🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6822

Bug#1155567: alire: diff for NMU version 1.2.1-2.2

#6822
From: Nicolas Boulenguez
Date: Sun, 29 Nov 2026 22:20
314 lines
14219 bytes
--KhuAYAloIKdgyTkq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: alire
Version: 1.2.1-2.1
Control: tags -1 + pending

Dear maintainer,

I've prepared an NMU for alire (versioned as 1.2.1-2.2) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should cancel it.

Regards.

--KhuAYAloIKdgyTkq
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="alire-1.2.1-2.2-nmu.diff"

diffstat for alire-1.2.1 alire-1.2.1

 changelog                                             |    7 
 patches/0002-Explicitly-check-GCC-versions-1562.patch |  224 ++++++++++++++++++
 patches/clic-inline-iterator.diff                     |   30 ++
 patches/series                                        |    2 
 4 files changed, 263 insertions(+)

diff -Nru alire-1.2.1/debian/changelog alire-1.2.1/debian/changelog
--- alire-1.2.1/debian/changelog	2025-03-20 10:51:56.000000000 +0100
+++ alire-1.2.1/debian/changelog	2026-11-29 22:54:24.000000000 +0100
@@ -1,3 +1,10 @@
+alire (1.2.1-2.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix the build with gnat-16
+
+ -- Nicolas Boulenguez <nicolas@debian.org>  Sun, 29 Nov 2026 22:54:24 +0100
+
 alire (1.2.1-2.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru alire-1.2.1/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch alire-1.2.1/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch
--- alire-1.2.1/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch	1970-01-01 01:00:00.000000000 +0100
+++ alire-1.2.1/debian/patches/0002-Explicitly-check-GCC-versions-1562.patch	2026-11-29 22:54:19.000000000 +0100
@@ -0,0 +1,224 @@
+From: Alejandro R Mosteo <amosteo@unizar.es>
+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 -Nru alire-1.2.1/debian/patches/clic-inline-iterator.diff alire-1.2.1/debian/patches/clic-inline-iterator.diff
--- alire-1.2.1/debian/patches/clic-inline-iterator.diff	1970-01-01 01:00:00.000000000 +0100
+++ alire-1.2.1/debian/patches/clic-inline-iterator.diff	2026-11-29 22:54:19.000000000 +0100
@@ -0,0 +1,30 @@
+From: Nicolas Boulenguez <nicolas@debian.org>
+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 -Nru alire-1.2.1/debian/patches/series alire-1.2.1/debian/patches/series
--- alire-1.2.1/debian/patches/series	2025-02-25 00:10:02.000000000 +0100
+++ alire-1.2.1/debian/patches/series	2026-11-29 22:54:19.000000000 +0100
@@ -1 +1,3 @@
 0001-Update-to-follow-Ada-Debian-policy.patch
+0002-Explicitly-check-GCC-versions-1562.patch
+clic-inline-iterator.diff

--KhuAYAloIKdgyTkq--
Technical Details
Message-ID: <O4Vpw-f01d-15@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <O4aAi-exl2-13@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Nicolas Boulenguez <nicolas@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155567: alire: diff for NMU version 1.2.1-2.2
Date: Sun, 29 Nov 2026 23:20:02 +0100
Message-ID: <O4Vpw-f01d-15@gated-at.bofh.it>
References: <O4aAi-exl2-13@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Nov 29 22:17:13 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.9
Reply-To: Nicolas Boulenguez <nicolas@debian.org>, 1155567@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: Stephane.Carrez@gmail.com
X-Debian-Pr-Message: followup 1155567
X-Debian-Pr-Package: src:alire
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: alire
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="KhuAYAloIKdgyTkq"
Content-Disposition: inline
X-Nmudiff-Version: 2.26.15
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2006007
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 314
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sun, 29 Nov 2026 23:14:48 +0100
X-Original-Message-ID: <awyj2OKzpvry4-u4@pegase>
X-Original-References: <awnlBXuVAaUu2tL_@pegase>