You are not logged in.

#1 2019-05-30 13:53:44

LetsAsk
Member
Registered: 2016-04-15
Posts: 9

Makepkg with arch-chroot

I am currently creating an installation script for Arch Linux. The sense or nonsense of such a script remains to be seen.

The script is stored on a USB stick and called via an Arch Linux live system.

I would like to install some packages from the AUR. Normally I would install an AUR helper like yay with makepkg, but makepkg must not be run with root and I haven't yet found a way to call arch-chroot as a non-root user.

Is there a way to run makepkg over arch-chroot like

arch-chroot /mnt makepkg -si

?

Offline

#2 2019-05-30 17:35:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Makepkg with arch-chroot

Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-05-30 18:38:20

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Makepkg with arch-chroot

LetsAsk wrote:

makepkg must not be run with root and I haven't yet found a way to call arch-chroot as a non-root user

Use the -u option for arch-chroot and the nobody user for makepkg: http://allanmcrae.com/2015/01/replacing-makepkg-asroot/


Jin, Jîyan, Azadî

Offline

#4 2019-05-30 22:14:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: Makepkg with arch-chroot

LetsAsk wrote:

Normally I would install an AUR helper like yay

Yes, but this isn't 'normally', so just ditch that idea.  Why on earth would you install an aur helper just to install other aur packages all from the same script.  The script is already automating everything, so yay does absolutely nothing for you here.

LetsAsk wrote:

I would like to install some packages from the AUR.

Is there any reason they need to be built on each target machine?  If the install script is on a flash drive, just put the built AUR packages on there too.  Then just install them with pacman from the script.

LetsAsk wrote:

The sense or nonsense of such a script remains to be seen.

I beg to differ.  It has been seen.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2019-05-31 17:02:30

LetsAsk
Member
Registered: 2016-04-15
Posts: 9

Re: Makepkg with arch-chroot

Trilby wrote:

Why on earth would you install an aur helper just to install other aur packages all from the same script.  The script is already automating everything, so yay does absolutely nothing for you here.

That's true, but there's nothing to be said against it. "Yay" is just a possibility to integrate aur packages into the system in a simple way. And I want to use "yay" in productive use anyway. Why not during the installation?

Trilby wrote:

Is there any reason they need to be built on each target machine?  If the install script is on a flash drive, just put the built AUR packages on there too.  Then just install them with pacman from the script.

I want to install the latest versions for each installation. Each installation should also be identical. This is necessary for my purpose.

Trilby wrote:

I beg to differ.  It has been seen.

Why? I have always understood scripts as the automation of recurring tasks. And that would be an installation with the same system, the same configurations, and the same packages, right? Why should a well-developed script be misplaced?

Offline

#6 2019-05-31 17:07:24

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: Makepkg with arch-chroot

You mean identical apart from the differing package versions?

Offline

#7 2019-05-31 17:13:53

LetsAsk
Member
Registered: 2016-04-15
Posts: 9

Re: Makepkg with arch-chroot

loqs wrote:

You mean identical apart from the differing package versions?

Identical with regard to the status " up-to-date at the time of installation".

Offline

Board footer

Powered by FluxBB