diff options
author | Werner Koch <[email protected]> | 2025-02-18 11:34:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-02-18 11:34:46 +0000 |
commit | 27b58fd6674c58405a3acc162b21a03931227174 (patch) | |
tree | 5804832d14e5ea844ed62b7141cfa3b84da89b04 | |
parent | w32: Enable "w32_error" for assuan_sock_get_flag. (diff) | |
download | libassuan-27b58fd6674c58405a3acc162b21a03931227174.tar.gz libassuan-27b58fd6674c58405a3acc162b21a03931227174.zip |
Put full commit id into VERSION.
* autogen.sh: Update from current libgpg-error.
* configure.ac: Append commit id to the VERSION file.
(BUILD_REVISION): New ac_define.
* src/sysutils.c (_assuan_sysutils_blurb): Replace revision by full
commit id.
-rw-r--r-- | AUTHORS | 16 | ||||
-rw-r--r-- | README | 2 | ||||
-rwxr-xr-x | autogen.sh | 95 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | src/sysutils.c | 4 | ||||
-rw-r--r-- | src/versioninfo.rc.in | 2 |
6 files changed, 73 insertions, 51 deletions
@@ -55,19 +55,5 @@ List of Copyright holders Copyright (C) 1992-2013 Free Software Foundation, Inc. Copyright (C) 1994 X Consortium Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001-2021,2023-2024 g10 Code GmbH + Copyright (C) 2001-2021,2023-2025 g10 Code GmbH Copyright (C) 2004 Simon Josefsson - - -========== - - Copyright 2003-2013 Free Software Foundation, Inc. - Copyright (C) 2013-2016 g10 Code GmbH - - This file is free software; as a special exception the author gives - unlimited permission to copy and/or distribute it, with or without - modifications, as long as this notice is preserved. - - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY, to the extent permitted by law; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -2,7 +2,7 @@ =========== Copyright (C) 2001-2013 Free Software Foundation, Inc. - Copyright (C) 2001-2021,2023-2024 g10 Code GmbH + Copyright (C) 2001-2021,2023-2025 g10 Code GmbH This is a general purpose IPC library which is for example used @@ -1,6 +1,6 @@ #! /bin/sh # autogen.sh -# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH +# Copyright (C) 2003, 2014, 2017, 2018, 2022 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -15,7 +15,7 @@ # configure it for the respective package. It is maintained as part of # GnuPG and source copied by other packages. # -# Version: 2018-07-10 +# Version: 2024-12-03 configure_ac="configure.ac" @@ -72,6 +72,7 @@ FORCE= SILENT= PRINT_HOST=no PRINT_BUILD=no +PRINT_TSDIR=no tmp=$(dirname "$0") tsdir=$(cd "${tmp}"; pwd) @@ -84,9 +85,10 @@ if test x"$1" = x"--help"; then echo " --silent Silent operation" echo " --force Pass --force to autoconf" echo " --find-version Helper for configure.ac" - echo " --git-build Run all commands to build from a Git" + echo " --git-build Run all commands to build from a Git" echo " --print-host Print only the host triplet" echo " --print-build Print only the build platform triplet" + echo " --print-tsdir Print only the dir of this script" echo " --build-TYPE Configure to cross build for TYPE" echo "" echo " ARGS are passed to configure in --build-TYPE mode." @@ -135,18 +137,17 @@ die_p configure_opts= extraoptions= # List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc +maintainer_mode_option= w32_toolprefixes= w32_extraoptions= -w32ce_toolprefixes= -w32ce_extraoptions= w64_toolprefixes= w64_extraoptions= amd64_toolprefixes= +disable_gettext_checks= # End list of optional variables sourced from ~/.gnupg-autogen.rc # What follows are variables which are sourced but default to # environment variables or lacking them hardcoded values. #w32root= -#w32ce_root= #w64root= #amd64root= @@ -159,6 +160,11 @@ case "$1" in SILENT=" --silent" shift ;; + --print-tsdir) + myhost="print-tsdir" + SILENT=" --silent" + shift + ;; --git-build) myhost="git-build" shift @@ -167,11 +173,6 @@ case "$1" in myhost="w32" shift ;; - --build-w32ce) - myhost="w32" - myhostsub="ce" - shift - ;; --build-w64) myhost="w32" myhostsub="64" @@ -203,7 +204,7 @@ if [ "$myhost" = "git-build" ]; then die_p make || fatal "error running make" die_p - make check || fatal "error running male check" + make check || fatal "error running make check" die_p exit 0 fi @@ -221,6 +222,12 @@ if [ -f "$HOME/.gnupg-autogen.rc" ]; then . "$HOME/.gnupg-autogen.rc" fi +# Disable the --enable-maintainer_mode option. +if [ "${maintainer_mode_option}" = off ]; then + maintainer_mode_option= +elif [ -z "${maintainer_mode_option}" ]; then + maintainer_mode_option=--enable-maintainer-mode +fi # **** FIND VERSION **** # This is a helper for the configure.ac M4 magic @@ -241,10 +248,12 @@ if [ "$myhost" = "find-version" ]; then if [ -z "$micro" ]; then matchstr1="$package-$major.[0-9]*" matchstr2="$package-$major-base" + matchstr3="" vers="$major.$minor" else matchstr1="$package-$major.$minor.[0-9]*" - matchstr2="$package-$major.$minor-base" + matchstr2="$package-$major.[0-9]*-base" + matchstr3="$package-$major-base" vers="$major.$minor.$micro" fi @@ -252,30 +261,49 @@ if [ "$myhost" = "find-version" ]; then if [ -e .git ]; then ingit=yes tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null) - tmp=$(echo "$tmp" | sed s/^"$package"//) if [ -n "$tmp" ]; then - tmp=$(echo "$tmp" | sed s/^"$package"// \ - | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}') + tmp=$(echo "$tmp" | sed s/^"$package"// \ + | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}') else - tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \ - | awk -F- '$4!=0{print"-beta"$4}') + # (due tof "-base" in the tag we need to take the 4th field) + tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null) + if [ -n "$tmp" ]; then + tmp=$(echo "$tmp" | sed s/^"$package"// \ + | awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}') + elif [ -n "${matchstr3}" ]; then + tmp=$(git describe --match "${matchstr3}" --long 2>/dev/null) + if [ -n "$tmp" ]; then + tmp=$(echo "$tmp" | sed s/^"$package"// \ + | awk -F- '$4!=0 && $4 !~ /^beta/ {print"-beta"$4}') + fi + fi fi [ -n "$tmp" ] && beta=yes + cid=$(git rev-parse --verify 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))) else ingit=no beta=yes tmp="-unknown" + cid="0000000" rev="0000000" rvd="0" 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 fi # **** end FIND VERSION **** +# **** PRINT TSDIR VERSION **** +# This is a helper used by some configure.ac M4 magic +if [ "$myhost" = "print-tsdir" ]; then + echo "$tsdir" + exit 0 +fi +# **** end PRINT TSDIR **** + if [ ! -f "$tsdir/build-aux/config.guess" ]; then fatal "$tsdir/build-aux/config.guess not found" @@ -294,12 +322,6 @@ fi # ****************** if [ "$myhost" = "w32" ]; then case $myhostsub in - ce) - w32root="$w32ce_root" - [ -z "$w32root" ] && w32root="$HOME/w32ce_root" - toolprefixes="$w32ce_toolprefixes arm-mingw32ce" - extraoptions="$extraoptions $w32ce_extraoptions" - ;; 64) w32root="$w64root" [ -z "$w32root" ] && w32root="$HOME/w64root" @@ -313,6 +335,7 @@ if [ "$myhost" = "w32" ]; then extraoptions="$extraoptions $w32_extraoptions" ;; esac + w32root=$(echo "$w32root" | sed s,^//,/,) info "Using $w32root as standard install directory" replace_sysroot @@ -345,7 +368,7 @@ if [ "$myhost" = "w32" ]; then fi fi - $tsdir/configure --enable-maintainer-mode ${SILENT} \ + $tsdir/configure "${maintainer_mode_option}" ${SILENT} \ --prefix=${w32root} \ --host=${host} --build=${build} SYSROOT=${w32root} \ PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \ @@ -390,7 +413,7 @@ if [ "$myhost" = "amd64" ]; then fi fi - $tsdir/configure --enable-maintainer-mode ${SILENT} \ + $tsdir/configure "${maintainer_mode_option}" ${SILENT} \ --prefix=${amd64root} \ --host=${host} --build=${build} \ ${configure_opts} ${extraoptions} "$@" @@ -413,17 +436,16 @@ q }' ${configure_ac}` automake_vers_num=`echo "$automake_vers" | cvtver` +gettext_vers="n/a" if [ -d "${tsdir}/po" ]; then gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { s/^.*\[\(.*\)])/\1/p q }' ${configure_ac}` gettext_vers_num=`echo "$gettext_vers" | cvtver` -else - gettext_vers="n/a" fi -if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ] +if [ -z "$autoconf_vers" -o -z "$automake_vers" ] then echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2 exit 1 @@ -501,12 +523,21 @@ fi if [ -n "${ACLOCAL_FLAGS}" ]; then aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}" 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} ..." $ACLOCAL ${aclocal_flags} info "Running autoheader..." $AUTOHEADER -info "Running automake --gnu ..." -$AUTOMAKE --gnu; +info "Running $AUTOMAKE ${automake_flags} ..." +$AUTOMAKE ${automake_flags}; info "Running autoconf${FORCE} ..." $AUTOCONF${FORCE} diff --git a/configure.ac b/configure.ac index 5dc2dc3..6ede460 100644 --- a/configure.ac +++ b/configure.ac @@ -51,7 +51,9 @@ m4_define([mym4_isbeta], m4_argn(2, mym4_verslist)) m4_define([mym4_version], m4_argn(4, mym4_verslist)) m4_define([mym4_revision], m4_argn(7, 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_commitid[>>VERSION]) AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org]) @@ -292,6 +294,9 @@ BUILD_REVISION="mym4_revision" AC_SUBST(BUILD_REVISION) AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION", [GIT commit id revision used to build this package]) +BUILD_COMMITID="mym4_commitid" +AC_DEFINE_UNQUOTED(BUILD_COMMITID, "$BUILD_COMMITID", + [Git commit id used to build this package]) changequote(,)dnl BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` diff --git a/src/sysutils.c b/src/sysutils.c index 4383888..657b527 100644 --- a/src/sysutils.c +++ b/src/sysutils.c @@ -44,10 +44,10 @@ _assuan_sysutils_blurb (void) "\n\n" "This is Libassuan " PACKAGE_VERSION " - The GnuPG IPC Library\n" "Copyright 2001-2013 Free Software Foundation, Inc.\n" - "Copyright 2001-2021,2023-2024 g10 Code GmbH\n" + "Copyright 2001-2021,2023-2025 g10 Code GmbH\n" "\n" "SPDX-License-Identifier: LGPL-2.1-or-later\n" - "(" BUILD_REVISION " " BUILD_TIMESTAMP ")\n" + "(" BUILD_COMMITID " " BUILD_TIMESTAMP ")\n" "\n\n"; return blurb; } diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in index 1e96245..8aa3bbe 100644 --- a/src/versioninfo.rc.in +++ b/src/versioninfo.rc.in @@ -40,7 +40,7 @@ BEGIN VALUE "FileDescription", "Assuan - GnuPG IPC\0" VALUE "FileVersion", "@LIBASSUAN_LT_CURRENT@.@LIBASSUAN_LT_AGE@.@LIBASSUAN_LT_REVISION@.@BUILD_REVISION@\0" VALUE "InternalName", "libassuan\0" - VALUE "LegalCopyright", "Copyright � 2001-2021 g10 Code GmbH\0" + VALUE "LegalCopyright", "Copyright � 2001-2021,2023-2025 g10 Code GmbH\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "libassuan.dll\0" VALUE "PrivateBuild", "\0" |