public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mariadb-connector-c] f44: [cleanup] Use '%autosetup' instead of '%setup' + conditional '%patch'
@ 2026-06-25 18:19 Michal Schorm
  0 siblings, 0 replies; only message in thread
From: Michal Schorm @ 2026-06-25 18:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/mariadb-connector-c
            Branch : f44
            Commit : c6f58f1af53e1365640876ab45d603da6224f679
            Author : Michal Schorm <mschorm@redhat.com>
            Date   : 2026-06-24T00:40:49+02:00
            Stats  : +1/-4 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/mariadb-connector-c/c/c6f58f1af53e1365640876ab45d603da6224f679?branch=f44

            Log:
            [cleanup] Use '%autosetup' instead of '%setup' + conditional '%patch'

The 'Patch1' tag is already conditional on the testsuite '%bcond', so
when the bcond is off, no patches exist in the parsed spec.
'%autosetup' handles this correctly -- it applies all declared patches
(zero when testsuite is off, one when on).

Verified in 'fedora:rawhide' container:
  - testsuite ON:  patch applied, full build + test RPMs produced
  - testsuite OFF: no patches applied, build succeeds without '-test'

Co-Authored-By: Claude AI <noreply@anthropic.com>

---
diff --git a/mariadb-connector-c.spec b/mariadb-connector-c.spec
index 2e46c08..72277df 100644
--- a/mariadb-connector-c.spec
+++ b/mariadb-connector-c.spec
@@ -102,10 +102,7 @@ and require this package, so the /etc/my.cnf file is present.
 
 
 %prep
-%setup -q -n %{name}-%{version}-src
-%if %{with testsuite}
-%patch -P1 -p1
-%endif
+%autosetup -p1 -n %{name}-%{version}-src
 
 # Remove unused parts
 rm -r win win-iconv external/zlib

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

only message in thread, other threads:[~2026-06-25 18:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 18:19 [rpms/mariadb-connector-c] f44: [cleanup] Use '%autosetup' instead of '%setup' + conditional '%patch' Michal Schorm

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