This is a quick way to set up an Arch Linux Pacman repository, hosted on Amazon S3 or an equivalent service. It can also be easily modified to use SSH/SCP to upload files to a more traditional web server, or a local machine.
It allows you to run your own repository, so that you can use pacman
to
install your own packages, and have them easily upgraded when you publish
updates.
- Inside the
public
folder, create one subdirectory for each repo you wish to establish. - Inside this folder, create another one for each architecture you wish to
support, e.g.
i686
,x86_64
, etc. - Copy
Makefile.config.sample
toMakefile.config
and update as required. - Build your packages as normal, and put the output
.xz
files into the relevant repo's architecture folder from step 2 (see below for an example). - Run
make
to construct the repo's database and upload it. - As packages are updated, copy them in as per steps 4 and 5. You can delete
the old
.xz
files if you wish, or leave them around for a while in case anyone is looking for older versions if they need to downgrade.
If uploading to s3://example.com/hello/
and the repo defined in
Makefile.config
is called myrepo
, then anyone wishing to use the repo will
need to add this to /etc/pacman.conf
:
[myrepo]
SigLevel = Optional TrustAll
Server = http://example.com/hello/$repo/$arch/
Run pacman -Sy
to read in the new repo, after which you can install any
packages from it with the usual pacman -S packagename
.
Once you have created the relevant folders, the tree should look similar to this:
./Makefile
./Makefile.config
./README.md
./public/
./public/myrepo/
./public/myrepo/x86_64/
./public/myrepo/x86_64/mypackage-1.0-1-x86_64.pkg.tar.xz
./public/myrepo/i686/
./public/myrepo/i686/mypackage-1.0-1-i686.pkg.tar.xz