You are not logged in.

#1 2019-04-06 14:04:15

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

devtools and pacman.conf/makepkg.conf customization

I am looking at using clean chroot building more, but I have made several changes to /etc/makepkg.conf and pacman.conf


I have added 1 local and 2 remote custom repos in /etc/.pacman.conf , will devtools use those repos like makepkg does ?

according to "makechrootpkg --help" output MAKEFLAGS & SRCDEST are honored.
I haven't found a mention of BUILDENV and COMPRESSXZ though.

How can i make sure makechrootpkg uses my settings ?

N.B. I'm not a TU or Dev, just a user that builds lots of aur packages.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2019-04-06 22:22:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,393
Website

Re: devtools and pacman.conf/makepkg.conf customization

I think changes in ~/.makepkg.conf get pulled into the chroot.

Offline

#3 2019-04-07 03:46:18

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: devtools and pacman.conf/makepkg.conf customization

ArchWiki wrote:

Alternatively, provide a custom pacman.conf and makepkg.conf with the following:

$ mkarchroot -C <pacman.conf> -M <makepkg.conf> $CHROOT/root base-devel

Make sure by providing your pacman.conf when creating the chroot (that is where the extra repositories are enabled).

Note: The resulting chroot will not be "clean" (not wholly clean according to the dogumantation documentation); ie, concerning packages built therein--don't take declined support requests personally.

Edit:

ArchWiki wrote:

unintended custom adjustments

Nice euphemism, ArchWiki.

Last edited by quequotion (2019-04-07 03:54:21)

Offline

#4 2019-04-07 11:30:10

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: devtools and pacman.conf/makepkg.conf customization

The binaries I build are only used on my own systems, they don't have to be built in a squeaky-clean system.
Although I do try to keep my main system installation trimmed down, occasionally I miss a dependency because it's already present.

example :
mesa-git recently gained a new dependency, glslang.
I missed that because glslang is an indirect dependency of vlc & mpv (both present on my main system) .

Building in a chroot with a minimal setup is one way to find such dependencies.
Looks like I need to test some things and possibly write some custom scripts based on chroot the "Classic Way".

Thanks Allan , Quequotion

Last edited by Lone_Wolf (2019-04-07 11:31:28)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2019-04-07 23:32:06

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 813
Website

Re: devtools and pacman.conf/makepkg.conf customization

Lone_Wolf wrote:

custom scripts based on chroot the "Classic Way"

You can also add packages to the base chroot at creation time; ie:

mkarchroot -C <pacman.conf> -M <makepkg.conf> $CHROOT/root base-devel aria2

in /etc/pacman.conf (note, set after aria2 is installed):

XferCommand = /usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf --ftp-pasv --dir=/ %u -o %o

in /etc/makepkg{,-optimize}.conf:

if [[ -n "$(command -v aria2c)" ]]; then
  DLAGENTS=('file::/usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf %u -o %o'
            'ftp::/usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf --ftp-pasv %u -o %o'
            'http::/usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf %u -o %o'
            'https::/usr/bin/aria2c --conf-path=/etc/aria2/aria2.conf %u -o %o')
else
  DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
            'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
            'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
            'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u')
fi

DLAGENTS+=('rsync::/usr/bin/rsync --no-motd -z %u %o'
           'scp::/usr/bin/scp -C %u %o')

/etc/aria2/aria2.conf:

mkdir $CHROOT/root/etc/aria2
cp {,$CHROOT/root}/etc/aria2/aria2.conf
# error handling
timeout=60
connect-timeout=30
max-tries=5
retry-wait=10
max-file-not-found=1

# downloading
split=100
##split=3
max-connection-per-server=16
##max-connection-per-server=3
min-split-size=1M
##min-split-size=1M
max-concurrent-downloads=10
##max-concurrent-downloads=1
file-allocation=none
remote-time=true
conditional-get=true
no-netrc=true

# resuming
continue=true
allow-overwrite=true
always-resume=false

# proxy
#http-proxy=127.0.0.1:8080
#https-proxy=127.0.0.1:8080
#ftp-proxy=127.0.0.1:8080

# console
#quiet=true
console-log-level=warn
summary-interval=0
enable-color=true
#enable-color=false
human-readable=true
#human-readable=false
show-console-readout=true
#show-console-readout=false
#truncate-console-readout=false

# logging
log-level=error
##log-level=warn
##log=/var/log/pacman-aria2.log

# what are these for?
follow-metalink=mem
metalink-preferred-protocol=https
follow-torrent=mem
bt-enable-lpd=true
auto-file-renaming=false
check-integrity=true
disable-ipv6=true
disk-cache=64M

#Enable DNSCrypt, etc?
async-dns=true

check-certificate=false

Clean as a whistle, sharp as a thistle!

*Note: this will enable aira2 download acceleration in both your base chroot (for updates, etc)--and any derived user chroot (aria2 everywhere)--and is therefore decidedly not "clean" (very fast though).

Last edited by quequotion (2019-04-08 07:02:50)

Offline

Board footer

Powered by FluxBB