Created
February 25, 2023 01:44
-
-
Save hallyn/b3334ac19f3e3edf05f805ff49cfa981 to your computer and use it in GitHub Desktop.
setup shadow tests in ubuntu container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cat /etc/apt/sources.list | |
| sed -i '/deb-src/d' /etc/apt/sources.list | |
| sed -i '/^deb /p;s/ /-src /' /etc/apt/sources.list | |
| export DEBIAN_PRIORITY=critical | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update | |
| apt-get -y dist-upgrade | |
| sudo apt-get -y install ubuntu-dev-tools automake autopoint \ | |
| xsltproc gettext eatmydata expect byacc libtool libbsd-dev \ | |
| pkgconf tmux | |
| su - ubuntu << EOF | |
| git clone https://github.com/shadow-maint/shadow | |
| cd shadow | |
| autoreconf -v -f --install | |
| ./autogen.sh --without-selinux --disable-man --with-yescrypt | |
| make -j4 | |
| EOF |
Author
Author
I'd love to see the complete set of commands you run to set up those. I've never worked with them. :)
Probably outside of the scope here mainly because I use different tools in different places :) For vm's on my main 'home' server, I use uvt-kvm, because I can do:
uvt-kvm create --memory 4096 --disk 30 rust release=jammy arch=amd64 --cpu 4 --run-script-once firstboot
For containers on my 'home' server I generally do
lxc-create -t download -n shadow -- -d ubuntu -r jammy - a amd64
lxc-start -n shadow
lxc-attach -n shadow -- << EOF
wget https://gisturl
./gist
EOF
In other environments I use lxd for both containers and vms. Those use cloud-init to specify a firstboot script.
Note that containers for shadow testsuite can be a problem as the testsuite uses a wide uid allocation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1 for no CI system lock-in.