You are not logged in.

#1 2019-04-14 11:46:54

mrjayviper
Member
Registered: 2019-04-02
Posts: 8

How do I install AUR packages during installation (while chrooted)?

steps/commands I used (as an example I'm trying to install yay)

# useradd -m -g users -G wheel -s /bin/bash myuser
# passwd myuser
# nano /etc/sudoers (to allow all members of the wheel group access to sudo)
# cd /home/myuser
# rm -rf /home/myuser/yay 2>/dev/null
# git clone https://aur.archlinux.org/yay.git
# chown -R myuser:users /home/myuser/yay
# cd yay
# pacman -S --asdeps go
# sudo -u chiyo makepkg

On the last step, it's failing to retrieve the yay.tar.gz. I'm getting a "transient operation: timeout" error.

I then installed wget  and tried manually  retrieving it (the URL was something like github.com/Jguer/yay/archive/v9.2.0.tar.gz) and no problem with that.

As a test, I then tried

# su - myuser
$ cd /home/myuser/yay
$ makepkg -si

I got the same issue above. As a test, I tried pinging github.com and it's failing. I decided to retrieve github's IP from my Mac (nslookup github.com) and tried pinging it from the Arch Linux installation and I can ping it fine. It seems DNS resolution is failing when logged in as the local user while chrooted.

Any ideas on what I'm doing wrong?

Thanks

Offline

#2 2019-04-14 12:59:08

natervance
Member
Registered: 2017-04-20
Posts: 18

Re: How do I install AUR packages during installation (while chrooted)?

Hi mrjayviper,

With dns issues inside of a chroot it sounds like you need to copy /etc/resolv.conf into the chroot. If you use the arch-chroot tool then this step should be done automatically. Details for the automatic method (arch-chroot) and the manual method for chroot (copy files, mount directories, etc.) are on the chroot wiki page

I'm a bit confused how you can't ping github.com because of a dns issue, yet you can wget github.com/Jguer/yay/archive/v9.2.0.tar.gz. Is the wget command run from outside of the chroot?

Offline

#3 2019-04-14 13:16:14

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,052
Website

Re: How do I install AUR packages during installation (while chrooted)?

A better question is why are you trying to do this from the chroot?  Just reboot into your new system, and go from there.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2019-04-14 15:14:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,712

Re: How do I install AUR packages during installation (while chrooted)?

Or, if you must (maybe it is a network driver or something), build the package on another machine, transfer the package to the new machine using a tool such as sftp, and install it with pacman -U


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2019-04-14 15:43:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,052
Website

Re: How do I install AUR packages during installation (while chrooted)?

ewaller wrote:

Or, if you must (maybe it is a network driver or something)

If that's the case, there's no reason to be messing with yay, git clone the package, and run makepkg as 'nobody'.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2019-04-14 16:06:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,712

Re: How do I install AUR packages during installation (while chrooted)?

Trilby wrote:

there's no reason to be messing with yay,

Completely agree with you there... (despite quoting you  egregiously out of context) wink

Maybe it is just my style, but I like to get out of the chroot as fast as possible and get into a system that has booted from scratch.  Then I start installing all the developer tools, source code management, and editors.  No reason for this really.  Maybe it is because the proof is in the pudding, I don't want to find out after I do all the work building a system that my box won't boot.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2019-04-14 17:01:19

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: How do I install AUR packages during installation (while chrooted)?

ewaller wrote:
Trilby wrote:

there's no reason to be messing with yay,

I don't want to find out after I do all the work building a system that my box won't boot.

Find out why is it not booting is easy; just boot to live and reinstall bootloader. if not worked just reinstall base. if this not worked again only thing that could happen is a data lose on your HDD or a demaged package on repo.

Offline

#8 2019-04-14 17:15:28

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,712

Re: How do I install AUR packages during installation (while chrooted)?

mmdamin wrote:

Find out why is it not booting is easy; just boot to live and reinstall bootloader. if not worked just reinstall base. if this not worked again only thing that could happen is a data lose on your HDD or a demaged package on repo.

I agree.  And on most laptops and desktops it is straight forward. But, I often build headless embedded systems that often run from integral eMMC drives. LIke this one: https://www.advantech.com/products/mi%7 … bbd9041dbb
Some embedded systems, not that one, are very picky about what will, and what will not boot from eMMC using UEFI; especially when one enforces secure boot with TPM.  There are partition configurations that just will not work.
The nice thing is, from power on, I have a working, headless, diskless controller that is ready in about 15 sec.

Last edited by ewaller (2019-04-14 17:15:56)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2019-04-14 17:49:25

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: How do I install AUR packages during installation (while chrooted)?

ewaller wrote:
mmdamin wrote:

Find out why is it not booting is easy; just boot to live and reinstall bootloader. if not worked just reinstall base. if this not worked again only thing that could happen is a data lose on your HDD or a demaged package on repo.

I agree.  And on most laptops and desktops it is straight forward. But, I often build headless embedded systems that often run from integral eMMC drives. LIke this one: https://www.advantech.com/products/mi%7 … bbd9041dbb
Some embedded systems, not that one, are very picky about what will, and what will not boot from eMMC using UEFI; especially when one enforces secure boot with TPM.  There are partition configurations that just will not work.
The nice thing is, from power on, I have a working, headless, diskless controller that is ready in about 15 sec.

archlinux targets intel x86_64, And if you can boot live disk, then installed must boot.

Offline

Board footer

Powered by FluxBB