aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: a35e612dad23d4b1c2d04e1dde4e9d9835f7618f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# aur-builds
automatic builds of aur packages on a cron job

make an arch container/vm 
struggle with networking for a bit
set up locales
 - uncomment `en_US-UTF-8 UTF-8` from `/etc/locale.gen`
 - run `locale-gen`
 - run `echo 'LANG=en_US-UTF-8' >> /etc/locale.conf`

set up a aur user for builds so we can do this without root:
 - run `useradd --home-dir /var/aur/ --create-home aur`
 - add `aur ALL=(ALL) NOPASSWD: /usr/bin/pacman, /usr/bin/mkarchroot, /usr/bin/arch-nspawn, /usr/bin/makechrootpkg` to the sudoers file

set up nginx to serve repo files
```nginx
user aur;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;

    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;

        location / {
            root   /var/aur/repo/;
            autoindex on;
        }
    }
}
```

run inital setup by copying in `constants.sh` and `setup.sh`, making `setup.sh` executable, and running `setup.sh`.

add the following lines to /etc/pacman.conf. if you've updated constants.sh, make sure to update below
```ini
[aur-builds]
SigLevel = Optional TrustAll
Server = file:///var/aur/repo
```

if you have a gpg key, import it and run `pacman-key --add [PUBKEY_FILE]; pacman-key --lsign-key [KEY_ID]`. also add --sign to the aur command in `build.sh`