diff mbox

[aws] UBUNTU: [debian] do not ship linux-image-extra pkg with custom kernels

Message ID 1484846910-6478-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Jan. 19, 2017, 5:28 p.m. UTC
For custom kernels, nothing useful will be in the linux-image-extra package,
so we don't ship that package.

Better would be to determine and disable all the configs that produce
drivers that end up in -extra and then set do_extras_package=false.

Ignore: yes

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 debian.aws/control.d/flavour-control.stub | 22 ----------------------
 debian.aws/rules.d/amd64.mk               |  1 +
 debian/rules.d/2-binary-arch.mk           |  2 ++
 3 files changed, 3 insertions(+), 22 deletions(-)

Comments

Tim Gardner Jan. 19, 2017, 6:03 p.m. UTC | #1
On 01/19/2017 10:28 AM, Kamal Mostafa wrote:
> For custom kernels, nothing useful will be in the linux-image-extra package,
> so we don't ship that package.
> 
> Better would be to determine and disable all the configs that produce
> drivers that end up in -extra and then set do_extras_package=false.
> 
> Ignore: yes
> 
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  debian.aws/control.d/flavour-control.stub | 22 ----------------------
>  debian.aws/rules.d/amd64.mk               |  1 +
>  debian/rules.d/2-binary-arch.mk           |  2 ++
>  3 files changed, 3 insertions(+), 22 deletions(-)
> 
> diff --git a/debian.aws/control.d/flavour-control.stub b/debian.aws/control.d/flavour-control.stub
> index 6a9d11b..bdefd9b 100644
> --- a/debian.aws/control.d/flavour-control.stub
> +++ b/debian.aws/control.d/flavour-control.stub
> @@ -46,28 +46,6 @@ Description: Linux kernel image for version PKGVER on DESC
>   the linux-FLAVOUR meta-package, which will ensure that upgrades work
>   correctly, and that supporting packages are also installed.
>  
> -Package: linux-image-extra-PKGVER-ABINUM-FLAVOUR
> -Build-Profiles: <!stage1>
> -Architecture: ARCH
> -Section: kernel
> -Priority: optional
> -Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-PKGVER-ABINUM-FLAVOUR, crda | wireless-crda
> -Description: Linux kernel extra modules for version PKGVER on DESC
> - This package contains the Linux kernel extra modules for version PKGVER on
> - DESC.
> - .
> - Also includes the corresponding System.map file, the modules built by the
> - packager, and scripts that try to ensure that the system is not left in an
> - unbootable state after an update.
> - .
> - Supports SUPPORTED processors.
> - .
> - TARGET
> - .
> - You likely do not want to install this package directly. Instead, install
> - the linux-FLAVOUR meta-package, which will ensure that upgrades work
> - correctly, and that supporting packages are also installed.
> -
>  Package: linux-headers-PKGVER-ABINUM-FLAVOUR
>  Build-Profiles: <!stage1>
>  Architecture: ARCH
> diff --git a/debian.aws/rules.d/amd64.mk b/debian.aws/rules.d/amd64.mk
> index a69ff49..10042a1 100644
> --- a/debian.aws/rules.d/amd64.mk
> +++ b/debian.aws/rules.d/amd64.mk
> @@ -16,6 +16,7 @@ do_tools_perf   = true
>  do_tools_x86	= true
>  do_tools_hyperv	= true
>  do_extras_package = true
> +ship_extras_package = false
>  do_tools_common = true
>  do_zfs		= true
>  do_libc_dev_package = false
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 8ce1fa8..d0d6706 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -472,6 +472,7 @@ binary-%: install-%
>  	dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
>  
>  ifeq ($(do_extras_package),true)
> +  ifneq ($(ship_extras_package),false)
>  	if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
>  		dh_installchangelogs -p$(pkgimg_ex); \
>  		dh_installdocs -p$(pkgimg_ex); \
> @@ -483,6 +484,7 @@ ifeq ($(do_extras_package),true)
>  		dh_md5sums -p$(pkgimg_ex); \
>  		dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
>  	fi
> +  endif
>  endif
>  
>  	dh_installchangelogs -p$(pkghdr)
> 

