diff options
-rw-r--r-- | kernel.spec | 34 | ||||
-rwxr-xr-x | scripts/rawhide-rc.sh | 40 | ||||
-rwxr-xr-x | scripts/stable-update.sh | 24 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 73 insertions, 26 deletions
diff --git a/kernel.spec b/kernel.spec index 1ece43077..b0e1f4cec 100644 --- a/kernel.spec +++ b/kernel.spec @@ -57,6 +57,8 @@ Summary: The Linux kernel %endif # define buildid .local +%define packager Thorsten Leemhuis https://fedoraproject.org/wiki/Kernel_Vanilla_Repositories +%define buildid .vanilla.knurd.1 %if 0%{?fedora} %define primary_target fedora @@ -93,10 +95,16 @@ Summary: The Linux kernel # Do we have a -stable update to apply? %define stable_update 0 +# Is it a -stable RC? +%define stable_rc 0 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} %define stable_base %{stable_update} +%if 0%{?stable_rc} +# stable RCs are incremental patches, so we need the previous stable patch +%define stable_base %(echo $((%{stable_update} - 1))) +%endif %endif %define rpmversion 5.%{base_sublevel}.%{stable_update} @@ -127,7 +135,7 @@ Summary: The Linux kernel # kernel PAE (only valid for ARM (lpae)) %define with_pae %{?_without_pae: 0} %{?!_without_pae: 1} # kernel-debug -%define with_debug %{?_without_debug: 0} %{?!_without_debug: 1} +%define with_debug %{?_with_debug: 1} %{?!_with_debug: 0} # kernel-doc %define with_doc %{?_without_doc: 0} %{?!_without_doc: 1} # kernel-headers @@ -140,7 +148,7 @@ Summary: The Linux kernel # bpf tool %define with_bpftool %{?_without_bpftool: 0} %{?!_without_bpftool: 1} # kernel-debuginfo -%define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1} +%define with_debuginfo %{?_with_debuginfo: 1} %{?!_with_debuginfo: 0} # Want to build a the vsdo directories installed %define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1} # kernel-zfcpdump (s390 specific kernel for zfcpdump) @@ -177,7 +185,7 @@ Summary: The Linux kernel %define with_cross %{?_with_cross: 1} %{?!_with_cross: 0} # # build a release kernel on rawhide -%define with_release %{?_with_release: 1} %{?!_with_release: 0} +%define with_release %{?_without_release: 0} %{?!_without_release: 1} # verbose build, i.e. no silent rules and V=1 %define with_verbose %{?_with_verbose: 1} %{?!_with_verbose: 0} @@ -195,12 +203,12 @@ Summary: The Linux kernel %define with_ipaclones %{?_without_ipaclones: 0} %{?!_without_ipaclones: 1} # Want to build a vanilla kernel build without any non-upstream patches? -%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} +%define with_vanilla %{?_without_vanilla: 0} %{?!_without_vanilla: 1} # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 0 +%define debugbuildsenabled 1 %if 0%{?fedora} # Kernel headers are being split out into a separate package @@ -227,7 +235,12 @@ Summary: The Linux kernel # pkg_release is what we'll fill in for the rpm Release: field %if 0%{?released_kernel} +%if 0%{?stable_rc} +%define stable_rctag .rc%{stable_rc} +%define pkg_release 0%{stable_rctag}.%{fedora_build}%{?buildid}%{?dist} +%else %define pkg_release %{fedora_build}%{?buildid}%{?dist} +%endif %else @@ -290,7 +303,7 @@ Summary: The Linux kernel %endif %if %{nopatches} -%define variant -vanilla +#define variant -vanilla %endif %if !%{debugbuildsenabled} @@ -516,7 +529,7 @@ Release: %{pkg_release} # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD %if 0%{?fedora} -ExclusiveArch: x86_64 s390x %{arm} aarch64 ppc64le +ExclusiveArch: x86_64 i386 i686 s390x %{arm} aarch64 ppc64le %else ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le %endif @@ -767,6 +780,10 @@ Source1000: kernel-local %define stable_patch_00 patch-5.%{base_sublevel}.%{stable_base}.xz Source5000: %{stable_patch_00} %endif +%if 0%{?stable_rc} +%define stable_patch_01 patch-3.%{base_sublevel}.%{stable_update}-rc%{stable_rc}.xz +Patch01: %{stable_patch_01} +%endif # non-released_kernel case # These are automagically defined by the rcrev and gitrev values set up @@ -1544,6 +1561,9 @@ fi xzcat %{SOURCE5000} | patch -p1 -F1 -s git commit -a -m "Stable update" %endif +%if 0%{?stable_rc} +ApplyPatch %{stable_patch_01} +%endif # Note: Even in the "nopatches" path some patches (build tweaks and compile # fixes) will always get applied; see patch defition above for details 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..c919bf11d 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 +~/usr/bin/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 @@ -1,3 +1,4 @@ SHA512 (linux-5.5.tar.xz) = fa74fdabb5e63384a39e54da05b86a9ae9ea16179524b041fbbdffc7177e80b53600ae98d76be127ba216148f9dc55fe07ab20637e22c6d6030cb4aa09eb2f86 SHA512 (patch-5.6-rc6.xz) = cb4867da79eaf199e65414be258b1ebf231eff3c506b27d0196c835a05c40937ec02604a982359379ed9a6a7d066f00ca87553df5f57bccfd47db0ceada9ae7f SHA512 (patch-5.6-rc6-git1.xz) = 0d0c1995e9da2ce8138b3e58a3a7e3d431cccbca869a6889fefeb8c3e8dfee32f6ed0235404a81eaadb9d37ed08e90a17da9c4c194ab6d87efe11240321ef7b6 + |