From 5fc60a990b7c13ee4a1923df7e9ed14119402634 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 24 Jan 2012 22:45:59 +0100 Subject: [PATCH] ksync: also get kernel changeset When syncing the parser+frontends, also grab the kernel changeset we are syncing from, for later forensics, if needed. Signed-off-by: "Yann E. MORIN" --- .version | 1 + configure.ac | 5 ++++- ksync.sh | 33 +++++++++++++++++++++++---------- scripts/version.sh | 20 ++++++++++++++++++++ 4 files changed, 48 insertions(+), 11 deletions(-) create mode 100755 scripts/version.sh diff --git a/.version b/.version index cbb0de2..9d268f9 100644 --- a/.version +++ b/.version @@ -1 +1,2 @@ +3.3.0-rc1 4a7cbb56fdbd92a47f57ca8b25bf5db35f0d6518 Saber-toothed Squirrel hg diff --git a/configure.ac b/configure.ac index 837999d..9cedf96 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,10 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.67]) -AC_INIT([kconfig-frontends], [m4_esyscmd_s([cat .version])], [nobody@nowhere.org]) +AC_INIT( + [kconfig-frontends], + [m4_esyscmd_s([./scripts/version.sh])], + [nobody@nowhere.org]) AC_CONFIG_SRCDIR([frontends/conf/conf.c]) # Use a config.h to avoid brazilions -DHAVE_FOO on compile lines AC_CONFIG_HEADERS([config.h]) diff --git a/ksync.sh b/ksync.sh index c8a2dc1..9be213d 100755 --- a/ksync.sh +++ b/ksync.sh @@ -5,15 +5,7 @@ my_name="${0##*/}" # If an argument is given, it's the location # of the Linux kernel source tree k_dir="${1}" -if [ -n "${k_dir}" -a -d "${k_dir}/kernel" ]; then - # Get the version - eval $( head -n 5 "${k_dir}/Makefile" \ - |sed -r -e 's/^/K_/; s/"//g; s/ = ?/="/; s/$/"/;' \ - ) - printf "Found Linux kernel %d.%d.%d%s '%s'\n" \ - "${K_VERSION}" "${K_PATCHLEVEL}" "${K_SUBLEVEL}" \ - "${K_EXTRAVERSION}" "${K_NAME}" -else +if [ ! \( -n "${k_dir}" -a -d "${k_dir}/kernel" \) ]; then if [ -n "${k_dir}" ]; then printf "%s: \`%s': not a Linux kernel source tree\n" \ "${my_name}" "${k_dir}" @@ -23,8 +15,29 @@ else exit 1 fi -exec .version + +exec