Skip to contentSkip to conversation

scripts/package: binrpm-pkg do not build source tar file v4

PATCH In review [email protected] 2 participants 2 messages Dec 4, 2014 – Dec 8, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/package: binrpm-pkg do not build source tar file v4

From: Jérôme Glisse <[email protected]>

When doing make binrpm-pkg we only want to build the binary and header package as the documentation of binrpm-pkg target claims. Hence this patch avoid building the source and devel package. This makes binrpm-pkg target lot faster and way more usefull.

Changed since v3 :
- Avoid creating /usr/src/kernels directory.
- Avoid useless pre clean step of source and devel package.

Changed since v2 :
- Avoid symlinks in /usr/src/kernel.
- Update subject line and changelog.

Changed since v1 :
- Avoid building the devel package too.

---
 scripts/package/mkspec | 4 ++++
 1 file changed, 4 insertions(+)
scripts/package/mkspec +4 -0
index 1395760..d9ab94b 100755
@@ -117,6 +117,7 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
 echo 'mv vmlinux.orig vmlinux'
 echo "%endif"
 
+if ! $PREBUILT; then
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
 echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
@@ -124,6 +125,7 @@ echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNEL
 echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
+fi
 
 echo ""
 echo "%clean"
@@ -151,9 +153,11 @@ echo "%files headers"
 echo '%defattr (-, root, root)'
 echo "/usr/include"
 echo ""
+if ! $PREBUILT; then
 echo "%files devel"
 echo '%defattr (-, root, root)'
 echo "/usr/src/kernels/$KERNELRELEASE"
 echo "/lib/modules/$KERNELRELEASE/build"
 echo "/lib/modules/$KERNELRELEASE/source"
 echo ""
+fi
Signature · 1 line
1.8.3.1
#1 lore raw

Dne 4.12.2014 v 16:53 [email protected] napsal(a):

Quoted 11 lines

From: Jérôme Glisse <[email protected]>

When doing make binrpm-pkg we only want to build the binary and header package as the documentation of binrpm-pkg target claims. Hence this patch avoid building the source and devel package. This makes binrpm-pkg target lot faster and way more usefull.

Changed since v3 :
- Avoid creating /usr/src/kernels directory.
- Avoid useless pre clean step of source and devel package.

Quoted 8 lines

Changed since v2 :
- Avoid symlinks in /usr/src/kernel.
- Update subject line and changelog.

Changed since v1 :
- Avoid building the devel package too.

Thanks, applied to kbuild.git#misc. I just used the subject line from v3, since it seems you accidentally reverted to that from v2.

Michal