Skip to content

Instantly share code, notes, and snippets.

@hallyn
Created February 25, 2023 01:44
Show Gist options
  • Select an option

  • Save hallyn/b3334ac19f3e3edf05f805ff49cfa981 to your computer and use it in GitHub Desktop.

Select an option

Save hallyn/b3334ac19f3e3edf05f805ff49cfa981 to your computer and use it in GitHub Desktop.
setup shadow tests in ubuntu container
#!/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
@hallyn
Copy link
Author

hallyn commented Mar 1, 2023

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