public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gap-pkg-datastructures] rawhide: Rebuild for gap 4.16.0
@ 2026-06-10 20:27 Jerry James
  0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-06-10 20:27 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gap-pkg-datastructures
            Branch : rawhide
            Commit : 355871928b0edfc5aea3dca3509973c7479aaa8d
            Author : Jerry James <loganjerry@gmail.com>
            Date   : 2026-06-10T14:26:54-06:00
            Stats  : +25/-9 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gap-pkg-datastructures/c/355871928b0edfc5aea3dca3509973c7479aaa8d?branch=rawhide

            Log:
            Rebuild for gap 4.16.0

- Drop unnecessary BuildRequires
- Use gap(...) symbols in dependencies
- Add patch to avoid undefined behavior due to signed integer overflow

---
diff --git a/gap-pkg-datastructures-undefined-behavior.patch b/gap-pkg-datastructures-undefined-behavior.patch
new file mode 100644
index 0000000..c2ad007
--- /dev/null
+++ b/gap-pkg-datastructures-undefined-behavior.patch
@@ -0,0 +1,15 @@
+--- datastructures-0.4.1/src/hashfunctions.h.orig	2025-12-25 17:09:00.000000000 -0700
++++ datastructures-0.4.1/src/hashfunctions.h	2026-03-25 15:15:31.461425325 -0600
+@@ -56,10 +56,9 @@ static inline UInt AddToHash(UInt seed,
+ // the size of the number as required
+ static inline Obj HashValueToObjInt(UInt uhash)
+ {
+-    Int hash = (Int)uhash;
+     // Make sure bottom bits are not lost
+-    hash += hash << 11;
+-    hash /= 16;
++    uhash += uhash << 11;
++    Int hash = (Int)uhash / 16;
+     return INTOBJ_INT(hash);
+ }
+ 

diff --git a/gap-pkg-datastructures.spec b/gap-pkg-datastructures.spec
index 825d856..3faa5b6 100644
--- a/gap-pkg-datastructures.spec
+++ b/gap-pkg-datastructures.spec
@@ -10,6 +10,9 @@ License:        GPL-2.0-or-later
 URL:            https://gap-packages.github.io/datastructures/
 VCS:            git:%{giturl}.git
 Source:         %{giturl}/releases/download/v%{version}/%{gap_upname}-%{version}.tar.gz
+# Fix an instance of undefined behavior due to a left shift of a signed integer
+# https://github.com/gap-packages/datastructures/pull/160
+Patch:          %{name}-undefined-behavior.patch
 
 # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
@@ -17,13 +20,15 @@ BuildSystem:    gap
 BuildOption(install): bin gap tst
 BuildOption(check): tst/testall.g
 
-BuildRequires:  gap-devel
-BuildRequires:  gap-pkg-autodoc
+BuildRequires:  gap(autodoc) >= 2016.01.21
+BuildRequires:  gap(gapdoc) >= 1.5
+BuildRequires:  gap-devel >= 4.12
 BuildRequires:  gcc
-BuildRequires:  libtool
 BuildRequires:  make
 
-Requires:       gap-core%{?_isa}
+Requires:       gap-core%{?_isa} >= 4.12
+
+Provides:       gap(datastructures) = %{version}-%{release}
 
 %description
 The datastructures package aims at providing standard datastructures,
@@ -54,13 +59,9 @@ Requires:       gap-online-help
 This package contains documentation for gap-pkg-%{gap_pkgname}.
 
 %prep
-%autosetup -n %{gap_upname}-%{version}
+%autosetup -n %{gap_upname}-%{version} -p1
 
 %build -p
-# The -fwrapv option is needed due to signed integer overflow.  UBSAN says:
-# src/hashfunctions.h:61:18: runtime error: left shift of 2851389363498048825 by 11 places cannot be represented in type 'long int'
-export CFLAGS='%{build_cflags} -fwrapv'
-export CXXFLAGS='%{build_cxxflags} -fwrapv'
 # This is NOT an autoconf-generated script.  Do NOT use %%configure.
 ./configure %{gap_archdir}
 %make_build

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-10 20:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 20:27 [rpms/gap-pkg-datastructures] rawhide: Rebuild for gap 4.16.0 Jerry James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox