diff mbox series

[Plucky/Unstable] UBUNTU: [Packaging] replace $(DROOT) with debian

Message ID 20241030111829.74488-1-masahiro.yamada@canonical.com
State New
Headers show
Series [Plucky/Unstable] UBUNTU: [Packaging] replace $(DROOT) with debian | expand

Commit Message

Masahiro Yamada Oct. 30, 2024, 11:18 a.m. UTC
If DROOT is not set to 'debian', our debian scripts do not work at all.
This variable is therefore not useful.

Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
---
 debian/rules                    | 33 +++++++++++++++------------------
 debian/rules.d/1-maintainer.mk  | 10 +++++-----
 debian/rules.d/2-binary-arch.mk | 20 ++++++++++----------
 debian/rules.d/4-checks.mk      |  8 ++++----
 4 files changed, 34 insertions(+), 37 deletions(-)

Comments

Agathe Porte Oct. 30, 2024, 2:06 p.m. UTC | #1
2024-10-30 12:19 CET, Masahiro Yamada:
> If DROOT is not set to 'debian', our debian scripts do not work at all.
> This variable is therefore not useful.

Agreed. I checked in a derivative and it does not seem to be changed
unlike the DEBIAN variable. Also it is shorter to type, which is nice:

	$ echo '$(DROOT)/' | wc -c
	10

	$ echo 'debian/' | wc -c
	8

Finally we already use debian/ in some of these files so this will allow
us to be consistent.

Acked-by: Agathe Porte <agathe.porte@canonical.com>
You-Sheng Yang Oct. 30, 2024, 9:02 p.m. UTC | #2
Hi, could you help elaborate what error is?

Masahiro Yamada <masahiro.yamada@canonical.com> 於 2024年10月30日 週三 12:19 寫道:

