summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rawhide-rc.sh40
-rwxr-xr-xscripts/stable-update.sh24
2 files changed, 45 insertions, 19 deletions
diff --git a/scripts/rawhide-rc.sh b/scripts/rawhide-rc.sh
index a4e15820a..c4e77ae42 100755
--- a/scripts/rawhide-rc.sh
+++ b/scripts/rawhide-rc.sh
@@ -1,19 +1,27 @@
#!/bin/sh
# Generate a commit for a rawhide RC release
+# update orgin
+~/usr/bin/vanilla-kernel-helper.sh masterupdate
+currentbranch=$(git symbolic-ref --short HEAD)
+if [[ "${currentbranch%-user-thl-vanilla-fedora}" == "rawhide" ]]; then
+ currentbranch="master"
+fi
+git merge --no-edit origin/${currentbranch%-user-thl-vanilla-fedora} || exit 1
+
source scripts/kernel-version.sh
-klist -s
-if [ ! $? -eq 0 ]; then
- echo "klist couldn't read the credential cache."
- echo "Do you need to fix your kerberos tokens?"
- exit 1
-fi
+#klist -s
+#if [ ! $? -eq 0 ]; then
+# echo "klist couldn't read the credential cache."
+# echo "Do you need to fix your kerberos tokens?"
+# exit 1
+#fi
-make release
+# make release
# fixup the release because rpmdev-bumpspec *sigh*
-scripts/fixup-bumpspec.sh
-fedpkg commit -c
+# scripts/fixup-bumpspec.sh
+# fedpkg commit -c
# Figure out what is our RC
RC=`grep "%global rcrev" kernel.spec| cut -d ' ' -f 3`
@@ -35,7 +43,10 @@ if [ ! -f patch-$MAJORVER.$BASE-rc$RC.xz ]; then
exit 1
fi
xz -9 patch-$MAJORVER.$BASE-rc$RC
- fedpkg upload patch-$MAJORVER.$BASE-rc$RC.xz
+ #fedpkg upload patch-$MAJORVER.$BASE-rc$RC.xz
+
+ checksum=$(sha512sum patch-$MAJORVER.$BASE-rc$RC.xz)
+ echo "SHA512 (patch-$MAJORVER.$BASE-rc$RC.xz) = ${checksum:0:128}" >> sources
fi
# bump rcrev in the spec and set git snapshot to 0
@@ -43,8 +54,11 @@ RC=$RC perl -p -i -e 's|%global rcrev.*|%global rcrev $ENV{'RC'}|' kernel.spec
perl -p -i -e 's|%define gitrev.*|%define gitrev 0|' kernel.spec
-perl -p -i -e 's|%global baserelease.*|%global baserelease 0|' kernel.spec
+perl -p -i -e 's|%global baserelease.*|%global baserelease 1|' kernel.spec
-rpmdev-bumpspec -c "Linux v$MAJORVER.$BASE-rc$RC" kernel.spec
+# rpmdev-bumpspec -c "Linux v$MAJORVER.$BASE-rc$RC" kernel.spec
+# echo "Don't forget to bump kernel-tools"
-echo "Don't forget to bump kernel-tools"
+git diff kernel.spec sources
+sleep 1 || exit 1
+git commit -m "Linux v$MAJORVER.$BASE-rc$RC" kernel.spec sources
diff --git a/scripts/stable-update.sh b/scripts/stable-update.sh
index 259a338c1..6169d3e86 100755
--- a/scripts/stable-update.sh
+++ b/scripts/stable-update.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-#
# Author: Laura Abbott <labbott@fedoraproject.org>
#
# Apply a stable patch update to the Fedora tree. This takes care of
@@ -13,6 +12,11 @@
#
# Args: Stable version to update (e.g. 4.7.7, 4.8.1)
+# update orgin
+vanilla-kernel-helper.sh masterupdate
+currentbranch=$(git symbolic-ref --short HEAD)
+git merge --no-edit origin/${currentbranch%-user-thl-vanilla-fedora} || exit 1
+
if [ $# -lt 1 ]; then
echo "Need a version"
exit 1
@@ -61,12 +65,15 @@ fi
grep $1 sources &> /dev/null
if [ ! $? -eq 0 ]; then
- fedpkg upload patch-$1.xz
+ # thl is not an allowed uploader, skip this
+ # fedpkg upload patch-$1.xz
+ checksum=$(sha512sum patch-$1.xz)
+ echo "SHA512 (patch-$1.xz) = ${checksum:0:128}" >> sources
# Cryptic awk: search for the previous patch level (if one exists) and
# remove it from the source file
awk -v VER=$VERSION.$PATCHLEVEL.$((SUBLEVEL-1)) '$0 !~ VER { print $0; }' < sources > sources.tmp
- mv sources.tmp sources
+ mv sources.tmp sources
fi
# Update the stable level
@@ -77,8 +84,13 @@ awk -v STABLE=$SUBLEVEL '/%define stable_update/ \
mv kernel.spec.tmp kernel.spec
# 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=`cat kernel.spec | grep "%global baserelease" | cut -d ' ' -f 3 | head -c 1`50
+#BASERELEASE=$(($BASERELEASE-1))
BASERELEASE=$BASERELEASE perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'BASERELEASE'}|' kernel.spec
-rpmdev-bumpspec -c "Linux v$1" kernel.spec
+# do not generate changelog: avoids merge conflicts that are not worth the trouble
+# rpmdev-bumpspec -c "Linux v$1" kernel.spec
+
+git diff kernel.spec sources
+sleep 1 || exit 1
+git commit -m "Linux v$1" kernel.spec sources