aur: Build each package with its own GNUPGHOME
This commit is contained in:
57
playbook.yml
57
playbook.yml
@@ -226,6 +226,8 @@
|
|||||||
- name: spotify
|
- name: spotify
|
||||||
preexec: |
|
preexec: |
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
source ./env
|
||||||
|
|
||||||
curl -sS https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | gpg --import -
|
curl -sS https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | gpg --import -
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
@@ -274,17 +276,6 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: check preexec script
|
|
||||||
stat:
|
|
||||||
path: /var/lib/makepkg/{{ item.name }}/preexec
|
|
||||||
become_user: makepkg
|
|
||||||
become: true
|
|
||||||
when: item.preexec is defined
|
|
||||||
loop: "{{ aur_packages }}"
|
|
||||||
register: preexec_before
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item.name }}"
|
|
||||||
|
|
||||||
- name: create build root directory
|
- name: create build root directory
|
||||||
file:
|
file:
|
||||||
path: "/var/lib/makepkg/{{ item.name }}/"
|
path: "/var/lib/makepkg/{{ item.name }}/"
|
||||||
@@ -298,6 +289,44 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
|
- name: create build gpg directory
|
||||||
|
file:
|
||||||
|
path: "/var/lib/makepkg/{{ item.name }}/gnupg"
|
||||||
|
state: directory
|
||||||
|
mode: '0700'
|
||||||
|
owner: makepkg
|
||||||
|
group: makepkg
|
||||||
|
become_user: makepkg
|
||||||
|
become: true
|
||||||
|
loop: "{{ aur_packages }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
|
- name: create env file
|
||||||
|
copy:
|
||||||
|
dest: /var/lib/makepkg/{{ item.name }}/env
|
||||||
|
owner: makepkg
|
||||||
|
group: makepkg
|
||||||
|
mode: "0600"
|
||||||
|
content: |
|
||||||
|
export GNUPGHOME="/var/lib/makepkg/{{ item.name }}/gnupg"
|
||||||
|
become_user: makepkg
|
||||||
|
become: true
|
||||||
|
loop: "{{ aur_packages }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
|
- name: check preexec script
|
||||||
|
stat:
|
||||||
|
path: /var/lib/makepkg/{{ item.name }}/preexec
|
||||||
|
become_user: makepkg
|
||||||
|
become: true
|
||||||
|
when: item.preexec is defined
|
||||||
|
loop: "{{ aur_packages }}"
|
||||||
|
register: preexec_before
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: install preexec script
|
- name: install preexec script
|
||||||
copy:
|
copy:
|
||||||
dest: /var/lib/makepkg/{{ item.name }}/preexec
|
dest: /var/lib/makepkg/{{ item.name }}/preexec
|
||||||
@@ -324,7 +353,9 @@
|
|||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: run preexec script
|
- name: run preexec script
|
||||||
command: "{{ item.1.stat.path }}"
|
command:
|
||||||
|
cmd: "{{ item.1.stat.path }}"
|
||||||
|
chdir: "{{ item.1.stat.path | dirname }}"
|
||||||
become_user: makepkg
|
become_user: makepkg
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
@@ -343,6 +374,8 @@
|
|||||||
content: |
|
content: |
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source /var/lib/makepkg/{{ item.name }}/env
|
||||||
|
|
||||||
export PKGEXT='.pkg.tar.zst'
|
export PKGEXT='.pkg.tar.zst'
|
||||||
export BUILDDIR=/var/lib/makepkg/{{ item.name }}/build/
|
export BUILDDIR=/var/lib/makepkg/{{ item.name }}/build/
|
||||||
export SRCDEST=/var/lib/makepkg/{{ item.name }}/src/
|
export SRCDEST=/var/lib/makepkg/{{ item.name }}/src/
|
||||||
|
|||||||
Reference in New Issue
Block a user