feat: install AUR packages

This commit is contained in:
Matthieu Bessat 2024-05-27 01:25:03 +02:00
parent a0ea7b0a3f
commit 003a22ca6e
6 changed files with 49 additions and 9 deletions

View file

@ -1 +1 @@
["util-linux", "less", "git", "moreutils", "tmux", "openssh", "base-devel", "moreutils", "fzf", "lf", "ripgrep", "fd", "bat", "pv", "at", "jo", "jq", "fx", "yq", "xsv", "unzip", "unoconv", "pandoc", "libqalculate", "wget", "nmap", "wireguard-tools", "tcpdump", "socat", "rsync", "rclone", "lsof", "w3m", "acpi", "smartmontools", "lshw", "dmidecode", "ffmpeg", "imagemagick", "mpv", "yt-dlp", "tesseract", "tesseract-data-fra", "tesseract-data-eng", "gopass", "vim", "helix", "gcc", "make", "cmake", "libxkbcommon", "jwt-cli", "fish", "zoxide", "dash", "pavucontrol", "wev", "wtype", "wl-clipboard", "wofi", "sway", "swaylock", "swayidle", "cliphist", "firefox-developer-edition", "torbrowser-launcher", "alacritty", "thunderbird", "zathura", "krita", "inkscape", "libreoffice-still", "ttf-font-awesome", "ttf-fira-code"]
["util-linux", "less", "git", "moreutils", "tmux", "openssh", "base-devel", "moreutils", "fzf", "lf", "ripgrep", "fd", "bat", "pv", "at", "jo", "jq", "fx", "yq", "xsv", "unzip", "unoconv", "pandoc", "libqalculate", "wget", "nmap", "wireguard-tools", "tcpdump", "socat", "rsync", "rclone", "lsof", "w3m", "acpi", "smartmontools", "lshw", "dmidecode", "usbutils", "ffmpeg", "imagemagick", "mpv", "yt-dlp", "tesseract", "tesseract-data-fra", "tesseract-data-eng", "gopass", "vim", "helix", "gcc", "make", "cmake", "libxkbcommon", "jwt-cli", "fish", "zoxide", "dash", "pavucontrol", "wev", "wtype", "wl-clipboard", "wofi", "sway", "swaylock", "swayidle", "cliphist", "firefox-developer-edition", "torbrowser-launcher", "alacritty", "thunderbird", "zathura", "krita", "inkscape", "libreoffice-still", "ttf-font-awesome", "ttf-fira-code"]

View file

@ -0,0 +1 @@
makepkg_aur_url: https://aur.archlinux.org/cgit/aur.git/snapshot/

View file

@ -0,0 +1,35 @@
# Inputs:
# package_name: name of the package to download and build (i.e. yay-bin)
# build_user: user we will sudo to when building. Must be able to use
# passwordless sudo
- name: Check if package {{ package_name }} is already installed
shell: set -o pipefail || exit 1; pacman -Qsq |
{ grep '^'{{ package_name | quote }}'$' ; [ $? -lt 2 ]; }
register: _package_installed
changed_when: no
- name: Make and install {{ package_name }}
become: yes
become_user: "aur_builder"
when: _package_installed.stdout == ""
block:
- name: Create temporary build directory
tempfile:
state: directory
register: _tempdir
- name: Download package from the AUR
unarchive:
remote_src: yes
src: "{{ makepkg_aur_url }}{{ package_name }}.tar.gz"
dest: "{{ _tempdir.path }}"
- name: Run makepkg
shell: cd '{{ _tempdir.path | quote }}/{{ package_name | quote }}' && makepkg -rsi --noconfirm
always:
- name: Remove temporary build directory
file:
state: absent
path: "{{ _tempdir.path }}"

View file

@ -0,0 +1,5 @@
- name: Run the installation backend
include_tasks: backend-makepkg.yaml
loop: "{{ packages }}"
loop_control:
loop_var: package_name

View file

@ -1 +1 @@
/home/mbess/workspace/monakhos/sandbox_vms/vm1
/mnt/extramedia3/mbess/workspace/monakhos/sandbox_vms/vm1

View file

@ -146,13 +146,12 @@
mode: 0644
validate: 'visudo -cf %s'
- name: Install yay using makepkg
kewlfft.aur.aur:
name: yay
use: makepkg
state: present
become: yes
become_user: aur_builder
- name: Install yay
import_role:
name: aur
vars:
packages:
- yay-bin
# - name: Clone books sources
# ansible.builtin.git: