Stable script updates
Reset the base release and use rpmdev-bumpspec for changelog entry
This commit is contained in:
parent
8bf2afaffd
commit
1b957b6a4f
@ -59,16 +59,9 @@ awk -v STABLE=$SUBLEVEL '/%define stable_update/ \
|
|||||||
< kernel.spec > kernel.spec.tmp
|
< kernel.spec > kernel.spec.tmp
|
||||||
mv kernel.spec.tmp kernel.spec
|
mv kernel.spec.tmp kernel.spec
|
||||||
|
|
||||||
# Add the changelog entry. Ideally we would get rpmdev-bumpspec to do so
|
# Reset the base release for use with rpmdev-bumpspec
|
||||||
# but that also bumps the release which we don't want so do this manually
|
BASERELEASE=`cat kernel.spec | grep "%global baserelease" | cut -d ' ' -f 3 | head -c 1`00
|
||||||
# for now
|
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`
|
rpmdev-bumpspec -c "Linux v$1" kernel.spec
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user