I am using Arch Linux. I want to do the same thing like apt-get source coreutils
; is it possible to download sources with Pacman? I didn't find a solution in the man pages.
How can I get the source code of a package?
2018 Update:
The abs
tool described below has been deprecated and it along with its rsync endpoint have been dropped since mid 2017.
The asp
tool now provides similar functionality. More information here.
As already mentioned you can use the ABS (Arch Build System):
Install it using pacman:
sudo pacman -S base-devel abs
First, download the ABS tree:
sudo abs
Then, get a specific package:
sudo abs [package_name]
Then copy the package, whose source you want to have, from the local abs tree (e.g. /var/abs/core/findutils
) to another directory, e.g. /home/blabla/abs
Then run makepkg
:
if you only want to get the sources and don't want to build the package you can run makepkg -od
otherwise run makepkg -s
, which will then handle all the package's dependencies automatically
watch out becaouse makepkg will overwrite your modifications, use makepkg -e
to build your local sources instead
If you want to install the package you've built, run
pacman -U name-of-package.xz