> If DROOT is not set to 'debian', our debian scripts do not work at all.
> This variable is therefore not useful.
>
> Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> ---
>  debian/rules                    | 33 +++++++++++++++------------------
>  debian/rules.d/1-maintainer.mk  | 10 +++++-----
>  debian/rules.d/2-binary-arch.mk | 20 ++++++++++----------
>  debian/rules.d/4-checks.mk      |  8 ++++----
>  4 files changed, 34 insertions(+), 37 deletions(-)
>
> diff --git a/debian/rules b/debian/rules
> index 48298523431c..76b8fe1ec964 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -26,15 +26,12 @@ unexport LDFLAGS
>  export LC_ALL=C
>  export SHELL=/bin/bash -e
>
> -# Where do we find the common configuration.
> -export DROOT=debian
> -
>  # Temporary workaround to fix build issues if only python2 runtime is
> installed
>  # (without python3-dev).
>  export PYTHON=python3
>
>  # Common variables for all architectures
> -include $(DROOT)/rules.d/0-common-vars.mk
> +include debian/rules.d/0-common-vars.mk
>
>  # Pull in some arch specific stuff
>  -include $(DEBIAN)/rules.d/$(arch).mk
> @@ -43,7 +40,7 @@ include $(DROOT)/rules.d/0-common-vars.mk
>  -include $(DEBIAN)/rules.d/hooks.mk
>
>  # Maintainer targets
> -include $(DROOT)/rules.d/1-maintainer.mk
> +include debian/rules.d/1-maintainer.mk
>
>  do_linux_tools=$(sort $(filter-out false,$(do_tools_usbip)
> $(do_tools_cpupower) $(do_tools_perf) $(do_tools_bpftool) $(do_tools_x86)))
>  do_cloud_tools=$(sort $(filter-out false,$(do_tools_hyperv)))
> @@ -149,22 +146,22 @@ clean: debian/control debian/canonical-certs.pem
> debian/canonical-revoked-certs.
>         [ -f $(DEBIAN)/reconstruct ] && bash $(DEBIAN)/reconstruct || true
>
>         # Remove generated intermediate files
> -       rm -f $(DROOT)/control.stub $(DEBIAN)/control.stub
> -       rm -f $(DROOT)/scripts/fix-filenames
> +       rm -f debian/control.stub $(DEBIAN)/control.stub
> +       rm -f debian/scripts/fix-filenames
>
>  .PHONY: distclean
>  distclean: clean
> -       rm -rf $(DROOT)/control debian/changelog \
> +       rm -rf debian/control debian/changelog \
>                 debian/control debian/control.stub debian/copyright
>
>  # Builds the image, arch headers and debug packages
> -include $(DROOT)/rules.d/2-binary-arch.mk
> +include debian/rules.d/2-binary-arch.mk
>
>  # Builds the source and linux-headers indep packages
> -include $(DROOT)/rules.d/3-binary-indep.mk
> +include debian/rules.d/3-binary-indep.mk
>
>  # Various checks to be performed on builds
> -include $(DROOT)/rules.d/4-checks.mk
> +include debian/rules.d/4-checks.mk
>
>  control_files := $(DEBIAN)/control.stub.in
>  ifeq ($(src_pkg_name),linux)
> @@ -182,10 +179,10 @@ UBUNTU_COMPATIBLE_SIGNING=$(shell grep -qx '
> *Subject: C = GB, ST = Isle of Man,
>  # Misc stuff
>  .PHONY: $(DEBIAN)/control.stub
>  $(DEBIAN)/control.stub:                                \
> -               $(DROOT)/scripts/control-create         \
> +               debian/scripts/control-create           \
>                 $(control_files)                        \
>                 debian/canonical-revoked-certs.pem      \
> -               $(DROOT)/control.d/flavour-module.stub  \
> +               debian/control.d/flavour-module.stub    \
>                 $(DEBIAN)/changelog                     \
>                 $(wildcard $(DEBIAN)/control.d/*)
>         for i in $(control_files); do
>      \
> @@ -201,7 +198,7 @@ $(DEBIAN)/control.stub:                             \
>           > $(DEBIAN)/control.stub;
>         flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.*))";\
>         for i in $$flavours; do
>      \
> -         $(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" |
>       \
> +         $(SHELL) debian/scripts/control-create $$i "$(any_signed)" |  \
>                 sed -e 's/PKGVER/$(release)/g'
>       \
>                 -e 's/ABINUM/$(abinum)/g'
>      \
>                 -e 's/SRCPKGNAME/$(src_pkg_name)/g'
>      \
> @@ -214,10 +211,10 @@ $(DEBIAN)/control.stub:                           \
>  debian/control: $(DEBIAN)/control.stub
>         cp $(DEBIAN)/control.stub debian/control
>
> -debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem)
> $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard
> $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
> +debian/canonical-certs.pem: $(wildcard debian/certs/*-all.pem) $(wildcard
> debian/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem)
> $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
>         for cert in $(sort $(notdir $^));
>      \
>         do
>       \
> -               for dir in $(DEBIAN) $(DROOT);
>       \
> +               for dir in $(DEBIAN) debian;
>       \
>                 do
>       \
>                         if [ -f "$$dir/certs/$$cert" ]; then
>       \
>                                 cat "$$dir/certs/$$cert";
>      \
> @@ -226,10 +223,10 @@ debian/canonical-certs.pem: $(wildcard
> $(DROOT)/certs/*-all.pem) $(wildcard $(DR
>                 done;
>      \
>         done >"$@"
>
> -debian/canonical-revoked-certs.pem: $(wildcard
> $(DROOT)/revoked-certs/*-all.pem) $(wildcard
> $(DROOT)/revoked-certs/*-$(arch).pem) $(wildcard
> $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard
> $(DEBIAN)/revoked-certs/*-$(arch).pem)
> +debian/canonical-revoked-certs.pem: $(wildcard
> debian/revoked-certs/*-all.pem) $(wildcard
> debian/revoked-certs/*-$(arch).pem) $(wildcard
> $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard
> $(DEBIAN)/revoked-certs/*-$(arch).pem)
>         for cert in $(sort $(notdir $^));
>      \
>         do
>       \
> -               for dir in $(DEBIAN) $(DROOT);
>       \
> +               for dir in $(DEBIAN) debian;
>       \
>                 do
>       \
>                         if [ -f "$$dir/revoked-certs/$$cert" ]; then
>       \
>                                 cat "$$dir/revoked-certs/$$cert";
>      \
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/
> 1-maintainer.mk
> index db2d7b99a312..f26a93fe1113 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -29,7 +29,7 @@ configs-targets := updateconfigs defaultconfigs
> genconfigs editconfigs
>  $(configs-targets):
>         dh_testdir
>         kmake='$(kmake)' skip_checks=$(do_skip_checks)
> conc_level=$(conc_level) \
> -               $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@
> +               $(SHELL) debian/scripts/misc/kernelconfig $@
>
>  .PHONY: printenv
>  printenv:
> @@ -102,11 +102,11 @@ printchanges:
>                         gawk '/UBUNTU:\s*Ubuntu-.*$$/ { print $$1; exit
> }'); \
>         fi; \
>         git log "$$baseCommit"..HEAD | \
> -       $(DROOT)/scripts/misc/git-ubuntu-log
> +       debian/scripts/misc/git-ubuntu-log
>
>  .PHONY: insertchanges
>  insertchanges: autoreconstruct finalchecks
> -       $(DROOT)/scripts/misc/insert-changes $(DROOT) $(DEBIAN)
> +       debian/scripts/misc/insert-changes debian $(DEBIAN)
>
>  .PHONY: autoreconstruct
>  autoreconstruct:
> @@ -115,12 +115,12 @@ autoreconstruct:
>         if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \
>                 echo "exit 0" >$(DEBIAN)/reconstruct; \
>         else \
> -               $(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag)
> $(DEBIAN)/reconstruct $(DROOT)/source/options; \
> +               debian/scripts/misc/gen-auto-reconstruct $(upstream_tag)
> $(DEBIAN)/reconstruct debian/source/options; \
>         fi
>
>  .PHONY: finalchecks
>  finalchecks: debian/control
> -       $(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)"
> $(do_skip_checks)
> +       debian/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)"
> $(do_skip_checks)
>
>  .PHONY: compileselftests
>  compileselftests:
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/
> 2-binary-arch.mk
> index 94c9cd5c6b89..6ba3904c0980 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -54,14 +54,14 @@ define build_dkms_sign =
>         )
>  endef
>  define build_dkms =
> -       rc=0; unset MAKEFLAGS; ARCH=$(build_arch)
> CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) $(DROOT)/scripts/dkms-build
> $(dkms_dir) $(abi_release)-$* '$(call
> build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?;
> if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >>
> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit
> $$rc; fi
> +       rc=0; unset MAKEFLAGS; ARCH=$(build_arch)
> CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) debian/scripts/dkms-build
> $(dkms_dir) $(abi_release)-$* '$(call
> build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?;
> if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >>
> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit
> $$rc; fi
>  endef
>
>  define install_control =
>         for which in $(3);
>       \
>         do
>       \
> -               template="$(DROOT)/templates/$(2).$$which.in";
>       \
> -               script="$(DROOT)/$(1).$$which";
>      \
> +               template="debian/templates/$(2).$$which.in";
>       \
> +               script="debian/$(1).$$which";
>      \
>                 sed -e 's/@abiname@/$(abi_release)/g'
>        \
>                     -e 's/@localversion@/-$*/g'
>        \
>                     -e 's/@image-stem@/$(instfile)/g'
>        \
> @@ -191,7 +191,7 @@ ifeq ($(do_extras_package),true)
>                 mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \
>                 mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
>                         $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel;
> \
> -               $(SHELL) $(DROOT)/scripts/module-inclusion --master \
> +               $(SHELL) debian/scripts/module-inclusion --master \
>                         $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
>                         $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
>
> $(DEBIAN)/control.d/$(target_flavour).inclusion-list \
> @@ -221,7 +221,7 @@ endif
>                 $(pkgdir)/lib/modules/$(abi_release)-$*/initrd/; \
>         fi
>
> -       echo "interest linux-update-$(abi_release)-$*"
> >"$(DROOT)/$(bin_pkg_name)-$*.triggers"
> +       echo "interest linux-update-$(abi_release)-$*"
> >"debian/$(bin_pkg_name)-$*.triggers"
>         install -d $(pkgdir_bin)/usr/lib/linux/triggers
>         $(call install_control,$(bin_pkg_name)-$*,image,postinst postrm
> preinst prerm)
>         install -d $(pkgdir)/usr/lib/linux/triggers
> @@ -295,7 +295,7 @@ endif
>         # Copy over scripts/module.lds for building external modules
>         cp $(builddir)/build-$*/scripts/module.lds $(hdrdir)/scripts
>         # Script to symlink everything up
> -       $(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)"
> "$*"
> +       $(SHELL) debian/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
>         # The build symlink
>         install -d debian/$(basepkg)-$*/lib/modules/$(abi_release)-$*
>         $(LN) /usr/src/$(basepkg)-$* \
> @@ -313,7 +313,7 @@ endif
>          PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)"           \
>          PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*" \
>          INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)"                 \
> -        run-parts -v $(DROOT)/tests-build
> +        run-parts -v debian/tests-build
>
>         #
>         # Remove files which are generated at installation by postinst,
> @@ -472,8 +472,8 @@ endif
>                 install -m644 $(abidir)/$*.fwinfo.builtin \
>
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/fwinfo.builtin; \
>         fi
> -       install -m644 $(DROOT)/canonical-certs.pem
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
> -       install -m644 $(DROOT)/canonical-revoked-certs.pem
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
> +       install -m644 debian/canonical-certs.pem
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
> +       install -m644 debian/canonical-revoked-certs.pem
> $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
>
>         # Get rid of .o and .cmd artifacts in headers
>         find $(hdrdir) -name \*.o -or -name \*.cmd -exec rm -f {} \;
> @@ -484,7 +484,7 @@ endif
>         install -d -m755 $(rustdir)
>         mv $(hdrdir)/rust $(rustdir)
>         # Generate symlink for Rust lib directory in headers
> -       $(SHELL) $(DROOT)/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)"
> "$*"
> +       $(SHELL) debian/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)"
> "$*"
>
>  ifneq ($(do_full_build),false)
>         # Clean out this flavours build directory.
> diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk
> index 7cb84e9f71e5..9c840af3698e 100644
> --- a/debian/rules.d/4-checks.mk
> +++ b/debian/rules.d/4-checks.mk
> @@ -1,9 +1,9 @@
>  # Check the signature of staging modules
>  module-signature-check-%: $(stampdir)/stamp-install-%
>         @echo Debug: $@
> -       $(DROOT)/scripts/checks/module-signature-check "$*" \
> -               "$(DROOT)/$(mods_pkg_name)-$*" \
> -               "$(DROOT)/$(mods_extra_pkg_name)-$*" \
> +       debian/scripts/checks/module-signature-check "$*" \
> +               "debian/$(mods_pkg_name)-$*" \
> +               "debian/$(mods_extra_pkg_name)-$*" \
>                 $(do_skip_checks)
>
>  checks-%: module-signature-check-%
> @@ -13,6 +13,6 @@ checks-%: module-signature-check-%
>  config-prepare-check-%: $(stampdir)/stamp-prepare-tree-%
>         @echo Debug: $@
>  ifneq ($(do_skip_checks),true)
> -       python3 $(DROOT)/scripts/misc/annotations -f
> $(commonconfdir)/annotations \
> +       python3 debian/scripts/misc/annotations -f
> $(commonconfdir)/annotations \
>                 --arch $(arch) --flavour $* --check
> $(builddir)/build-$*/.config
>  endif
> --
> 2.43.0
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
Masahiro Yamada Oct. 31, 2024, 6:52 a.m. UTC | #3
On Wed, Oct 30, 2024 at 10:03 PM You-Sheng Yang
<vicamo.yang@canonical.com> wrote:
>
> Hi, could you help elaborate what error is?

No. This is not a bug fix.

This is a clean-up patch.
You-Sheng Yang Oct. 31, 2024, 10:09 a.m. UTC | #4
Per offline conversation, there are already tons of appearances of
string "debian/", so it's meaningless to define a variable here.

Acked-by: You-Sheng Yang <vicamo.yang@canonical.com>

On Wed, Oct 30, 2024 at 12:19 PM Masahiro Yamada
<masahiro.yamada@canonical.com> wrote:
>
> If DROOT is not set to 'debian', our debian scripts do not work at all.
> This variable is therefore not useful.
>
> Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
> ---
>  debian/rules                    | 33 +++++++++++++++------------------
>  debian/rules.d/1-maintainer.mk  | 10 +++++-----
>  debian/rules.d/2-binary-arch.mk | 20 ++++++++++----------
>  debian/rules.d/4-checks.mk      |  8 ++++----
>  4 files changed, 34 insertions(+), 37 deletions(-)
>
> diff --git a/debian/rules b/debian/rules
> index 48298523431c..76b8fe1ec964 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -26,15 +26,12 @@ unexport LDFLAGS
>  export LC_ALL=C
>  export SHELL=/bin/bash -e
>
> -# Where do we find the common configuration.
> -export DROOT=debian
> -
>  # Temporary workaround to fix build issues if only python2 runtime is installed
>  # (without python3-dev).
>  export PYTHON=python3
>
>  # Common variables for all architectures
> -include $(DROOT)/rules.d/0-common-vars.mk
> +include debian/rules.d/0-common-vars.mk
>
>  # Pull in some arch specific stuff
>  -include $(DEBIAN)/rules.d/$(arch).mk
> @@ -43,7 +40,7 @@ include $(DROOT)/rules.d/0-common-vars.mk
>  -include $(DEBIAN)/rules.d/hooks.mk
>
>  # Maintainer targets
> -include $(DROOT)/rules.d/1-maintainer.mk
> +include debian/rules.d/1-maintainer.mk
>
>  do_linux_tools=$(sort $(filter-out false,$(do_tools_usbip) $(do_tools_cpupower) $(do_tools_perf) $(do_tools_bpftool) $(do_tools_x86)))
>  do_cloud_tools=$(sort $(filter-out false,$(do_tools_hyperv)))
> @@ -149,22 +146,22 @@ clean: debian/control debian/canonical-certs.pem debian/canonical-revoked-certs.
>         [ -f $(DEBIAN)/reconstruct ] && bash $(DEBIAN)/reconstruct || true
>
>         # Remove generated intermediate files
> -       rm -f $(DROOT)/control.stub $(DEBIAN)/control.stub
> -       rm -f $(DROOT)/scripts/fix-filenames
> +       rm -f debian/control.stub $(DEBIAN)/control.stub
> +       rm -f debian/scripts/fix-filenames
>
>  .PHONY: distclean
>  distclean: clean
> -       rm -rf $(DROOT)/control debian/changelog \
> +       rm -rf debian/control debian/changelog \
>                 debian/control debian/control.stub debian/copyright
>
>  # Builds the image, arch headers and debug packages
> -include $(DROOT)/rules.d/2-binary-arch.mk
> +include debian/rules.d/2-binary-arch.mk
>
>  # Builds the source and linux-headers indep packages
> -include $(DROOT)/rules.d/3-binary-indep.mk
> +include debian/rules.d/3-binary-indep.mk
>
>  # Various checks to be performed on builds
> -include $(DROOT)/rules.d/4-checks.mk
> +include debian/rules.d/4-checks.mk
>
>  control_files := $(DEBIAN)/control.stub.in
>  ifeq ($(src_pkg_name),linux)
> @@ -182,10 +179,10 @@ UBUNTU_COMPATIBLE_SIGNING=$(shell grep -qx ' *Subject: C = GB, ST = Isle of Man,
>  # Misc stuff
>  .PHONY: $(DEBIAN)/control.stub
>  $(DEBIAN)/control.stub:                                \
> -               $(DROOT)/scripts/control-create         \
> +               debian/scripts/control-create           \
>                 $(control_files)                        \
>                 debian/canonical-revoked-certs.pem      \
> -               $(DROOT)/control.d/flavour-module.stub  \
> +               debian/control.d/flavour-module.stub    \
>                 $(DEBIAN)/changelog                     \
>                 $(wildcard $(DEBIAN)/control.d/*)
>         for i in $(control_files); do                                           \
> @@ -201,7 +198,7 @@ $(DEBIAN)/control.stub:                             \
>           > $(DEBIAN)/control.stub;
>         flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.*))";\
>         for i in $$flavours; do                                                 \
> -         $(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" |        \
> +         $(SHELL) debian/scripts/control-create $$i "$(any_signed)" |  \
>                 sed -e 's/PKGVER/$(release)/g'                                  \
>                 -e 's/ABINUM/$(abinum)/g'                                       \
>                 -e 's/SRCPKGNAME/$(src_pkg_name)/g'                             \
> @@ -214,10 +211,10 @@ $(DEBIAN)/control.stub:                           \
>  debian/control: $(DEBIAN)/control.stub
>         cp $(DEBIAN)/control.stub debian/control
>
> -debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
> +debian/canonical-certs.pem: $(wildcard debian/certs/*-all.pem) $(wildcard debian/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
>         for cert in $(sort $(notdir $^));                                       \
>         do                                                                      \
> -               for dir in $(DEBIAN) $(DROOT);                                  \
> +               for dir in $(DEBIAN) debian;                                    \
>                 do                                                              \
>                         if [ -f "$$dir/certs/$$cert" ]; then                    \
>                                 cat "$$dir/certs/$$cert";                       \
> @@ -226,10 +223,10 @@ debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DR
>                 done;                                                           \
>         done >"$@"
>
> -debian/canonical-revoked-certs.pem: $(wildcard $(DROOT)/revoked-certs/*-all.pem) $(wildcard $(DROOT)/revoked-certs/*-$(arch).pem) $(wildcard $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard $(DEBIAN)/revoked-certs/*-$(arch).pem)
> +debian/canonical-revoked-certs.pem: $(wildcard debian/revoked-certs/*-all.pem) $(wildcard debian/revoked-certs/*-$(arch).pem) $(wildcard $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard $(DEBIAN)/revoked-certs/*-$(arch).pem)
>         for cert in $(sort $(notdir $^));                                       \
>         do                                                                      \
> -               for dir in $(DEBIAN) $(DROOT);                                  \
> +               for dir in $(DEBIAN) debian;                                    \
>                 do                                                              \
>                         if [ -f "$$dir/revoked-certs/$$cert" ]; then            \
>                                 cat "$$dir/revoked-certs/$$cert";               \
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index db2d7b99a312..f26a93fe1113 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -29,7 +29,7 @@ configs-targets := updateconfigs defaultconfigs genconfigs editconfigs
>  $(configs-targets):
>         dh_testdir
>         kmake='$(kmake)' skip_checks=$(do_skip_checks) conc_level=$(conc_level) \
> -               $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@
> +               $(SHELL) debian/scripts/misc/kernelconfig $@
>
>  .PHONY: printenv
>  printenv:
> @@ -102,11 +102,11 @@ printchanges:
>                         gawk '/UBUNTU:\s*Ubuntu-.*$$/ { print $$1; exit }'); \
>         fi; \
>         git log "$$baseCommit"..HEAD | \
> -       $(DROOT)/scripts/misc/git-ubuntu-log
> +       debian/scripts/misc/git-ubuntu-log
>
>  .PHONY: insertchanges
>  insertchanges: autoreconstruct finalchecks
> -       $(DROOT)/scripts/misc/insert-changes $(DROOT) $(DEBIAN)
> +       debian/scripts/misc/insert-changes debian $(DEBIAN)
>
>  .PHONY: autoreconstruct
>  autoreconstruct:
> @@ -115,12 +115,12 @@ autoreconstruct:
>         if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \
>                 echo "exit 0" >$(DEBIAN)/reconstruct; \
>         else \
> -               $(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options; \
> +               debian/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct debian/source/options; \
>         fi
>
>  .PHONY: finalchecks
>  finalchecks: debian/control
> -       $(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks)
> +       debian/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks)
>
>  .PHONY: compileselftests
>  compileselftests:
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 94c9cd5c6b89..6ba3904c0980 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -54,14 +54,14 @@ define build_dkms_sign =
>         )
>  endef
>  define build_dkms =
> -       rc=0; unset MAKEFLAGS; ARCH=$(build_arch) CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) $(DROOT)/scripts/dkms-build $(dkms_dir) $(abi_release)-$* '$(call build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?; if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit $$rc; fi
> +       rc=0; unset MAKEFLAGS; ARCH=$(build_arch) CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) debian/scripts/dkms-build $(dkms_dir) $(abi_release)-$* '$(call build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?; if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit $$rc; fi
>  endef
>
>  define install_control =
>         for which in $(3);                                                      \
>         do                                                                      \
> -               template="$(DROOT)/templates/$(2).$$which.in";                  \
> -               script="$(DROOT)/$(1).$$which";                                 \
> +               template="debian/templates/$(2).$$which.in";                    \
> +               script="debian/$(1).$$which";                                   \
>                 sed -e 's/@abiname@/$(abi_release)/g'                           \
>                     -e 's/@localversion@/-$*/g'                                 \
>                     -e 's/@image-stem@/$(instfile)/g'                           \
> @@ -191,7 +191,7 @@ ifeq ($(do_extras_package),true)
>                 mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \
>                 mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
>                         $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel; \
> -               $(SHELL) $(DROOT)/scripts/module-inclusion --master \
> +               $(SHELL) debian/scripts/module-inclusion --master \
>                         $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
>                         $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
>                         $(DEBIAN)/control.d/$(target_flavour).inclusion-list \
> @@ -221,7 +221,7 @@ endif
>                 $(pkgdir)/lib/modules/$(abi_release)-$*/initrd/; \
>         fi
>
> -       echo "interest linux-update-$(abi_release)-$*" >"$(DROOT)/$(bin_pkg_name)-$*.triggers"
> +       echo "interest linux-update-$(abi_release)-$*" >"debian/$(bin_pkg_name)-$*.triggers"
>         install -d $(pkgdir_bin)/usr/lib/linux/triggers
>         $(call install_control,$(bin_pkg_name)-$*,image,postinst postrm preinst prerm)
>         install -d $(pkgdir)/usr/lib/linux/triggers
> @@ -295,7 +295,7 @@ endif
>         # Copy over scripts/module.lds for building external modules
>         cp $(builddir)/build-$*/scripts/module.lds $(hdrdir)/scripts
>         # Script to symlink everything up
> -       $(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
> +       $(SHELL) debian/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
>         # The build symlink
>         install -d debian/$(basepkg)-$*/lib/modules/$(abi_release)-$*
>         $(LN) /usr/src/$(basepkg)-$* \
> @@ -313,7 +313,7 @@ endif
>          PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)"           \
>          PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*" \
>          INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)"                 \
> -        run-parts -v $(DROOT)/tests-build
> +        run-parts -v debian/tests-build
>
>         #
>         # Remove files which are generated at installation by postinst,
> @@ -472,8 +472,8 @@ endif
>                 install -m644 $(abidir)/$*.fwinfo.builtin \
>                         $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/fwinfo.builtin; \
>         fi
> -       install -m644 $(DROOT)/canonical-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
> -       install -m644 $(DROOT)/canonical-revoked-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
> +       install -m644 debian/canonical-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
> +       install -m644 debian/canonical-revoked-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
>
>         # Get rid of .o and .cmd artifacts in headers
>         find $(hdrdir) -name \*.o -or -name \*.cmd -exec rm -f {} \;
> @@ -484,7 +484,7 @@ endif
>         install -d -m755 $(rustdir)
>         mv $(hdrdir)/rust $(rustdir)
>         # Generate symlink for Rust lib directory in headers
> -       $(SHELL) $(DROOT)/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)" "$*"
> +       $(SHELL) debian/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)" "$*"
>
>  ifneq ($(do_full_build),false)
>         # Clean out this flavours build directory.
> diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk
> index 7cb84e9f71e5..9c840af3698e 100644
> --- a/debian/rules.d/4-checks.mk
> +++ b/debian/rules.d/4-checks.mk
> @@ -1,9 +1,9 @@
>  # Check the signature of staging modules
>  module-signature-check-%: $(stampdir)/stamp-install-%
>         @echo Debug: $@
> -       $(DROOT)/scripts/checks/module-signature-check "$*" \
> -               "$(DROOT)/$(mods_pkg_name)-$*" \
> -               "$(DROOT)/$(mods_extra_pkg_name)-$*" \
> +       debian/scripts/checks/module-signature-check "$*" \
> +               "debian/$(mods_pkg_name)-$*" \
> +               "debian/$(mods_extra_pkg_name)-$*" \
>                 $(do_skip_checks)
>
>  checks-%: module-signature-check-%
> @@ -13,6 +13,6 @@ checks-%: module-signature-check-%
>  config-prepare-check-%: $(stampdir)/stamp-prepare-tree-%
>         @echo Debug: $@
>  ifneq ($(do_skip_checks),true)
> -       python3 $(DROOT)/scripts/misc/annotations -f $(commonconfdir)/annotations \
> +       python3 debian/scripts/misc/annotations -f $(commonconfdir)/annotations \
>                 --arch $(arch) --flavour $* --check $(builddir)/build-$*/.config
>  endif
> --
> 2.43.0
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Paolo Pisati Nov. 4, 2024, 2:09 p.m. UTC | #5
On Wed, Oct 30, 2024 at 12:18:29PM +0100, Masahiro Yamada wrote:
> If DROOT is not set to 'debian', our debian scripts do not work at all.
> This variable is therefore not useful.

Can you rebase on latest unstable/master and resend please?

Thank you.
Masahiro Yamada Nov. 5, 2024, 8:50 a.m. UTC | #6
On Mon, Nov 4, 2024 at 11:10 PM Paolo Pisati <paolo.pisati@canonical.com> wrote:
>
> On Wed, Oct 30, 2024 at 12:18:29PM +0100, Masahiro Yamada wrote:
> > If DROOT is not set to 'debian', our debian scripts do not work at all.
> > This variable is therefore not useful.
>
> Can you rebase on latest unstable/master and resend please?

Sure. I will send v2.
diff mbox series

Patch

diff --git a/debian/rules b/debian/rules
index 48298523431c..76b8fe1ec964 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,15 +26,12 @@  unexport LDFLAGS
 export LC_ALL=C
 export SHELL=/bin/bash -e
 
-# Where do we find the common configuration.
-export DROOT=debian
-
 # Temporary workaround to fix build issues if only python2 runtime is installed
 # (without python3-dev).
 export PYTHON=python3
 
 # Common variables for all architectures
-include $(DROOT)/rules.d/0-common-vars.mk
+include debian/rules.d/0-common-vars.mk
 
 # Pull in some arch specific stuff
 -include $(DEBIAN)/rules.d/$(arch).mk
