Skip to contentSkip to conversation

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

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

lore
Share & tools
lore
#0 lore raw

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

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

When doing make binrpm-pkg we do not want to build the source tar file. This patch avoid doing the gigantic tar file.

---
 scripts/package/mkspec | 2 ++
 1 file changed, 2 insertions(+)
scripts/package/mkspec +2 -0
index 1395760..b6f5e31 100755
@@ -119,8 +119,10 @@ echo "%endif"
 
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
+if ! $PREBUILT; then
 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\""
 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
+fi
 echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
Signature · 1 line
1.9.3
#1 lore raw
Quoted 9 lines · On Fri, Oct 31, 2014 at 03:05:31PM -0400, [email protected] wrote:

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

When doing make binrpm-pkg we do not want to build the source tar file. This patch avoid doing the gigantic tar file.

Anyone ? Bueller ?

Quoted 22 lines
---
 scripts/package/mkspec | 2 ++
 1 file changed, 2 insertions(+)
scripts/package/mkspec +2 -0
index 1395760..b6f5e31 100755
@@ -119,8 +119,10 @@ echo "%endif"
 
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
+if ! $PREBUILT; then
 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\""
 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
+fi
 echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
 echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
Signature · 1 line
1.9.3
#2 lore raw
In reply to [email protected]
Quoted 18 lines · On 2014-10-31 20:05, [email protected] wrote:

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

When doing make binrpm-pkg we do not want to build the source tar file. This patch avoid doing the gigantic tar file.

---
 scripts/package/mkspec | 2 ++
 1 file changed, 2 insertions(+)
scripts/package/mkspec +0 -0
index 1395760..b6f5e31 100755

scripts/package/mkspec echo "%endif" · line 125

Quoted 7 lines
scripts/package/mkspec +2 -0
@@ -119,8 +119,10 @@ echo "%endif"
 
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
+if ! $PREBUILT; then
 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\""
 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
+fi

This does not generate any tar file, but a /usr/src/kernels/... tree to be packaged in the kernel-devel package. I'm not says we should be doing this in make binrpm-pkg, but the change should also remove the kernel-devel package in the binrpm-pkg case.

Michal

#3 lore raw
Quoted 20 lines · Michal Marek
Quoted 19 lines · On 2014-10-31 20:05, [email protected] wrote:

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

When doing make binrpm-pkg we do not want to build the source tar file. This patch avoid doing the gigantic tar file.

---
 scripts/package/mkspec | 2 ++
 1 file changed, 2 insertions(+)
scripts/package/mkspec +0 -0
index 1395760..b6f5e31 100755
@@ -119,8 +119,10 @@ echo "%endif"
 
Quoted 11 lines

scripts/package/mkspec echo "%endif" · line 125

Quoted 6 lines
scripts/package/mkspec +2 -0
 echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
 echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
+if ! $PREBUILT; then
 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\""
 echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
+fi

This does not generate any tar file, but a /usr/src/kernels/... tree to be packaged in the kernel-devel package. I'm not says we should be doing this in make binrpm-pkg, but the change should also remove the kernel-devel package in the binrpm-pkg case.

Sent a v2 that also avoid building the devel package for binrpm-pkg target.

Cheers,
Jérôme

Quoted 2 lines

Michal