Cmnt: [Noble/Unstable][PATCH 3/6] UBUNTU: [Packaging] Remove support for sub-flavors
Masahiro Yamada
masahiro.yamada at canonical.com
Mon Dec 4 16:04:20 UTC 2023
On Fri, Nov 24, 2023 at 10:30 PM Juerg Haefliger
<juerg.haefliger at canonical.com> wrote:
>
> Sub-flavors were a concept in Maverick and earlier. In fact, it was
> removed later in Maverick but that commit was not carried forward to
> Natty so it's still here. Finally get rid of it.
>
> (forwardported from commit db54f0fec701e97b829f0abb2750c30464b38dec maverick/linux)
> Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> ---
With this patch applied, I still see "sub-flavours".
debian/rules:208: flavours="$(sort $(wildcard
$(DEBIAN)/control.d/vars.* $(DEBIAN)/sub-flavours/*.vars))";\
debian/docs/README.inclusion-list:4:The original Hardy release had the
notion of sub-flavours,
debian/docs/README.inclusion-list:9:re-implementation of the
sub-flavours philosophy is hopefully simpler,
Your 6/6 will delete debian/docs/README.inclusion-list anyway, but
you can clean up one more line in debian/rules.
> debian/rules | 2 +-
> debian/rules.d/2-binary-arch.mk | 18 ---------
> debian/scripts/control-create | 23 +++++------
> debian/scripts/sub-flavour | 69 ---------------------------------
> 4 files changed, 10 insertions(+), 102 deletions(-)
> delete mode 100644 debian/scripts/sub-flavour
>
> diff --git a/debian/rules b/debian/rules
> index 70ad432a2e90..57595186fcc6 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -192,7 +192,7 @@ $(DEBIAN)/control.stub: \
> debian/canonical-revoked-certs.pem \
> $(DROOT)/control.d/flavour-module.stub \
> $(DEBIAN)/changelog \
> - $(wildcard $(DEBIAN)/control.d/* $(DEBIAN)/sub-flavours/*.vars)
> + $(wildcard $(DEBIAN)/control.d/*)
> for i in $(control_files); do \
> cat $$i; \
> echo ""; \
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 1cf2b106bf25..f1950bbdcb92 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -251,17 +251,6 @@ ifeq ($(do_doc_package),true)
> chmod 644 $(bindoc)/changelog.Debian.old.gz
> endif
>
> -ifneq ($(skipsub),true)
> - for sub in $($(*)_sub); do \
> - if ! (TO=$$sub FROM=$* ABI_RELEASE=$(abi_release) $(SHELL) \
> - $(DROOT)/scripts/sub-flavour); then exit 1; fi; \
> - /sbin/depmod -b debian/$(bin_pkg_name)-$$sub \
> - -ea -F debian/$(bin_pkg_name)-$$sub/boot/System.map-$(abi_release)-$* \
> - $(abi_release)-$*; \
> - $(call install_control,$(bin_pkg_name)--$$sub,image,postinst postrm preinst prerm); \
> - done
> -endif
> -
> ifeq ($(do_dbgsym_package),true)
> # Debug image is simple
> install -m644 -D $(builddir)/build-$*/vmlinux \
> @@ -633,13 +622,6 @@ ifeq ($(do_lib_rust),true)
> $(call dh_all,$(pkgrust))
> endif
>
> -ifneq ($(skipsub),true)
> - @set -e; for sub in $($(*)_sub); do \
> - pkg=$(bin_pkg_name)-$$sub; \
> - $(call dh_all_inline,$$pkg); \
> - done
> -endif
> -
> ifeq ($(do_dbgsym_package),true)
> $(call dh_all,$(dbgpkg)) -- -Zxz
>
> diff --git a/debian/scripts/control-create b/debian/scripts/control-create
> index 5d0e3e46556c..32ef0f2df536 100755
> --- a/debian/scripts/control-create
> +++ b/debian/scripts/control-create
> @@ -9,21 +9,16 @@ any_signed=$2
>
> [ "$provides" != '' ] && provides="$provides, "
>
> -if [ "$is_sub" = "" ]; then
> - flavour=$(basename $vars | sed 's/.*\.//')
> - stub="${DEBIAN}/control.d/flavour-control.stub debian/control.d/flavour-buildinfo.stub"
> - if [ "$any_signed" = 'true' ]; then
> - sign_me_pkg="-unsigned"
> - sign_me_txt=" unsigned"
> - sign_peer_pkg=""
> - else
> - sign_me_pkg=""
> - sign_me_txt=""
> - sign_peer_pkg="-unsigned"
> - fi
> +flavour=$(basename $vars | sed 's/.*\.//')
> +stub="${DEBIAN}/control.d/flavour-control.stub debian/control.d/flavour-buildinfo.stub"
> +if [ "$any_signed" = 'true' ]; then
> + sign_me_pkg="-unsigned"
> + sign_me_txt=" unsigned"
> + sign_peer_pkg=""
> else
> - flavour=$(basename $vars .vars)
> - stub=${DEBIAN}/sub-flavours/control.stub
> + sign_me_pkg=""
> + sign_me_txt=""
> + sign_peer_pkg="-unsigned"
> fi
>
> cat $stub | grep -v '^#' | sed \
> diff --git a/debian/scripts/sub-flavour b/debian/scripts/sub-flavour
> deleted file mode 100644
> index 01004939617c..000000000000
> --- a/debian/scripts/sub-flavour
> +++ /dev/null
> @@ -1,69 +0,0 @@
> -#!/bin/bash
> -
> -. debian/debian.env
> -
> -echo "SUB_PROCESS $FROM => $TO"
> -
> -export from_pkg="linux-image-$ABI_RELEASE-$FROM"
> -export to_pkg="linux-image-$ABI_RELEASE-$TO"
> -
> -from_moddir="debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM"
> -to_moddir="debian/$to_pkg/lib/modules/$ABI_RELEASE-$FROM"
> -
> -install -d "debian/$to_pkg/boot"
> -install -m644 debian/$from_pkg/boot/config-$ABI_RELEASE-$FROM \
> - debian/$to_pkg/boot/
> -install -m600 debian/$from_pkg/boot/{vmlinuz,System.map}-$ABI_RELEASE-$FROM \
> - debian/$to_pkg/boot/
> -
> -#
> -# Print some warnings if there are files in the sub-flavours list
> -# that do not actually exist.
> -#
> -cat ${DEBIAN}/sub-flavours/$TO.list | while read line
> -do
> -(
> - cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel;
> - #
> - # If its a wildcard, then check that there are files that match.
> - #
> - if echo "$line" | grep '\*' > /dev/null
> - then
> - if [ `eval find "$line" -name '*.ko' 2>/dev/null|wc -l` -lt 1 ]
> - then
> - echo SUB_INST Warning - No files in $line
> - fi
> - #
> - # Else it should be a single file reference.
> - #
> - elif [ ! -f "$line" ]
> - then
> - echo SUB_INST Warning - could not find "$line"
> - fi
> -)
> -done
> -
> -cat ${DEBIAN}/sub-flavours/$TO.list | while read line; do
> - (
> - cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel;
> - if echo "$line" | grep '\*' > /dev/null
> - then
> - eval find "$line" -name '*.ko' 2>/dev/null || true
> - elif [ -f "$line" ]
> - then
> - echo "$line"
> - fi
> - );
> -done | while read mod; do
> - echo "SUB_INST checking: $mod"
> - fromdir="/lib/modules/$ABI_RELEASE-$FROM/"
> - egrep "^($fromdir)?kernel/$mod:" \
> - $from_moddir/modules.dep | sed -e "s|^$fromdir||" -e 's/://' -e 's/ /\n/g' | \
> - while read m; do
> - m="${fromdir}$m"
> - test -f debian/$to_pkg/$m && continue
> - echo "SUB_INST installing: $m"
> - install -D -m644 debian/$from_pkg/$m \
> - debian/$to_pkg/$m
> - done
> -done
> --
> 2.40.1
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list