@@ -43,7 +40,7 @@  include $(DROOT)/rules.d/0-common-vars.mk
 -include $(DEBIAN)/rules.d/hooks.mk
 
 # Maintainer targets
-include $(DROOT)/rules.d/1-maintainer.mk
+include debian/rules.d/1-maintainer.mk
 
 do_linux_tools=$(sort $(filter-out false,$(do_tools_usbip) $(do_tools_cpupower) $(do_tools_perf) $(do_tools_bpftool) $(do_tools_x86)))
 do_cloud_tools=$(sort $(filter-out false,$(do_tools_hyperv)))
@@ -149,22 +146,22 @@  clean: debian/control debian/canonical-certs.pem debian/canonical-revoked-certs.
 	[ -f $(DEBIAN)/reconstruct ] && bash $(DEBIAN)/reconstruct || true
 
 	# Remove generated intermediate files
-	rm -f $(DROOT)/control.stub $(DEBIAN)/control.stub
-	rm -f $(DROOT)/scripts/fix-filenames
+	rm -f debian/control.stub $(DEBIAN)/control.stub
+	rm -f debian/scripts/fix-filenames
 
 .PHONY: distclean
 distclean: clean
-	rm -rf $(DROOT)/control debian/changelog \
+	rm -rf debian/control debian/changelog \
 		debian/control debian/control.stub debian/copyright
 
 # Builds the image, arch headers and debug packages
-include $(DROOT)/rules.d/2-binary-arch.mk
+include debian/rules.d/2-binary-arch.mk
 
 # Builds the source and linux-headers indep packages
-include $(DROOT)/rules.d/3-binary-indep.mk
+include debian/rules.d/3-binary-indep.mk
 
 # Various checks to be performed on builds
-include $(DROOT)/rules.d/4-checks.mk
+include debian/rules.d/4-checks.mk
 
 control_files := $(DEBIAN)/control.stub.in
 ifeq ($(src_pkg_name),linux)
@@ -182,10 +179,10 @@  UBUNTU_COMPATIBLE_SIGNING=$(shell grep -qx ' *Subject: C = GB, ST = Isle of Man,
 # Misc stuff
 .PHONY: $(DEBIAN)/control.stub
 $(DEBIAN)/control.stub: 				\
-		$(DROOT)/scripts/control-create		\
+		debian/scripts/control-create		\
 		$(control_files)			\
 		debian/canonical-revoked-certs.pem	\
-		$(DROOT)/control.d/flavour-module.stub	\
+		debian/control.d/flavour-module.stub	\
 		$(DEBIAN)/changelog			\
 		$(wildcard $(DEBIAN)/control.d/*)
 	for i in $(control_files); do                                           \
@@ -201,7 +198,7 @@  $(DEBIAN)/control.stub: 				\
 	  > $(DEBIAN)/control.stub;
 	flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.*))";\
 	for i in $$flavours; do							\
-	  $(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" |	\
+	  $(SHELL) debian/scripts/control-create $$i "$(any_signed)" |	\
 		sed -e 's/PKGVER/$(release)/g'                                  \
 		-e 's/ABINUM/$(abinum)/g'                                       \
 		-e 's/SRCPKGNAME/$(src_pkg_name)/g'                             \
@@ -214,10 +211,10 @@  $(DEBIAN)/control.stub: 				\
 debian/control: $(DEBIAN)/control.stub
 	cp $(DEBIAN)/control.stub debian/control
 
-debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
+debian/canonical-certs.pem: $(wildcard debian/certs/*-all.pem) $(wildcard debian/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem)
 	for cert in $(sort $(notdir $^));					\
 	do									\
-		for dir in $(DEBIAN) $(DROOT);					\
+		for dir in $(DEBIAN) debian;					\
 		do								\
 			if [ -f "$$dir/certs/$$cert" ]; then			\
 				cat "$$dir/certs/$$cert";			\
@@ -226,10 +223,10 @@  debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DR
 		done;								\
 	done >"$@"
 
-debian/canonical-revoked-certs.pem: $(wildcard $(DROOT)/revoked-certs/*-all.pem) $(wildcard $(DROOT)/revoked-certs/*-$(arch).pem) $(wildcard $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard $(DEBIAN)/revoked-certs/*-$(arch).pem)
+debian/canonical-revoked-certs.pem: $(wildcard debian/revoked-certs/*-all.pem) $(wildcard debian/revoked-certs/*-$(arch).pem) $(wildcard $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard $(DEBIAN)/revoked-certs/*-$(arch).pem)
 	for cert in $(sort $(notdir $^));					\
 	do									\
-		for dir in $(DEBIAN) $(DROOT);					\
+		for dir in $(DEBIAN) debian;					\
 		do								\
 			if [ -f "$$dir/revoked-certs/$$cert" ]; then		\
 				cat "$$dir/revoked-certs/$$cert";		\
diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index db2d7b99a312..f26a93fe1113 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -29,7 +29,7 @@  configs-targets := updateconfigs defaultconfigs genconfigs editconfigs
 $(configs-targets):
 	dh_testdir
 	kmake='$(kmake)' skip_checks=$(do_skip_checks) conc_level=$(conc_level) \
-		$(SHELL) $(DROOT)/scripts/misc/kernelconfig $@
+		$(SHELL) debian/scripts/misc/kernelconfig $@
 
 .PHONY: printenv
 printenv:
@@ -102,11 +102,11 @@  printchanges:
 			gawk '/UBUNTU:\s*Ubuntu-.*$$/ { print $$1; exit }'); \
 	fi; \
 	git log "$$baseCommit"..HEAD | \
-	$(DROOT)/scripts/misc/git-ubuntu-log
+	debian/scripts/misc/git-ubuntu-log
 
 .PHONY: insertchanges
 insertchanges: autoreconstruct finalchecks
-	$(DROOT)/scripts/misc/insert-changes $(DROOT) $(DEBIAN)
+	debian/scripts/misc/insert-changes debian $(DEBIAN)
 
 .PHONY: autoreconstruct
 autoreconstruct:
@@ -115,12 +115,12 @@  autoreconstruct:
 	if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \
 		echo "exit 0" >$(DEBIAN)/reconstruct; \
 	else \
-		$(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options; \
+		debian/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct debian/source/options; \
 	fi
 
 .PHONY: finalchecks
 finalchecks: debian/control
-	$(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks)
+	debian/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks)
 
 .PHONY: compileselftests
 compileselftests:
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 94c9cd5c6b89..6ba3904c0980 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -54,14 +54,14 @@  define build_dkms_sign =
 	)
 endef
 define build_dkms =
-	rc=0; unset MAKEFLAGS; ARCH=$(build_arch) CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) $(DROOT)/scripts/dkms-build $(dkms_dir) $(abi_release)-$* '$(call build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?; if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit $$rc; fi
+	rc=0; unset MAKEFLAGS; ARCH=$(build_arch) CROSS_COMPILE=$(CROSS_COMPILE) $(SHELL) debian/scripts/dkms-build $(dkms_dir) $(abi_release)-$* '$(call build_dkms_sign,$(builddir)/build-$*)' $(1) $(2) $(3) $(4) $(5) || rc=$$?; if [ "$$rc" = "9" -o "$$rc" = "77" ]; then echo do_$(4)_$*=false >> $(builddir)/skipped-dkms.mk; rc=0; fi; if [ "$$rc" != "0" ]; then exit $$rc; fi
 endef
 
 define install_control =
 	for which in $(3);							\
 	do									\
-		template="$(DROOT)/templates/$(2).$$which.in";			\
-		script="$(DROOT)/$(1).$$which";					\
+		template="debian/templates/$(2).$$which.in";			\
+		script="debian/$(1).$$which";					\
 		sed -e 's/@abiname@/$(abi_release)/g'				\
 		    -e 's/@localversion@/-$*/g'					\
 		    -e 's/@image-stem@/$(instfile)/g'				\
@@ -191,7 +191,7 @@  ifeq ($(do_extras_package),true)
 		mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \
 		mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
 			$(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel; \
-		$(SHELL) $(DROOT)/scripts/module-inclusion --master \
+		$(SHELL) debian/scripts/module-inclusion --master \
 			$(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
 			$(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
 			$(DEBIAN)/control.d/$(target_flavour).inclusion-list \
@@ -221,7 +221,7 @@  endif
 		$(pkgdir)/lib/modules/$(abi_release)-$*/initrd/; \
 	fi
 
-	echo "interest linux-update-$(abi_release)-$*" >"$(DROOT)/$(bin_pkg_name)-$*.triggers"
+	echo "interest linux-update-$(abi_release)-$*" >"debian/$(bin_pkg_name)-$*.triggers"
 	install -d $(pkgdir_bin)/usr/lib/linux/triggers
 	$(call install_control,$(bin_pkg_name)-$*,image,postinst postrm preinst prerm)
 	install -d $(pkgdir)/usr/lib/linux/triggers
@@ -295,7 +295,7 @@  endif
 	# Copy over scripts/module.lds for building external modules
 	cp $(builddir)/build-$*/scripts/module.lds $(hdrdir)/scripts
 	# Script to symlink everything up
-	$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
+	$(SHELL) debian/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
 	# The build symlink
 	install -d debian/$(basepkg)-$*/lib/modules/$(abi_release)-$*
 	$(LN) /usr/src/$(basepkg)-$* \
@@ -313,7 +313,7 @@  endif
 	 PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)"		\
 	 PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*"	\
 	 INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)"			\
-	 run-parts -v $(DROOT)/tests-build
+	 run-parts -v debian/tests-build
 
 	#
 	# Remove files which are generated at installation by postinst,
@@ -472,8 +472,8 @@  endif
 		install -m644 $(abidir)/$*.fwinfo.builtin \
 			$(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/fwinfo.builtin; \
 	fi
-	install -m644 $(DROOT)/canonical-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
-	install -m644 $(DROOT)/canonical-revoked-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
+	install -m644 debian/canonical-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
+	install -m644 debian/canonical-revoked-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
 
 	# Get rid of .o and .cmd artifacts in headers
 	find $(hdrdir) -name \*.o -or -name \*.cmd -exec rm -f {} \;
@@ -484,7 +484,7 @@  endif
 	install -d -m755 $(rustdir)
 	mv $(hdrdir)/rust $(rustdir)
 	# Generate symlink for Rust lib directory in headers
-	$(SHELL) $(DROOT)/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)" "$*"
+	$(SHELL) debian/scripts/link-lib-rust "$(hdrdir)" "$(indeppkg)" "$*"
 
 ifneq ($(do_full_build),false)
 	# Clean out this flavours build directory.
diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk
index 7cb84e9f71e5..9c840af3698e 100644
--- a/debian/rules.d/4-checks.mk
+++ b/debian/rules.d/4-checks.mk
@@ -1,9 +1,9 @@ 
 # Check the signature of staging modules
 module-signature-check-%: $(stampdir)/stamp-install-%
 	@echo Debug: $@
-	$(DROOT)/scripts/checks/module-signature-check "$*" \
-		"$(DROOT)/$(mods_pkg_name)-$*" \
-		"$(DROOT)/$(mods_extra_pkg_name)-$*" \
+	debian/scripts/checks/module-signature-check "$*" \
+		"debian/$(mods_pkg_name)-$*" \
+		"debian/$(mods_extra_pkg_name)-$*" \
 		$(do_skip_checks)
 
 checks-%: module-signature-check-%
@@ -13,6 +13,6 @@  checks-%: module-signature-check-%
 config-prepare-check-%: $(stampdir)/stamp-prepare-tree-%
 	@echo Debug: $@
 ifneq ($(do_skip_checks),true)
-	python3 $(DROOT)/scripts/misc/annotations -f $(commonconfdir)/annotations \
+	python3 debian/scripts/misc/annotations -f $(commonconfdir)/annotations \
 		--arch $(arch) --flavour $* --check $(builddir)/build-$*/.config
 endif