Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-rpm-macros for
openSUSE:Factory checked in at 2023-12-21 23:37:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rpm-macros (Old)
and /work/SRC/openSUSE:Factory/.python-rpm-macros.new.1840 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rpm-macros"
Thu Dec 21 23:37:19 2023 rev:54 rq:1134299 version:20231220.98427f3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rpm-macros/python-rpm-macros.changes
2023-10-12 23:38:45.545621631 +0200
+++
/work/SRC/openSUSE:Factory/.python-rpm-macros.new.1840/python-rpm-macros.changes
2023-12-21 23:37:21.535792784 +0100
@@ -1,0 +2,21 @@
+Wed Dec 20 16:33:59 UTC 2023 - Daniel Garcia <[email protected]>
+
+- Update to version 20231220.98427f3:
+ * fix python2_compile macro
+
+-------------------------------------------------------------------
+Tue Dec 19 10:13:29 UTC 2023 - Daniel Garcia <[email protected]>
+
+- Update to version 20231207.46c2ec3:
+ * make FLAVOR_compile compatible with python2
+
+-------------------------------------------------------------------
+Mon Dec 04 08:34:09 UTC 2023 - [email protected]
+
+- Update to version 20231204.dd64e74:
+ * Combine fix_shebang in one line
+ * New macro FLAVOR_fix_shebang_path
+ * Use realpath in %python_clone macro shebang replacement
+ * Compile and fix_shebang in %python_install macros
+
+-------------------------------------------------------------------
Old:
----
python-rpm-macros-20231010.0a1f0d9.tar.xz
New:
----
python-rpm-macros-20231220.98427f3.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.sUlQdc/_old 2023-12-21 23:37:23.743873307 +0100
+++ /var/tmp/diff_new_pack.sUlQdc/_new 2023-12-21 23:37:23.755873745 +0100
@@ -17,7 +17,7 @@
Name: python-rpm-macros
-Version: 20231010.0a1f0d9
+Version: 20231220.98427f3
Release: 0
Summary: RPM macros for building of Python modules
License: WTFPL
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.sUlQdc/_old 2023-12-21 23:37:24.087885852 +0100
+++ /var/tmp/diff_new_pack.sUlQdc/_new 2023-12-21 23:37:24.115886873 +0100
@@ -3,6 +3,6 @@
<param
name="url">git://github.com/openSUSE/python-rpm-macros.git</param>
<param
name="changesrevision">80d37568d9732beb7fcc2cf27c5c08f9c01fade1</param></service><service
name="tar_scm">
<param
name="url">https://github.com/openSUSE/python-rpm-macros.git</param>
- <param
name="changesrevision">0a1f0d9a0d295f1414c7bde6a6f0ef344ff0b37d</param></service></servicedata>
+ <param
name="changesrevision">98427f34744bb5b418adf7ed2ff9a336048aad02</param></service></servicedata>
(No newline at EOF)
++++++ python-rpm-macros-20231010.0a1f0d9.tar.xz ->
python-rpm-macros-20231220.98427f3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rpm-macros-20231010.0a1f0d9/README.md
new/python-rpm-macros-20231220.98427f3/README.md
--- old/python-rpm-macros-20231010.0a1f0d9/README.md 2023-10-10
21:24:02.000000000 +0200
+++ new/python-rpm-macros-20231220.98427f3/README.md 2023-12-20
17:12:31.000000000 +0100
@@ -389,6 +389,11 @@
the call of this macro is not required, as the script interpreter line is
already
taken care of by the alternatives setup `%python_clone -a`.
+* __`%<flavor>_fix_shebang_path path`__ rewrites the script interpreter
+ line in python scripts installed into `path` to use the
+ particular flavor. A glob like `*` can be used in the path parameter
+ to fix the shebang for all files in a directory.
+
* __`%<flavor>_sitelib`, `%<flavor>_sitearch`__: path to noarch (purelib) and
arch-dependent `site-packages` (platlib) directory.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rpm-macros-20231010.0a1f0d9/flavor.in
new/python-rpm-macros-20231220.98427f3/flavor.in
--- old/python-rpm-macros-20231010.0a1f0d9/flavor.in 2023-10-10
21:24:02.000000000 +0200
+++ new/python-rpm-macros-20231220.98427f3/flavor.in 2023-12-20
17:12:31.000000000 +0100
@@ -36,10 +36,13 @@
%__#FLAVOR# %{py_setup} %{?py_setup_args} build \\\
--executable="%__#FLAVOR# %#FLAVOR#_shbang_opts"
-%#FLAVOR#_install \
+%#FLAVOR#_install(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
\
%{_python_use_flavor #FLAVOR#} \
+myargs="%{**}" \
%__#FLAVOR# %{py_setup} %{?py_setup_args} install \\\
- -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}
+ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} $myargs \
+%#FLAVOR#_compile \
+%#FLAVOR#_fix_shebang
##### PEP517/PEP518 macros #####
@@ -92,19 +95,23 @@
import sys, py_compile \
for f in sys.argv[1:]: \
fp=f[len("%{buildroot}"):] \
- print(f"Generating cached byte-code for {fp}") \
- for o in [0, 1]: \
- py_compile.compile(f, dfile=fp, optimize=o) \
+ print("Generating cached byte-code for " + str(fp)) \
+ if sys.version[0] == "2": \
+ py_compile.compile(f, dfile=fp) \
+ else: \
+ for o in [0, 1]: \
+ py_compile.compile(f, dfile=fp, optimize=o) \
' \
fi \
done
%#FLAVOR#_fix_shebang \
-for f in %{buildroot}%{_bindir}/*; do \
- [ -f $f ] && sed -i "1s@#!.*python.*@#!$(realpath %__#FLAVOR#)@" $f \
-done; \
-for f in %{buildroot}%{_sbindir}/*; do \
- [ -f $f ] && sed -i "1s@#!.*python.*@#!$(realpath %__#FLAVOR#)@" $f \
+%#FLAVOR#_fix_shebang_path %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/*
+
+%#FLAVOR#_fix_shebang_path(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
\
+myargs="%{**}" \
+for f in ${myargs}; do \
+ [ -f $f ] && sed -i "1s@#\\!.*python.*@#\\!$(realpath %__#FLAVOR#)@" $f \
done
# Alternative entries in file section
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rpm-macros-20231010.0a1f0d9/macros.lua
new/python-rpm-macros-20231220.98427f3/macros.lua
--- old/python-rpm-macros-20231010.0a1f0d9/macros.lua 2023-10-10
21:24:02.000000000 +0200
+++ new/python-rpm-macros-20231220.98427f3/macros.lua 2023-12-20
17:12:31.000000000 +0100
@@ -497,7 +497,7 @@
local binsuffix = rpm.expand("%" .. python .. "_bin_suffix")
link,name,path = python_alternative_names(param, binsuffix, true)
print(rpm.expand(string.format("cp %s %s\n", param, path)))
- print(rpm.expand(string.format("sed -ri '1s@#!.*python.*@#!%s@' %s\n",
"%__" .. python, path)))
+ print(rpm.expand(string.format("sed -ri \"1s@#!.*python.*@#!%s@\"
%s\n", "$(realpath %__" .. python .. ")", path)))
end
-- %python_clone -a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-rpm-macros-20231010.0a1f0d9/testfiles/fix-shebang.spec
new/python-rpm-macros-20231220.98427f3/testfiles/fix-shebang.spec
--- old/python-rpm-macros-20231010.0a1f0d9/testfiles/fix-shebang.spec
1970-01-01 01:00:00.000000000 +0100
+++ new/python-rpm-macros-20231220.98427f3/testfiles/fix-shebang.spec
2023-12-20 17:12:31.000000000 +0100
@@ -0,0 +1,49 @@
+#
+# spec file for package specRPM_CREATION_NAME
+#
+# Copyright (c) specCURRENT_YEAR SUSE LLC
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+
+Name: fix-shebang
+Version: 1.0
+Release: 0
+Summary: Test fix shebanng
+License: GPLv2
+URL: https://example.com
+BuildRequires: python-rpm-macros
+
+%description
+
+%prep
+%autosetup
+
+%build
+%configure
+%make_build
+
+%install
+%make_install
+%python3_fix_shebang_path %{buildroot}/usr/libexec/*
+%python3_fix_shebang
+
+%post
+%postun
+
+%files
+%license COPYING
+%doc ChangeLog README
+
+%changelog
+