You are not logged in.

#1 2022-10-24 11:54:40

gwpl
Member
From: Warsaw, Poland
Registered: 2010-07-10
Posts: 28

AUR Helper for Docker (rua?)

Hello!

I would love to have easy way to make docker images with fresh Archlinux and installing from AUR using some AUR Helper (to fetch and compile all dependencies without user interaction).

Does anyone has best template/solution/example for this?

I tried to use `rua` ( https://aur.archlinux.org/packages/rua ) AUR Helper , but has problems running inside docker ( https://github.com/vn971/rua/issues/8#i … 1277359483 ),

example docker file:

FROM archlinux:latest
RUN pacman -Syyu --noconfirm && \
pacman -S --noconfirm    git base-devel  vim base-devel bubblewrap-suid xz shellcheck rustup 
#       &&  \  #because we setup default rust toolchain on packager user
#rustup default stable && rustup install stable && rustc -V

#RUN set -x ; mkdir /home/nobody && chown -v nobody:nobody /home/nobody && cd /home/nobody/ && sudo -u nobody git clone https://aur.archlinux.org/pacaur.git && cd pacaur/ && sudo -u nobody makepkg -si


# # set up the packager user
RUN useradd --create-home packager --uid 1111 -U
# COPY bashrc.sh /home/packager/.bashrc
# COPY packager-actions /etc/sudoers.d/
# 
# RUN pacman -S --noconfirm meson gtest gmock expac jq
# #RUN pacman -S --noconfirm

# this is attempt to make it work in docker:
# (but maybe not needed if dependencies installed like README.md advices: --needed git base-devel bubblewrap-suid xz shellcheck cargo)
RUN chmod u+s /usr/bin/bwrap # https://github.com/containers/bubblewrap/issues/324#issuecomment-517378834
# but turned out to issue about running rua in docker: https://github.com/vn971/rua/issues/8

RUN pacman -S --noconfirm --needed --asdeps git base-devel bubblewrap-suid libseccomp xz shellcheck cargo # from https://github.com/vn971/rua#install-dependencies

USER packager
WORKDIR /home/packager/


RUN rustup default stable
RUN cargo install rua
RUN /home/packager/.cargo/bin/rua install logseq-desktop

Last edited by gwpl (2022-10-24 11:56:02)

Offline

#2 2022-10-24 12:38:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: AUR Helper for Docker (rua?)

If you are putting this in a docker file anyways, why would you install an AUR "helper" (which itself needs to be installed from the AUR).  Just use `got clone ...` and makepkg.

Last edited by Trilby (2022-10-24 12:39:08)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-10-27 13:12:41

gwpl
Member
From: Warsaw, Poland
Registered: 2010-07-10
Posts: 28

Re: AUR Helper for Docker (rua?)

Maybe there is something that I do not understand about makepkg or AUR Helpers , but I thought they help also in fetching and compiling all required depenencies (that maybe other AUR packages) .

Would I achieve the same with just one makepkg? To get smooth install of AUR package with all required (AUR and non AUR) dependencies?

Offline

#4 2022-10-27 14:06:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: AUR Helper for Docker (rua?)

Makepkg has a flag for installing any dependencies from the repos, but not from the AUR.  But if you are scripting this anyways, you know ahead of time which packages are needed, right?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-10-28 00:09:48

lfitzgerald
Member
Registered: 2021-07-16
Posts: 162

Re: AUR Helper for Docker (rua?)

Aren't there other AUR helpers that don't use bubblewrap? Can you use them instead?

Offline

#6 2023-02-02 13:32:17

gwpl
Member
From: Warsaw, Poland
Registered: 2010-07-10
Posts: 28

Re: AUR Helper for Docker (rua?)

I need to give it a try if they can automatically download and install AUR depenencies.
Bascially goal is to have possibility to have whole process automated.
Benefits of rua is that it has a nice `rua upgrade` so once I have build e.g. docker or VM I can just upgrade staff without rebuilding whole thing.
The other is that anyway is usually anyway in some way involved in my projects , so even if I would compile rua from sources it does not introduce extra dependencies to me.
https://wiki.archlinux.org/title/AUR_helpers  - however maybe I should explore other options from AUR helper wiki.
Any suggestions for something that could be used to make smooth , non-interactive download and build of all dependencies, and later when needed upgrade of them?

Offline

#7 2023-02-02 14:19:43

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: AUR Helper for Docker (rua?)

I use auracle. It has the "buildorder" switch and filter for every line with AUR, then some bash to get the actual package name and then loop over that list with git and makepkg. It'll build (and install) all AUR deps and their AUR deps and their AUR deps and their AUR deps and

Offline

Board footer

Powered by FluxBB