Commit bcf966e6 authored by Evan Hunt's avatar Evan Hunt
Browse files

[rt31494] add gitID to kit.sh generated tarballs

parent 965371b8
......@@ -21,6 +21,8 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_SRCID@
@BIND9_CONFIGARGS@
@BIND9_MAKE_INCLUDES@
......@@ -114,6 +116,7 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
main.@O@: main.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DSRCID=\"${SRCID}\" \
-DCONFIGARGS="\"${CONFIGARGS}\"" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
......@@ -124,6 +127,7 @@ bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/bindkeys.pl
config.@O@: config.c bind.keys.h
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DSRCID=\"${SRCID}\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-DNS_SYSCONFDIR=\"${sysconfdir}\" \
-c ${srcdir}/config.c
......
......@@ -67,6 +67,7 @@ EXTERN isc_timermgr_t * ns_g_timermgr INIT(NULL);
EXTERN isc_socketmgr_t * ns_g_socketmgr INIT(NULL);
EXTERN cfg_parser_t * ns_g_parser INIT(NULL);
EXTERN const char * ns_g_version INIT(VERSION);
EXTERN const char * ns_g_srcid INIT(SRCID);
EXTERN const char * ns_g_configargs INIT(CONFIGARGS);
EXTERN in_port_t ns_g_port INIT(0);
EXTERN in_port_t lwresd_g_listenport INIT(0);
......
......@@ -551,8 +551,8 @@ parse_command_line(int argc, char *argv[]) {
printf("BIND %s\n", ns_g_version);
exit(0);
case 'V':
printf("BIND %s built with %s\n", ns_g_version,
ns_g_configargs);
printf("BIND %s <id:%s> built with %s\n",
ns_g_version, ns_g_srcid, ns_g_configargs);
#ifdef OPENSSL
printf("using OpenSSL version: %s\n",
OPENSSL_VERSION_TEXT);
......@@ -1056,9 +1056,9 @@ main(int argc, char *argv[]) {
*/
strlcat(version,
#if defined(NO_VERSION_DATE) || !defined(__DATE__)
"named version: BIND " VERSION,
"named version: BIND " VERSION " <" SRCID ">",
#else
"named version: BIND " VERSION " (" __DATE__ ")",
"named version: BIND " VERSION " <" SRCID "> (" __DATE__ ")",
#endif
sizeof(version));
result = isc_file_progname(*argv, program_name, sizeof(program_name));
......
......@@ -3288,6 +3288,13 @@ AC_SUBST(BIND9_VERSION)
BIND9_MAJOR="MAJOR=${MAJORVER}.${MINORVER}"
AC_SUBST(BIND9_MAJOR)
BIND9_SRCID="SRCID=unset"
if test -f $srcdir/srcid; then
. $srcdir/srcid
BIND9_SRCID="SRCID=$SRCID"
fi
AC_SUBST(BIND9_SRCID)
if test -z "$ac_configure_args"; then
BIND9_CONFIGARGS="defaults"
else
......
......@@ -122,6 +122,7 @@ test ! -d $topdir || {
mkdir $topdir || exit 1
git archive --format=tar $remote $tag | ( cd $topdir; tar xf -)
shorthash=`git ls-remote $remote $tag | cut -c1-8`
cd $topdir || exit 1
......@@ -156,6 +157,9 @@ find util -depth -type d -print | xargs rmdir 2>/dev/null
# Remove all .gitignore files
find . -name .gitignore -print | xargs rm
# populate srcid file
echo "SRCID=$shorthash" > srcid
# The following files should be executable.
chmod +x configure install-sh mkinstalldirs bin/tests/system/ifconfig.sh
# Fix up releases with libbind.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment