[pacman-dev] building pacman for a customer foloder
pacman-dev
pacman-dev at dodtsair.com
Wed Mar 7 02:49:18 UTC 2018
Hello Pacman Team,
I was trying to build Pacman for installation into a custom folder.
I downloaded the following pacman source code:
https://sources.archlinux.org/other/pacman/pacman-5.0.2.tar.gz
I then ran the following configure command:
./configure --prefix=/usr/local/pacman/ --disable-doc --disable-shared
After this is seems to be using --prefix for make install but not when building. The binaries assume a location of /usr/local. See below for details. How do I build pacman to run from a custom directory?
To make install I run
$make
$sudo mkdir /usr/local/pacman
$sudo chown localuser:localuser /usr/local/pacman/
$make install
At this point it has installed pacman executable at:
$ls /usr/local/pacman/bin/pacman
/usr/local/pacman/bin/pacman
The configuration file can be found at
$ls /usr/local/pacman/etc/pacman.conf
/usr/local/pacman/etc/pacman.conf
However when I run pacman I get an error, like the following:
$ /usr/local/pacman/bin/pacman -U ~/mist.tar.gz
error: config file /usr/local/etc/pacman.conf could not be read: No such file or directory
If I go and link the file:
$sudo ln -s /usr/local/pacman/etc/pacman.conf /usr/local/etc/
Then run pacman again I still get an error, just now with the var folder:
$/usr/local/pacman/bin/pacman -U ~/mist.tar.gz
error: failed to initialize alpm library
(could not find or read directory: /usr/local/var/lib/pacman/)
It seems to be taking the prefix for installation but not for compile. What do I need to change to make it run from a different prefix?
Michael Power
More information about the pacman-dev
mailing list