From a3bcea072bdbf2f538af738d5d736e08075ff04b Mon Sep 17 00:00:00 2001 From: ezri Date: Sat, 17 Aug 2024 22:56:26 -0400 Subject: [PATCH 1/2] use debian12 as vagrant runner (#172) * use debian12 as vagrant runner * use mergerfs with debianrustup --- Vagrantfile | 8 ++++---- test/toplevel-perms.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index cd969948..051fe620 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,7 @@ Vagrant.configure("2") do |config| # Regular debian testing box config.vm.define "debian" do |debian| - debian.vm.box = "debian/testing64" + debian.vm.box = "generic/debian12" debian.vm.provision "file", source: "./", destination: "/home/vagrant/try" debian.vm.provision "shell", privileged: false, inline: " sudo apt-get update @@ -26,11 +26,11 @@ Vagrant.configure("2") do |config| # Regular debian testing box but we try the rustup oneliner config.vm.define "debianrustup" do |debianrustup| - debianrustup.vm.box = "debian/testing64" + debianrustup.vm.box = "generic/debian12" debianrustup.vm.provision "file", source: "./", destination: "/home/vagrant/try" debianrustup.vm.provision "shell", privileged: false, inline: " sudo apt-get update - sudo apt-get install -y curl attr pandoc gcc make autoconf + sudo apt-get install -y curl attr pandoc gcc make autoconf mergerfs sudo chown -R vagrant:vagrant try cd try mkdir rustup @@ -50,7 +50,7 @@ Vagrant.configure("2") do |config| # Regular debian testing box with LVM config.vm.define "debianlvm" do |debianlvm| - debianlvm.vm.box = "debian/testing64" + debianlvm.vm.box = "generic/debian12" debianlvm.vm.provision "file", source: "./", destination: "/home/vagrant/try" debianlvm.vm.provision "shell", privileged: false, inline: " sudo apt-get update diff --git a/test/toplevel-perms.sh b/test/toplevel-perms.sh index 9ac824c5..b7cb77c6 100755 --- a/test/toplevel-perms.sh +++ b/test/toplevel-perms.sh @@ -34,7 +34,7 @@ cd "$try_workspace" || exit 9 touch test cmd="$(mktemp)" -echo "find / -maxdepth 1 -print0 | xargs -0 ls -ld | awk '{print substr(\$1, 1, 10), \$9, \$10, \$11}' | grep -v 'proc' | grep -v 'swap'" > "$cmd" +echo "find / -maxdepth 1 -print0 | xargs -0 ls -ld | awk '{print substr(\$1, 1, 10), \$9, \$10, \$11}' | grep -v 'proc' | grep -v 'swap' | grep -v 'vmlinuz' | grep -v 'initrd'" > "$cmd" # Use this after gidmapper to show user and group ownership #echo "find / -maxdepth 1 -print0 | xargs -0 ls -ld | awk '{print substr(\$1, 1, 10), \$3, \$4, \$9, \$10, \$11}' | grep -v 'proc' | grep -v 'swap'" > "$cmd" From b670fcf65b85223cb0b3d9fb71c63589bc7db150 Mon Sep 17 00:00:00 2001 From: ezri Date: Wed, 21 Aug 2024 22:08:27 -0400 Subject: [PATCH 2/2] pure_mountpoint fixes & CI chores (#169) Some of the pure_mountpoint logic were missed when merging commits over, and the tests never failed due to incorrect permission bits. As well as some CI chore * fix: misc upperdir fixes * fix: test bit on merge mult dirs test * chore (tests/ci): add mergerfs to vagrantfiles * chore (tests/ci): run merge multi dirs test in home dir * chore (tests/ci): update fedora box ver, install mergerfs --- .github/workflows/vagrant.yaml | 2 +- Vagrantfile | 16 ++++++++++------ test/merge_multiple_dirs.sh | 3 +++ try | 7 ++++--- 4 files changed, 18 insertions(+), 10 deletions(-) mode change 100644 => 100755 test/merge_multiple_dirs.sh diff --git a/.github/workflows/vagrant.yaml b/.github/workflows/vagrant.yaml index caa34c17..17aa7d86 100644 --- a/.github/workflows/vagrant.yaml +++ b/.github/workflows/vagrant.yaml @@ -18,7 +18,7 @@ jobs: - debianrustup - debianlvm - rocky9 - - fedora33 + - fedora39 runs-on: self-hosted steps: - name: Checkout diff --git a/Vagrantfile b/Vagrantfile index 051fe620..79982b1c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config| debian.vm.provision "file", source: "./", destination: "/home/vagrant/try" debian.vm.provision "shell", privileged: false, inline: " sudo apt-get update - sudo apt-get install -y git expect curl attr pandoc gcc make autoconf + sudo apt-get install -y git expect curl attr pandoc gcc make autoconf mergerfs sudo chown -R vagrant:vagrant try cd try scripts/run_tests.sh @@ -54,7 +54,7 @@ Vagrant.configure("2") do |config| debianlvm.vm.provision "file", source: "./", destination: "/home/vagrant/try" debianlvm.vm.provision "shell", privileged: false, inline: " sudo apt-get update - sudo apt-get install -y git expect lvm2 mergerfs curl attr pandoc gcc make autoconf + sudo apt-get install -y git expect lvm2 mergerfs curl attr pandoc gcc make autoconf mergerfs # Create an image for the lvm disk sudo fallocate -l 2G /root/lvm_disk.img @@ -95,7 +95,9 @@ Vagrant.configure("2") do |config| rocky.vm.box = "generic/rocky9" rocky.vm.provision "file", source: "./", destination: "/home/vagrant/try" rocky.vm.provision "shell", privileged: false, inline: " - sudo yum install -y git expect curl attr pandoc + sudo yum install -y git expect curl attr pandoc fuse + wget https://github.com/trapexit/mergerfs/releases/download/2.40.2/mergerfs-2.40.2-1.el9.x86_64.rpm + sudo rpm -i mergerfs-2.40.2-1.el9.x86_64.rpm sudo chown -R vagrant:vagrant try cd try TRY_TOP=$(pwd) scripts/run_tests.sh @@ -107,11 +109,13 @@ Vagrant.configure("2") do |config| end # # Regular rocky testing box - config.vm.define "fedora33" do |fedora| - fedora.vm.box = "generic/fedora33" + config.vm.define "fedora39" do |fedora| + fedora.vm.box = "generic/fedora39" fedora.vm.provision "file", source: "./", destination: "/home/vagrant/try" fedora.vm.provision "shell", privileged: false, inline: " - sudo yum install -y git expect curl attr pandoc + sudo yum install -y git expect curl attr pandoc fuse + wget https://github.com/trapexit/mergerfs/releases/download/2.40.2/mergerfs-2.40.2-1.fc39.x86_64.rpm + sudo rpm -i mergerfs-2.40.2-1.fc39.x86_64.rpm sudo chown -R vagrant:vagrant try cd try TRY_TOP=$(pwd) scripts/run_tests.sh diff --git a/test/merge_multiple_dirs.sh b/test/merge_multiple_dirs.sh old mode 100644 new mode 100755 index 38e47dce..12c97008 --- a/test/merge_multiple_dirs.sh +++ b/test/merge_multiple_dirs.sh @@ -43,6 +43,9 @@ cleanup() { trap 'cleanup' EXIT +# (ezri) gh ci gid fix +cd ~ || exit 1 + try_workspace="$(mktemp -d -p .)" cp "$TRY_TOP/test/resources/file.txt.gz" "$try_workspace/" cd "$try_workspace" || exit 1 diff --git a/try b/try index fcf02f78..09e8c08b 100755 --- a/try +++ b/try @@ -193,9 +193,9 @@ do fi ## Symlinks - if [ -L "$mountpoint" ] + if [ -L "$pure_mountpoint" ] then - ln -s $(readlink "$mountpoint") "$SANDBOX_DIR/temproot/$mountpoint" + ln -s $(readlink "$pure_mountpoint") "$SANDBOX_DIR/temproot/$pure_mountpoint" continue fi @@ -289,7 +289,8 @@ EOF chmod 755 "${SANDBOX_DIR}/temproot" while IFS="" read -r mountpoint do - if [ -L "$mountpoint" ] + pure_mountpoint=${mountpoint##*:} + if [ -L "$pure_mountpoint" ] then rm "${SANDBOX_DIR}/temproot/${mountpoint}" fi