public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - Fix %autosetup not to cause errors during run of rpmspec tool
@ 2026-11-23  9:29 Lubos Kardos
  0 siblings, 0 replies; only message in thread
From: Lubos Kardos @ 2026-11-23  9:29 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : a0329136e36d22e3668da59a1f5e38dd5dc63910
            Author : Lubos Kardos <lkardos@redhat.com>
            Date   : 2016-01-19T16:20:24+01:00
            Stats  : +47/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/a0329136e36d22e3668da59a1f5e38dd5dc63910?branch=pmatilai-v6

            Log:
            - Fix %autosetup not to cause errors during run of rpmspec tool
- Resolves: #1293687

---
diff --git a/rpm-4.13.0-autosetup-errors.patch b/rpm-4.13.0-autosetup-errors.patch
new file mode 100644
index 0000000..dacde03
--- /dev/null
+++ b/rpm-4.13.0-autosetup-errors.patch
@@ -0,0 +1,42 @@
+From 231a7213b90a8dfba426737732e2dc6e62acfbad Mon Sep 17 00:00:00 2001
+From: Lubos Kardos <lkardos@redhat.com>
+Date: Tue, 19 Jan 2016 14:37:07 +0100
+Subject: [PATCH] Fix %autosetup to not cause errors during run of rpmspec tool
+
+Firstly %autosetup showed an error during its expansion if some patch
+wasn't available, that is an error was showed during parsing of a spec
+file. This caused showing an error during execution of rpmspec
+tool (rhbz:1293687).
+
+Now %autosetup doesn't cause an error during parsing of a spec file but
+it causes an error during building of specfile if some patch is not
+available. Also old macro %patch behaves similarly.
+---
+ macros.in | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/macros.in b/macros.in
+index 319a1a3..f11affe 100644
+--- a/macros.in
++++ b/macros.in
+@@ -1122,8 +1122,15 @@ done \
+ 
+ # Single patch application
+ %apply_patch(qp:m:)\
+-test -f %{1} || exit 1 ; \
+-%{uncompress:%{1}} | %{expand:%__scm_apply_%{__scm} %{-q} %{-p:-p%{-p*}} %{-m:-m%{-m*}}}
++%{lua:\
++local file = rpm.expand("%{1}")\
++if posix.access(file, "r") then\
++    local options = rpm.expand("%{-q} %{-p:-p%{-p*}} %{-m:-m%{-m*}}")\
++    local scm_apply = rpm.expand("%__scm_apply_%{__scm}")\
++    print(rpm.expand("%{uncompress:"..file.."} | "..scm_apply.." "..options.."\\n"))\
++else\
++    print("echo 'Cannot read "..file.."'; exit 1;".."\\n")\
++end}
+ 
+ # Automatically apply all patches
+ %autopatch(vp:)\
+-- 
+1.9.3
+

diff --git a/rpm.spec b/rpm.spec
index 996452e..8f05815 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -29,7 +29,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}16%{?dist}
+Release: %{?snapver:0.%{snapver}.}17%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2
@@ -66,6 +66,7 @@ Patch110: rpm-4.13.0-disabling-filetriggers.patch
 Patch111: rpm-4.13.0-chroot-file-triggers.patch
 Patch112: rpm-4.13.0-missingok.patch
 Patch113: rpm-4.13.0-recursing-rpmdeps.patch
+Patch114: rpm-4.13.0-autosetup-errors.patch
 
 # These are not yet upstream
 Patch302: rpm-4.7.1-geode-i686.patch
@@ -570,6 +571,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Tue Jan 19 2016 Lubos Kardos <lkardos@redhat.com> - 4.13.0-0.rc1.17
+- Fix %autosetup not to cause errors during run of rpmspec tool (#1293687)
+
 * Fri Jan 15 2016 Lubos Kardos <lkardos@redhat.com> - 4.13.0-0.rc1.16
 - Fix recursive calling of rpmdeps tool (#1297557)
 

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

only message in thread, other threads:[~2026-11-23  9:29 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:29 [rpms/rpm] pmatilai-v6: - Fix %autosetup not to cause errors during run of rpmspec tool Lubos Kardos

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