summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-12-13 00:43:10 +0700
committerShulhan <ms@kilabit.info>2025-01-12 02:13:39 +0700
commit6df469412b3e08624f41f82d8fb7294f4b1c2bfd (patch)
tree218af8b1daf0bebc0a8dcba46b8376c38e737fc3
parent7211f7597c35b51501e6fba72b864dd0817349be (diff)
downloadawwan-6df469412b3e08624f41f82d8fb7294f4b1c2bfd.tar.xz
all: update machine container setup with latest Arch
The latest mkosi use importctl instead of machinectl to import the image. There is an issue in mkosi.conf where build with Format=tar always get compressed using zstd, but importctl unable to import it, so we need to set CompressOutput=false. The home directory mode needs to be set to open 0755, because now its default to 0700, which makes the test failed to read file on others user's home. The pacman mirror changes to public one that is always available, geo.mirror.pkgbuild.com. The BUG_REPORT_URL in os-release for Arch changes which we need to modify because its included in the test-container.
-rw-r--r--Makefile8
-rw-r--r--_ops/awwan-test/mkosi.conf1
-rwxr-xr-x_ops/awwan-test/mkosi.finalize.chroot2
-rw-r--r--_ops/awwan-test/mkosi.skeleton/etc/pacman.conf4
-rw-r--r--_ops/awwan-tour/mkosi.conf1
-rwxr-xr-x_ops/awwan-tour/mkosi.finalize.chroot2
-rw-r--r--_ops/awwan-tour/mkosi.skeleton/etc/pacman.conf4
-rw-r--r--testdata/local/get.data2
-rw-r--r--testdata/play/awwanssh.test/get_test.data2
9 files changed, 18 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e34b225..f2f2ae7 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,9 @@ build-awwan-test:
@echo ">>> Building container awwan-test ..."
sudo mkosi --directory=_ops/awwan-test/ --force build
- sudo machinectl --force import-tar /data/awwan/awwan-test.tar
+ sudo importctl -m import-tar --force /data/awwan/awwan-test.tar
+ sudo mkdir -p /etc/systemd/nspawn
+ sudo cp /data/awwan/awwan-tour.nspawn /etc/systemd/nspawn/
sudo machinectl start awwan-test
## Once the container is imported, we can enable and run them any
@@ -176,7 +178,9 @@ build-tour-local: build-tour
mkdir -p /data/awwan/
ln -sTf $$(pwd) /data/awwan/src
- sudo machinectl --force import-tar /data/awwan/awwan-tour.tar
+ sudo importctl -m import-tar --force /data/awwan/awwan-tour.tar
+ sudo mkdir -p /etc/systemd/nspawn
+ sudo cp /data/awwan/awwan-tour.nspawn /etc/systemd/nspawn/
sudo machinectl start awwan-tour
#}}}
diff --git a/_ops/awwan-test/mkosi.conf b/_ops/awwan-test/mkosi.conf
index 463ef2a..c245e63 100644
--- a/_ops/awwan-test/mkosi.conf
+++ b/_ops/awwan-test/mkosi.conf
@@ -1,5 +1,6 @@
[Output]
CacheDirectory=~/.cache/mkosi/
+CompressOutput=false
Format=tar
Output=awwan-test
OutputDirectory=/data/awwan/
diff --git a/_ops/awwan-test/mkosi.finalize.chroot b/_ops/awwan-test/mkosi.finalize.chroot
index 84db413..96cff1c 100755
--- a/_ops/awwan-test/mkosi.finalize.chroot
+++ b/_ops/awwan-test/mkosi.finalize.chroot
@@ -4,4 +4,6 @@ systemctl enable sshd.service
chmod 0600 /etc/ssh/*_key
chown -R awwan:awwan /home/awwan/
+chmod 0755 /home/awwan
chown -R awwanssh:awwanssh /home/awwanssh/
+chmod 0755 /home/awwanssh
diff --git a/_ops/awwan-test/mkosi.skeleton/etc/pacman.conf b/_ops/awwan-test/mkosi.skeleton/etc/pacman.conf
index e288913..619c921 100644
--- a/_ops/awwan-test/mkosi.skeleton/etc/pacman.conf
+++ b/_ops/awwan-test/mkosi.skeleton/etc/pacman.conf
@@ -74,13 +74,13 @@ LocalFileSigLevel = Optional
#Include = /etc/pacman.d/mirrorlist
[core]
-Server = https://mirror.0x.sg/archlinux/$repo/os/$arch
+Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
#[extra-testing]
#Include = /etc/pacman.d/mirrorlist
[extra]
-Server = https://mirror.0x.sg/archlinux/$repo/os/$arch
+Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
diff --git a/_ops/awwan-tour/mkosi.conf b/_ops/awwan-tour/mkosi.conf
index ca4d1c7..3bd1a05 100644
--- a/_ops/awwan-tour/mkosi.conf
+++ b/_ops/awwan-tour/mkosi.conf
@@ -1,5 +1,6 @@
[Output]
CacheDirectory=~/.cache/mkosi/
+CompressOutput=false
Format=tar
Output=awwan-tour
OutputDirectory=/data/awwan/
diff --git a/_ops/awwan-tour/mkosi.finalize.chroot b/_ops/awwan-tour/mkosi.finalize.chroot
index ed11077..79e8a3b 100755
--- a/_ops/awwan-tour/mkosi.finalize.chroot
+++ b/_ops/awwan-tour/mkosi.finalize.chroot
@@ -6,4 +6,6 @@ systemctl enable org-awwan-tour.service
chmod 0600 /etc/ssh/*_key
chown -R awwan:awwan /home/awwan/
+chmod 0755 /home/awwan
chown -R awwanssh:awwanssh /home/awwanssh/
+chmod 0755 /home/awwanssh
diff --git a/_ops/awwan-tour/mkosi.skeleton/etc/pacman.conf b/_ops/awwan-tour/mkosi.skeleton/etc/pacman.conf
index e288913..619c921 100644
--- a/_ops/awwan-tour/mkosi.skeleton/etc/pacman.conf
+++ b/_ops/awwan-tour/mkosi.skeleton/etc/pacman.conf
@@ -74,13 +74,13 @@ LocalFileSigLevel = Optional
#Include = /etc/pacman.d/mirrorlist
[core]
-Server = https://mirror.0x.sg/archlinux/$repo/os/$arch
+Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
#[extra-testing]
#Include = /etc/pacman.d/mirrorlist
[extra]
-Server = https://mirror.0x.sg/archlinux/$repo/os/$arch
+Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
diff --git a/testdata/local/get.data b/testdata/local/get.data
index c0e24ec..821119d 100644
--- a/testdata/local/get.data
+++ b/testdata/local/get.data
@@ -13,6 +13,6 @@ ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
-BUG_REPORT_URL="https://bugs.archlinux.org/"
+BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
diff --git a/testdata/play/awwanssh.test/get_test.data b/testdata/play/awwanssh.test/get_test.data
index aec7acb..0f755eb 100644
--- a/testdata/play/awwanssh.test/get_test.data
+++ b/testdata/play/awwanssh.test/get_test.data
@@ -12,7 +12,7 @@ ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
-BUG_REPORT_URL="https://bugs.archlinux.org/"
+BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo