rpms/kernel/devel Makefile, 1.63, 1.64 gen-patches, 1.2, 1.3 kernel.spec, 1.324, 1.325
Roland McGrath (roland)
fedora-extras-commits at redhat.com
Wed Dec 19 09:37:09 UTC 2007
- Previous message: rpms/powerpc-utils-papr/F-8 powerpc-utils-papr.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message: rpms/less/F-8 less-406-nonexfile.patch, NONE, 1.1 less.spec, 1.42, 1.43
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: roland
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2625
Modified Files:
Makefile gen-patches kernel.spec
Log Message:
make git-branch builds work again
Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Makefile,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Makefile 27 Nov 2007 19:18:54 -0000 1.63
+++ Makefile 19 Dec 2007 09:36:28 -0000 1.64
@@ -1,7 +1,7 @@
# Makefile for source rpm: kernel
# $Id$
NAME := kernel
-SPECFILE = $(firstword $(wildcard *.spec))
+SPECFILE := kernel.spec
# use noarch for make prep instead of the current CPU
# noarch creates and checks all config files not just the current one,
@@ -115,11 +115,16 @@
ifeq (,$(filter-out $(tag-pattern),$(CHECKOUT_TAG)))
variant := $(patsubst $(tag-pattern),%,$(CHECKOUT_TAG))
srpm: SPECFILE := $(wildcard $(SPECFILE:.spec=-$(variant).spec) \
- $(SPECFILE:.spec=-t.$(variant).spec))
+ $(SPECFILE:.spec=.t.$(variant).spec))
srpm beehive-sprm: RELEASE := 0.$(variant).$(RELEASE)
endif
endif
+ifndef KVERSION
+KVERSION := $(shell awk '$$1 == "%define" && $$2 == "base_sublevel" { \
+ print "2.6." $$3 \
+ }' $(SPECFILE))
+endif
#
# Hacks for building kernel rpms from upstream code plus local GIT branches.
@@ -130,7 +135,7 @@
git/%:
@$(MAKE) GIT_SPEC=$(subst /,-,$(*D)) git-$(*F)
else
-git-%: $(SPECFILE:.spec=-t.$(GIT_SPEC).spec)
+git-%: $(SPECFILE:.spec=.t.$(GIT_SPEC).spec)
@$(MAKE) GIT_SPEC= $* SPECFILE=$<
endif
@@ -174,29 +179,29 @@
gen-patches ?= gen-patches
ifndef havespec
-$(SPECFILE:.spec=-t.%-fedora.spec): $(SPECFILE) $(gen-patches) FORCE
+$(SPECFILE:.spec=.t.%-fedora.spec): $(SPECFILE) $(gen-patches) FORCE
./$(gen-patches) --fedora < $< > $@ $(gen-patches-args)
-$(SPECFILE:.spec=-t.%.spec): $(SPECFILE) $(gen-patches) FORCE
+$(SPECFILE:.spec=.t.%.spec): $(SPECFILE) $(gen-patches) FORCE
./$(gen-patches) < $< > $@ $(gen-patches-args)
-.PRECIOUS: $(SPECFILE:.spec=-t.%.spec) $(SPECFILE:.spec=-t.%-fedora.spec)
+.PRECIOUS: $(SPECFILE:.spec=.t.%.spec) $(SPECFILE:.spec=.t.%-fedora.spec)
endif
-spec-%: $(SPECFILE:.spec=-t.%.spec) ;
+spec-%: $(SPECFILE:.spec=.t.%.spec) ;
$(SPECFILE):;
FORCE:;
branch-of-* = $(firstword $(head-$*) $*)
-gen-patches-args = --name $* v$(VERSION) $(call heads,$(branch-of-*))
+gen-patches-args = --name $* v$(KVERSION) $(call heads,$(branch-of-*))
define heads
-$(if $(tag-$1),$(filter-out v$(VERSION),$(tag-$1)),\
+$(if $(tag-$1),$(filter-out v$(KVERSION),$(tag-$1)),\
$(call heads,$(firstword $(branch-$1) $(branch-upstream)))) $1
endef
files-%-fedora:
- @echo $(SPECFILE:.spec=-t.$*-fedora.spec)
+ @echo $(SPECFILE:.spec=.t.$*-fedora.spec)
@$(call list-patches,$(branch-of-*))
files-%:
- @echo $(SPECFILE:.spec=-t.$*.spec)
+ @echo $(SPECFILE:.spec=.t.$*.spec)
@$(call list-patches,$(branch-of-*))
define list-patches
$(if $(tag-$1),version=$(patsubst v%,%,$(tag-$1)),\
@@ -206,6 +211,6 @@
ifndef tag-$(branch-upstream)
tag-$(branch-upstream) := $(shell \
- sed -n 's/^.* *//;s/\.bz2$$//;s/patch-/v/p' sources)
+ sed -n 's/^.* *//;s/\.bz2$$//;s/patch-/v/;/^v/h;$${g;p}' sources)
endif
endif
Index: gen-patches
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/gen-patches,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gen-patches 9 Jun 2007 00:27:14 -0000 1.2
+++ gen-patches 19 Dec 2007 09:36:28 -0000 1.3
@@ -29,7 +29,8 @@
shift
base_rev=`git-rev-parse "$base"` || exit
-nextpatch=1
+patchbase=10
+nextpatch=$patchbase
usepatch()
{
patches[$nextpatch]=$1
@@ -43,6 +44,8 @@
{
local logrev=$1
local logbranch=$3
+ local ref
+ ref=`git-symbolic-ref -q $logbranch` && logbranch=$ref
case $logbranch in
refs/remotes/*)
logbranch=${logbranch#refs/remotes/}
@@ -72,7 +75,7 @@
patch_headers()
{
- p=1
+ p=$patchbase
while [ $p -lt $nextpatch ]; do
echo "Patch$p: ${patches[$p]}\\"
p=$(($p + 1))
@@ -81,7 +84,7 @@
patch_apply()
{
- p=1
+ p=$patchbase
while [ $p -lt $nextpatch ]; do
# echo "%patch$p -p1\\"
echo "ApplyPatch ${patches[$p]}\\"
@@ -115,13 +118,17 @@
base=$1
base_rev=$tag_rev
shift
- usepatch patch-${base#v}.bz2
+ patchfile=patch-${base#v}.bz2
+ fgrep -q $patchfile sources || usepatch $patchfile
log $tag_rev tag $base
done
version=${base#v}
now="`date +'%Y-%m-%d %H:%M %Z'`"
+GIT_DIFF_OPTS=-pu
+export GIT_DIFF_OPTS
+
for branch; do
merge_base=`git-merge-base $base_rev $branch` || {
@@ -148,7 +155,7 @@
esac
file=linux-${version}-${branch_name}.patch
- git diff --no-renames -p \
+ git diff --no-renames --patch-with-stat \
-r "${merge_base}" -r "${branch_rev}" > $file || exit
if [ ! -s $file ]; then
rm -f $file
@@ -165,14 +172,14 @@
#upstream_branch=`date -u -d "$now" +${branch}.%Y%m%dT%H%M | sed s/-/_/g`
upstream_branch=$name
-branch_rev=`git describe $base_rev | sed 's/-g[0-9a-f]*$//;s/-/./g;s/^v//'`
+branch_rev=`git describe $base_rev | sed 's/-g[0-9a-f]*$//;s/^[^-]*//;s/-/./g'`
logdate=`date -d "$now" +'%a %b %d %Y'`
sed "/%define nopatches/c\\
%define nopatches ${nopatches}\\
%define upstream_branch ${name}\\
-%define upstream_branch_release ${branch_rev}
+%define upstream_branch_tag ${branch_rev}
/^### BRANCH PATCH/a\\
`patch_headers`
###
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.324
retrieving revision 1.325
diff -u -r1.324 -r1.325
--- kernel.spec 19 Dec 2007 03:50:12 -0000 1.324
+++ kernel.spec 19 Dec 2007 09:36:28 -0000 1.325
@@ -151,6 +151,7 @@
%if %{nopatches}
%define includexen 0
%define with_xen 0
+%define with_bootwrapper 0
%define variant -vanilla
%else
%define variant_fedora -fedora
@@ -158,9 +159,10 @@
%define using_upstream_branch 0
%if 0%{?upstream_branch:1}
+%define stable_update 0
%define using_upstream_branch 1
%define variant -%{upstream_branch}%{?variant_fedora}
-%define pkg_release %{upstream_branch_release}.%{pkg_release}
+%define pkg_release 0.%{fedora_build}%{upstream_branch_tag}%{?buildid}%{?dist}
%endif
%if !%{debugbuildsenabled}
@@ -521,9 +523,6 @@
Source91: config-sparc64
Source92: config-sparc64-smp
-%if %{using_upstream_branch}
-### BRANCH PATCH ###
-%else
# Here should be only the patches up to the upstream canonical Linus tree.
# For a stable release kernel
@@ -547,6 +546,8 @@
%endif
%endif
+%if %{using_upstream_branch}
+### BRANCH PATCH ###
%endif
%if !%{nopatches}
@@ -594,7 +595,12 @@
Patch142: linux-2.6-ps3-legacy-bootloader-hack.patch
Patch143: linux-2.6-g5-therm-shutdown.patch
+%endif
+
Patch150: linux-2.6-build-nonintconfig.patch
+
+%if !%{nopatches}
+
Patch160: linux-2.6-execshield.patch
Patch250: linux-2.6-debug-sizeof-structs.patch
Patch260: linux-2.6-debug-nmi-timeout.patch
@@ -863,8 +869,6 @@
# If this isn't the first make prep, we use links to the existing clean tarball
# which speeds things up quite a bit.
-%if %{using_upstream_branch}
-%else
# Update to latest upstream.
# released_kernel with stable_update available case
%if 0%{?stable_update}
@@ -883,7 +887,6 @@
%endif
%endif
%endif
-%endif
if [ ! -d kernel-%{kversion}/vanilla-%{vanillaversion} ]; then
# Ok, first time we do a make prep.
@@ -893,9 +896,6 @@
cd vanilla-%{vanillaversion}
# Update vanilla to the latest upstream.
-%if %{using_upstream_branch}
-### BRANCH APPLY ###
-%else
# released_kernel with stable_update available case
%if 0%{?stable_update}
ApplyPatch patch-2.6.%{base_sublevel}.%{stable_update}.bz2
@@ -913,7 +913,6 @@
%endif
%endif
%endif
-%endif
cd ..
@@ -933,6 +932,10 @@
cd linux-%{kversion}.%{_target_cpu}
+%if %{using_upstream_branch}
+### BRANCH APPLY ###
+%endif
+
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/config-* .
cp %{SOURCE15} .
@@ -957,7 +960,6 @@
done
%endif
-
# This patch adds a "make nonint_oldconfig" which is non-interactive and
# also gives a list of missing options at the end. Useful for automated
# builds (as used in the buildsystem).
- Previous message: rpms/powerpc-utils-papr/F-8 powerpc-utils-papr.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message: rpms/less/F-8 less-406-nonexfile.patch, NONE, 1.1 less.spec, 1.42, 1.43
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list