Quantcast

[PATCH v2 0/3] builddeb updates for v4.12

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v2 0/3] builddeb updates for v4.12

riku.voipio
From: Riku Voipio <[hidden email]>

Resend of the builddeb script updates that missed v4.11
round.

Changes from v1 series:

Standards-Version: line is removed instead of updating

Andrew Donnellan (1):
  builddeb: fix typo

Riku Voipio (2):
  builddeb: Update a few outdated and hardcoded strings
  builddeb: add make fastdeb-pkg target

 scripts/package/Makefile |  7 +++++-
 scripts/package/builddeb | 58 +++++++++++++++++++++++-------------------------
 2 files changed, 34 insertions(+), 31 deletions(-)

--
2.11.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH v2 1/3] builddeb: Update a few outdated and hardcoded strings

riku.voipio
From: Riku Voipio <[hidden email]>

The builddeb script has some hardcoded references to Linux version 2.6
which is ancient. Drop Provides as the virtual packages provided are not
useful anymore. Leave the Provides for linux-kernel-headers, as someone
might still be referring to it.

While at it, updated copyright date and drop Standards-Version:

Cc: Timo Sigurdsson <[hidden email]>
Signed-off-by: Riku Voipio <[hidden email]>
---
v2: Drop Standards-Version: instead of updating as suggested by Ben
---
 scripts/package/builddeb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f04e91f0845d..c0107f581c5d 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -260,7 +260,7 @@ This is a packacked upstream version of the Linux kernel.
 The sources may be found at most Linux ftp sites, including:
 ftp://ftp.kernel.org/pub/linux/kernel
 
-Copyright: 1991 - 2015 Linus Torvalds and others.
+Copyright: 1991 - 2017 Linus Torvalds and others.
 
 The git repository for mainline kernel development is at:
 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
@@ -283,7 +283,6 @@ Section: kernel
 Priority: optional
 Maintainer: $maintainer
 Build-Depends: $build_depends
-Standards-Version: 3.8.4
 Homepage: http://www.kernel.org/
 EOF
 
@@ -291,7 +290,6 @@ if [ "$ARCH" = "um" ]; then
  cat <<EOF >> debian/control
 
 Package: $packagename
-Provides: linux-image, linux-image-2.6, linux-modules-$version
 Architecture: any
 Description: User Mode Linux kernel, version $version
  User-mode Linux is a port of the Linux kernel to its own system call
@@ -308,7 +306,6 @@ else
  cat <<EOF >> debian/control
 
 Package: $packagename
-Provides: linux-image, linux-image-2.6, linux-modules-$version
 Suggests: $fwpackagename
 Architecture: any
 Description: Linux kernel, version $version
@@ -341,7 +338,6 @@ rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
 cat <<EOF >> debian/control
 
 Package: $kernel_headers_packagename
-Provides: linux-headers, linux-headers-2.6
 Architecture: any
 Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
  This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
@@ -399,7 +395,6 @@ if [ -n "$BUILD_DEBUG" ] ; then
 
 Package: $dbg_packagename
 Section: debug
-Provides: linux-debug, linux-debug-$version
 Architecture: any
 Description: Linux kernel debugging symbols for $version
  This package will come in handy if you need to debug the kernel. It provides
--
2.11.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 2/3] builddeb: fix typo

riku.voipio
In reply to this post by riku.voipio
From: Andrew Donnellan <[hidden email]>

Signed-off-by: Andrew Donnellan <[hidden email]>
Signed-off-by: Riku Voipio <[hidden email]>
---
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c0107f581c5d..3407826f2a99 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -69,7 +69,7 @@ set_debarch() {
  echo "" >&2
  echo "** ** **  WARNING  ** ** **" >&2
  echo "" >&2
- echo "Your architecture doesn't have it's equivalent" >&2
+ echo "Your architecture doesn't have its equivalent" >&2
  echo "Debian userspace architecture defined!" >&2
  echo "Falling back to using your current userspace instead!" >&2
  echo "Please add support for $UTS_MACHINE to ${0} ..." >&2
--
2.11.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 3/3] builddeb: add make fastdeb-pkg target

