]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3078] set package version and type in configure.ac
authorWlodek Wencel <wlodek@isc.org>
Tue, 3 Oct 2023 16:34:33 +0000 (18:34 +0200)
committerWlodek Wencel <wlodek@isc.org>
Tue, 3 Oct 2023 16:34:33 +0000 (18:34 +0200)
configure.ac
hammer.py

index 215349b0dbf53835b68d6da396c11ff32b3880ea..346a36cf6124d5ef8b53c449905ea6bf166699d7 100644 (file)
@@ -43,8 +43,17 @@ AC_PROG_CXX
 AC_PROG_CXXCPP
 
 # Check for exact Kea version.
-AC_MSG_CHECKING(whether this is a tarball or git source)
-if test -d "${srcdir}/.git"; then
+AC_MSG_CHECKING(whether this is a tarball or git source or package preparation)
+# KEA_PKG_VERSION_IN_CONFIGURE and KEA_PKG_TYPE_IN_CONFIGURE names may be weird
+# considering those are placed inside configure script, but those are designed
+# to be set in package sources (APKBUILD, rules or kea.spec) kea-packaging repo
+# KEA_PKG_VERSION_IN_CONFIGURE will be date and timestamp of the package
+#                              e.g. "isc20230921141113"
+# KEA_PKG_TYPE_IN_CONFIGURE will be type of the package "rpm", "deb" or "apk"
+if test -n "$KEA_PKG_VERSION_IN_CONFIGURE"; then
+        KEA_SRCID="$KEA_PKG_VERSION_IN_CONFIGURE $KEA_PKG_TYPE_IN_CONFIGURE"
+        AC_MSG_RESULT("$KEA_PKG_TYPE_IN_CONFIGURE")
+elif test -d "${srcdir}/.git"; then
         KEA_SRCID="git `(cd "${top_srcdir}";git rev-parse HEAD)`"
         AC_MSG_RESULT("git")
 else
index dfb7659e05f95cb7bd663c80ad7d462718b8d599..affdfedd2a631f4374210a4c610a10da1e89c6bd 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -2415,6 +2415,7 @@ def _build_deb(system, revision, features, tarball_path, env, check_times, dry_r
     # update version, etc
     execute('sed -i -e s/{VERSION}/%s/ changelog' % pkg_version, cwd='kea-src/kea-%s/debian' % pkg_version, check_times=check_times, dry_run=dry_run)
     execute('sed -i -e s/{ISC_VERSION}/%s/ changelog' % pkg_isc_version, cwd='kea-src/kea-%s/debian' % pkg_version, check_times=check_times, dry_run=dry_run)
+    execute('sed -i -e s/{ISC_VERSION}/%s/ rules' % pkg_isc_version, cwd='kea-src/kea-%s/debian' % pkg_version, check_times=check_times, dry_run=dry_run)
     execute('sed -i -e s/{FREERADIUS_CLIENT_VERSION}/%s/g control' % frc_version, cwd='kea-src/kea-%s/debian' % pkg_version, check_times=check_times, dry_run=dry_run)
 
     services_list = ['isc-kea-dhcp4.isc-kea-dhcp4-server.service', 'isc-kea-dhcp6.isc-kea-dhcp6-server.service', 'isc-kea-dhcp-ddns.isc-kea-dhcp-ddns-server.service', 'isc-kea-ctrl-agent.service']