Re: Support buildid in kernel-headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 21, 2019 at 3:30 PM Paul Moore <paul@xxxxxxxxxxxxxx> wrote:
> On Wed, 2019-08-21 at 14:48 -0400, Josh Boyer wrote:
> > On Wed, Aug 21, 2019 at 2:47 PM Paul Moore <paul@xxxxxxxxxxxxxx>
> > wrote:
> > > Hello,
> > >
> > > Last year there was a change to how the kernel-headers package is
> > > built, and unfortunately that change made it so that changes to the
> > > kernel's buildid variable do not carryover to the the kernel-
> > > header's
> > > build.  While I recognize that this is problem that only affects a
> > > small number of people, it would be nice to see this fixed.
> > >
> > > I'm attaching a small patch which fixes this for my use case, and
> >
> > The list strips attachments.  Can you send it inline?
>
> Sorry about that, a little birdie warned me against sending patches inline to this list (something about whitespace
> mangling), but the patch is pasted below.  Also, in the case there are issues, I put a copy of the patch here:

Any thoughts on fixing this problem?

> --- scripts/create_headers_tarball.sh.orig      2019-05-06 17:50:49.533846042 -0400
> +++ scripts/create_headers_tarball.sh   2019-05-06 17:57:54.259359305 -0400
> @@ -26,13 +26,14 @@ BASE=`grep "%define base_sublevel" kerne
>  STABLE=`grep "%define stable_update" kernel.spec| cut -d ' ' -f 3`
>  RC=`grep "%global rcrev" kernel.spec| cut -d ' ' -f 3`
>  GITREV=`grep "%define gitrev" kernel.spec| cut -d ' ' -f 3`
> +BUILDID=`grep "^%define buildid" kernel.spec| cut -d ' ' -f 3`
>  if [ $RELEASED -eq 0 ]; then
>         cd kernel-$MAJORVER.$BASE.fc??
>         NEWBASE=$(($BASE+1))
> -       KVER=$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE
> -       cd linux-$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE.fc*/
> +       KVER=$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE$BUILDID
> +       cd linux-$MAJORVER.$NEWBASE.0-0.rc$RC.git$GITREV.$BASERELEASE$BUILDID.fc*/
>  else
> -       cd kernel-$MAJORVER.$BASE.fc??/linux-$MAJORVER.$BASE.$STABLE-$BASERELEASE.fc*/
> +       cd kernel-$MAJORVER.$BASE.fc??/linux-$MAJORVER.$BASE.$STABLE-$BASERELEASE$BUILDID.fc*/
>         KVER=$MAJORVER.$BASE.$STABLE-$BASERELEASE
>  fi
>
> @@ -64,6 +65,7 @@ BASERELEASE=$(($BASERELEASE-1))
>  BASERELEASE=$BASERELEASE perl -p -i -e 's|%global baserelease.*|%global baserelease $ENV{'BASERELEASE'}|' kernel-headers.spec
>
>  if [ $RELEASED -eq 0 ]; then
> +       [ -n $BUILDID ] && sed -i -e 's/^# define buildid .local/%define buildid '$BUILDID'/' kernel-headers.spec
>         RC=$RC perl -p -i -e 's|%global rcrev.*|%global rcrev $ENV{'RC'}|' kernel-headers.spec
>         GITREV=$GITREV perl -p -i -e 's|%define gitrev.*|%define gitrev $ENV{'GITREV'}|' kernel-headers.spec
>         rpmdev-bumpspec -c "Linux v$MAJORVER.$NEWBASE-rc$RC.git$GITREV" kernel-headers.spec

-- 
paul moore
www.paul-moore.com
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux