public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Backport upstream solution to make brp-python-bytecompile automagic part opt-outable
@ 2026-11-23  9:31 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-11-23  9:31 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 364d038b5513066552348067918b31e9e0aed864
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2018-05-28T14:12:32+02:00
            Stats  : +31/-4 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/364d038b5513066552348067918b31e9e0aed864?branch=pmatilai-v6

            Log:
            Backport upstream solution to make brp-python-bytecompile automagic part opt-outable

See https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation

---
diff --git a/rpm-4.14.1-python-brp-bytecompile.patch b/rpm-4.14.1-python-brp-bytecompile.patch
index d99a271..692fb11 100644
--- a/rpm-4.14.1-python-brp-bytecompile.patch
+++ b/rpm-4.14.1-python-brp-bytecompile.patch
@@ -1,8 +1,29 @@
 diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
-index 894fa3459..47776215a 100644
+index 894fa34..c06bdfa 100644
 --- a/scripts/brp-python-bytecompile
 +++ b/scripts/brp-python-bytecompile
-@@ -87,6 +87,10 @@ if [ ! -x "$default_python" ]; then
+@@ -1,5 +1,6 @@
+ #!/bin/bash
+ errors_terminate=$2
++extra=$3
+ 
+ # If using normal root, avoid changing anything.
+ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+@@ -79,14 +80,22 @@ do
+ done
+ 
+ 
+-# Handle other locations in the filesystem using the default python
+-# implementation - if we  have a default python interpreter
++# Handle other locations in the filesystem using the default python implementation
++# if extra is set to 0, don't do this
++if [ 0$extra -eq 0 ]; then
++	exit 0
++fi
+ 
++# If we don't have a default python interpreter, we cannot proceed
+ default_python=${1:-/usr/bin/python}
+ if [ ! -x "$default_python" ]; then
  	exit 0
  fi
  

diff --git a/rpm.spec b/rpm.spec
index b91b2f5..f7d2cd2 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -23,7 +23,7 @@
 
 %global rpmver 4.14.1
 #global snapver rc2
-%global rel 9
+%global rel 10
 
 %global srcver %{version}%{?snapver:-%{snapver}}
 %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -56,8 +56,10 @@ Patch3: rpm-4.9.90-no-man-dirs.patch
 Patch4: rpm-4.8.1-use-gpg2.patch
 # Temporary band-aid for rpm2cpio whining on payload size mismatch (#1142949)
 Patch5: rpm-4.12.0-rpm2cpio-hack.patch
-# Skip automatic Python byte-compilation if *.py files are not present
+# Skip automatic Python byte-compilation (outside of Python directories) if
+# *.py files are not present, and allow to disable it even if they are
 # Upstream pull request: https://github.com/rpm-software-management/rpm/pull/383
+#                        https://github.com/rpm-software-management/rpm/pull/434
 Patch6: rpm-4.14.1-python-brp-bytecompile.patch
 
 # Downstream-only patch:
@@ -605,6 +607,10 @@ make check || cat tests/rpmtests.log
 %doc doc/librpm/html/*
 
 %changelog
+* Mon May 28 2018 Miro Hrončok <mhroncok@redhat.com> - 4.14.1-10
+- Backport upstream solution to make brp-python-bytecompile automagic part opt-outable
+  https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation
+
 * Tue May 22 2018 Mark Wielaard <mjw@fedoraproject.org> - 4.14.1-9
 - find-debuginfo.sh: Handle application/x-pie-executable (#1581224)
 

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

only message in thread, other threads:[~2026-11-23  9:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:31 [rpms/rpm] pmatilai-v6: Backport upstream solution to make brp-python-bytecompile automagic part opt-outable 

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