So this is a bit of a debug hack, right ? Normally we'd just set
do_extras_package=false. But you're gonna use the prepared extras
package (that you won't actually ship) to aid you in finding the configs
that need to be disabled, right ?

It looks like not defining ship_extras_package maintains existing
behavior. However, without some comments it seems like a redundant
'ifneq' fence. Perhaps you could drop a note there so that we remember
why we did this a few years from now.

rtg
Tim Gardner Jan. 19, 2017, 7:12 p.m. UTC | #2
On 01/19/2017 11:03 AM, Tim Gardner wrote:
> On 01/19/2017 10:28 AM, Kamal Mostafa wrote:
>> For custom kernels, nothing useful will be in the linux-image-extra package,
>> so we don't ship that package.
>>
>> Better would be to determine and disable all the configs that produce
>> drivers that end up in -extra and then set do_extras_package=false.
>>
>> Ignore: yes
>>
>> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
>> ---
>>  debian.aws/control.d/flavour-control.stub | 22 ----------------------
>>  debian.aws/rules.d/amd64.mk               |  1 +
>>  debian/rules.d/2-binary-arch.mk           |  2 ++
>>  3 files changed, 3 insertions(+), 22 deletions(-)
>>
>> diff --git a/debian.aws/control.d/flavour-control.stub b/debian.aws/control.d/flavour-control.stub
>> index 6a9d11b..bdefd9b 100644
>> --- a/debian.aws/control.d/flavour-control.stub
>> +++ b/debian.aws/control.d/flavour-control.stub
>> @@ -46,28 +46,6 @@ Description: Linux kernel image for version PKGVER on DESC
>>   the linux-FLAVOUR meta-package, which will ensure that upgrades work
>>   correctly, and that supporting packages are also installed.
>>  
>> -Package: linux-image-extra-PKGVER-ABINUM-FLAVOUR
>> -Build-Profiles: <!stage1>
>> -Architecture: ARCH
>> -Section: kernel
>> -Priority: optional
>> -Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-PKGVER-ABINUM-FLAVOUR, crda | wireless-crda
>> -Description: Linux kernel extra modules for version PKGVER on DESC
>> - This package contains the Linux kernel extra modules for version PKGVER on
>> - DESC.
>> - .
>> - Also includes the corresponding System.map file, the modules built by the
>> - packager, and scripts that try to ensure that the system is not left in an
>> - unbootable state after an update.
>> - .
>> - Supports SUPPORTED processors.
>> - .
>> - TARGET
>> - .
>> - You likely do not want to install this package directly. Instead, install
>> - the linux-FLAVOUR meta-package, which will ensure that upgrades work
>> - correctly, and that supporting packages are also installed.
>> -
>>  Package: linux-headers-PKGVER-ABINUM-FLAVOUR
>>  Build-Profiles: <!stage1>
>>  Architecture: ARCH
>> diff --git a/debian.aws/rules.d/amd64.mk b/debian.aws/rules.d/amd64.mk
>> index a69ff49..10042a1 100644
>> --- a/debian.aws/rules.d/amd64.mk
>> +++ b/debian.aws/rules.d/amd64.mk
>> @@ -16,6 +16,7 @@ do_tools_perf   = true
>>  do_tools_x86	= true
>>  do_tools_hyperv	= true
>>  do_extras_package = true
>> +ship_extras_package = false
>>  do_tools_common = true
>>  do_zfs		= true
>>  do_libc_dev_package = false
>> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
>> index 8ce1fa8..d0d6706 100644
>> --- a/debian/rules.d/2-binary-arch.mk
>> +++ b/debian/rules.d/2-binary-arch.mk
>> @@ -472,6 +472,7 @@ binary-%: install-%
>>  	dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
>>  
>>  ifeq ($(do_extras_package),true)
>> +  ifneq ($(ship_extras_package),false)
>>  	if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
>>  		dh_installchangelogs -p$(pkgimg_ex); \
>>  		dh_installdocs -p$(pkgimg_ex); \
>> @@ -483,6 +484,7 @@ ifeq ($(do_extras_package),true)
>>  		dh_md5sums -p$(pkgimg_ex); \
>>  		dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
>>  	fi
>> +  endif
>>  endif
>>  
>>  	dh_installchangelogs -p$(pkghdr)
>>
> 
> So this is a bit of a debug hack, right ? Normally we'd just set
> do_extras_package=false. But you're gonna use the prepared extras
> package (that you won't actually ship) to aid you in finding the configs
> that need to be disabled, right ?
> 
> It looks like not defining ship_extras_package maintains existing
> behavior. However, without some comments it seems like a redundant
> 'ifneq' fence. Perhaps you could drop a note there so that we remember
> why we did this a few years from now.
> 
> rtg
> 

After some IRC convo I better understand the intent of this patch.

rtg
Kamal Mostafa Jan. 20, 2017, 8:54 p.m. UTC | #3
Improved v2 on the way.

 -Kamal
diff mbox

Patch

diff --git a/debian.aws/control.d/flavour-control.stub b/debian.aws/control.d/flavour-control.stub
index 6a9d11b..bdefd9b 100644
--- a/debian.aws/control.d/flavour-control.stub
+++ b/debian.aws/control.d/flavour-control.stub
@@ -46,28 +46,6 @@  Description: Linux kernel image for version PKGVER on DESC
  the linux-FLAVOUR meta-package, which will ensure that upgrades work
  correctly, and that supporting packages are also installed.
 
-Package: linux-image-extra-PKGVER-ABINUM-FLAVOUR
-Build-Profiles: <!stage1>
-Architecture: ARCH
-Section: kernel
-Priority: optional
-Depends: ${misc:Depends}, ${shlibs:Depends}, linux-image-PKGVER-ABINUM-FLAVOUR, crda | wireless-crda
-Description: Linux kernel extra modules for version PKGVER on DESC
- This package contains the Linux kernel extra modules for version PKGVER on
- DESC.
- .
- Also includes the corresponding System.map file, the modules built by the
- packager, and scripts that try to ensure that the system is not left in an
- unbootable state after an update.
- .
- Supports SUPPORTED processors.
- .
- TARGET
- .
- You likely do not want to install this package directly. Instead, install
- the linux-FLAVOUR meta-package, which will ensure that upgrades work
- correctly, and that supporting packages are also installed.
-
 Package: linux-headers-PKGVER-ABINUM-FLAVOUR
 Build-Profiles: <!stage1>
 Architecture: ARCH
diff --git a/debian.aws/rules.d/amd64.mk b/debian.aws/rules.d/amd64.mk
index a69ff49..10042a1 100644
--- a/debian.aws/rules.d/amd64.mk
+++ b/debian.aws/rules.d/amd64.mk
@@ -16,6 +16,7 @@  do_tools_perf   = true
 do_tools_x86	= true
 do_tools_hyperv	= true
 do_extras_package = true
+ship_extras_package = false
 do_tools_common = true
 do_zfs		= true
 do_libc_dev_package = false
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 8ce1fa8..d0d6706 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -472,6 +472,7 @@  binary-%: install-%
 	dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
 
 ifeq ($(do_extras_package),true)
+  ifneq ($(ship_extras_package),false)
 	if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
 		dh_installchangelogs -p$(pkgimg_ex); \
 		dh_installdocs -p$(pkgimg_ex); \
@@ -483,6 +484,7 @@  ifeq ($(do_extras_package),true)
 		dh_md5sums -p$(pkgimg_ex); \
 		dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
 	fi
+  endif
 endif
 
 	dh_installchangelogs -p$(pkghdr)