Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow for being consumed in a (discouraged) form of snapshots #321

Merged
merged 1 commit into from
Sep 18, 2018

Conversation

jnpkrn
Copy link
Contributor

@jnpkrn jnpkrn commented Sep 4, 2018

This is meant as a lean, customized policy driven alternative
to the original proposal by Jan Friesse jfriesse@redhat.com that
balances the inherent trade-off in the opposite direction, so that the
configure.ac script is practically untouched and more weight and policy
is hardcoded in git-version-gen. Problem with that approach stems from
(avoidable) effective fork of the respective gnulib's module and imposed
maintenance burden.

Speaking for libqb in particular, we should nonetheless make it
absolutely clear such in-development snapshots are nothing more,
nothing binding (not to think of viral injection of these bits
into circle of dependent packages upon their rebuilds), since the
changes accumulated since the last official release should only be
assumed firmly committed at the point the new release is cut (may
happen 99% of time with snapshots but no accountability from our
side for the complementary inter-release twists...), which is exactly
when many possibly unanticipated variables like correct SONAME
versions get to reflect what's appropriate.
Also, OpenPGP signature constitutes something more eligible for
one's trust than (provably) bit/content unstable archives without
the possibility of an independent authenticity/integrity verification.

Therefore, the only thinkable and upstream-approved use cases
for such snapshots are development-only purposes (CI et al.)!

Signed-off-by: Jan Pokorný jpokorny@redhat.com

@chrissie-c
Copy link
Contributor

The travis CI build failure looks odd for this. is it related or is it just Travis being weird (again)?

@jnpkrn
Copy link
Contributor Author

jnpkrn commented Sep 7, 2018

Looks like unanticipated, activistic "seriously? you might cause something!",
rather unwanted "thoughtfulness". Let me try something with umask or chmod.

@jnpkrn
Copy link
Contributor Author

jnpkrn commented Sep 7, 2018

Of course, it was a matter of make distcheck that copies sources
into a separate directory marking them read-only (so as to catch the
case that the build recipes attempt to modify source files in their
source location as opposed producing the modified copy into the
build one, which is an error), and consequently, such untouched
sources to be distributed are copied to distribution directory
(non-writability being retained), but there, it's legal to modify
files from dist-hook, but as documented, one should rather mark
them writable again first (and mv is actually reasonably safe
in a way it asks for confirmation when read-only file is to be
replaced, which is exactly what made the CI timeout elapse).

Now the file gets marked as writable prior to being replaced
(as opposed to mv -f since we'd like to know about any other
possible issues).

Also, noticed that autoreconf needs to be invoked with -f when
the VERSION in generated configure script needs to be reflected
truthfully (another precondition is that no .*version files are
present, i.e., at least make maintainer-clean, if not distclean,
shall be called in advance, but that shall be clear already).
Hence extended autogen.sh to that effect.

@jnpkrn jnpkrn force-pushed the consume-as-snapshots branch 5 times, most recently from 43a4931 to 3fa480b Compare September 7, 2018 20:25
@jfriesse
Copy link
Member

Just a few (biased) comments:

  • If you try diff gnulib and libqb version of git-version-gen you will find that they already differs. So technically speaking, you are already maintain a fork
  • Use git archive stored version tag #320 is based on assumption, that non version tagged archives should not be built at all. This PR is based on idea to "care to bump "X.Y.Z-yank" template below upon each release very desirable". Isn't that going against main idea of git-version-gen?
  • Eventho I must say I quite like this alternative aproach, it is showing it's weakness because configure.ac has to be modified to pristine version during dist-hook.
  • As long as I didn't overlooked something, make rpm will not work and alternative to 0b07907 should be ported.

@chrissie-c
Copy link
Contributor

I'm generally in favour of this approach. The language in the messages needs updating to be a little less ... archaic though.

@jnpkrn jnpkrn force-pushed the consume-as-snapshots branch from 3fa480b to a30b710 Compare September 11, 2018 09:08
@jnpkrn
Copy link
Contributor Author

jnpkrn commented Sep 11, 2018 via email

@jnpkrn
Copy link
Contributor Author

jnpkrn commented Sep 11, 2018 via email

@jfriesse
Copy link
Member

@jnpkrn I don't understand why are you still talking something about CI. The reason for implementing that feature was (at least for corosync) to mitigate problems with github release page, where people tends to use "Source code" link (probably not that much problem for libqb, but quite a big for projects which doesn't use release page at all (corosync/kronosnet)). If it also helps CI, good, but it's (at least for me) just nice side effect.

@jnpkrn
Copy link
Contributor Author

jnpkrn commented Sep 11, 2018 via email

@jnpkrn jnpkrn force-pushed the consume-as-snapshots branch 5 times, most recently from 812ec96 to d3f72d6 Compare September 13, 2018 08:06
This is meant as a lean, customized policy driven alternative
to the original proposal by Jan Friesse <jfriesse@redhat.com> that
balances the inherent trade-off in the opposite direction, so that the
configure.ac script is practically untouched and more weight and policy
is hardcoded in git-version-gen.  Problem with that approach stems from
(avoidable) effective fork of the respective gnulib's module and imposed
maintenance burden.

Speaking for libqb in particular, we should nonetheless make it
absolutely clear such in-development snapshots are nothing more,
nothing binding (not to think of viral injection of these bits
into circle of dependent packages upon their rebuilds), since the
changes accumulated since the last official release should only be
assumed firmly committed at the point the new release is cut (may
happen 99% of time with snapshots but no accountability from our
side for the complementary inter-release twists...), which is exactly
when many possibly unanticipated variables like correct SONAME
versions get to reflect what's appropriate.
Also, OpenPGP signature constitutes something more eligible for
one's trust than (provably) bit/content unstable archives without
the possibility of an independent authenticity/integrity verification.

  Therefore, the only thinkable and upstream-endorsed use cases
  for such snapshots are development-only purposes (CI et al.)!

V2 of the patch:
Thanks to feedback from Jan Friesse, a glitch in "make rpm" et al.
not working with the snapshots was pointed out.

V3:
Only normalize configure.ac back when known to be previously affected
with "git archive" substitution logic, and do not use an exclamation
mark as short commit - decoration separator since that could be
ambiguous (it is a valid branch name character), stick with double
question marks instead (not allowed, doubled for good measure).

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
@jnpkrn jnpkrn force-pushed the consume-as-snapshots branch from d3f72d6 to d6875f2 Compare September 13, 2018 08:54
@jnpkrn jnpkrn merged commit d6875f2 into ClusterLabs:master Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants