ACK: [UNSTABLE][PATCH 1/2] UBUNTU: [Packaging] Drop unused d-i build-deps and packaging
Tim Gardner
tim.gardner at canonical.com
Mon Nov 8 13:54:43 UTC 2021
Acked-by: Tim Gardner <tim.gardner at canonical.com>
definitely some old cruft
On 11/8/21 6:32 AM, Dimitri John Ledkov wrote:
> Unused since 20.04.1 release, and no udebs are built in Ubuntu since
> 21.04 release.
>
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
> ---
> debian.master/control.d/flavour-control.stub | 10 ---
> debian.master/control.stub.in | 2 -
> debian/rules | 35 +--------
> debian/rules.d/1-maintainer.mk | 1 -
> debian/rules.d/2-binary-arch.mk | 8 +-
> debian/rules.d/5-udebs.mk | 79 --------------------
> 6 files changed, 2 insertions(+), 133 deletions(-)
> delete mode 100644 debian/rules.d/5-udebs.mk
>
> diff --git a/debian.master/control.d/flavour-control.stub b/debian.master/control.d/flavour-control.stub
> index e931872e38..fe08e02e15 100644
> --- a/debian.master/control.d/flavour-control.stub
> +++ b/debian.master/control.d/flavour-control.stub
> @@ -140,13 +140,3 @@ Description: Linux kernel version specific cloud tools for version PKGVER-ABINUM
> version locked tools for cloud for version PKGVER-ABINUM on
> =HUMAN=.
>
> -Package: SRCPKGNAME-udebs-FLAVOUR
> -Build-Profiles: <!stage1> <!noudeb> <!cross> <!autopkgtest>
> -XC-Package-Type: udeb
> -Section: debian-installer
> -Architecture: ARCH
> -Depends: ${udeb:Depends}
> -Description: Metapackage depending on kernel udebs
> - This package depends on the all udebs that the kernel build generated,
> - for easier version and migration tracking.
> -
> diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in
> index 31386fad5d..4d0cb5f3ac 100644
> --- a/debian.master/control.stub.in
> +++ b/debian.master/control.stub.in
> @@ -6,8 +6,6 @@ Standards-Version: 3.9.4.0
> Build-Depends:
> debhelper-compat (= 10),
> cpio,
> - kernel-wedge <!stage1> <!noudeb> <!cross> <!autopkgtest>,
> - dctrl-tools <!stage1> <!noudeb> <!cross> <!autopkgtest>,
> kmod <!stage1>,
> makedumpfile [amd64] <!stage1>,
> libcap-dev <!stage1>,
> diff --git a/debian/rules b/debian/rules
> index 737da10635..16a069766e 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -39,19 +39,10 @@ do_tools_common?=true
> do_tools_host?=false
> do_tools_perf_jvmti?=false
> do_enforce_all?=false
> -ifneq ($(filter noudeb,$(DEB_BUILD_PROFILES)),)
> -disable_d_i=true
> -endif
> -
> -# Don't build udebs if $(DEBIAN)/d-i/ doesn't exist
> -ifeq ($(wildcard $(DEBIAN)/d-i/.),)
> - disable_d_i=true
> -endif
>
> -# Don't build tools or udebs in a cross compile environment.
> +# Don't build tools in a cross compile environment.
> ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
> do_tools=false
> - disable_d_i=true
> do_zfs=false
> endif
>
> @@ -83,7 +74,6 @@ endif
> # - disable dkms builds as the versions used may have been deleted
> ifneq ($(filter autopkgtest,$(DEB_BUILD_PROFILES)),)
> flavours := $(firstword $(flavours))
> - disable_d_i=true
> do_zfs=false
> endif
>
> @@ -134,21 +124,12 @@ clean: debian/control debian/canonical-certs.pem debian/canonical-revoked-certs.
> dh_testroot
> dh_clean
>
> -ifeq ($(disable_d_i),)
> - # d-i stuff
> - rm -rf $(DEBIAN)/d-i-$(arch)
> - # Generated on the fly.
> - rm -f $(DEBIAN)/d-i/firmware/$(arch)/kernel-image
> -endif
> -
> # normal build junk
> rm -rf $(DEBIAN)/abi/$(release)-$(revision)
> rm -rf $(builddir)
> rm -f $(stampdir)/stamp-*
> rm -rf $(DEBIAN)/linux-*
>
> - # This gets rid of the d-i packages in control
> - cp -f $(DEBIAN)/control.stub $(DROOT)/control
> cp $(DEBIAN)/changelog debian/changelog
>
> # Install the copyright information.
> @@ -172,9 +153,6 @@ distclean: clean
> # Builds the image, arch headers and debug packages
> include $(DROOT)/rules.d/2-binary-arch.mk
>
> -# Rules for building the udebs ($(DEBIAN)-installer)
> -include $(DROOT)/rules.d/5-udebs.mk
> -
> # Builds the source, doc and linux-headers indep packages
> include $(DROOT)/rules.d/3-binary-indep.mk
>
> @@ -222,18 +200,7 @@ $(DEBIAN)/control.stub: \
>
> .PHONY: debian/control
> debian/control: $(DEBIAN)/control.stub
> - echo "# placebo control.stub for kernel-wedge flow change" >debian/control.stub
> cp $(DEBIAN)/control.stub debian/control
> -ifeq ($(disable_d_i),)
> - # start new paragraph in debian/control
> - echo >> debian/control
> - # append udeb packages
> - export KW_DEFCONFIG_DIR=$(DEBIAN)/d-i && \
> - export KW_CONFIG_DIR=$(DEBIAN)/d-i && \
> - LANG=C kernel-wedge gen-control $(release)-$(abinum) | \
> - grep-dctrl -FArchitecture $(arch) \
> - >>$(CURDIR)/debian/control
> -endif
>
> debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
> for cert in $(sort $(notdir $^)); \
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index 5917b89bbd..cd249d179b 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -99,7 +99,6 @@ printenv:
> @echo "DEB_BUILD_ARCH = $(DEB_BUILD_ARCH)"
> @echo "arch = $(arch)"
> @echo "kmake = $(kmake)"
> - @echo "disable_d_i = $(disable_d_i)"
>
> printchanges:
> @baseCommit=$$(git log --pretty=format:'%H %s' | \
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 2f131a1682..f5ce021276 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -176,12 +176,6 @@ endif
> ifeq ($(do_dtbs),true)
> $(build_cd) $(kmake) $(build_O) $(conc_level) dtbs_install \
> INSTALL_DTBS_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*/device-tree
> -ifeq ($(disable_d_i),)
> - ( cd $(pkgdir)/lib/firmware/$(abi_release)-$*/ && find device-tree -print ) | \
> - while read dtb_file; do \
> - echo "$$dtb_file ?" >> $(DEBIAN)/d-i/firmware/$(arch)/kernel-image; \
> - done
> -endif
> endif
>
> ifeq ($(no_dumpfile),)
> @@ -798,7 +792,7 @@ build-arch: $(build-arch-deps-true)
> @echo Debug: $@
>
> ifeq ($(AUTOBUILD),)
> -binary-arch-deps-$(do_flavour_image_package) += binary-udebs
> +binary-arch-deps-$(do_flavour_image_package) += binary-debs
> else
> binary-arch-deps-$(do_flavour_image_package) = binary-debs
> endif
> diff --git a/debian/rules.d/5-udebs.mk b/debian/rules.d/5-udebs.mk
> deleted file mode 100644
> index 584115f6a1..0000000000
> --- a/debian/rules.d/5-udebs.mk
> +++ /dev/null
> @@ -1,79 +0,0 @@
> -# Do udebs if not disabled in the arch-specific makefile
> -binary-udebs: binary-debs
> - @echo Debug: $@
> -ifeq ($(disable_d_i),)
> - @$(MAKE) --no-print-directory -f $(DROOT)/rules DEBIAN=$(DEBIAN) \
> - do-binary-udebs
> -endif
> -
> -do-binary-udebs: linux_udeb_name=$(shell if echo $(src_pkg_name)|egrep -q '(linux-unstable|linux-lts|linux-hwe|linux-[0-9]+\.[0-9]+)'; then echo $(src_pkg_name); else echo linux; fi)
> -do-binary-udebs: debian/control
> - @echo Debug: $@
> - dh_testdir
> - dh_testroot
> -
> - # unpack the kernels into a temporary directory
> - mkdir -p debian/d-i-${arch}
> -
> - imagelist=$$(cat $(CURDIR)/$(DEBIAN)/d-i/kernel-versions | grep ^${arch} | gawk '{print $$3}') && \
> - for f in $$imagelist; do \
> - i=$(release)-$(abinum)-$$f; \
> - for f in \
> - ../linux-image-$$i\_$(release)-$(revision)_${arch}.deb \
> - ../linux-image-unsigned-$$i\_$(release)-$(revision)_${arch}.deb \
> - ../linux-modules-$$i\_$(release)-$(revision)_${arch}.deb \
> - ../linux-modules-extra-$$i\_$(release)-$(revision)_${arch}.deb; \
> - do \
> - [ -f $$f ] && dpkg -x $$f debian/d-i-${arch}; \
> - done; \
> - /sbin/depmod -b debian/d-i-${arch} $$i; \
> - done
> -
> - # kernel-wedge will error if no modules unless this is touched
> - touch $(DEBIAN)/d-i/no-modules
> -
> - touch $(CURDIR)/$(DEBIAN)/d-i/ignore-dups
> - export KW_DEFCONFIG_DIR=$(CURDIR)/$(DEBIAN)/d-i && \
> - export KW_CONFIG_DIR=$(CURDIR)/$(DEBIAN)/d-i && \
> - export SOURCEDIR=$(CURDIR)/debian/d-i-${arch} && \
> - kernel-wedge install-files $(release)-$(abinum) && \
> - kernel-wedge check
> -
> - # Build just the udebs
> - dilist=$$(dh_listpackages -s | grep "\-di$$") && \
> - [ -z "$dilist" ] || \
> - for i in $$dilist; do \
> - dh_fixperms -p$$i; \
> - $(lockme) dh_gencontrol -p$$i; \
> - dh_builddeb -p$$i; \
> - done
> -
> - # Generate the meta-udeb dependancy lists.
> - @gawk ' \
> - /^Package:/ { \
> - package=$$2; flavour=""; parch="" } \
> - (/Package-Type: udeb/ && package !~ /^$(linux_udeb_name)-udebs-/) { \
> - match(package, "'$(release)'-'$(abinum)'-(.*)-di", bits); \
> - flavour = bits[1]; \
> - } \
> - (/^Architecture:/ && $$0 " " ~ / '$(arch)'/) { \
> - parch=$$0; \
> - } \
> - (flavour != "" && parch != "") { \
> - udebs[flavour] = udebs[flavour] package ", "; \
> - flavour=""; parch=""; \
> - } \
> - END { \
> - for (flavour in udebs) { \
> - package="$(linux_udeb_name)-udebs-" flavour; \
> - file="debian/" package ".substvars"; \
> - print("udeb:Depends=" udebs[flavour]) > file; \
> - metas="'$(builddir)'/udeb-meta-packages"; \
> - print(package) >metas \
> - } \
> - } \
> - ' <$(CURDIR)/debian/control
> - @while read i; do \
> - $(lockme) dh_gencontrol -p$$i; \
> - dh_builddeb -p$$i; \
> - done <$(builddir)/udeb-meta-packages
>
--
-----------
Tim Gardner
Canonical, Inc
More information about the kernel-team
mailing list