----- Original Message ----- > From: "Vít Ondruch" <vondruch@xxxxxxxxxx> > To: devel@xxxxxxxxxxxxxxxxxxxxxxx > Sent: Tuesday, October 8, 2019 1:10:18 PM > Subject: Re: Has fedpkg + dist-git replaced rpmbuild for building new/local packages? > > > > > Dne 08. 10. 19 v 12:04 Ankur Sinha napsal(a): > > > > On Tue, Oct 08, 2019 12:21:05 +0300, Panu Matilainen wrote: > > > > Yup. If you prefer working in a dist-git like layout, just configure rpm do > behave that way. One possibility is simply: > > %_topdir %{getenv:PWD} > %_sourcedir %{_topdir} > %_specdir %{_topdir} > %_srcrpmdir %{_topdir} > %_builddir %{_topdir} > > ..and perhaps %_buildrootdir as well. And then just "mkdir foo; cd foo" when > starting a new package. > > The reasons that rpm doesn't default to this directory per source package > layout include > - there are cases where this doesn't work so well > - it'd invalidate 20+ years of documentation on the subject > - nobody has sat down to figure how to transition the existing assumptions > to this type of layout without breaking everybodys setup in the progress > I'll add this to the docs pages when I find time. It can go in the > "prepare your system" section: > https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/#preparing-your-system-to-create-rpm-packages > It'll be easier for newbies to transition to fedpkg + dist-git after the > package is approved if they use a similar layout right from the start. > > > > > > There is disconnect. You want something simple for newbies but you > immediately start talking about fiddling with configuration files? I would > never suggest to anybody to touch any configuration file and I would not > suggest this to newbies especially. I agree. Using mock (or COPR) is my go-to-tool for all packaging, no need to get distracted (IMO) by some other tool. It's very --verbose, so you get to know your build process / spec file if you read enough. And you can run it no top of `rawhide` (don't remember default, use `-r config`), so no surprises for ppl running stable Fedoras and rpmbuild. You can even build SRPM with it (--buildsrpm), and using `--noclean` you keep the /root/ for further examination (it also speeds up the repeated builds). Of course you have `--shell --unpriv` to try stuff manually and finally --install the package without worries. One's creating a package in like 5 minutes or so (focusing on the RPMs itself): F.e.: ``` ➜ mkcd rubygem-yarn ➜ gem2rpm --fetch yarn > rubygem-yarn.spec ➜ nano *.spec # Fix license ➜ mock --quiet --no-clean --resultdir=. --buildsrpm --spec *.spec --sources *.gem ➜ mock --no-clean --resultdir=. *.src.rpm ➜ mock --no-clean --install *.noarch.rpm ``` Regards, Pavel > > > > > Vít > > > > > > Would anyone else have the cycles to review/update these pages in the > meantime please? > https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/ > https://docs.fedoraproject.org/en-US/quick-docs/create-hello-world-rpm/ (I > don't see any other package building related pages there) > _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx