Samuel's answers were excellent.  I just want to add one thing.

On Tue, Apr 28, 2020 at 4:11 PM Samuel Sieb <sam...@sieb.net> wrote:
> That is a huge topic.  I don't know where to start with that.  I use
> "rpmbuild" for my purposes, but I've seen it mentioned that "mock" is
> the recommended way to build.  Actual packages for Fedora get built in
> koji.  https://koji.fedoraproject.org/koji/  There are a set of command
> line utilities for managing packages and running builds.

For those interested, here's how to try mock yourself.  Install mock:

sudo dnf install mock

Add yourself to the mock group:

sudo usermod -a -G mock <your username goes here>

Go find a package you care about on koji.  Since this thread is about
bind, let's look it up.  Visit https://koji.fedoraproject.org/koji/.
In the upper right, there is a dropdown which is set to "Packages"
(leave that alone), a text box, and a button that says "SEARCH".  Type
bind in the text box and press return or click the SEARCH button.  You
now see a list of the bind builds that koji knows about.  Click on the
top one.  This gives you a bunch of information about that build.
Look down the left side until you find "RPMs".  That is a list of rpm
files associated with this build.  Find the "src" label.  Just below
that should be a line that looks like this:

bind-9.11.18-2.fc33.src.rpm (info) (download)

Click on the download link.  You now have a source rpm in your
Downloads directory.  Let's pretend you have
~/Downloads/bind-9.11.18-2.fc33.src.rpm.  Build it yourself like this
(assuming you have x86_64 hardware, which seems like a pretty safe
assumption):

mock -r fedora-rawhide-x86_64 --rebuild ~/Downloads/bind-9.11.18-2.fc33.src.rpm

If you want to build for Fedora 32 instead, do it like this:

mock -r fedora-32-x86_64 --rebuild ~/Downloads/bind-9.11.18-2.fc33.src.rpm

Look in /etc/mock to see all of the distributions you can build for.
If you have x86_64 hardware, you can build for the x86_64 and i386
targets.  If you want to build for other types of hardware, ask me how
to do it.

After initiating the mock build, look in
/var/lib/mock/fedora-rawhide-x86_64 (or
/var/lib/mock/fedora-32-x86_64) to see where the build happened.
Build logs and binary artifacts go in the "result" directory.  The
build itself happens in a chroot, which is in the "root" directory.
Look in "root/builddir/build" to find all of the usual directories
created by rpmbuild.

I think all of that counts as "one thing", don't you? :-)  Regards,
-- 
Jerry James
http://www.jamezone.org/
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-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/users@lists.fedoraproject.org

Reply via email to