Get makepkg working

This commit is contained in:
Balakrishnan Balasubramanian 2025-02-26 19:56:14 -05:00
parent 731a442d7b
commit b2dcfe2b61
4 changed files with 39 additions and 7 deletions

View File

@ -5,6 +5,7 @@ LABEL Description="Container to build archlinux packages"
COPY packager.conf /etc/makepkg.conf.d/packager.conf
COPY sudoers /etc/sudoers.d/builder
COPY run.sh /run.sh
# COPY ./yay /usr/bin/yay
# RUN echo "169.254.1.2 archmirror.i.balki.me" >> /etc/hosts
@ -14,7 +15,7 @@ COPY mirrorlist /etc/pacman.d/mirrorlist
RUN useradd builder -m
WORKDIR /w
WORKDIR /home/builder
USER builder

7
Makefile Normal file
View File

@ -0,0 +1,7 @@
build:
podman build -t gitea.balki.me/balki/aur_builder:exp .
pull:
podman pull docker.io/archlinux:base-devel

View File

@ -3,12 +3,14 @@
Command to build
```
podman build --add-host=archmirror.i.balki.me:169.254.1.2 -t gitea.balki.me/balki/aur_builder:10 .
cd ~/projects/mine/aur_builder/
podman build -t gitea.balki.me/balki/aur_builder:exp .
```
Command to run
```
cd /home/balki/archws/abs/arti_aur
podman run --rm -v $PWD:/w -it gitea.balki.me/balki/aur_builder:10
cd /home/balki/gotosocial_aur/
podman run --rm -v $PWD:/w -it gitea.balki.me/balki/aur_builder:exp
Y
```

28
run.sh
View File

@ -7,10 +7,32 @@ sudo sh -c 'echo "169.254.1.2 archmirror.i.balki.me" >> /etc/hosts'
sudo pacman -Syu
sudo chown --recursive builder:builder /w
yay_build() {
# not working yet
# rm-rf .git
makepkg --printsrcinfo > .SRCINFO
git config --global user.email "aur_builder@balki.me"
git config --global user.name "Balakrishnan Balasubramanian"
makepkg --printsrcinfo >.SRCINFO
makepkg -s
yay -Bi "$PWD"
}
makepkg_build() {
if [ -d deps ]; then
sudo pacman -U deps/*pkg.tar*
fi
makepkg -s
}
cp -r /w .
cd ./w
# bash
# yay_build
makepkg_build
sudo cp ./*pkg.tar* /w