Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2015-03-24 12:15:41 +0100
committerMichal Marek <mmarek@suse.cz>2015-03-24 12:16:10 +0100
commit1ff4e48dc0dcc80c9155832505dc62b76e2dfe05 (patch)
treedaae858a09c99580a0cb8823fdddd86533354700
parent391b8106b2303754c992ef5f0b6b82bde10cc568 (diff)
Add the git commit and branch to the package description
References: bnc#920633 Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--rpm/kgraft-patch.changes5
-rw-r--r--rpm/kgraft-patch.spec2
-rwxr-xr-xscripts/tar-up.sh10
3 files changed, 15 insertions, 2 deletions
diff --git a/rpm/kgraft-patch.changes b/rpm/kgraft-patch.changes
index 1723f33..c438ebe 100644
--- a/rpm/kgraft-patch.changes
+++ b/rpm/kgraft-patch.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Tue Mar 24 11:14:47 UTC 2015 - mmarek@suse.cz
+
+- Add the git commit and branch to the package description (bnc#920633)
+
+-------------------------------------------------------------------
Wed Nov 26 09:08:31 UTC 2014 - mbenes@suse.com
- Set .immediate flags for the initial patch
diff --git a/rpm/kgraft-patch.spec b/rpm/kgraft-patch.spec
index fbe471a..971ae5f 100644
--- a/rpm/kgraft-patch.spec
+++ b/rpm/kgraft-patch.spec
@@ -36,6 +36,8 @@ ExclusiveArch: s390x x86_64
%description
This is an initial kGraft patch.
+@@SOURCE_TIMESTAMP@@
+
%prep
%setup -c
cp %_sourcedir/kgr_patch_main.c .
diff --git a/scripts/tar-up.sh b/scripts/tar-up.sh
index 8ae0cb2..9a5bded 100755
--- a/scripts/tar-up.sh
+++ b/scripts/tar-up.sh
@@ -52,8 +52,6 @@ install -m 644 rpm/kgraft-patch.spec $build_dir/kgraft-patch-"$RELEASE".spec
install -m 644 rpm/kgraft-patch.changes $build_dir/kgraft-patch-"$RELEASE".changes
install -m 644 rpm/config.sh $build_dir/config.sh
-sed -i "s/@@RELEASE@@/$RELEASE/g" $build_dir/kgraft-patch-"$RELEASE".spec
-
tsfile=source-timestamp
ts=$(git show --pretty=format:%ct HEAD | head -n 1)
date "+%Y-%m-%d %H:%M:%S %z" -d "1970-01-01 00:00 UTC $ts seconds" >$build_dir/$tsfile
@@ -62,3 +60,11 @@ branch=$(sed -ne 's|^ref: refs/heads/||p' .git/HEAD 2>/dev/null)
if test -n "$branch"; then
echo "GIT Branch: $branch" >>$build_dir/$tsfile
fi
+
+sed -i \
+ -e "s/@@RELEASE@@/$RELEASE/g" \
+ -e "/@@SOURCE_TIMESTAMP@@/ {
+ e echo -n 'Source timestamp: '; cat $build_dir/$tsfile
+ d
+ }" \
+ $build_dir/kgraft-patch-"$RELEASE".spec