You are not logged in.
Hi folks,
often I use makepkg for building custom packages. I'd like to save the compilation results, the packages, in order to get an "higher" security level...
I want makepkg saves .pkg into the same directory used by pacman.
So, I edited (created) ~/.makepkg.conf with the below lines:
PKGDEST=/var/cache/pacman/pkg
I get this error:
==> ERROR: You do not have write permission to store packages in /var/cache/pacman/pkg.
Aborting...
Is this normal? (at first blush I think yes, /var -> root, but thinking more deeply, I'm not sure about it because makepkg should only take care of building the package...)
How can I fix it?
Thanks you
EDIT: solved
Last edited by nTia89 (2016-03-29 17:04:32)
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Yes, that is normal.
/var/cache/pacman/pkg is usually used by pacman, for downloading and installing packages as root. makepkg doesn't run as root so it can't write to there (and it doesn't elevate to root either, except for un/installing make/depends).
I use /var/cache/pacman/custom as my PKGDEST which I gave 777 permissions. (This is also the location of my custom repository for AUR packages.)
Last edited by eschwartz (2016-03-29 14:18:35)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
ok @Eschwartz, thanks for the advice!
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
I'd like to advice you of another way:
using yaourt (I don't know if other aur helpers have this feature too...)
just edit .yaourtrc enabling
EXPORT=2
option.
This edit makes yaourt to ask the password in order to write in the pacman's cache!
SOLVED
PS: I'd like to see the same feature in makepkg; prior to open an worthless bug our bugtracker, let me know if itis not a good idea!
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
I don't think it is a necessary feature, and saying "yaourt does it" doesn't actually help the case for it. makepkg packages are necessarily foreign to the official repositories. Mirroring them into your local package folder blurs that distinction a bit, and blurring the distinction in itself is where much of the criticism of yaourt gets directed at.
Offline
mh... I think you can export into a different directory and yaourt will continue ask for password if needed, that is what makepkg is missing
OT: anyway, I use default pacman's cache because I don't see any problems doing it so (I'm a desktop user);
what have you pointed out, is a need issues or just a concept issue?
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
It's a concept issue. Putting built packages into pacman's cache while a perfectly legal thing to do, and convenient, I personally believe is a "wart," as in not the most elegant solution.
Offline
please, let me know the best solution in your opinion
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
When you build a package and wish to keep it put it in a folder with all your other self-built packages. That separation will not let you ever "forget" that the package isn't actually part of the official repositories. From there you could do some kind of job to mirror the packages to a back-up over your network or any other method to implement the same if you don't want to rely on a single-point-of-failure.
Offline
Again, I set PKGDEST in makepkg.conf
And in yaourtrc I have EXPORT=1 so yaourt moves the built packages to where makepkg would've put them anyway.
I feel that is the most elegant solution, especially since I then use /var/cache/pacman/custom as a custom local repository and add it as a second CacheDir in pacman.conf -- why make things harder for myself by mixing in foreign packages in the (main) cache?
Last edited by eschwartz (2016-03-29 18:26:10)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Back, back! To the pits of hell from which you spawned yaourt! I think you can surmise from that my opinion of it. cower, for the win!
Offline
Again, I set PKGDEST in makepkg.conf
And in yaourtrc I have EXPORT=1 so yaourt moves the built packages to where makepkg would've put them anyway....
...
...
but in my case (dir=/var/cache/pacman/pkg owned by root), with your configuration (EXPORT=1), using makepkg (lonely, no yaourt) breaks the chain!
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
If you absolutely positively insist that you must store built packages in /var/cache/pacman/pkg, then you will need to give your user write access to root-owned directories...
I can keep on telling you it is a better idea to use a separate new directory like /var/cache/pacman/custom, but if you are just going to ignore me there is no use doing so.
...
Regardless, yaourt is irrelevant, like all AUR helpers it (can) simply depends on makepkg to determine what happens to built packages.
Yes, you can also set it to "store packages in pacman's CacheDir", but that is entirely out of makepkg's scope and I can promise you the pacman devs will NEVER go for that!
What is so hard about using some other directory?
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
simply, I interpret the KISS philosophy in this way...
- I put all installed packages into a single folder
- obtaining it in the easiest way, compatibly with my needs
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Ok, you're running low-ish on disk space so what should you do as a band-aid? Well, pacman's cache is the first thing to throw overboard - pacman -Scc as the butcher method. But, now, you have all your AUR packages mixed in with that folder.. Uh-oh..
Offline
ok, I give it a try...
I will create /var/cache/pacman/pkg/mattia-custom-build
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline