On Wed, 2020-03-11 at 12:21 +0100, clime wrote:
> rpmbuild needs to get a preprocessed spec already.

Hmm, what do you mean with that? The spec files we currently have in
dist-git can be built directly with rpmbuild, you just need to tell
rpmbuild that the sources are in the same directory, e.g.:

--- 8< ---
nils@gibraltar:~/dist-git/fedora/rpms/dcraw (master)> rpmbuild --define 
"%_sourcedir $PWD" -ba --clean dcraw.spec
setting SOURCE_DATE_EPOCH=1563926400
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.PTKY48
+ umask 022
+ cd /home/nils/rpmbuild/BUILD
+ cd /home/nils/rpmbuild/BUILD
+ rm -rf dcraw
+ /usr/bin/gzip -dc /home/nils/dist-git/fedora/rpms/dcraw/dcraw-9.28.0.tar.gz
[... skip build messages ...]
Wrote: /home/nils/rpmbuild/SRPMS/dcraw-9.28.0-6.fc31.src.rpm
Wrote: 
/home/nils/rpmbuild/RPMS/x86_64/dcraw-debugsource-9.28.0-6.fc31.x86_64.rpm
Wrote: /home/nils/rpmbuild/RPMS/x86_64/dcraw-9.28.0-6.fc31.x86_64.rpm
Wrote: /home/nils/rpmbuild/RPMS/x86_64/dcraw-debuginfo-9.28.0-6.fc31.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.qq02g8
+ umask 022
+ cd /home/nils/rpmbuild/BUILD
+ cd dcraw
+ /usr/bin/rm -rf /home/nils/rpmbuild/BUILDROOT/dcraw-9.28.0-6.fc31.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.x7fCS6
+ umask 022
+ cd /home/nils/rpmbuild/BUILD
+ rm -rf dcraw
+ RPM_EC=0
++ jobs -p
+ exit 0
nils@gibraltar:~/dist-git/fedora/rpms/dcraw (master)>
--- >8 ---

That aside, the main thing I don't like in your proposal is that the
files would still be called '*.spec', but with the additional macros
they wouldn't be RPM spec files anymore. Files which are to be
preprocessed, should be distinguishable from the preprocessed version
by a different extension, e.g.:

- something.c --> cpp --> something.i
- Makefile.am --> automake --> Makefile.in --> configure --> Makefile
- sendmail.mc -> /etc/mail/make (m4) -> sendmail.cf

Nils
-- 
Nils Philippsen    "Those who would give up Essential Liberty to
Software Engineer   purchase a little Temporary Safety, deserve neither
Red Hat             Liberty nor Safety."  --  Benjamin Franklin, 1759
PGP fingerprint:  D0C1 1576 CDA6 5B6E BBAE  95B2 7D53 7FCA E9F6 395D
            old:  C4A8 9474 5C4C ADE3 2B8F  656D 47D8 9B65 6951 3011
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to