Skip to content

Commit

Permalink
Merge pull request #174 from CyberShadow/pull-20231028-134617
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
CyberShadow authored Oct 28, 2023
2 parents 0a0be14 + 5949071 commit fd4d9a8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions test/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN pacman -Sy
RUN pacman --noconfirm -S rubygems ruby-rdoc pacutils expect aur
RUN sudo -u aconfmgr gem install bashcov

ENV ACONFMGR_IN_CONTAINER=1
RUN /opt/aur/setup.sh

RUN useradd billy
5 changes: 3 additions & 2 deletions test/docker/Dockerfile.arch
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ FROM scratch

COPY --from=rootfs /root.x86_64/ /

RUN pacman-key --init
RUN pacman-key --populate
# Signatures are not timestamped, therefore always
# become invalid after some time when the key expires
RUN sed -i "s/^SigLevel.*/SigLevel = Never/" /etc/pacman.conf

ARG arch_date
RUN echo 'Server=https://archive.archlinux.org/repos/'"${arch_date}"'/$repo/os/$arch' > /etc/pacman.d/mirrorlist
Expand Down
4 changes: 2 additions & 2 deletions test/docker/aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ md5sums=('SKIP'
'9cd425efe85356ca36f08e2dc773f31f'
'f0e1159864a04bad3b1f903bc7301d80'
'718c816fdaedb644f5b4d0cd742dbc97'
'05f52abd3c84a79f4ef10681d9e5a133'
'12c4adba5530e989c8d9067972cbcbae')
'465c05c00d4127eca4ba49e9122ca492'
'5b0d438efd0d35ca3a1ee2331db0985c')

_aur_uid=500
_aur_gid=500
Expand Down
2 changes: 1 addition & 1 deletion test/docker/aur/setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eEuo pipefail

if [[ ! -f /.dockerenv ]]
if [[ ! -v ACONFMGR_IN_CONTAINER ]]
then
echo 'Refusing to run setup outside Docker.'
exit 1
Expand Down
2 changes: 1 addition & 1 deletion test/docker/aur/start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eEuo pipefail

if [[ ! -f /.dockerenv ]]
if [[ ! -v ACONFMGR_IN_CONTAINER ]]
then
echo 'Refusing to start outside Docker.'
exit 1
Expand Down
1 change: 1 addition & 0 deletions test/docker/build-aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pacman_opts+=(--noconfirm)
mkdir /aconfmgr-packages

chown -R nobody: aur
chmod +x /aconfmgr{,/test{,/docker{,/aur}}}
env -i -C aur su -s /bin/bash nobody -c 'makepkg --printsrcinfo' > aur/.SRCINFO
AconfMakePkgDir aur false false "$PWD"/aur

Expand Down
7 changes: 6 additions & 1 deletion test/t/lib-funcs-integ.bash
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,13 @@ function TestInitAUR() {

LogEnter 'Initializing AUR support...\n'

if [[ ! -v ACONFMGR_IN_CONTAINER ]]
then
FatalError 'Refusing to start outside Docker.\n'
fi

LogEnter 'Starting AUR...\n'
command sudo /opt/aur/start.sh
command sudo env ACONFMGR_IN_CONTAINER=1 /opt/aur/start.sh
LogLeave

LogEnter 'Generating a SSH key...\n'
Expand Down

0 comments on commit fd4d9a8

Please sign in to comment.