Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-rpm-macros for openSUSE:Factory 
checked in at 2026-11-24 12:33:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-rpm-macros (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-rpm-macros"

Tue Nov 24 12:33:44 2026 rev:50 rq:1399308 version:2.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-rpm-macros/ghc-rpm-macros.changes    
2025-09-01 17:19:22.461948714 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-rpm-macros.new.1340718/ghc-rpm-macros.changes   
    2026-11-24 12:41:05.883734701 +0100
@@ -1,0 +2,28 @@
+Thu Nov 19 14:57:24 UTC 2026 - Peter Simons <[email protected]>
+
+- Add cabal-tweak-dep-ver-ignore-whitespace.patch:
+  * Ignore whitespace around the operators of the old constraint, so
+    that '< 1.2' matches "<1.2" as well as "<  1.2".
+  * Match the old constraint only as complete tokens: '< 1.2' no longer
+    matches "< 1.20" or "< 1.2.1", and '>= 1.2' no longer matches
+    "^>= 1.2".
+  * Match a constraint that directly follows the package name, as in
+    "base<5".
+  * Insert the new constraint literally, so that "&" and "/" work.
+  * Quote the old constraint, so that "*" is no longer expanded against
+    file names in the current directory.
+
+-------------------------------------------------------------------
+Wed Nov 18 09:29:38 UTC 2026 - Peter Simons <[email protected]>
+
+- Add dont-enable-profiling-by-default.patch: macros.ghc-suse defined
+  with_ghc_prof as 0, but %{with ghc_prof} only checks whether the macro
+  is defined, so profiling was enabled rather than disabled. Leave the
+  macro undefined instead.
+
+-------------------------------------------------------------------
+Thu Dec  4 19:13:06 UTC 2025 - Ondřej Súkup <[email protected]>
+
+- Disable building of profiling library variants by default.
+
+-------------------------------------------------------------------

New:
----
  cabal-tweak-dep-ver-ignore-whitespace.patch
  dont-enable-profiling-by-default.patch

----------(New B)----------
  New:
- Add cabal-tweak-dep-ver-ignore-whitespace.patch:
  * Ignore whitespace around the operators of the old constraint, so
  New:
- Add dont-enable-profiling-by-default.patch: macros.ghc-suse defined
  with_ghc_prof as 0, but %{with ghc_prof} only checks whether the macro
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.sZwQAH/_old  2026-11-24 12:41:07.700811704 +0100
+++ /var/tmp/diff_new_pack.sZwQAH/_new  2026-11-24 12:41:07.704811873 +0100
@@ -25,6 +25,9 @@
 URL:            https://fedoraproject.org/wiki/Haskell_SIG
 # source gets updated with osc service dr
 Source0:        %{name}-%{version}.tar.xz
+# Defining with_ghc_prof to 0 enables profiling because %%{with} only checks 
definedness.
+Patch0:         dont-enable-profiling-by-default.patch
+Patch1:         cabal-tweak-dep-ver-ignore-whitespace.patch
 BuildRequires:  xz
 Requires:       rpm
 Requires:       chrpath
@@ -48,7 +51,7 @@
 for example in ghc and haskell-platform.
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 echo no build stage needed

++++++ cabal-tweak-dep-ver-ignore-whitespace.patch ++++++
--- a/cabal-tweak-dep-ver
+++ b/cabal-tweak-dep-ver
@@ -1,8 +1,24 @@
 #!/bin/sh
+#
+# Usage: cabal-tweak-dep-ver dep old new
+#
+# Replace the version constraint OLD on dependency DEP with NEW in the .cabal
+# file in the current directory, e.g.
+#
+#   cabal-tweak-dep-ver base '< 4.22' '< 5'
+#
+# Whitespace in OLD is not significant: '< 4.22' matches "<4.22" as well as
+# "<  4.22", because Cabal ignores whitespace around the operators of a
+# version range. OLD must match complete tokens of the constraint: '< 1.2'
+# does not match "< 1.20" or "< 1.2.1", and '>= 1.2' does not match
+# "^>= 1.2". NEW is inserted literally.
+#
+# The script fails if OLD does not occur in the constraint on DEP, so that a
+# change in the upstream .cabal file doesn't go unnoticed.
 
 set -e +x
 
-function fail {
+fail() {
     echo "$0: $1" >&2
     exit 1
 }
@@ -14,23 +30,57 @@
 fi
 
 DEP=$1
-OLD=$(echo $2 | sed -e "s/*/\\\\*/g" -e "s/\./\\\\./g")
 NEW=$3
 
+# OLD with all whitespace removed. Fail if nothing is left.
+OLDTEXT=$(printf '%s\n' "$2" | tr -d '[:space:]')
+if [ -z "$OLDTEXT" ]; then
+    fail "$USAGE"
+fi
+
+# Turn OLD into a regular expression (BRE) that matches it literally, except
+# that any amount of whitespace is allowed before and after every operator.
+# The operators are first marked with \x01, then the text is escaped, then the
+# markers are replaced.
+OLD=$(printf '%s\n' "$OLDTEXT" | sed \
+    -e 's/\(&&\|||\|[<>=^]\{1,\}\)/\x01&\x01/g' \
+    -e 's/[][\.*^$/]/\\&/g' \
+    -e 's/\x01/[[:space:]]*/g')
+
+# Characters that must not immediately precede or follow the match, because
+# they would make the match part of a longer token: if OLD starts with an
+# operator, an operator character must not precede it ('>=' in '^>='); if it
+# starts with a version number, a digit or a dot must not precede it ('4.22'
+# in '14.22'). A version at the end must not be followed by a digit or dot.
+case $OLDTEXT in
+    [\<\>=^]*) EXCL='<>=^'; EMPTY='\|' ;;
+    *)         EXCL='0-9.';  EMPTY= ;;
+esac
+
+# The name of the dependency, followed by the text between the name and OLD.
+# That text is empty (only if OLD starts with an operator, as in "base<5"),
+# or it starts with a character that cannot be part of a package name and
+# ends with a character from outside EXCL. It cannot contain a comma, so the
+# match stays within the constraint on DEP.
+BREAK='[^[:alnum:]-]'
+PRE="$BREAK$DEP\\($EMPTY[^[:alnum:]$EXCL-]\\|$BREAK[^,]*[^,$EXCL]\\)"
+POST='\([^0-9.]\|$\)'
+
+# NEW escaped for use in the replacement part of the sed command.
+NEWREPL=$(printf '%s\n' "$NEW" | sed -e 's/[\/&]/\\&/g')
+
 CABALFILE=$(ls *.cabal)
 
 if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then
    fail "There needs to be one .cabal file in the current dir!"
 fi
 
-BREAK=[^[:alnum:]-]
-
-if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then
-   fail "$CABALFILE does not match: $DEP $OLD"
+if ! grep -q -e "\\($PRE\\)$OLD$POST" "$CABALFILE"; then
+   fail "$CABALFILE does not match: $DEP $2"
 fi
 
-if [ ! -f $CABALFILE.orig ]; then
+if [ ! -f "$CABALFILE.orig" ]; then
     BACKUP=.orig
 fi
 
-sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^,]*\)$OLD/\1$NEW/g" $CABALFILE
+sed -i$BACKUP -e "s/\\($PRE\\)$OLD$POST/\\1$NEWREPL\\3/g" "$CABALFILE"

++++++ dont-enable-profiling-by-default.patch ++++++
--- a/macros.ghc-suse
+++ b/macros.ghc-suse
@@ -25,8 +25,10 @@
 # enable library documentation in doc subpkgs
 %with_haddock 1
 
-# enable prof packages
-%with_ghc_prof 0
+# Profiling libraries are disabled by default. Do not define with_ghc_prof
+# here: %%{with ghc_prof} tests only whether the macro is defined, so even a
+# value of 0 would enable profiling. Build with "--with ghc_prof" or define
+# "%%with_ghc_prof 1" in the project config to enable it.
 
 # %%{?_smp_ncpus_max:--jobs=%%{?_smp_ncpus_max}}
 %ghc_smp_mflags %{?_smp_mflags}

++++++ ghc-rpm-macros-2.9.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-2.9.2/macros.ghc-suse 
new/ghc-rpm-macros-2.9.2/macros.ghc-suse
--- old/ghc-rpm-macros-2.9.2/macros.ghc-suse    2025-08-01 12:02:07.997313650 
+0200
+++ new/ghc-rpm-macros-2.9.2/macros.ghc-suse    2025-12-04 20:11:05.134933738 
+0100
@@ -26,7 +26,7 @@
 %with_haddock 1
 
 # enable prof packages
-%with_ghc_prof 1
+%with_ghc_prof 0
 
 # %%{?_smp_ncpus_max:--jobs=%%{?_smp_ncpus_max}}
 %ghc_smp_mflags %{?_smp_mflags}

Reply via email to