public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/pcs] eln: simplify prep
Date: Fri, 20 Nov 2026 18:17:47 GMT [thread overview]
Message-ID: <179519866710.1.7761439883055375915.rpms-pcs-816b32694a3f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/pcs
Branch : eln
Commit : 816b32694a3fa5678c1ce9ceaddcd9ba93ed5156
Author : Michal Pospíšil <mpospisi@redhat.com>
Date : 2026-11-18T16:20:04-05:00
Stats : +31/-24 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/pcs/c/816b32694a3fa5678c1ce9ceaddcd9ba93ed5156?branch=eln
Log:
simplify prep
I unified the order of parameters to autosetup and autopatch as it was
mismatched from the time I copied the pcs-web-ui installation from the
upstream spec where it was written originally by someone else. This also
makes it easier to follow the documentation, as the order is now same
across usages and comments explaining what they do.
I also reviewed the comments in the whole prep section. I made sure that
comments make sense to me, there is no outdated information and updated
formatting to match the rest of the spec.
---
diff --git a/pcs.spec b/pcs.spec
index 6232ba6..3bf5427 100644
--- a/pcs.spec
+++ b/pcs.spec
@@ -314,36 +314,47 @@ Pacemaker/Corosync Configuration System (pcs) in the background.
%prep
-# documentation for setup/autosetup/autopatch:
+# Documentation for setup/autosetup/autopatch:
# * http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
# * https://rpm-software-management.github.io/rpm/manual/autosetup.html
-# patch web-ui sources
-# -n <name> — Set Name of Build Directory
-# -T — Do Not Perform Default Archive Unpacking
-# -b <n> — Unpack The nth Sources Before Changing Directory
-# -a <n> — Unpack The nth Sources After Changing Directory
-# -N — disables automatic patch application, use autopatch to apply patches
#
-# 1. unpack sources (-b 0)
-# 2. then cd into sources tree (the setup macro itself)
-# 3. then unpack node_modules into sources tree (-a 1).
-# patch pycurl sources
-%autosetup -T -b 23 -n %{pycurl_src_name} -N
+# AUTOSETUP
+# -T - do not perform default archive unpacking
+# -b <n> - unpack Source<n> into builddir
+# -a <n> - unpack Source<n> into the previously unpacked source
+# -N - disables automatic patch application, use autopatch
+# -n <name> - set name of build directory
+#
+# AUTOPATCH (applies patches with finer control than autosetup)
+# -p <n> - argument to control patch prefix stripping (pnum in the patch manual)
+# -m <n> - apply patches starting from <n>
+# -M <n> - apply patches up to <n>
+
+# Unpack and patch pycurl sources
+%autosetup -T -b 23 -N -n %{pycurl_src_name}
+# Apply infinite amount of patches starting with Patch401
%autopatch -p1 -m 401
-# repackaging patched pycurl and placing it into sources next to the untouched
+# Repackaging patched pycurl and placing it into sources next to the untouched
# original - it cannot be replaced, because rpmbuild -bp would fail on 2nd+ try
tar -c -f %{_sourcedir}/%{pycurl_src_name}-patched.tar.gz -z ../%{pycurl_src_name}
+# Unpack and patch web-ui sources
+# 1. Unpack web-ui Source100 before changing dir (-b 100)
+# 2. Autosetup calls cd into unpacked web-ui tree
+# 3. Unpack node_modules Source101 after cd into web-ui tree (-a 101).
%autosetup -T -b 100 -a 101 -N -n %{ui_src_name}
+# Apply Patch201-Patch400
%autopatch -p1 -m 201 -M 400
-# patch pcs sources
-%autosetup -S git -n %{pcs_source_name} -N
+# Unpack and patch pcs sources
+%autosetup -N -n %{pcs_source_name}
+# Apply Patch1-Patch200
%autopatch -p1 -M 200
-# generate .tarball-version if building from an untagged commit, not a released version
-# autogen uses git-version-gen which uses .tarball-version for generating version number
+# Generate .tarball-version if building from an untagged commit, not a released
+# version. autogen.sh uses git-version-gen which uses .tarball-version file for
+# setting version number across autotools
%if 0%{?tarball_version:1}
echo %{tarball_version} > %{_builddir}/%{pcs_source_name}/.tarball-version
%endif
@@ -352,10 +363,7 @@ tar -c -f %{_sourcedir}/%{pycurl_src_name}-patched.tar.gz -z ../%{pycurl_src_nam
echo %{ui_tarball_version} > %{_builddir}/%{ui_src_name}/.tarball-version
%endif
-# prepare dirs/files necessary for building python bundles
-# -----------------------------------------------------
-# 1) rubygems sources
-
+# Move rubygem sources where autotools expect them
mkdir -p %{rubygem_cache_dir}
cp -f %SOURCE61 %{rubygem_cache_dir}
cp -f %SOURCE62 %{rubygem_cache_dir}
@@ -373,12 +381,11 @@ cp -f %SOURCE73 %{rubygem_cache_dir}
cp -f %SOURCE75 %{rubygem_cache_dir}
cp -f %SOURCE76 %{rubygem_cache_dir}
-
-# 2) prepare python bundles
+# Move bundled python sdists where autotools expect them
mkdir -p %{pcs_bundled_dir}/src
cp -f %SOURCE21 rpm/
cp -f %SOURCE22 rpm/
-# using patched pycurl instead of the original
+# Moving patched pycurl instead of the original
cp -f %{_sourcedir}/%{pycurl_src_name}-patched.tar.gz rpm/
reply other threads:[~2026-11-20 18:17 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=179519866710.1.7761439883055375915.rpms-pcs-816b32694a3f@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