From 1854b5dd488b82301311f1bc56ea3760b97c0986 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Sun, 3 Mar 2024 23:40:18 +0100 Subject: [PATCH] Aggiunto tutto il materiale. --- Dockerfile | 12 ++++++++++++ README.md | 8 ++++++++ fixperms.sh | 5 +++++ paruw.sh | 2 ++ 4 files changed, 27 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 fixperms.sh create mode 100644 paruw.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9490bfc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# vim:sts=2:sw=2 +FROM archlinux:latest + +RUN pacman -Syy && pacman -S --noconfirm base-devel git nodejs sudo && \ + useradd -m -s /bin/bash paru && \ + echo "paru ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/paru && \ + chmod 0440 /etc/sudoers.d/paru && \ + su - paru -c "git clone https://aur.archlinux.org/paru-bin.git; cd paru-bin; makepkg --noconfirm -csi" && \ + pacman -Scc --noconfirm + +COPY --chmod=0755 --chown=root:root paruw.sh /paruw.sh +COPY --chmod=0755 --chown=root:root fixperms.sh /fixperms.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..81b988a --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Build materials for the Docker image to release AUR package. # + +This repository helps build a Docker image that can be used in Gitea/GitHub +actions to build and release an AUR package. + +To compile the image: + + docker build -t myarch:1.0.0 -f Dockerfile . diff --git a/fixperms.sh b/fixperms.sh new file mode 100644 index 0000000..f633622 --- /dev/null +++ b/fixperms.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Fix permissions for current working directory. +chgrp -R paru $(pwd) +chmod -R g+w $(pwd) diff --git a/paruw.sh b/paruw.sh new file mode 100644 index 0000000..94243f7 --- /dev/null +++ b/paruw.sh @@ -0,0 +1,2 @@ +#!/bin/bash +su -l paru -c "$@"