public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/notmuch] rawhide: Move editing of sources to %prep section
Date: Mon, 15 Jun 2026 19:18:30 GMT	[thread overview]
Message-ID: <178155111056.1.10425910025910706736.rpms-notmuch-290beaf6c2a2@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/notmuch
            Branch : rawhide
            Commit : 290beaf6c2a2fc487b5b771b8f89ff8e0d333410
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
            Date   : 2026-06-14T17:32:53+02:00
            Stats  : +9/-14 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/notmuch/c/290beaf6c2a2fc487b5b771b8f89ff8e0d333410?branch=rawhide

            Log:
            Move editing of sources to %prep section

The editing of sources was done partially in %generate_buildrequires.
This works, because the steps are done in order, but conceptually,
sources are supposed to be 'prepared' in %prep, so that at end of %prep
we have the tree in the state in which we'll be trying to work on it.

While at it, drop some pushd+popd's to reduce verbosity and replace
them with "cd" (relying on sections' cwd scoping) or make's "-C"; switch
to %make_* consistently.

Amended-by: Michael J Gruber <mjg@fedoraproject.org>

[skip changelog]

---
diff --git a/notmuch.spec b/notmuch.spec
index b2465a4..a2c9c7f 100644
--- a/notmuch.spec
+++ b/notmuch.spec
@@ -182,18 +182,18 @@ interface, utilizing the notmuch framework.
 # we build the wheel using pyproject macros instead
 sed -i -e '/setup.py build/ d' bindings/Makefile.local
 
-%generate_buildrequires
 # Generate _notmuch_config.py needed by setup.py:
-cat > bindings/python-cffi/_notmuch_config.py <<EOF
+cat >bindings/python-cffi/_notmuch_config.py <<EOF
 # _notmuch_config.py was automatically generated by the configure
 # script in the root of the notmuch source tree.
 NOTMUCH_VERSION_FILE='%{_builddir}/%{?buildsubdir}/version.txt'
 NOTMUCH_INCLUDE_DIR='%{_builddir}/%{?buildsubdir}/lib'
 NOTMUCH_LIB_DIR='%{_builddir}/%{?buildsubdir}/lib'
 EOF
-pushd bindings/python-cffi > /dev/null
+
+%generate_buildrequires
+cd bindings/python-cffi
 %pyproject_buildrequires
-popd > /dev/null
 
 %build
 %configure --emacslispdir=%{_emacs_sitelispdir}
@@ -206,9 +206,7 @@ popd
 %make_build CFLAGS="$RPM_OPT_FLAGS -fPIC"
 
 # Build notmuch-mutt
-pushd contrib/notmuch-mutt
-make
-popd
+%make_build -C contrib/notmuch-mutt
 
 %install
 %make_install
@@ -227,9 +225,7 @@ pushd bindings/python-cffi
 popd
 
 # Install the ruby bindings
-pushd bindings/ruby
-make install DESTDIR=%{buildroot}
-popd
+%make_install -C bindings/ruby
 
 # Install notmuch-mutt
 %if %{with mutt}
@@ -241,9 +237,8 @@ install -m0644 contrib/notmuch-mutt/notmuch-mutt.1 \
 
 # Install notmuch-vim
 %if %{with vim}
-pushd vim
-make install DESTDIR=%{buildroot} prefix="%{_datadir}/vim/vimfiles"
-popd
+install -m0755 -d %{buildroot}%{_datadir}/vim/vimfiles/{doc,plugin,syntax}
+%make_install prefix="%{_datadir}/vim/vimfiles" -C vim
 %endif
 
 # Do not install notmuch-git which requires sfsexp
@@ -269,7 +264,7 @@ NOTMUCH_SKIP_TESTS="$NOTMUCH_SKIP_TESTS emacs-tree.14"
 NOTMUCH_SKIP_TESTS="$NOTMUCH_SKIP_TESTS" \
 NOTMUCH_TEST_SERIALIZE="yesplease" \
 NOTMUCH_TEST_TIMEOUT="10m" \
-%{py3_test_envvars} make test V=1
+%{py3_test_envvars} %make_build test
 %endif
 
 %if %{with vim}

                 reply	other threads:[~2026-06-15 19:18 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=178155111056.1.10425910025910706736.rpms-notmuch-290beaf6c2a2@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