Include the full commit id.

* autogen.sh: Update to version 2024-07-04 from libgpg-error.
* configure.ac (BUILD_COMMITID): New.  Append to VERSION file.
* src/version.c (cright_blurb): Use BUILD_COMMITID here.
This commit is contained in:
Werner Koch 2024-11-05 14:19:17 +01:00
parent a304ec0ede
commit 0ad30e670a
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
3 changed files with 25 additions and 9 deletions

View File

@ -15,7 +15,7 @@
# configure it for the respective package. It is maintained as part of # configure it for the respective package. It is maintained as part of
# GnuPG and source copied by other packages. # GnuPG and source copied by other packages.
# #
# Version: 2023-03-15 # Version: 2024-07-04
configure_ac="configure.ac" configure_ac="configure.ac"
@ -140,6 +140,7 @@ w32_extraoptions=
w64_toolprefixes= w64_toolprefixes=
w64_extraoptions= w64_extraoptions=
amd64_toolprefixes= amd64_toolprefixes=
disable_gettext_checks=
# End list of optional variables sourced from ~/.gnupg-autogen.rc # End list of optional variables sourced from ~/.gnupg-autogen.rc
# What follows are variables which are sourced but default to # What follows are variables which are sourced but default to
# environment variables or lacking them hardcoded values. # environment variables or lacking them hardcoded values.
@ -264,17 +265,19 @@ if [ "$myhost" = "find-version" ]; then
fi fi
fi fi
[ -n "$tmp" ] && beta=yes [ -n "$tmp" ] && beta=yes
cid=$(git rev-parse --verify HEAD | tr -d '\n\r')
rev=$(git rev-parse --short HEAD | tr -d '\n\r') rev=$(git rev-parse --short HEAD | tr -d '\n\r')
rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null))) rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
else else
ingit=no ingit=no
beta=yes beta=yes
tmp="-unknown" tmp="-unknown"
cid="0000000"
rev="0000000" rev="0000000"
rvd="0" rvd="0"
fi fi
echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:" echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:$cid:"
exit 0 exit 0
fi fi
# **** end FIND VERSION **** # **** end FIND VERSION ****
@ -410,17 +413,16 @@ q
}' ${configure_ac}` }' ${configure_ac}`
automake_vers_num=`echo "$automake_vers" | cvtver` automake_vers_num=`echo "$automake_vers" | cvtver`
gettext_vers="n/a"
if [ -d "${tsdir}/po" ]; then if [ -d "${tsdir}/po" ]; then
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
s/^.*\[\(.*\)])/\1/p s/^.*\[\(.*\)])/\1/p
q q
}' ${configure_ac}` }' ${configure_ac}`
gettext_vers_num=`echo "$gettext_vers" | cvtver` gettext_vers_num=`echo "$gettext_vers" | cvtver`
else
gettext_vers="n/a"
fi fi
if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ] if [ -z "$autoconf_vers" -o -z "$automake_vers" ]
then then
echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2 echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2
exit 1 exit 1
@ -498,12 +500,21 @@ fi
if [ -n "${ACLOCAL_FLAGS}" ]; then if [ -n "${ACLOCAL_FLAGS}" ]; then
aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}" aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}"
fi fi
automake_flags="--gnu"
if [ -n "${extra_automake_flags}" ]; then
automake_flags="${automake_flags} ${extra_automake_flags}"
fi
if [ -n "${AUTOMAKE_FLAGS}" ]; then
automake_flags="${automake_flags} ${AUTOMAKE_FLAGS}"
fi
info "Running $ACLOCAL ${aclocal_flags} ..." info "Running $ACLOCAL ${aclocal_flags} ..."
$ACLOCAL ${aclocal_flags} $ACLOCAL ${aclocal_flags}
info "Running autoheader..." info "Running autoheader..."
$AUTOHEADER $AUTOHEADER
info "Running automake --gnu ..." info "Running $AUTOMAKE ${automake_flags} ..."
$AUTOMAKE --gnu; $AUTOMAKE ${automake_flags};
info "Running autoconf${FORCE} ..." info "Running autoconf${FORCE} ..."
$AUTOCONF${FORCE} $AUTOCONF${FORCE}

View File

@ -44,7 +44,9 @@ m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
m4_define([mym4_version], m4_argn(4, mym4_verslist)) m4_define([mym4_version], m4_argn(4, mym4_verslist))
m4_define([mym4_revision], m4_argn(7, mym4_verslist)) m4_define([mym4_revision], m4_argn(7, mym4_verslist))
m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist)) m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
m4_define([mym4_commitid], m4_argn(9, mym4_verslist))
m4_esyscmd([echo ]mym4_version[>VERSION]) m4_esyscmd([echo ]mym4_version[>VERSION])
m4_esyscmd([echo ]mym4_commitid[>>VERSION])
AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org]) AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
# LT Version numbers, remember to change them just *before* a release. # LT Version numbers, remember to change them just *before* a release.
@ -669,9 +671,12 @@ AC_SUBST(ENABLED_LANGUAGES, $enabled_languages)
# Provide information about the build. # Provide information about the build.
# #
BUILD_REVISION="mym4_revision" BUILD_REVISION="mym4_revision"
BUILD_COMMITID="mym4_commitid"
AC_SUBST(BUILD_REVISION) AC_SUBST(BUILD_REVISION)
AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION", AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
[GIT commit id revision used to build this package]) [GIT short commit id used to build this package])
AC_DEFINE_UNQUOTED(BUILD_COMMITID, "$BUILD_COMMITID",
[Git commit id used to build this package])
changequote(,)dnl changequote(,)dnl
BUILD_VERSION=`echo "$PACKAGE_VERSION" | sed 's/\([0-9.]*\).*/\1./'` BUILD_VERSION=`echo "$PACKAGE_VERSION" | sed 's/\([0-9.]*\).*/\1./'`

View File

@ -98,7 +98,7 @@ cright_blurb (void)
"This is GPGME " PACKAGE_VERSION " - The GnuPG Made Easy library\n" "This is GPGME " PACKAGE_VERSION " - The GnuPG Made Easy library\n"
CRIGHTBLURB CRIGHTBLURB
"\n" "\n"
"(" BUILD_REVISION " " BUILD_TIMESTAMP ")\n" "(" BUILD_COMMITID " " BUILD_TIMESTAMP ")\n"
"\n\n"; "\n\n";
return blurb; return blurb;
} }