rpms/kernel/devel kernel.spec, 1.83, 1.84 linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch, 1.3, 1.4
Roland McGrath (roland)
fedora-extras-commits at redhat.com
Sun Aug 12 22:52:29 UTC 2007
- Previous message (by thread): rpms/postgresql-jdbc/devel .cvsignore, 1.5, 1.6 postgresql-jdbc.spec, 1.12, 1.13 sources, 1.5, 1.6 postgresql-jdbc-version.patch, 1.1, NONE
- Next message (by thread): rpms/qa-assistant/devel test,1.2,1.3
- 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-serv18503
Modified Files:
kernel.spec
linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch
Log Message:
* Sun Aug 12 2007 Roland McGrath <roland at redhat.com>
- Rearrange module signing to avoid conflicts with debugedit build-id changes.
- debugedit embedded objects before stripping to avoid later build-id change.
- Use -g for C files in x86_64 vDSO.
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- kernel.spec 12 Aug 2007 21:49:12 -0000 1.83
+++ kernel.spec 12 Aug 2007 22:51:52 -0000 1.84
@@ -1231,6 +1231,18 @@
linux-%{kversion}.%{_target_cpu}/scripts/bin2c ksign_def_public_key __initdata < extract.pub > linux-%{kversion}.%{_target_cpu}/crypto/signature/key.h
%endif
+%if %{fancy_debuginfo}
+# This override tweaks the kernel makefiles so that we run debugedit on an
+# object before embedding it. When we later run find-debuginfo.sh, it will
+# run debugedit again. The edits it does change the build ID bits embedded
+# in the stripped object, but repeating debugedit is a no-op. We do it
+# beforehand to get the proper final build ID bits into the embedded image.
+# This affects the vDSO images in vmlinux, and the vmlinux image in bzImage.
+idhack='cmd_objcopy=$(if $(filter -S,$(OBJCOPYFLAGS)),'\
+'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug -i $<";)'\
+'$(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@'
+%endif
+
BuildKernel() {
MakeTarget=$1
KernelImage=$2
@@ -1273,7 +1285,8 @@
fi
make -s ARCH=$Arch %{oldconfig_target} > /dev/null
- make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
+ make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget %{?sparse_mflags} \
+ ${idhack+"$idhack"}
make -s ARCH=$Arch %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
# Start installing the results
@@ -1371,21 +1384,6 @@
find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
- # gpg sign the modules
-%if %{with_modsign}
- gcc -o scripts/modsign/mod-extract scripts/modsign/mod-extract.c -Wall
- KEYFLAGS="--no-default-keyring --homedir .."
- KEYFLAGS="$KEYFLAGS --secret-keyring ../kernel.sec"
- KEYFLAGS="$KEYFLAGS --keyring ../kernel.pub"
- export KEYFLAGS
-
- while read i
- do
- sh ./scripts/modsign/modsign.sh $i Red
- mv -f $i.signed $i
- done < modnames
- unset KEYFLAGS
-%endif
# mark modules executable so that strip-to-file can strip them
xargs --no-run-if-empty chmod u+x < modnames
@@ -1409,12 +1407,12 @@
rm -f modinfo
while read i
do
- echo -n "$i "
+ echo -n "${i#$RPM_BUILD_ROOT/lib/modules/$KernelVer/} " >> modinfo
/sbin/modinfo -l $i >> modinfo
done < modnames
egrep -v \
- '^GPL(v2)?|^Dual BSD/GPL|^Dual MPL/GPL|^GPL and additional rights' \
+ 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$' \
modinfo && exit 1
rm -f modinfo modnames
@@ -1482,6 +1480,28 @@
BuildKernel %make_target %kernel_image kdump
%endif
+%if %{with_modsign}
+# gpg sign the modules
+gcc $RPM_OPT_FLAGS -o scripts/modsign/mod-extract scripts/modsign/mod-extract.c
+
+# We do this on the installed, stripped .ko files in $RPM_BUILD_ROOT
+# rather than as we are building them. The __arch_install_post macro
+# comes after __debug_install_post, which is what runs find-debuginfo.sh.
+# This is necessary because the debugedit changes to the build ID bits
+# change the contents of the .ko that go into the signature. A signature
+# made before debugedit is no longer correct for the .ko contents we'll
+# have in the end.
+%define __arch_install_post \
+find $RPM_BUILD_ROOT/lib/modules -name '*.ko' |\
+(cd %{_builddir}/%{buildsubdir}/linux-%{kversion}.%{_target_cpu}\
+while read i\
+do\
+ GNUPGHOME=.. sh ./scripts/modsign/modsign.sh $i Red\
+ mv -f $i.signed $i\
+done)\
+%{nil}
+%endif
+
###
### Special hacks for debuginfo subpackages.
###
@@ -1730,6 +1750,11 @@
%changelog
+* Sun Aug 12 2007 Roland McGrath <roland at redhat.com>
+- Rearrange module signing to avoid conflicts with debugedit build-id changes.
+- debugedit embedded objects before stripping to avoid later build-id change.
+- Use -g for C files in x86_64 vDSO.
+
* Sun Aug 12 2007 Dave Jones <davej at redhat.com>
- 2.6.23-rc2-git5
linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch:
Index: linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch 9 Aug 2007 20:21:02 -0000 1.3
+++ linux-2.6-x86_64-vdso-install-unstripped-copies-on-disk.patch 12 Aug 2007 22:51:52 -0000 1.4
@@ -53,7 +53,7 @@
+$(obj)/%.so: $(obj)/%.so.dbg FORCE
+ $(call if_changed,objcopy)
+
-+CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64
++CFL := $(PROFILING) -mcmodel=small -fPIC $(if $(CONFIG_DEBUG_INFO),-g,-g0) -O2 -fasynchronous-unwind-tables -m64
$(obj)/vclock_gettime.o: CFLAGS = $(CFL)
$(obj)/vgetcpu.o: CFLAGS = $(CFL)
- Previous message (by thread): rpms/postgresql-jdbc/devel .cvsignore, 1.5, 1.6 postgresql-jdbc.spec, 1.12, 1.13 sources, 1.5, 1.6 postgresql-jdbc-version.patch, 1.1, NONE
- Next message (by thread): rpms/qa-assistant/devel test,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list