You are not logged in.
If I'm installing a package from AUR or using a homegrown PKGBUILD, I need to install any make-depends prior to building. Should these packages be installed as explicitly-installed or as dependencies?
If I install them explicitly and later remove the package which required them, pacman -Rs will not remove them and nor will they be listed as orphaned.
If I install them as dependencies, they will be included as orphaned and may be removed by pacman -Rs, even though they are needed for making needed packages. Of course, they are not needed by the running system, but only for building one or more packages, but they are not exactly not-needed either.
Is it best to list them as explicit ? Or is it best to list them as dependencies? Or is it best to uninstall them after building the package(s) which require them?
I seem to vacillate between the first two policies, neither of which is very satisfactory. I have not tried the third.
Last edited by cfr (2022-12-12 18:06:08)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Same as makepkg does, they get installed as dependencies. makepkg also has an option to clean up installed packages after the build.
If you're building in a clean chroot, which you should be, it's mostly moot, though.
Offline
Same as makepkg does, they get installed as dependencies. makepkg also has an option to clean up installed packages after the build.
If you're building in a clean chroot, which you should be, it's mostly moot, though.
I should?
Edit: I just followed the instructions at https://wiki.archlinux.org/title/Arch_User_Repository which don't say I should clone the git repository or makepkg in a chroot as far as I can see. They just say to do it as an ordinary user. (I actually do it as a different ordinary user who is not in wheel etc. and can't access my home directory.)
Last edited by cfr (2022-12-11 21:28:42)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Offline
I just let makepkg install them (using the -s flag) and I remove them with my next cleanup of orphans (though using makepkg's -r flag would take care of this too, I just don't have a habit of that).
If there are certain build dependencies that you know you will regularly need and just want to keep them installed explicitly install that package. E.g., if you build a lot of rust programs, you may just want to keep rust installed. If there are few of these, you could make your own meta-package like cfr-devel which lists those build tools you commonly use that aren't in base-devel. This is precisely what base-devel is: a group of tools that is so commonly needed for building AUR packages that it is a group and most AUR users just keep base-devel installed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks, but I'm not a developer so I don't think this applies?
I just let makepkg install them (using the -s flag) and I remove them with my next cleanup of orphans (though using makepkg's -r flag would take care of this too, I just don't have a habit of that).
I've never used -s because I don't want to run makepkg as a user with more privileges than necessary. (And some dependencies are AUR packages, though I admit many are not.)
However, it sounds as if I should probably be using --asdeps more often and maybe removing things more often.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Thanks, but I'm not a developer so I don't think this applies?
Just because you aren't a dev doesn't mean that you can't use scripts such as extra-x86_64-buildfrom the devtools package.
Or you could just use graysky's clean-chroot-manager package to achieve the same thing.
All make depends are only installed into the build system chroot and never on to the machine that you are installing to.
Offline
I've never used -s because I don't want to run makepkg as a user with more privileges than necessary.
Ah, this doesn't add up. You still run makepkg as a regular user. With the -s flag it just runs the same pacman command (with sudo / su) that you would to install the dependencies, it just handles gathering that list of target packages for you.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ah, this doesn't add up. You still run makepkg as a regular user. With the -s flag it just runs the same pacman command (with sudo / su) that you would to install the dependencies, it just handles gathering that list of target packages for you.
Yes, but I'd have to give the user sudo rights and I've been reluctant to do that. I dare say that's paranoid or pointless or both, but that's why I've never used -s.
Just because you aren't a dev doesn't mean that you can't use scripts such as extra-x86_64-build from the devtools package.
But is there a reason to? It means trying to knit together the AUR instructions with the developer instructions. That's a lot of complications if there's not a good reason to do it.
All make depends are only installed into the build system chroot and never on to the machine that you are installing to.
Is this a good reason to do it that way?
Right now, I rely on the previous PKGBUILD when an AUR package is updated. I imagine this would be lost (or, at least, be more complicated) if building in a chroot.
I'm not suggesting the way I do it right now is ideal. I'm just trying to get a sense of why people are suggesting the different things they're suggesting (since Trilby seems not to be using clean chroots?).
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Yes, but I'd have to give the user sudo rights and I've been reluctant to do that.
If your user doesn't have sudo rights, remove sudo, then makepkg -s will use `su`. But in any case, you need to run pacman somehow, right? That requires some way of elevating rights.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
slithery wrote:Just because you aren't a dev doesn't mean that you can't use scripts such as extra-x86_64-build from the devtools package.
But is there a reason to? It means trying to knit together the AUR instructions with the developer instructions. That's a lot of complications if there's not a good reason to do it.
You don't have to 'knit together' anything. Just cd into the directory that contains the PKGBUILD and run extra-x86_64-build (or ccm c & ccm s) instead of makepkg.
slithery wrote:All make depends are only installed into the build system chroot and never on to the machine that you are installing to.
Is this a good reason to do it that way?
Yes. It provides an answer to the question you asked about not having to install makedepends onto your system.
https://wiki.archlinux.org/title/Develo … ean_chroot
https://github.com/graysky2/clean-chroot-manager
Offline
All packages in the repos are built in a clean chroot for a reason. There are a LOT of projects that will autodetect things that are on your system, or not on your system, when building. A clean chroot gives you a clean way to build with exactly what the PKGBUILD specifies.
Offline
The devtools method fails for me every time I try it. Example:
Installing auracle-git from the AUR
...
(1/1) Arming ConditionNeedsUpdate...
Checking PKGBUILD
PKGBUILD (auracle-git) W: PKGBUILD uses internal makepkg 'msg2' subroutine
Checking auracle-git-r366.8739929-5-x86_64.pkg.tar.zst
auracle-git W: Dependency included and not needed ('libcurl.so')
==> Running checkpkg
error: target not found: auracle-git
==> WARNING: Skipped checkpkg due to missing repo packages
Then it just dropps me in the shell again. It works with makepkg.
Offline
That's not a failure, after it builds it checks things with namcap and checkpkg. Everything worked just fine.
Offline
Oh. The package is in my done folder, indeed. There isn't an -i flag, like for makepkg perchance?
Offline
I just use makepkg -i after running devtools.
Online
I'm confused. Why does the wiki page on building AUR packages recommend a method which doesn't use a chroot if packages should always be built in a chroot?
If this is correct - and I'm certainly not suggesting it isn't - then why doesn't the AUR page explain how to do this for an AUR package? Of even that it should be done? I realise it may seem straightforward to people answering this, but ... I followed the wiki. When the AUR changed, I followed the wiki again. But I was following the wrong bit of the wiki?
Edit: Apologies. I spent the weekend trying to connect to a VPN so I can access files I used to access using cadaver. And I achieved nothing. I shouldn't have asked this question when I'm entangled in dead non-CIFS ends and addresses I can't figure out.
Last edited by cfr (2022-12-12 07:20:56)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I think you might be getting a little too hung up on Scimmia's "which you should be". It's good advice, it's probably best practice in many cases, but it is not necessary to get a package built. The AUR page mentions clean chroots in the troubleshooting section. This is where you'll need a clean chroot to make sure you stay sane while trying to fix a PKGBUILD.
There is also the problem of wiki house keeping. The clean chroot article is in the dev namespace of the wiki and it's probably not entirely understandable for everyone. The tools have potentially confusing names. Unless that is somewhat cleaned up/streamlined, suggesting it to every single beginner might lead to exactly those support threads that suggesting a clean chroot tries to prevent in the first place.
I just use makepkg -i after running devtools.
Now I feel stupid.
Offline
I think you might be getting a little too hung up on Scimmia's "which you should be".
Ah, ShouldLand ...
FWIW I've never built an AUR package in a chroot. None of my computers have blown up... yet.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I think you might be getting a little too hung up on Scimmia's "which you should be".
FWIW I've never built an AUR package in a chroot. None of my computers have blown up... yet.
Ah, thanks to you both. I think I will keep it in mind for troubleshooting and not try to figure out a new workflow at the moment, at least. Trying to get my head around VPN is more than enough frustration for now!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Fun to see a thread where everyone is "right" haha!
Just to add another perspective...
For packages that don't require a ton of build-deps, or those that I build so frequently that I've kept those deps installed, I just makepkg in a certain folder and routinely (part of backup checklist) clean up orphans via pacman.
For one-off packages (testing upstream cherry-picks or commit reverts), or those that require a lengthy list of build-deps, I do the manual clean chroot build method. It's mighty easy - don't let that "dev" aspect sway you.
As the counter of times I've seen extra-x86_64-build mentioned in such discussions continues to increment I'll likely give that a go some near-future date!
Offline
I always build everything in a clean chroot and recommend this to everyone. But you certainly don't HAVE to do this!
Still, I'd give a +1 if Arch devs decide to make the chroot method the default.
Offline
Still, I'd give a +1 if Arch devs decide to make the chroot method the default.
Not quite sure what you mean by this. As I understand it, Arch packages are already built in a clean chroot. The Arch devs don't control whether people use the same method to build AUR/other packages for their own use or not. Or did you mean you'd like to see the wiki page recommend it as default?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline