Browse Source

Setup AUR repo and make no attempt to build AUR pkgs

Building AUR packages automatically isn't that easy, so let's just assume
that the user somehow builds them to the repo.
master
Sebastian Wiesner 2 months ago
parent
commit
26fa4118e8
13 changed files with 64 additions and 38 deletions
  1. +2
    -0
      kasterl.yml
  2. +0
    -5
      roles/arch-aur-base/tasks/main.yml
  3. +0
    -3
      roles/arch-aur-packages/meta/main.yml
  4. +0
    -4
      roles/arch-aur-packages/tasks/main.yml
  5. +0
    -0
      roles/arch-aur/meta/main.yml
  6. +8
    -0
      roles/arch-aur/tasks/cleanup.yml
  7. +47
    -0
      roles/arch-aur/tasks/main.yml
  8. +3
    -0
      roles/arch-aur/templates/90-repo-aur.conf.j2
  9. +3
    -0
      roles/arch-aur/vars/main.yml
  10. +1
    -7
      roles/arch-base-devel/meta/main.yml
  11. +0
    -8
      roles/arch-desktop-base/meta/main.yml
  12. +0
    -7
      roles/arch-extra-personal/meta/main.yml
  13. +0
    -4
      roles/arch-tools/meta/main.yml

+ 2
- 0
kasterl.yml View File

@@ -4,6 +4,8 @@
roles:
- role: arch-base
tags: [install]
- role: arch-aur
tags: [aur, install]
- role: arch-base-devel
tags: [devel]
- role: arch-desktop-base


+ 0
- 5
roles/arch-aur-base/tasks/main.yml View File

@@ -1,5 +0,0 @@
- name: Install base-devel to build AUR packages
pacman:
name: base-devel
state: present
# TODO: Setup AUR package repository

+ 0
- 3
roles/arch-aur-packages/meta/main.yml View File

@@ -1,3 +0,0 @@
dependencies:
- arch-pacman
- arch-aur-base

+ 0
- 4
roles/arch-aur-packages/tasks/main.yml View File

@@ -1,4 +0,0 @@
- name: Debug packages to install
debug:
msg: "Would install {{ item }}"
loop: "{{ aur_packages }}"

roles/arch-aur-base/meta/main.yml → roles/arch-aur/meta/main.yml View File


+ 8
- 0
roles/arch-aur/tasks/cleanup.yml View File

@@ -0,0 +1,8 @@
- name: Remove legacy pkg repo directory
file:
path: /srv/pkgrepo
state: absent
- name: Remove legacy pkgrepo aur group
group:
name: pkgrepo_aur
state: absent

+ 47
- 0
roles/arch-aur/tasks/main.yml View File

@@ -0,0 +1,47 @@
- name: Install base-devel to build AUR packages
pacman:
name: base-devel
state: present
- name: Create group for AUR repo maintainers
group:
name: "{{ arch_aur_repo_group }}"
- name: Add ansible user to the group
user:
name: "{{ ansible_user }}"
groups: "{{ arch_aur_repo_group }}"
append: yes
- name: Create directory for AUR repo
file:
path: "{{ arch_aur_repo_dir }}"
state: directory
group: "{{ arch_aur_repo_group }}"
# Add SGID bit to inherit group ownership for files
mode: "2775"
- name: Set default ACL to allow all AUR group members to edit files
acl:
path: "{{ arch_aur_repo_dir }}"
default: true
state: present
follow: no
etype: group
permissions: "rw-"
- name: Set default ACL to allow all users to read files regardless
# Avoids troubles from too restrictive umasks
acl:
path: "{{ arch_aur_repo_dir }}"
default: true
state: present
follow: no
etype: other
permissions: "r--"
- name: Initialize AUR package database
command:
cmd: "repo-add {{ arch_aur_pkg_db }}"
creates: "{{ arch_aur_pkg_db }}"
- name: Configure AUR repository
template:
dest: "{{ arch_pacman_config_dir }}/90-repo-aur.conf"
src: 90-repo-aur.conf.j2
mode: "0644"

- import_tasks: cleanup.yml

+ 3
- 0
roles/arch-aur/templates/90-repo-aur.conf.j2 View File

@@ -0,0 +1,3 @@
[aur]
SigLevel = Optional TrustAll
Server = file://{{ arch_aur_repo_dir }}

+ 3
- 0
roles/arch-aur/vars/main.yml View File

@@ -0,0 +1,3 @@
arch_aur_repo_group: pkg_aur
arch_aur_repo_dir: "/srv/pkg/aur"
arch_aur_pkg_db: "/srv/pkg/aur/aur.db.tar.xz"

+ 1
- 7
roles/arch-base-devel/meta/main.yml View File

@@ -1,8 +1,2 @@
dependencies:
- role: arch-pacman
- role: arch-aur-packages
vars:
aur_packages:
- git-gone
- ammonite
- tla-toolbox
- arch-pacman

+ 0
- 8
roles/arch-desktop-base/meta/main.yml View File

@@ -1,10 +1,2 @@
dependencies:
- arch-pacman
- role: arch-aur-packages
vars:
aur_packages:
# Lovely icon theme :)
- numix-circle-icon-theme-git
- numix-cursor-theme
# A favourite font of mine
- otf-vollkorn

+ 0
- 7
roles/arch-extra-personal/meta/main.yml View File

@@ -1,9 +1,2 @@
dependencies:
- arch-pacman
- role: arch-aur-packages
vars:
aur_packages:
- skypeforlinux-stable-bin
- chiaki
- mediathek
- cozy-audiobooks

+ 0
- 4
roles/arch-tools/meta/main.yml View File

@@ -1,6 +1,2 @@
dependencies:
- arch-pacman
- role: arch-aur-packages
vars:
aur_packages:
- mdcat

Loading…
Cancel
Save