public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Backport upstream solution to make brp-python-bytecompile automagic part opt-outable
Date: Mon, 23 Nov 2026 09:31:52 GMT	[thread overview]
Message-ID: <179542631244.1.6702267901046742294.rpms-rpm-364d038b5513@fedoraproject.org> (raw)

            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)
 

                 reply	other threads:[~2026-11-23  9:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542631244.1.6702267901046742294.rpms-rpm-364d038b5513@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox