public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/package: binrpm-pkg do not create source and devel package v3
@ 2014-12-02 20:45 j.glisse
  2014-12-04 15:05 ` Jerome Glisse
  2014-12-04 15:41 ` Michal Marek
  0 siblings, 2 replies; 3+ messages in thread
From: j.glisse @ 2014-12-02 20:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jérôme Glisse

From: Jérôme Glisse <jglisse@redhat.com>

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 v2 :
  - Avoid symlinks in /usr/src/kernel.
  - Update subject line and changelog.

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

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
---
 scripts/package/mkspec | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 1395760..010653c 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -119,11 +119,13 @@ 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 -)"
 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
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/package: binrpm-pkg do not create source and devel package v3
  2014-12-02 20:45 [PATCH] scripts/package: binrpm-pkg do not create source and devel package v3 j.glisse
@ 2014-12-04 15:05 ` Jerome Glisse
  2014-12-04 15:41 ` Michal Marek
  1 sibling, 0 replies; 3+ messages in thread
From: Jerome Glisse @ 2014-12-04 15:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Michal Marek

On Tue, Dec 02, 2014 at 03:45:59PM -0500, j.glisse@gmail.com wrote:
> From: Jérôme Glisse <jglisse@redhat.com>
> 
> 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 v2 :
>   - Avoid symlinks in /usr/src/kernel.
>   - Update subject line and changelog.
> 
> Changed since v1 :
>   - Avoid building the devel package too.
> 
> Signed-off-by: Jérôme Glisse <jglisse@redhat.com>

Drop your cc while updating commit log

> ---
>  scripts/package/mkspec | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index 1395760..010653c 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -119,11 +119,13 @@ 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 -)"
>  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
> -- 
> 1.9.3
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/package: binrpm-pkg do not create source and devel package v3
  2014-12-02 20:45 [PATCH] scripts/package: binrpm-pkg do not create source and devel package v3 j.glisse
  2014-12-04 15:05 ` Jerome Glisse
@ 2014-12-04 15:41 ` Michal Marek
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Marek @ 2014-12-04 15:41 UTC (permalink / raw)
  To: j.glisse, linux-kernel; +Cc: Jérôme Glisse

On 2014-12-02 21:45, j.glisse@gmail.com wrote:
> From: Jérôme Glisse <jglisse@redhat.com>
> 
> 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 v2 :
>   - Avoid symlinks in /usr/src/kernel.
>   - Update subject line and changelog.

Thanks, much better!


>  echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
>  echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"

One last nitpick, then I'll merge the patch (promise!) -- the
/usr/src/kernels/$KERNELRELEASE directory is not needed and in fact the
rm -f above is also irrelevant. So please wrap the whole block in if !
$PREBUILT.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-04 15:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 20:45 [PATCH] scripts/package: binrpm-pkg do not create source and devel package v3 j.glisse
2014-12-04 15:05 ` Jerome Glisse
2014-12-04 15:41 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox