[UNSTABLE][PATCH 1/2] UBUNTU: [Packaging] Switch to 3.0 dpkg source formats

Masahiro Yamada masahiro.yamada at canonical.com
Wed Feb 14 06:12:31 UTC 2024


On Wed, Feb 7, 2024 at 11:02 AM Dimitri John Ledkov
<dimitri.ledkov at canonical.com> wrote:
>
> This patch switches packaging to 3.0 dpkg source formats. Using native
> (no orig-tarball) for RC releases, and quilt (with orig tarball) for
> released kernels.
>
> This is a minimal conversion to the new formats. The immediate benefit
> is ability to use xz compression for the source tarballs, GPG verified
> upstream tarballs, and simplify kernel patching for those that are
> rebuilding Ubuntu kernels.
>
> Once this is applied we will then be able to further simplify our
> packaging by collapsing debian.* directories under debian dir, and
> significantly reducing - if not eliminating our reconstruct scripts.
>
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
> ---
>  debian/rules.d/1-maintainer.mk |  2 ++
>  debian/source/format           |  2 +-
>  debian/source/local-options    | 12 ++++++++++++
>  3 files changed, 15 insertions(+), 1 deletion(-)
>  create mode 100644 debian/source/local-options
>
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index dfcd814e2d..51eae55f78 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -114,8 +114,10 @@ autoreconstruct:
>         # No need for reconstruct for -rc kernels since we don't upload an
>         # orig tarball, so just remove it.
>         if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \
> +               echo "3.0 (native)" > debian/source/format; \
>                 echo "exit 0" >$(DEBIAN)/reconstruct; \
>         else \
> +               echo "3.0 (quilt)" > debian/source/format; \
>                 $(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options; \
>         fi
>
> diff --git a/debian/source/format b/debian/source/format
> index d3827e75a5..89ae9db8f8 100644
> --- a/debian/source/format
> +++ b/debian/source/format
> @@ -1 +1 @@
> -1.0
> +3.0 (native)



debian/source/format is version-controlled
and then recreated by debian/rules.d/1-maintainer.mk

You should do either of them, not both.




> diff --git a/debian/source/local-options b/debian/source/local-options
> new file mode 100644
> index 0000000000..d77c6f2631
> --- /dev/null
> +++ b/debian/source/local-options
> @@ -0,0 +1,12 @@
> +# Do not ingore removed files and include them in the automatically
> +# generated patch
> +include-removal
> +# Do not try to prepare the build tree by applying patches which are
> +# apparently unapplied
> +no-preparation
> +# Use debian-changes patch name without version number
> +single-debian-patch
> +# Do not try to unapply patches
> +no-unapply-patches
> +# Automatically add to quilt series the autogenerated patch
> +auto-commit

This is a good progress, although I am not a big fan of auto-commit,
which can include garbage files into the source file if you missed
to run 'git clean' in advance.

Also, it does not handle addition of symlinks
as far as I understood.



More information about the kernel-team mailing list