diff options
author | Laura Abbott <labbott@fedoraproject.org> | 2016-10-17 11:25:22 -0700 |
---|---|---|
committer | Laura Abbott <labbott@fedoraproject.org> | 2016-10-17 11:55:37 -0700 |
commit | 1b957b6a4fb5a6bce3322a359d7cda0bbf3dfcee (patch) | |
tree | 11a1cc70b962811cf33b80fdc86c4d248c639932 /scripts | |
parent | 8bf2afaffdfb0ef2638c115b224b3d69f2bd9906 (diff) | |
download | kernel-1b957b6a4fb5a6bce3322a359d7cda0bbf3dfcee.tar.gz kernel-1b957b6a4fb5a6bce3322a359d7cda0bbf3dfcee.tar.xz kernel-1b957b6a4fb5a6bce3322a359d7cda0bbf3dfcee.zip |
Stable script updates
Reset the base release and use rpmdev-bumpspec for changelog entry
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/stable-update.sh | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/scripts/stable-update.sh b/scripts/stable-update.sh index 25f7f5ad6..eefd9a96d 100755 --- a/scripts/stable-update.sh +++ b/scripts/stable-update.sh @@ -59,16 +59,9 @@ awk -v STABLE=$SUBLEVEL '/%define stable_update/ \ < kernel.spec > kernel.spec.tmp mv kernel.spec.tmp kernel.spec -# Add the changelog entry. Ideally we would get rpmdev-bumpspec to do so -# but that also bumps the release which we don't want so do this manually -# for now +# Reset the base release for use with rpmdev-bumpspec +BASERELEASE=`cat kernel.spec | grep "%global baserelease" | cut -d ' ' -f 3 | head -c 1`00 +BASERELEASE=$(($BASERELEASE-1)) +BASERELEASE=$BASERELEASE perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'BASERELEASE'}|' kernel.spec -BASERELEASE=`cat kernel.spec | grep "%global baserelease" | cut -d ' ' -f 3` -CURDATE=`date +"%a %b %d %Y"` -PACKAGER=`rpmdev-packager` -CHANGELOG="%changelog\n* $CURDATE $PACKAGER - $1\n- Linux v$1\n" - -awk -v CHANGE="$CHANGELOG" '/%changelog/ {print CHANGE } \ - !/%changelog/ { print $0 }' \ - < kernel.spec > kernel.spec.tmp -mv kernel.spec.tmp kernel.spec +rpmdev-bumpspec -c "Linux v$1" kernel.spec |