riku.voipio
In reply to this post by riku.voipio
From: Riku Voipio <[hidden email]>

Currently, the deb-pkg and bindeb-pkg targets create multiple packages
for the kernel binaries, headers, userspace headers and firmware.

For developers who generate Debian packages as part of their development
workflows, it's often not necessary to generate all these packages.

Introduce new target, fastdeb-pkg, which only generates kernel packages.
Re-order package build order so that kernel binary package is created
first and we can exit cleanly unless generating rest packages with the
old bindeb-pkg and deb-pkg targets.

Cc: Andrew Donnellan <[hidden email]>
Tested-By: Jim Davis <[hidden email]>
Signed-off-by: Riku Voipio <[hidden email]>
---
 scripts/package/Makefile |  7 ++++++-
 scripts/package/builddeb | 49 +++++++++++++++++++++++++-----------------------
 2 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 71b4a8af9d4d..fc86cc3ae222 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -97,6 +97,10 @@ bindeb-pkg: FORCE
  $(MAKE) KBUILD_SRC=
  +$(call cmd,builddeb)
 
+fastdeb-pkg: FORCE
+ $(MAKE) KBUILD_SRC=
+ +$(call cmd,builddeb)
+
 clean-dirs += $(objtree)/debian/
 
 
@@ -142,7 +146,8 @@ help: FORCE
  @echo '  rpm-pkg             - Build both source and binary RPM kernel packages'
  @echo '  binrpm-pkg          - Build only the binary kernel RPM package'
  @echo '  deb-pkg             - Build both source and binary deb kernel packages'
- @echo '  bindeb-pkg          - Build only the binary kernel deb package'
+ @echo '  bindeb-pkg          - Build all binary kernel deb packages'
+ @echo '  fastdeb-pkg         - Build only the binary kernel image deb package'
  @echo '  tar-pkg             - Build the kernel as an uncompressed tarball'
  @echo '  targz-pkg           - Build the kernel as a gzip compressed tarball'
  @echo '  tarbz2-pkg          - Build the kernel as a bzip2 compressed tarball'
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 3407826f2a99..6c2f57039d22 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -180,11 +180,6 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
  fi
 fi
 
-if [ "$ARCH" != "um" ]; then
- $MAKE headers_check KBUILD_SRC=
- $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
-fi
-
 # Install the maintainer scripts
 # Note: hook scripts under /etc/kernel are also executed by official Debian
 # kernel packages, as well as kernel packages built using make-kpkg.
@@ -315,6 +310,32 @@ EOF
 
 fi
 
+# Move firmware out of kernel image package.
+if [ -e "$tmpdir/lib/firmware" ]; then
+ mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/"
+ rmdir "$tmpdir/lib/firmware"
+fi
+
+create_package "$packagename" "$tmpdir"
+[ "x$1" = "xfastdeb-pkg" ] && exit 0
+
+if [ -e "$fwdir/lib/firmware/$version" ]; then
+ cat <<EOF >> debian/control
+
+Package: $fwpackagename
+Architecture: all
+Description: Linux kernel firmware, version $version
+ This package contains firmware from the Linux kernel, version $version.
+EOF
+
+ create_package "$fwpackagename" "$fwdir"
+fi
+
+if [ "$ARCH" != "um" ]; then
+ $MAKE headers_check KBUILD_SRC=
+ $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
+fi
+
 # Build kernel header package
 (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
 (cd $srctree; find arch/*/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
@@ -345,22 +366,6 @@ Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
  This is useful for people who need to build external modules
 EOF
 
-# Do we have firmware? Move it out of the way and build it into a package.
-if [ -e "$tmpdir/lib/firmware" ]; then
- mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/"
- rmdir "$tmpdir/lib/firmware"
-
- cat <<EOF >> debian/control
-
-Package: $fwpackagename
-Architecture: all
-Description: Linux kernel firmware, version $version
- This package contains firmware from the Linux kernel, version $version.
-EOF
-
- create_package "$fwpackagename" "$fwdir"
-fi
-
 cat <<EOF >> debian/control
 
 Package: $libc_headers_packagename
@@ -377,8 +382,6 @@ if [ "$ARCH" != "um" ]; then
  create_package "$libc_headers_packagename" "$libc_headers_dir"
 fi
 
-create_package "$packagename" "$tmpdir"
-
 if [ -n "$BUILD_DEBUG" ] ; then
  # Build debug package
  # Different tools want the image in different locations
--
2.11.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH v2 0/3] builddeb updates for v4.12

riku.voipio
In reply to this post by riku.voipio
Hi Masahiro,

On 31 March 2017 at 16:09,  <[hidden email]> wrote:
> From: Riku Voipio <[hidden email]>
>
> Resend of the builddeb script updates that missed v4.11
> round.

Can you please take a look at the series?

> Changes from v1 series:
>
> Standards-Version: line is removed instead of updating
>
> Andrew Donnellan (1):
>   builddeb: fix typo
>
> Riku Voipio (2):
>   builddeb: Update a few outdated and hardcoded strings
>   builddeb: add make fastdeb-pkg target
>
>  scripts/package/Makefile |  7 +++++-
>  scripts/package/builddeb | 58 +++++++++++++++++++++++-------------------------
>  2 files changed, 34 insertions(+), 31 deletions(-)
>
> --
> 2.11.0
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH v2 0/3] builddeb updates for v4.12

Masahiro Yamada
2017-04-11 16:31 GMT+09:00 Riku Voipio <[hidden email]>:
> Hi Masahiro,
>
> On 31 March 2017 at 16:09,  <[hidden email]> wrote:
>> From: Riku Voipio <[hidden email]>
>>
>> Resend of the builddeb script updates that missed v4.11
>> round.
>
> Can you please take a look at the series?

After I check clang patches a little more,
I will take a look at this series.
Very sorry for the delay.




--
Best Regards
Masahiro Yamada

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target

Masahiro Yamada
In reply to this post by riku.voipio
Hi.


2017-03-31 22:09 GMT+09:00  <[hidden email]>:

> From: Riku Voipio <[hidden email]>
>
> Currently, the deb-pkg and bindeb-pkg targets create multiple packages
> for the kernel binaries, headers, userspace headers and firmware.
>
> For developers who generate Debian packages as part of their development
> workflows, it's often not necessary to generate all these packages.
>
> Introduce new target, fastdeb-pkg, which only generates kernel packages.
> Re-order package build order so that kernel binary package is created
> first and we can exit cleanly unless generating rest packages with the
> old bindeb-pkg and deb-pkg targets.
>
> Cc: Andrew Donnellan <[hidden email]>
> Tested-By: Jim Davis <[hidden email]>
> Signed-off-by: Riku Voipio <[hidden email]>
> ---


Before expanding this even more,
please help me understand this script.

Commit 3716001b implemented source package build
at the end of the builddeb script.
However, the binary packages are still built in its own way.
(So, debian/rules is not used in general workflows,
so we need to test it explicitly somehow.)

Why do not we create a source package first,
then build binary packages from it?


rpm-pkg does that way.
(generate a spec-file, then run rpmbuild)




--
Best Regards
Masahiro Yamada

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target

riku.voipio
Hi,

Thanks for taking time to review.

On 18 April 2017 at 17:31, Masahiro Yamada
<[hidden email]> wrote:
> Before expanding this even more,
> please help me understand this script.
>
> Commit 3716001b implemented source package build
> at the end of the builddeb script.
> However, the binary packages are still built in its own way.
> (So, debian/rules is not used in general workflows,
> so we need to test it explicitly somehow.)

Historic reasons.. since the builddeb already existed, the easiest way
to implement debian/rules was to make a skeleton debian/rules that
calls builddeb indrectly.

> Why do not we create a source package first,
> then build binary packages from it?

I wouldn't do a source package per se, but we could create a debian/
directory tree and the call dpkg-buildpackage. This would be a more
substantial overhaul that might break some expected behavior of
deb-pkg targets. If people think its worth, I can give it a shot.

> rpm-pkg does that way.
> (generate a spec-file, then run rpmbuild)

speaking of the mkspec script, it would be nice to refactor it to here
documents over endless lines of echo.

Riku

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH v2 1/3] builddeb: Update a few outdated and hardcoded strings

Masahiro Yamada
In reply to this post by riku.voipio
Hi Riku,


The merge windows will be open shortly,
so I'd like to apply the first two.

2017-03-31 22:09 GMT+09:00  <[hidden email]>:
> From: Riku Voipio <[hidden email]>
>
> The builddeb script has some hardcoded references to Linux version 2.6
> which is ancient. Drop Provides as the virtual packages provided are not
> useful anymore. Leave the Provides for linux-kernel-headers, as someone
> might still be referring to it.
>
> While at it, updated copyright date and drop Standards-Version:


Could you add some comments about
"why" for the Standard-Version removal?

I know the answer is in the v2:
https://patchwork.kernel.org/patch/9532275/
but I'd like you to record it in git-log.

With the comment improved, I will pick up this soon.

Thanks!


--
Best Regards
Masahiro Yamada

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target

Masahiro Yamada
In reply to this post by riku.voipio
Hi Riku,


2017-04-20 19:53 GMT+09:00 Riku Voipio <[hidden email]>:

> Hi,
>
> Thanks for taking time to review.
>
> On 18 April 2017 at 17:31, Masahiro Yamada
> <[hidden email]> wrote:
>> Before expanding this even more,
>> please help me understand this script.
>>
>> Commit 3716001b implemented source package build
>> at the end of the builddeb script.
>> However, the binary packages are still built in its own way.
>> (So, debian/rules is not used in general workflows,
>> so we need to test it explicitly somehow.)
>
> Historic reasons.. since the builddeb already existed, the easiest way
> to implement debian/rules was to make a skeleton debian/rules that
> calls builddeb indrectly.
>
>> Why do not we create a source package first,
>> then build binary packages from it?
>
> I wouldn't do a source package per se, but we could create a debian/
> directory tree and the call dpkg-buildpackage. This would be a more
> substantial overhaul that might break some expected behavior of
> deb-pkg targets. If people think its worth, I can give it a shot.


In hindsight, it seems more straightforward to me
to build the binary packages from the source package.
But, I know this refactoring will need lots of changes, which may
break something.

Once we support this fastdeb-pkg target,
we will not be able to convert the script in that way.
(because we do not have a standard way to generate a particular binary
package from *.dsc)
That's why I asked the question, and I want to be careful.



>> rpm-pkg does that way.
>> (generate a spec-file, then run rpmbuild)
>
> speaking of the mkspec script, it would be nice to refactor it to here
> documents over endless lines of echo.

As always, cleaning patches are welcome.



--
Best Regards
Masahiro Yamada

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target

Ben Hutchings-3
On Fri, 2017-04-21 at 18:57 +0900, Masahiro Yamada wrote:
[...]
> In hindsight, it seems more straightforward to me
> to build the binary packages from the source package.
> But, I know this refactoring will need lots of changes, which may
> break something.
>
> Once we support this fastdeb-pkg target,
> we will not be able to convert the script in that way.
> (because we do not have a standard way to generate a particular binary
> package from *.dsc)
[...]

We kind of do, though it's a relatively new feature:
https://wiki.debian.org/BuildProfileSpec

Ben.

--
Ben Hutchings
I'm not a reverse psychological virus.  Please don't copy me into your
sig.

signature.asc (849 bytes) Download Attachment
Loading...