Pacman aurutils: Difference between revisions

From wikinotes
Line 14: Line 14:
|}
|}
</blockquote><!-- Documentation -->
</blockquote><!-- Documentation -->
= Locations =
<blockquote>
{| class="wikitable"
|-
| <code>/etc/pacman.conf</code> || include your repo in pacman's conf
|-
| <code>/etc/pacman.d/${your_repo}.conf</code> || configure your repo
|-
|}
</blockquote><!-- Locations -->


= Tutorials =
= Tutorials =

Revision as of 21:51, 2 September 2023

aurutils manages aur packages within your own local pacman repository.
You can then host/share this package repository with other arch systems.

Documentation

github https://github.com/AladW/aurutils
man aur https://github.com/AladW/aurutils/blob/master/man1/aur.1
man aurhosting https://github.com/AladW/aurutils/blob/master/man7/aurhosting.7

Locations

/etc/pacman.conf include your repo in pacman's conf
/etc/pacman.d/${your_repo}.conf configure your repo

Tutorials

initial setup https://gist.github.com/geosharma/afe1ea9ebe58cb67aaaba62a0d47bc7a

Install

aura -A aurutils

Usage

# add or update package to repo
aur search ${pkg}
aur sync   ${pkg}       # download, build AUR package to local repo
aur sync -u             # update all installed AUR packages

# install a package from the repo
sudo pacman -S ${pkg}   # install package from repo

Configuration

Create/Use Repo

WARNING:

Obviously, this setup is not ideal for a shared system.
The user that builds packages should not have super-user permissions to install packages on a production system.

# 'build' group members can add packages
mkdir -p /var/cache/pacman/aur
sudo chown ${USER}:${USER} /var/cache/pacman/aur
sudo chmod 775 /var/cache/pacman/aur
# /etc/pacman.d/aur.conf
[options]
CacheDir = /var/cache/pacman/pkg/
CacheDir = /var/cache/pacman/aur/

[aur]
SigLevel = Optional TrustAll
Server = file:///var/cache/pacman/aur
# /etc/pacman.conf

# ...

Include /etc/pacman.d/aurutils.conf

NOTE:

careful, the user use pass to `-o` must have superuser permissions

sudo install -d -d /var/cache/pacman/aur -o ${USER}
repo-add /var/cache/pacman/aur/aur.db.tar

Adding manually built packages to repo

# copy manually built packages to repo
cp /var/src/*/*.pkg.tar.* /var/cache/pacman/aur/

# add packages to database
repo-add -n aur.db.tar /var/cache/pacman/aur/*.pkg.tar.*

# now update :)
aur sync -u

Host Repo

You've already created a git repo, you just need to host it now.

Server

# host repo over HTTP
python -m http.server -d /var/cache/pacman/aur

Clients

Note: like when configuring packages above, the db must match the section-name in pacman.conf (ex. aur.db -> [aur]).

# /etc/pacman.d/aur.conf

[options]
CacheDir = /var/cache/pacman/pkg/
CacheDir = /var/cache/pacman/aur/

[aur]
SigLevel = Optional TrustAll
Server = http://192.168.1.123:8000

Now check for a package you've built on the server

sudo pacman -Syy google-chrome  # tadaa!