mirror of
https://salsa.debian.org/ha-team/libqb
synced 2025-08-25 05:26:45 +00:00

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>
23 lines
976 B
Bash
Executable File
23 lines
976 B
Bash
Executable File
#!/bin/sh
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
version_files=".snapshot-version .tarball-version .version"
|
|
work_tree=0; test -n "$(cat $version_files 2>/dev/null|head -n1)" || work_tree=1
|
|
autoreconf_opts=${autoreconf_opts=-i -v}; test $# -eq 0 || autoreconf_opts=$*
|
|
# -f to always adapt to actual project's version dynamically @ dev's checkout
|
|
test $work_tree -eq 0 || autoreconf_opts="$autoreconf_opts -f"
|
|
|
|
autoreconf $autoreconf_opts || exit $?
|
|
if grep -Eq '\-yank' $version_files 2>/dev/null; then
|
|
echo ': CONSUME SNAPSHOTS ONLY AT YOUR RISK (genuine releases recommended!)'
|
|
printf ': snapshot version: '
|
|
elif test $work_tree -eq 0; then
|
|
echo ': About to consume a source distribution (genuine release advised)...'
|
|
printf ': tracked version: '
|
|
else
|
|
echo ': About to consume a checked out tree (dedicated for maintenance!)...'
|
|
fi
|
|
cat $version_files 2>/dev/null | head -n1; rm -f .snapshot-version
|
|
|
|
echo ': Now run ./configure && make'
|