On Fri, Dec 6, 2024 at 9:28 PM Todd Zullinger <tmz@xxxxxxxxx> wrote: > > Stephen Morris wrote: > > Yes, but this still highlights the final question as "sudo dnf download > > symlinks-1.7-11.fc41.src" does the download but as shown above "sudo dnf > > install symlinks-1.7-11.fc41.src" won't do the install. > > > > How do I find where the source has been installed to when under dnfdragora > > when I search for symlinks in either names or descriptions I only get a > > reference to the binary package even though I have installed the source > > package as shown by "dnf info symlinks" which shows both the binary and > > source packages as being installed? Especially when I would have thought the > > source would have been installed to a sub_folder of /usr/src, but there > > isn't a symlinks sub_folder of /usr/src, it only has akmods, annobin, debug > > and kernels sub_folders. > > You shouldn't be using dnf to work with source rpm packages > (other than downloading them, but even that isn't really > required or optimal in most cases). If `dnf install` for a > source can even be made to work, it's very, very far from > the intended use of dnf. > > Rather, if you want to explore the corresponding source for > a Fedora package, use the fedpkg command. For example, to > get the expanded source for the symlinks package: > > $ sudo dnf install fedpkg > $ fedpkg clone -a symlinks > $ cd symlinks > $ fedpkg switch-branch f41 > $ fedpkg prep > $ cd symlinks-1.7 > $ : ... > $ : profit! > > This downloads the source code, extracts it into the current > directory, and applies any patches (of which there are none > for this package, at this time). That leaves you with a > symlinks-1.7 directory to explore. > > If you don't want to use fedpkg, the next best thing, IMO, > would be `rpm -ivh symlinks-1.7-11.fc41.src.rpm` to > "install" it (as a normal user -- NOT as root). > > That creates an ~/rpmbuild directory which contains SOURCES > & SPECS directories. To expand the source, you'd run > `rpmbuild -bp --nodeps SPECS/symlinks.spec` (from the > ~/rpmbuild directory). That would put the expanded source > in ~/rpmbuild/BUILD/symlinks-1.7-build/symlinks-1.7. > > Using fedpkg is much easier and I'd highly recommend that > instead of using rpmbuild, unless you have a strong desire > to first learn a lot about rpmbuild rather than just poking > at the symlinks source code. :) Fedora's docs on building RPMs also use fedpkg. See <https://docs.fedoraproject.org/en-US/package-maintainers/Packaging_Tutorial/>. For me, learning that I was supposed to use fedpkg was the big epiphany. Jeff -- _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-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/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue