COPR mechanism to apply patch to linked spec, prior to build?
by PGNet Dev
i regularly create COPR projects, which link an upstream repo .spec in a pagure project.
i want to build @ COPR _after_ modifying the .spec.
there are 2 ways I see doing that.
(1) manually modifying/patching the spec itself
(2) having the buildsys auto-apply a patch to the spec, prior to the build
(1) is trivial, _if_ I edit a _fork_; that interferes with workflow, breaking upstream source updates' triggers for autobuilds at COPR
(2) is doable at opensuse's OBS, specifying the patch to be applied to the link-ed project sources
e.g.,
https://build.opensuse.org/package/view_file/home:pgnd:devel:gcc10/gcc10/...
what (other) mechanism exists for applying patches to a COPR spec, prior to build?
is there an OBS-style functional equivalent?
3 years, 1 month
including a custom-macro pkg for use in COPR build specs?
by PGNet Dev
i've created a custom macro file, packaged as a COPR pkg ( pgfed/pgnd-rpmbuild-macros ), for reference/(re)use in my _other_ COPR builds. it contains a macro def'n, "%_pgnd_macros"
if I install the pkg locally,
rpm -ql pgnd-rpmbuild-macros
/usr/lib/rpm/macros.d
/usr/lib/rpm/macros.d/macros.pgnd-rpmbuild
and reference it in a test.spec
cat test.spec
%{_pgnd_macros}
Name: test
Release: %{dist}
Summary: test
License: MIT
Version: 1
BuildArch: noarch
%description
...
any/all of its macro defs/expansions are available, as intended, and can be used throughout the build.
same for local mock builds.
next, to get my COPR builds to use it, @ COPR: Home >> pgfed >> [project] >> Settings >> Project Details
, i've set:
External Repositories: copr://pgfed/pgnd-rpmbuild-macros/fedora-$releasever-$basearch/
and, for the specific buildroot, @ COPR: Home >> pgfed >> [project] >> Edit >> fedora-32-x86_64
, i've set:
Packages: git coreutils rpm pgnd-rpmbuild-macros
once save, @ the project Overview,
External Repository List
The following repositories are accessible during builds
copr://pgfed/pgnd-rpmbuild-macros/fedora-$releasever-$basearch/
On build exec @ COPR, the build fails
...
stderr: error: line 1: Unknown tag: %{_pgnd_macros}
can't parse specfile
here's a specific example,
https://copr.fedorainfracloud.org/coprs/pgfed/redis-6/build/1601289/
https://download.copr.fedorainfracloud.org/results/pgfed/redis-6/srpm-bui...
what additional/changed config is required to get my 'other' COPR builds to correctly include/use my DIY-macros?
3 years, 1 month