Source: alire Version: 1.2.1-2.1 Severity: wishlist Tags: patch Hello.
Here are some suggestions for the packaging of alire in Debian. Please commit, push and maybe upload the changes you agree with. The last commit prepares the gnat-16 transition, in experimental for now. The transition of non-library packages usually only requires a no-change no-commit rebuild with an implicit Build-Depends: gnat (>= 16) but alire will need a normal upload similar to the last commit.
>From 6d809ea30b55476248daf9f9f72ffd7acb6c7aa4 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:01:52 +0100 Subject: [PATCH 01/11] Enable continuous integration on salsa --- debian/salsa-ci.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 debian/salsa-ci.yml diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml new file mode 100644 index 00000000..26871b96 --- /dev/null +++ b/debian/salsa-ci.yml @@ -0,0 +1,2 @@ +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml -- 2.47.3
>From 4ad7be05c12b329d2aecc947c339cec19f351a2c Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:17:40 +0100 Subject: [PATCH 02/11] Update watch file to format version 5 --- debian/watch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/watch b/debian/watch index d0079703..04eacfd7 100644 --- a/debian/watch +++ b/debian/watch @@ -1,5 +1,7 @@ -version=4 +Version: 5 +Template: GitHub +Owner: alire-project +Project: alire # @ANY_VERSION@ would also match beta releases -https://github.com/alire-project/alire/tags \ - (?:.*?/)?v?(\d[\.\d]*)@ARCHIVE_EXT@ +Custom-Version: v(\d+(?:[.]\d+)*) -- 2.47.3
>From 82a167427b44d36b799230e1bae753aff8cca675 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:17:43 +0100 Subject: [PATCH 03/11] Drop obsolete Rules-Requires-Root: no --- debian/control | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/control b/debian/control index e2eb5065..0eef2088 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,6 @@ Build-Depends: libxmlezout-dev, python3, Standards-Version: 4.6.2 -Rules-Requires-Root: no Homepage: https://github.com/alire-project Vcs-Browser: https://salsa.debian.org/debian/alire Vcs-Git: https://salsa.debian.org/debian/alire.git -- 2.47.3
>From eff41f6471dad2edfb52da49de55190ef749ab5a Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:17:45 +0100 Subject: [PATCH 04/11] Drop obsolete Priority: optional --- debian/control | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/control b/debian/control index 0eef2088..45251b3e 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,5 @@ Source: alire Section: devel -Priority: optional Maintainer: Stephane Carrez <[email protected]> Uploaders: Ludovic Brenta <[email protected]> Build-Depends: -- 2.47.3
>From 3a8a85fb23808cb91e1a514cfa03bf6845a52b84 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:18:56 +0100 Subject: [PATCH 05/11] Update Standards-Version to 4.7.4 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 45251b3e..3eb948e8 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Build-Depends: libxmlada-unicode-dev, libxmlezout-dev, python3, -Standards-Version: 4.6.2 +Standards-Version: 4.7.4 Homepage: https://github.com/alire-project Vcs-Browser: https://salsa.debian.org/debian/alire Vcs-Git: https://salsa.debian.org/debian/alire.git -- 2.47.3
>From cd8e270a2ebff64f51a5d31f84a5d131c8c39cea Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:24:35 +0100 Subject: [PATCH 06/11] Update debhelper to compat 14 --- debian/control | 3 +-- debian/rules | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/debian/control b/debian/control index 3eb948e8..ea6a4d16 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Maintainer: Stephane Carrez <[email protected]> Uploaders: Ludovic Brenta <[email protected]> Build-Depends: - debhelper-compat (= 13), + debhelper-compat (= 14), dh-ada-library, gnat, gprbuild (>= 2015-2), @@ -22,7 +22,6 @@ Vcs-Git: https://salsa.debian.org/debian/alire.git Package: alire Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: gnat, gprbuild Description: Ada package manager A catalog of ready-to-use Ada libraries plus a command-line tool diff --git a/debian/rules b/debian/rules index 953ad658..b24858ad 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ include /usr/share/dpkg/buildflags.mk include /usr/share/ada/packaging.mk %: - dh $@ + dh $@ --without single-binary # For now, DPKG_EXPORT_BUILDFLAGS above has no effect and we use the # -cargs -largs gprbuild options. This is better than nothing, but @@ -36,7 +36,3 @@ override_dh_auto_build: # bin/alr crashes if it cannot create HOME/.config/. HOME='$(CURDIR)/debian/man1' \ python3 debian/generate-man.py - -# Skip dwz. Failure with gcc-13: -# dwz: ./dwz.c:12035: adjust_exprloc: Assertion `refd != NULL && !refd->die_remove' failed. -override_dh_dwz: -- 2.47.3
>From 714c6199f8ca34d551e58b6d63580b6fa32ec30e Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:25:16 +0100 Subject: [PATCH 07/11] Update copyright years --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index 9a017d29..d0d58823 100644 --- a/debian/copyright +++ b/debian/copyright @@ -9,7 +9,7 @@ License: GPL-3+ Files: debian/* Copyright: 2023 Stephane Carrez <[email protected]> - 2024 Nicolas Boulenguez <[email protected]> + 2024-2026 Nicolas Boulenguez <[email protected]> License: GPL-3+ Files: testsuite/fixtures/crates/libhello_git/* -- 2.47.3
>From 3a9689a63562e4f54b461e927173f153296b2908 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 00:25:56 +0100 Subject: [PATCH 08/11] Remove Build-Depends version restrictions older than oldoldstable --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ea6a4d16..725046bf 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper-compat (= 14), dh-ada-library, gnat, - gprbuild (>= 2015-2), + gprbuild, libgnatcoll-dev, libgnatprj-dev, libxmlada-dom-dev, -- 2.47.3
>From 9a88542f0a556753922e9733332ab7819aabe759 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 18:20:10 +0100 Subject: [PATCH 09/11] Add upstream/metadata --- debian/upstream/metadata | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 debian/upstream/metadata diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 00000000..18d154af --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/alire-project/alire/issues +Bug-Submit: https://github.com/alire-project/alire/issues/new +Repository: https://github.com/alire-project/alire.git +Repository-Browse: https://github.com/alire-project/alire.git -- 2.47.3
>From a93583ec6e1069f619c7604bec2bf6f497805b84 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 18:19:03 +0100 Subject: [PATCH 10/11] Tell gbp to clone and merge upstream history --- debian/gbp.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/gbp.conf b/debian/gbp.conf index accc13fc..1502cedf 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -1,3 +1,9 @@ [DEFAULT] debian-branch = debian/master upstream-branch = upstream/master + +[clone] +add-upstream-vcs = True + +[import-orig] +upstream-vcs-tag = v%(version)s -- 2.47.3
>From 7a5bf19f6287b34f8f234b90d43d518446eed142 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez <[email protected]> Date: Thu, 19 Nov 2026 19:46:30 +0100 Subject: [PATCH 11/11] DO NOT PUSH/UPLEAD AS IS Build with gnat-16 in experimental MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit builds with gnat-16, but won’t build in unstable. All previous commits build in unstable (with gnat-14). gnat (>= 16) should not stay gprbuild (>= 2026) not sure why, but necessary with gnat-16 patches mostly backported from latest alire The work-around for #1096181 should not be necessary anymore with gnat-16. --- debian/changelog | 6 + debian/control | 4 +- ...2-Explicitly-check-GCC-versions-1562.patch | 224 ++++++++++++++++++ debian/patches/clic-inline-iterator.diff | 30 +++ debian/patches/series | 2 + debian/rules | 5 - 6 files changed, 264 insertions(+), 7 deletions(-) create mode 100644 debian/patches/0002-Explicitly-check-GCC-versions-1562.patch create mode 100644 debian/patches/clic-inline-iterator.diff diff --git a/debian/changelog b/debian/changelog index 32f68051..d99df804 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +alire (1.2.1-3) experimental; urgency=medium + + * Build in experimental with gnat-16 + + -- Nicolas Boulenguez <[email protected]> Thu, 19 Nov 2026 18:23:22 +0000 + alire (1.2.1-2.1) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/control b/debian/control index 725046bf..1d717274 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,8 @@ Uploaders: Ludovic Brenta <[email protected]> Build-Depends: debhelper-compat (= 14), dh-ada-library, - gnat, - gprbuild, + gnat (>= 16), + gprbuild (>= 2026), libgnatcoll-dev, libgnatprj-dev, libxmlada-dom-dev, diff --git a/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch b/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch new file mode 100644 index 00000000..9672f664 --- /dev/null +++ b/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch @@ -0,0 +1,224 @@ +From: Alejandro R Mosteo <[email protected]> +Date: Thu, 15 Feb 2024 18:04:19 +0100 +Subject: Backport: Explicitly check GCC versions (#1562) +Origin: backport, https://github.com/alire-project/alir/commit/4e1455e6e25701c5dcb1482b1109278c4991d8b4 + +* Explicitly check all GCC versions we want + +* Remove unneeded `aliased` + +* Try to use safer reference + +* Workaround for GNAT 13 troubles with expr. funcs. + +* Fix test index to use deterministic external gnat version + +--- a/src/alire/alire-dependencies-states.adb ++++ b/src/alire/alire-dependencies-states.adb +@@ -28,7 +28,7 @@ + Workspace : Any_Path) + return Stored_Release + is +- Opt_Root : constant Roots.Optional.Root := ++ Opt_Root : Roots.Optional.Root := + Roots.Optional.Detect_Root (Workspace); + begin + if Opt_Root.Is_Valid then +--- a/src/alire/alire-publish.adb ++++ b/src/alire/alire-publish.adb +@@ -327,7 +327,7 @@ + -- Will have raised if the release is not loadable or incomplete + else + declare +- Root : constant Roots.Optional.Root := Alire.Root.Current; ++ Root : Roots.Optional.Root := Alire.Root.Current; + begin + case Root.Status is + when Outside => +@@ -427,7 +427,7 @@ + + procedure Generate_Index_Manifest (Context : in out Data) is + User_Manifest : constant Any_Path := Packaged_Manifest (Context); +- Workspace : constant Roots.Optional.Root := Root.Current; ++ Workspace : Roots.Optional.Root := Root.Current; + begin + if not GNAT.OS_Lib.Is_Read_Accessible_File (User_Manifest) then + Raise_Checked_Error +@@ -932,7 +932,7 @@ + Revision : String := "HEAD"; + Options : All_Options := New_Options) + is +- Root : constant Roots.Optional.Root := Roots.Optional.Search_Root (Path); ++ Root : Roots.Optional.Root := Roots.Optional.Search_Root (Path); + Git : constant VCSs.Git.VCS := VCSs.Git.Handler; + use all type Roots.Optional.States; + +--- a/src/alire/alire-root.adb ++++ b/src/alire/alire-root.adb +@@ -14,6 +14,11 @@ + ------------- + + function Current return Roots.Root +- is (Roots.Optional.Detect_Root (Directories.Detect_Root_Path).Value); ++ is ++ Optional_Root : Roots.Optional.Root := ++ Roots.Optional.Detect_Root (Directories.Detect_Root_Path); ++ begin ++ return Optional_Root.Value; ++ end Current; + + end Alire.Root; +--- a/src/alire/alire-roots-editable.adb ++++ b/src/alire/alire-roots-editable.adb +@@ -228,7 +228,7 @@ + Path : Any_Path) + return Crate_Name + is +- Pin_Root : constant Optional.Root := Optional.Detect_Root (Path); ++ Pin_Root : Optional.Root := Optional.Detect_Root (Path); + begin + if Crate.Is_Empty and then not Pin_Root.Is_Valid then + Raise_Checked_Error +@@ -256,12 +256,27 @@ + -- dependency is in the closure but not in the root crate). + + if not This.Solution.Depends_On (Crate) then +- This.Add_Dependency +- (Dependencies.New_Dependency +- (Crate, +- (if Pin_Root.Is_Valid +- then Pin_Root.Updatable_Dependency.Versions +- else Semver.Extended.Any))); ++ declare ++ -- This temporary is used to work around a bug in GNAT 13 ++ Dep_Ver : Semver.Extended.Version_Set; ++ begin ++ if Pin_Root.Is_Valid then ++ declare ++ -- This temporary is used to work around a bug in GNAT 13 ++ Updatable_Dep : constant Dependencies.Dependency ++ := Pin_Root.Updatable_Dependency; ++ begin ++ Dep_Ver := Updatable_Dep.Versions; ++ end; ++ else ++ Dep_Ver := Semver.Extended.Any; ++ end if; ++ ++ This.Add_Dependency ++ (Dependencies.New_Dependency (Crate, Dep_Ver)); ++ -- Pins to local paths are more likely not to be indexed, so we ++ -- allow unknown dependencies here. ++ end; + end if; + + -- Remove any previous pin for this crate +--- a/src/alire/alire-roots-optional.adb ++++ b/src/alire/alire-roots-optional.adb +@@ -125,13 +125,14 @@ + -- Value -- + ----------- + +- function Value (This : aliased Root) return Reference ++ function Value (This : in out Root) return Reference + is + begin + This.Assert; + -- The following Unrestricted_Access cannot fail as we just asserted + -- the value is stored. +- return Reference'(Ptr => This.Data.Value'Unrestricted_Access); ++ return Ref : constant Reference := ++ Reference'(Ptr => This.Data.Value'Unrestricted_Access); + end Value; + + --------------------- +@@ -166,7 +167,7 @@ + -- Updatable_Dependency -- + -------------------------- + +- function Updatable_Dependency (This : Root) ++ function Updatable_Dependency (This : in out Root) + return Dependencies.Dependency + is (Dependencies.New_Dependency + (This.Value.Release.Element.Name, +--- a/src/alire/alire-roots-optional.ads ++++ b/src/alire/alire-roots-optional.ads +@@ -39,7 +39,7 @@ + function Outside (This : Root) return Boolean; + -- True when there is no root at all, broken or valid + +- function Value (This : aliased Root) return Reference with ++ function Value (This : in out Root) return Reference with + Pre => This.Is_Valid; + + function Brokenness (This : Root) return String with +@@ -55,7 +55,7 @@ + + -- UTILITIES + +- function Updatable_Dependency (This : Root) ++ function Updatable_Dependency (This : in out Root) + return Dependencies.Dependency + with Pre => This.Is_Valid; + -- If This.Is_Valid, get the corresponding updatable +--- a/src/alire/alire-roots.adb ++++ b/src/alire/alire-roots.adb +@@ -570,7 +570,7 @@ + declare + use Containers.Crate_Name_Sets; + use Semver.Extended; +- Target : constant Optional.Root := ++ Target : Optional.Root := + Optional.Detect_Root (Pin.Path); + begin + +@@ -712,7 +712,11 @@ + --------------- + + function Load_Root (Path : Any_Path) return Root +- is (Roots.Optional.Detect_Root (Path).Value); ++ is ++ Optional_Root : Optional.Root := Optional.Detect_Root (Path); ++ begin ++ return Optional_Root.Value; ++ end Load_Root; + + ------------------------------ + -- Export_Build_Environment -- +--- a/src/alire/alire-user_pins.adb ++++ b/src/alire/alire-user_pins.adb +@@ -259,7 +259,7 @@ + -- At this point, we have the sources at Destination. Last checks ensue. + + declare +- Root : constant Roots.Optional.Root := ++ Root : Roots.Optional.Root := + Roots.Optional.Detect_Root (Destination); + begin + +--- a/src/alr/alr-commands-version.adb ++++ b/src/alr/alr-commands-version.adb +@@ -33,7 +33,7 @@ + Indexes : constant Alire.Index_On_Disk.Loading.Set := + Alire.Index_On_Disk.Loading.Find_All + (Alire.Config.Edit.Indexes_Directory, Index_Outcome); +- Root : constant Alire.Roots.Optional.Root := ++ Root : Alire.Roots.Optional.Root := + Alire.Roots.Optional.Search_Root (Alire.Directories.Current); + begin + if Args.Count /= 0 then +--- a/src/alr/alr-commands.adb ++++ b/src/alr/alr-commands.adb +@@ -546,7 +546,11 @@ + Cmd.Requires_Valid_Session; + end if; + +- return Cmd.Optional_Root.Value; ++ return R : constant Alire.Roots.Optional.Reference := ++ (Ptr => Cmd.Optional_Root.Value.Ptr.all'Unchecked_Access); ++ -- Workaround for bug (?) in GNAT 11 about dangling pointers. It should ++ -- simply be: ++ -- return Cmd.Optional_Root.Value; + end Root; + + --------- diff --git a/debian/patches/clic-inline-iterator.diff b/debian/patches/clic-inline-iterator.diff new file mode 100644 index 00000000..b8f15e75 --- /dev/null +++ b/debian/patches/clic-inline-iterator.diff @@ -0,0 +1,30 @@ +From: Nicolas Boulenguez <[email protected]> +Subject: in deps/clic, replace an iterator with basic function calls + +The alire build succeeds with gcc-14 but fails with +gprbuild 2026.0.0-2 +gnat-16 gcc-16 16.2.0-4 + +Summary of the link command: +g++-16 [lots of .o] [lots of .a] -lgnatcoll -lgnatprj -lxmlada_schema -lxmlada_dom -lxmlada_sax -lxmlada_input -lxmlada_unicode deps/clic/lib/libClic.a deps/simple_logging/lib/libsimple_logging.a -lxmlezout deps/ada-toml/lib/static/dev/libada_toml.a deps/aaa/lib/libaaa.a -ldl -Wl,-z,relro -Wl,-z,now -lgnarl-16 -lgnat-16 -lrt -lpthread -ldl -Wl,-rpath-link,/usr/lib/gcc/x86_64-linux-gnu/16//adalib -shared-libgcc -o bin//alr + +Next two lines in the log: +/usr/bin/x86_64-linux-gnu-ld.bfd: /build/reproducible-path/alire-1.2.1/obj/alr-commands.o: in function `alr__commands__sub_cmd__display_options': +./obj/./deps/clic/src/clic-subcommand-instance.adb:891:(.text+0x415e8): undefined reference to `clic__subcommand__switch_info_vectors__implementation__reference_control_typeFD' + +This work-around is based on clic/185519d6, embedded in alire/1.2.1. + +--- a/deps/clic/src/clic-subcommand-instance.adb ++++ b/deps/clic/src/clic-subcommand-instance.adb +@@ -887,8 +887,10 @@ + + Has_Printable_Rows := True; + end Print_Row; ++ Elt : Switch_Info; + begin +- for Elt of Config.Info loop ++ for I in Config.Info.First_Index .. Config.Info.Last_Index loop ++ Elt := Config.Info.Element (I); + Print_Row (To_String (Elt.Switch), + To_String (Elt.Long_Switch), + To_String (Elt.Argument), diff --git a/debian/patches/series b/debian/patches/series index c023f08b..44e146af 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ 0001-Update-to-follow-Ada-Debian-policy.patch +0002-Explicitly-check-GCC-versions-1562.patch +clic-inline-iterator.diff diff --git a/debian/rules b/debian/rules index b24858ad..7f1a7557 100755 --- a/debian/rules +++ b/debian/rules @@ -6,11 +6,6 @@ DEB_BUILD_MAINT_OPTIONS := hardening=+all # -gnatwn: Debian builds should not fail because of a new warning DEB_ADAFLAGS_MAINT_APPEND := -gnatafno -gnatVa -gnatwan -# work-around for #1096181. -ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf)) - DEB_ADAFLAGS_MAINT_APPEND += -fno-stack-check -endif - DPKG_EXPORT_BUILDFLAGS := 1 include /usr/share/dpkg/buildflags.mk include /usr/share/ada/packaging.mk -- 2.47.3

