[REVIEW][Unstable] Introduce variant support for master kernel packages

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[REVIEW 3/6][linux-restricted-modules] UBUNTU: [Debian] Split control.stub out into component parts

seth.forshee
In preparation for variant support, split up debian/control.stub
into more granular control file fragments.

Signed-off-by: Seth Forshee <[hidden email]>
---
 debian/control.common                     |  19 +++
 debian/control.d/meta-nvidia              |  31 +++++
 debian/control.d/nvidia                   |  55 ++++++++
 debian/control.d/transitionals-nvidia-430 |  13 ++
 debian/control.d/transitionals-oem        |  15 +++
 debian/control.d/transitionals-oem-osp1   |  15 +++
 debian/control.stub                       | 153 ----------------------
 debian/rules                              |  22 +++-
 8 files changed, 164 insertions(+), 159 deletions(-)
 create mode 100644 debian/control.common
 create mode 100644 debian/control.d/meta-nvidia
 create mode 100644 debian/control.d/nvidia
 create mode 100644 debian/control.d/transitionals-nvidia-430
 create mode 100644 debian/control.d/transitionals-oem
 create mode 100644 debian/control.d/transitionals-oem-osp1
 delete mode 100644 debian/control.stub

diff --git a/debian/control.common b/debian/control.common
new file mode 100644
index 000000000000..e93b8c2dba89
--- /dev/null
+++ b/debian/control.common
@@ -0,0 +1,19 @@
+Source: LRM_SOURCE
+Section: utils
+Priority: optional
+Maintainer: Canonical Kernel Team <[hidden email]>
+Build-Depends:
+ debhelper (>= 9),
+ lsb-release,
+ python3,
+ python3-apt,
+ cpio,
+ dkms,
+ wget,
+ gawk,
+ linux-headers-ABI-generic (>= VERSION),
+ linux-buildinfo-ABI-generic (>= VERSION),
+ linux-headers-ABI-lowlatency (>= VERSION),
+ linux-buildinfo-ABI-lowlatency (>= VERSION),
+Standards-Version: 3.9.4
+Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-restricted-modules/+git/@SERIES@
diff --git a/debian/control.d/meta-nvidia b/debian/control.d/meta-nvidia
new file mode 100644
index 000000000000..d090f08fcebf
--- /dev/null
+++ b/debian/control.d/meta-nvidia
@@ -0,0 +1,31 @@
+Package: linux-modules-nvidia-390-generic
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Depends: ${misc:Depends}, linux-modules-nvidia-390-ABI-generic (= ${binary:Version})
+Description: Extra drivers for nvidia-390 for the generic flavour
+ Install extra signed nvidia-390 modules compatible with the generic flavour.
+
+Package: linux-modules-nvidia-390-lowlatency
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Depends: ${misc:Depends}, linux-modules-nvidia-390-ABI-lowlatency (= ${binary:Version})
+Description: Extra drivers for nvidia-390 for the lowlatency flavour
+ Install extra signed nvidia-390 modules compatible with the lowlatency flavour.
+
+Package: linux-modules-nvidia-440-generic
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Depends: ${misc:Depends}, linux-modules-nvidia-440-ABI-generic (= ${binary:Version})
+Description: Extra drivers for nvidia-440 for the generic flavour
+ Install extra signed nvidia-440 modules compatible with the generic flavour.
+
+Package: linux-modules-nvidia-440-lowlatency
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Depends: ${misc:Depends}, linux-modules-nvidia-440-ABI-lowlatency (= ${binary:Version})
+Description: Extra drivers for nvidia-440 for the lowlatency flavour
+ Install extra signed nvidia-440 modules compatible with the lowlatency flavour.
diff --git a/debian/control.d/nvidia b/debian/control.d/nvidia
new file mode 100644
index 000000000000..875e09ea8f87
--- /dev/null
+++ b/debian/control.d/nvidia
@@ -0,0 +1,55 @@
+Package: linux-modules-nvidia-390-ABI-generic
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Priority: optional
+Built-Using: ${linux:BuiltUsing}
+Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-generic | linux-image-unsigned-ABI-generic, nvidia-kernel-common-390
+Description: Linux kernel nvidia modules for version ABI
+ This package contains the Linux kernel nvidia modules for version ABI.
+ .
+ You likely do not want to install this package directly. Instead, install the
+ linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
+ correctly, and that supporting packages are also installed.
+
+Package: linux-modules-nvidia-390-ABI-lowlatency
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Priority: optional
+Built-Using: ${linux:BuiltUsing}
+Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-lowlatency | linux-image-unsigned-ABI-lowlatency, nvidia-kernel-common-390
+Description: Linux kernel nvidia modules for version ABI
+ This package contains the Linux kernel nvidia modules for version ABI.
+ .
+ You likely do not want to install this package directly. Instead, install the
+ linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
+ correctly, and that supporting packages are also installed.
+
+Package: linux-modules-nvidia-440-ABI-generic
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Priority: optional
+Built-Using: ${linux:BuiltUsing}
+Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-generic | linux-image-unsigned-ABI-generic, nvidia-kernel-common-440
+Description: Linux kernel nvidia modules for version ABI
+ This package contains the Linux kernel nvidia modules for version ABI.
+ .
+ You likely do not want to install this package directly. Instead, install the
+ linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
+ correctly, and that supporting packages are also installed.
+
+Package: linux-modules-nvidia-440-ABI-lowlatency
+Build-Profiles: <!stage1>
+Architecture: amd64
+Section: kernel
+Priority: optional
+Built-Using: ${linux:BuiltUsing}
+Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-lowlatency | linux-image-unsigned-ABI-lowlatency, nvidia-kernel-common-440
+Description: Linux kernel nvidia modules for version ABI
+ This package contains the Linux kernel nvidia modules for version ABI.
+ .
+ You likely do not want to install this package directly. Instead, install the
+ linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
+ correctly, and that supporting packages are also installed.
diff --git a/debian/control.d/transitionals-nvidia-430 b/debian/control.d/transitionals-nvidia-430
new file mode 100644
index 000000000000..6f73305f4bd3
--- /dev/null
+++ b/debian/control.d/transitionals-nvidia-430
@@ -0,0 +1,13 @@
+Package: linux-modules-nvidia-430-generic
+Architecture: amd64
+Section: oldlibs
+Depends: linux-modules-nvidia-440-generic
+Description: Extra drivers for nvidia-430 for the generic flavour (dummy transitional package)
+ Transitional package for upgrades of -430 to -440.
+
+Package: linux-modules-nvidia-430-lowlatency
+Architecture: amd64
+Section: oldlibs
+Depends: linux-modules-nvidia-440-lowlatency
+Description: Extra drivers for nvidia-430 for the generic flavour (dummy transitional package)
+ Transitional package for upgrades of -430 to -440.
diff --git a/debian/control.d/transitionals-oem b/debian/control.d/transitionals-oem
new file mode 100644
index 000000000000..ceef586052cf
--- /dev/null
+++ b/debian/control.d/transitionals-oem
@@ -0,0 +1,15 @@
+Package: linux-modules-nvidia-390-oem
+Architecture: amd64
+Section: oldlibs
+Priority: optional
+Depends: linux-modules-nvidia-390-generic
+Description: Extra drivers for nvidia-390 for the generic flavour (dummy transitional package)
+ Transitional package for upgrades from linux-oem to generic
+
+Package: linux-modules-nvidia-418-oem
+Architecture: amd64
+Section: oldlibs
+Priority: optional
+Depends: linux-modules-nvidia-440-generic
+Description: Extra drivers for nvidia-418 for the generic flavour (dummy transitional package)
+ Transitional package for upgrades from linux-oem to generic
diff --git a/debian/control.d/transitionals-oem-osp1 b/debian/control.d/transitionals-oem-osp1
new file mode 100644
index 000000000000..ec090fe4d767
--- /dev/null
+++ b/debian/control.d/transitionals-oem-osp1
@@ -0,0 +1,15 @@
+Package: linux-modules-nvidia-390-oem-osp1
+Architecture: amd64
+Section: oldlibs
+Priority: optional
+Depends: linux-modules-nvidia-390-generic
+Description: Extra drivers for nvidia-390 for the generic flavour (dummy transitional package)
+ Transitional package for upgrades from linux-oem-osp1 to generic
+
+Package: linux-modules-nvidia-418-oem-osp1
+Architecture: amd64
+Section: oldlibs
+Priority: optional
+Depends: linux-modules-nvidia-440-generic
+Description: Extra drivers for nvidia-418 for the generic flavour (dummy transitional package)
+ Transitional package for upgrades from linux-oem-osp1 to generic
diff --git a/debian/control.stub b/debian/control.stub
deleted file mode 100644
index b8f26eb6d409..000000000000
--- a/debian/control.stub
+++ /dev/null
@@ -1,153 +0,0 @@
-Source: LRM_SOURCE
-Section: utils
-Priority: optional
-Maintainer: Canonical Kernel Team <[hidden email]>
-Build-Depends:
- debhelper (>= 9),
- lsb-release,
- python3,
- python3-apt,
- cpio,
- dkms,
- wget,
- gawk,
- linux-headers-ABI-generic (>= VERSION),
- linux-buildinfo-ABI-generic (>= VERSION),
- linux-headers-ABI-lowlatency (>= VERSION),
- linux-buildinfo-ABI-lowlatency (>= VERSION),
-Standards-Version: 3.9.4
-Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-restricted-modules/+git/@SERIES@
-
-Package: linux-modules-nvidia-390-ABI-generic
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Priority: optional
-Built-Using: ${linux:BuiltUsing}
-Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-generic | linux-image-unsigned-ABI-generic, nvidia-kernel-common-390
-Description: Linux kernel nvidia modules for version ABI
- This package contains the Linux kernel nvidia modules for version ABI.
- .
- You likely do not want to install this package directly. Instead, install the
- linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
- correctly, and that supporting packages are also installed.
-
-Package: linux-modules-nvidia-390-ABI-lowlatency
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Priority: optional
-Built-Using: ${linux:BuiltUsing}
-Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-lowlatency | linux-image-unsigned-ABI-lowlatency, nvidia-kernel-common-390
-Description: Linux kernel nvidia modules for version ABI
- This package contains the Linux kernel nvidia modules for version ABI.
- .
- You likely do not want to install this package directly. Instead, install the
- linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
- correctly, and that supporting packages are also installed.
-
-Package: linux-modules-nvidia-390-generic
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Depends: ${misc:Depends}, linux-modules-nvidia-390-ABI-generic (= ${binary:Version})
-Description: Extra drivers for nvidia-390 for the generic flavour
- Install extra signed nvidia-390 modules compatible with the generic flavour.
-
-Package: linux-modules-nvidia-390-lowlatency
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Depends: ${misc:Depends}, linux-modules-nvidia-390-ABI-lowlatency (= ${binary:Version})
-Description: Extra drivers for nvidia-390 for the lowlatency flavour
- Install extra signed nvidia-390 modules compatible with the lowlatency flavour.
-
-Package: linux-modules-nvidia-440-ABI-generic
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Priority: optional
-Built-Using: ${linux:BuiltUsing}
-Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-generic | linux-image-unsigned-ABI-generic, nvidia-kernel-common-440
-Description: Linux kernel nvidia modules for version ABI
- This package contains the Linux kernel nvidia modules for version ABI.
- .
- You likely do not want to install this package directly. Instead, install the
- linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
- correctly, and that supporting packages are also installed.
-
-Package: linux-modules-nvidia-440-ABI-lowlatency
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Priority: optional
-Built-Using: ${linux:BuiltUsing}
-Depends: ${misc:Depends}, ${shlibs:Depends}, binutils, linux-image-ABI-lowlatency | linux-image-unsigned-ABI-lowlatency, nvidia-kernel-common-440
-Description: Linux kernel nvidia modules for version ABI
- This package contains the Linux kernel nvidia modules for version ABI.
- .
- You likely do not want to install this package directly. Instead, install the
- linux-image-nvidia-FLAVOUR meta-package, which will ensure that upgrades work
- correctly, and that supporting packages are also installed.
-
-Package: linux-modules-nvidia-440-generic
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Depends: ${misc:Depends}, linux-modules-nvidia-440-ABI-generic (= ${binary:Version})
-Description: Extra drivers for nvidia-440 for the generic flavour
- Install extra signed nvidia-440 modules compatible with the generic flavour.
-
-Package: linux-modules-nvidia-440-lowlatency
-Build-Profiles: <!stage1>
-Architecture: amd64
-Section: kernel
-Depends: ${misc:Depends}, linux-modules-nvidia-440-ABI-lowlatency (= ${binary:Version})
-Description: Extra drivers for nvidia-440 for the lowlatency flavour
- Install extra signed nvidia-440 modules compatible with the lowlatency flavour.
-
-Package: linux-modules-nvidia-430-generic
-Architecture: amd64
-Section: oldlibs
-Depends: linux-modules-nvidia-440-generic
-Description: Extra drivers for nvidia-430 for the generic flavour (dummy transitional package)
- Transitional package for upgrades of -430 to -440.
-
-Package: linux-modules-nvidia-430-lowlatency
-Architecture: amd64
-Section: oldlibs
-Depends: linux-modules-nvidia-440-lowlatency
-Description: Extra drivers for nvidia-430 for the generic flavour (dummy transitional package)
- Transitional package for upgrades of -430 to -440.
-
-Package: linux-modules-nvidia-390-oem
-Architecture: amd64
-Section: oldlibs
-Priority: optional
-Depends: linux-modules-nvidia-390-generic
-Description: Extra drivers for nvidia-390 for the generic flavour (dummy transitional package)
- Transitional package for upgrades from linux-oem to generic
-
-Package: linux-modules-nvidia-390-oem-osp1
-Architecture: amd64
-Section: oldlibs
-Priority: optional
-Depends: linux-modules-nvidia-390-generic
-Description: Extra drivers for nvidia-390 for the generic flavour (dummy transitional package)
- Transitional package for upgrades from linux-oem-osp1 to generic
-
-Package: linux-modules-nvidia-418-oem
-Architecture: amd64
-Section: oldlibs
-Priority: optional
-Depends: linux-modules-nvidia-440-generic
-Description: Extra drivers for nvidia-418 for the generic flavour (dummy transitional package)
- Transitional package for upgrades from linux-oem to generic
-
-Package: linux-modules-nvidia-418-oem-osp1
-Architecture: amd64
-Section: oldlibs
-Priority: optional
-Depends: linux-modules-nvidia-440-generic
-Description: Extra drivers for nvidia-418 for the generic flavour (dummy transitional package)
- Transitional package for upgrades from linux-oem-osp1 to generic
diff --git a/debian/rules b/debian/rules
index 84a306ef10b2..1e611e68ece8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,17 +17,27 @@ series = $(shell dpkg-parsechangelog | sed -ne 's/^Distribution: *//p' | sed -e
 dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390/ { print $$2; }' debian/dkms-versions)
 dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440/ { print $$2; }' debian/dkms-versions)
 
+control_files := debian/control.common
+control_files += $(filter-out $(primary_control_files),$(shell LC_ALL=C ls -d debian/control.d/*))
+
 test:
  echo "$(src_fullversion) $(src_version)"
 
 # We build our control file.  This has to be done before dh runs otherwise
 # we have no binary files and we will not run the appropriate targets.
-pre-clean:
- sed <debian/control.stub >debian/control \
- -e 's/LRM_SOURCE/$(src_package)/g' \
- -e "s/ABI/$(src_abi)/g" \
- -e "s/VERSION/$(src_version)/g" \
- -e "s/@SERIES@/$(series)/g"
+pre-clean: $(control_files)
+ rm -f debian/control.tmp
+ for i in $^; do \
+ sed \
+ -e 's/LRM_SOURCE/$(src_package)/g' \
+ -e "s/ABI/$(src_abi)/g" \
+ -e "s/VERSION/$(src_version)/g" \
+ -e "s/@SERIES@/$(series)/g" \
+ $$i >>debian/control.tmp; \
+ echo "" >>debian/control.tmp; \
+ done
+ rm -f $@
+ mv debian/control.tmp debian/control
  rm -rf ./$(src_version) UNSIGNED SIGNED
  rm -f debian/linux-modules-*.install \
  debian/linux-modules-*.preinst \
--
2.24.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[REVIEW 4/6][linux-restricted-modules] UBUNTU: [Packaging] Support variant substitutions in control files

seth.forshee
In reply to this post by seth.forshee
Support substitution patterns for variant information in control
files. Also update debian/control.d/meta-nvidia to use these
variablesso to produce meta packages for all variants.

Signed-off-by: Seth Forshee <[hidden email]>
---
 debian/control.d/meta-nvidia |  8 +++----
 debian/rules                 | 42 ++++++++++++++++++++++++++----------
 2 files changed, 35 insertions(+), 15 deletions(-)

diff --git a/debian/control.d/meta-nvidia b/debian/control.d/meta-nvidia
index d090f08fcebf..2a10a70cc7ba 100644
--- a/debian/control.d/meta-nvidia
+++ b/debian/control.d/meta-nvidia
@@ -1,4 +1,4 @@
-Package: linux-modules-nvidia-390-generic
+Package: linux-modules-nvidia-390-generic${variant:suffix}
 Build-Profiles: <!stage1>
 Architecture: amd64
 Section: kernel
@@ -6,7 +6,7 @@ Depends: ${misc:Depends}, linux-modules-nvidia-390-ABI-generic (= ${binary:Versi
 Description: Extra drivers for nvidia-390 for the generic flavour
  Install extra signed nvidia-390 modules compatible with the generic flavour.
 
-Package: linux-modules-nvidia-390-lowlatency
+Package: linux-modules-nvidia-390-lowlatency${variant:suffix}
 Build-Profiles: <!stage1>
 Architecture: amd64
 Section: kernel
@@ -14,7 +14,7 @@ Depends: ${misc:Depends}, linux-modules-nvidia-390-ABI-lowlatency (= ${binary:Ve
 Description: Extra drivers for nvidia-390 for the lowlatency flavour
  Install extra signed nvidia-390 modules compatible with the lowlatency flavour.
 
-Package: linux-modules-nvidia-440-generic
+Package: linux-modules-nvidia-440-generic${variant:suffix}
 Build-Profiles: <!stage1>
 Architecture: amd64
 Section: kernel
@@ -22,7 +22,7 @@ Depends: ${misc:Depends}, linux-modules-nvidia-440-ABI-generic (= ${binary:Versi
 Description: Extra drivers for nvidia-440 for the generic flavour
  Install extra signed nvidia-440 modules compatible with the generic flavour.
 
-Package: linux-modules-nvidia-440-lowlatency
+Package: linux-modules-nvidia-440-lowlatency${variant:suffix}
 Build-Profiles: <!stage1>
 Architecture: amd64
 Section: kernel
diff --git a/debian/rules b/debian/rules
index 1e611e68ece8..913148e835fd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,29 +14,49 @@ src_abi = $(shell echo "$(src_fullversion)" | sed -ne 's/\([0-9]*\.[0-9]*\.[0-9]
 src_version = $(shell echo $(src_fullversion) | sed -e 's/+[0-9][0-9]*//')
 series = $(shell dpkg-parsechangelog | sed -ne 's/^Distribution: *//p' | sed -e 's/-\(security\|updates\|proposed\)$$//')
 
+VARIANT_PROVIDES=$(shell echo "$(src_package)" | sed -e 's/linux-restricted-modules-//')
+
 dkms_nvidia_390_version=$(shell gawk '/^nvidia-graphics-drivers-390/ { print $$2; }' debian/dkms-versions)
 dkms_nvidia_440_version=$(shell gawk '/^nvidia-graphics-drivers-440/ { print $$2; }' debian/dkms-versions)
 
+# Get variants, assumng primary if debian/variants is not present
+variants = --
+ifneq (,$(wildcard debian/variants))
+ variants := $(shell cat debian/variants)
+endif
+
 control_files := debian/control.common
-control_files += $(filter-out $(primary_control_files),$(shell LC_ALL=C ls -d debian/control.d/*))
+control_files += $(shell LC_ALL=C ls -d debian/control.d/*)
 
 test:
  echo "$(src_fullversion) $(src_version)"
 
+define variant_payload
+variant="$$(echo '$(variant)' | sed -e 's/--//')"; \
+sed -e "s/\$${variant:suffix}/$$variant/g" -e "s/\$${variant:provides\(\|-image\|-headers\)}/$${variant_provides:+linux\1-$$variant_provides}/" <$$i; \
+variant_provides=''; \
+echo "";
+endef
+
 # We build our control file.  This has to be done before dh runs otherwise
 # we have no binary files and we will not run the appropriate targets.
 pre-clean: $(control_files)
  rm -f debian/control.tmp
- for i in $^; do \
- sed \
- -e 's/LRM_SOURCE/$(src_package)/g' \
- -e "s/ABI/$(src_abi)/g" \
- -e "s/VERSION/$(src_version)/g" \
- -e "s/@SERIES@/$(series)/g" \
- $$i >>debian/control.tmp; \
- echo "" >>debian/control.tmp; \
- done
- rm -f $@
+ for i in $^; do \
+ if grep -q "{variant:" $$i; then \
+ variant_provides="$(VARIANT_PROVIDES)"; \
+ $(foreach variant,$(variants),$(variant_payload)) \
+ else \
+ cat $$i; \
+ echo ""; \
+ fi; \
+ done | sed \
+ -e 's/LRM_SOURCE/$(src_package)/g' \
+ -e "s/ABI/$(src_abi)/g" \
+ -e "s/VERSION/$(src_version)/g" \
+ -e "s/@SERIES@/$(series)/g" \
+    >debian/control.tmp
+ rm -f debian/control
  mv debian/control.tmp debian/control
  rm -rf ./$(src_version) UNSIGNED SIGNED
  rm -f debian/linux-modules-*.install \
--
2.24.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[REVIEW 5/6][linux-restricted-modules] UBUNTU: [Debian] Only produce transitionals for primary variant

seth.forshee
In reply to this post by seth.forshee
We only want the primary variant to produce transitional meta
packages, so only include them in debian/control if
debian/variants includes the primary variant.

Signed-off-by: Seth Forshee <[hidden email]>
---
 debian/rules | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 913148e835fd..b16106d7d77f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,7 +26,12 @@ ifneq (,$(wildcard debian/variants))
 endif
 
 control_files := debian/control.common
-control_files += $(shell LC_ALL=C ls -d debian/control.d/*)
+# control files only wanted for the primary variant
+primary_control_files := $(shell LC_ALL=C ls -d debian/control.d/transitionals-*)
+ifneq ($(filter --, $(variants)),)
+ control_files += $(primary_control_files)
+endif
+control_files += $(filter-out $(primary_control_files),$(shell LC_ALL=C ls -d debian/control.d/*))
 
 test:
  echo "$(src_fullversion) $(src_version)"
--
2.24.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[REVIEW 6/6][linux-restricted-modules] UBUNTU: [Packaging] update variants

seth.forshee
In reply to this post by seth.forshee
BugLink: http://bugs.launchpad.net/bugs/1786013
Signed-off-by: Seth Forshee <[hidden email]>
---
 debian/variants | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 debian/variants

diff --git a/debian/variants b/debian/variants
new file mode 100644
index 000000000000..3662a92b1ebe
--- /dev/null
+++ b/debian/variants
@@ -0,0 +1 @@
+-wip
--
2.24.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [REVIEW 1/3][linux-signed] UBUNTU: [Packaging] Set source package name from the changelog

Andy Whitcroft-3
In reply to this post by seth.forshee
On Tue, Dec 03, 2019 at 04:26:45PM -0600, Seth Forshee wrote:

> To ease transitioning the source package name, set the name in
> the control file from the name in the topmost changelog entry.
>
> Signed-off-by: Seth Forshee <[hidden email]>
> ---
>  debian/control.stub | 2 +-
>  debian/rules        | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/debian/control.stub b/debian/control.stub
> index f91e9976f401..cada6c9a795b 100644
> --- a/debian/control.stub
> +++ b/debian/control.stub
> @@ -1,4 +1,4 @@
> -Source: linux-signed
> +Source: SIGNED_SRC_PACKAGE

Why not SRCPKGNAME like the primary package?

-apw

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Acked] [REVIEW][Unstable] Introduce variant support for master kernel packages

Andy Whitcroft-3
In reply to this post by seth.forshee
On Tue, Dec 03, 2019 at 04:26:34PM -0600, Seth Forshee wrote:

> For some backport packages in bionic we've adopted a scheme where
> package names include the upstream version (e.g. linux-azure-5.3,
> linux-meta-azure-5.3, etc.). For these packages a list of the variants
> supported from the package (e.g. -edge) is used by linux-meta to
> determine what meta packages need to be produced. This allows changing
> the variant without rebuilding the kernel.
>
> This has utility for the master kernels during development. We would be
> able to introduce new kernel verions into the -proposed and -release
> pockets earlier for testing while keeping the primary variant packages
> at a better-tested kernel versions. The meta packages would be suffixed
> with the variant, such as -wip as used in the patches which follow,
> allowing e.g. linux-generic-wip to be installed for testing the
> work-in-progress kernel.
>
> Variant support is also likely to be useful after development, easing
> the transition of hwe and hwe-edge to newer kernel version, for example.
>
> Supporting variants is more complicated for the master kernel than for
> derivatives. There are a handful of packages which should only produces
> by the master kernel, such as linux-libc-dev, so the kernel source
> package needs to be aware of variants to know whether or not to produce
> these packages. linux-restricted-modules also produces meta packages,
> which need to include variant suffixes. Therefore all packages will gain
> a $DEBIAN/variants file. The list of variants for a given source package
> will be maintained in kernel-series.yaml and updates by cranky-fix.
>
> I'd appreciate review on the following patches for unstable which
> implement variant support and prepare the packaging for including
> upstream version numbers in the source package names. There are also
> some cleanup patches. For the kernel package I've included an example of
> changing the source package name from linux to linux-5.4. I did not
> include patches changing the source package name for supporting
> packages; these will be done when preparing new uploads.
>
> I will point out that there are inconsistencies in the format of
> substition variables for control files in these patches. This is because
> it is inconsistent in our packaging. I used the format which seemed to
> be predominant for each package. These should be unified, but I did not
> do so as part of this work.
>
> I've got a test build using these changes and new source package names
> at https://launchpad.net/~sforshee/+archive/ubuntu/test-builds.

This all looks pretty sane at the source level.  Other than my comments
on SRCPKGNAME which is mostly cosmetic:

Acked-by: Andy Whitcroft <[hidden email]>

-apw

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [REVIEW][Unstable] Introduce variant support for master kernel packages

seth.forshee
In reply to this post by seth.forshee
On Tue, Dec 03, 2019 at 04:26:34PM -0600, Seth Forshee wrote:

> For some backport packages in bionic we've adopted a scheme where
> package names include the upstream version (e.g. linux-azure-5.3,
> linux-meta-azure-5.3, etc.). For these packages a list of the variants
> supported from the package (e.g. -edge) is used by linux-meta to
> determine what meta packages need to be produced. This allows changing
> the variant without rebuilding the kernel.
>
> This has utility for the master kernels during development. We would be
> able to introduce new kernel verions into the -proposed and -release
> pockets earlier for testing while keeping the primary variant packages
> at a better-tested kernel versions. The meta packages would be suffixed
> with the variant, such as -wip as used in the patches which follow,
> allowing e.g. linux-generic-wip to be installed for testing the
> work-in-progress kernel.
>
> Variant support is also likely to be useful after development, easing
> the transition of hwe and hwe-edge to newer kernel version, for example.
>
> Supporting variants is more complicated for the master kernel than for
> derivatives. There are a handful of packages which should only produces
> by the master kernel, such as linux-libc-dev, so the kernel source
> package needs to be aware of variants to know whether or not to produce
> these packages. linux-restricted-modules also produces meta packages,
> which need to include variant suffixes. Therefore all packages will gain
> a $DEBIAN/variants file. The list of variants for a given source package
> will be maintained in kernel-series.yaml and updates by cranky-fix.
>
> I'd appreciate review on the following patches for unstable which
> implement variant support and prepare the packaging for including
> upstream version numbers in the source package names. There are also
> some cleanup patches. For the kernel package I've included an example of
> changing the source package name from linux to linux-5.4. I did not
> include patches changing the source package name for supporting
> packages; these will be done when preparing new uploads.
>
> I will point out that there are inconsistencies in the format of
> substition variables for control files in these patches. This is because
> it is inconsistent in our packaging. I used the format which seemed to
> be predominant for each package. These should be unified, but I did not
> do so as part of this work.
>
> I've got a test build using these changes and new source package names
> at https://launchpad.net/~sforshee/+archive/ubuntu/test-builds.

Applied to focal/master-next, with adjustment to use SRCPKGNAME as
requested by Andy.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
12