Move to all shell scripts

This commit is contained in:
Greg Hellings
2023-08-23 16:26:13 -05:00
parent 4f03ff3d62
commit 18ff595f9b
13 changed files with 24 additions and 23 deletions
+2 -4
View File
@@ -9,10 +9,8 @@ isolinux.cfg
Vagrantfile
# Generated distros
distros/fedora-rawhide-*.hcl
distros/centos-8stream-*.hcl
distros/centos-9stream-*.hcl
cellar/centos-9stream-*.hcl
distros/fedora/rawhide/*.hcl
distros/nixos/**/*.hcl
__pycache__
*.pyc
+8 -1
View File
@@ -6,6 +6,8 @@ sys.path.append(str(Path(__file__).parent / "lib"))
from support import Support, BASE
import time
source test.xsh
year, month, day, hour, minute, second, wday, jday, dst = time.localtime()
STAMP = f"build={year}.{month}.{day}.{hour}"
@@ -59,7 +61,12 @@ def do_build(build):
packer build -var @(headless) -var @(args.stamp) @(build.var_file) @(build.only) @(BASE / "sources")
else:
upload = "-except=upload"
packer build -var @(headless) -var @(args.stamp) @(build.var_file) @(build.only) -except=upload @(BASE / "sources")
# Skip building file if we already have built it
output = Path(__file__).parent / "output" / get_vagrant_provider(build.provider.name) / f"{build.distro}-{build.version}-{build.provider.arch}.box"
if output.exists():
print(f"Skipping {build} as box already exists")
else:
packer build -var @(headless) -var @(args.stamp) @(build.var_file) @(build.only) -except=upload @(BASE / "sources")
if args.all or (args.distro and args.version and args.build):
process_all()
+2 -5
View File
@@ -83,16 +83,13 @@ EOF
# sshd: disable password authentication and DNS checks
ex -s /etc/ssh/sshd_config <<EOF
:%substitute/^\(PasswordAuthentication\) yes$/\1 no/
:%substitute/^.*\(PasswordAuthentication\) yes$/\1 yes/
:%substitute/^#\(UseDNS\) yes$/&\r\1 no/
:update
:quit
EOF
cat >>/etc/sysconfig/sshd <<EOF
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
PubkeyAcceptedKeyTypes +ssh-rsa
EOF
echo PubkeyAcceptedKeyTypes +ssh-rsa >> /etc/ssh/sshd_config
# Decrease connection time by preventing reverse DNS lookups
# (see https://lists.centos.org/pipermail/centos-devel/2016-July/014981.html
+1 -1
View File
@@ -92,7 +92,7 @@ EOF
# sshd: disable password authentication and DNS checks
ex -s /etc/ssh/sshd_config <<EOF
:%substitute/^\(PasswordAuthentication\) yes$/\1 no/
:%substitute/^.*\(PasswordAuthentication\) yes$/\1 yes/
:%substitute/^#\(UseDNS\) yes$/&\r\1 no/
:update
:quit
+2 -4
View File
@@ -5,10 +5,8 @@ apt update
apt upgrade -y
# Configure sshd to be faster
echo << EOF > /etc/ssh/sshd_config.d/00-vagrant_accept_pubkey.conf
UseDNS no
PubkeyAcceptedKeyTypes +ssh-rsa
EOF
sed -i -E -e 's,^.*(UseDNS).*$,\1 No,' /etc/ssh/sshd_config
echo "PubkeyAcceptedKeyTypes +ssh-rsa" >> /etc/ssh/sshd_config
# Clean up after ourselves
apt-get clean
+2 -2
View File
@@ -1,8 +1,8 @@
distro = "fedora"
version = "rawhide"
iso = {
url = "https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/./Fedora-Server-dvd-x86_64-Rawhide-20230814.n.0.iso"
checksum = "e682844d4d61e9e51b5dd98ebabb4738ed3460d02e217125c6f77f9089c87142"
url = "https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/./Fedora-Server-dvd-x86_64-Rawhide-20230823.n.0.iso"
checksum = "4ed35d456b51b2d27cfa083220cc0ac4b593f63db0513d69d79af622711783a6"
}
boot_command = [
"<up>e<down><down><end><bs><bs><bs><bs><bs>",
+1 -1
View File
@@ -6,4 +6,4 @@
- arch: x86_64
provider: vmware-iso
38: *supp
rawhide: []
rawhide: *supp
+1
View File
@@ -1 +1,2 @@
#!/usr/bin/env bash
set -ex
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ex
sed -i -e 's,#PROVIDER_PLACEHOLDER,guest-agent.nix,' /etc/nixos/configuration.nix
sed -i -e 's,#PROVIDER_PLACEHOLDER,./guest-agent.nix,' /etc/nixos/configuration.nix
cat << EOF > /etc/nixos/guest-agent.nix
{...}:
{
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ex
sed -i -e 's,#PROVIDER_PLACEHOLDER,guest-agent.nix,' /etc/nixos/configuration.nix
sed -i -e 's,#PROVIDER_PLACEHOLDER,./guest-agent.nix,' /etc/nixos/configuration.nix
cat << EOF > /etc/nixos/guest-agent.nix
{...}:
{
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ex
sed -i -e 's,#PROVIDER_PLACEHOLDER,guest-agent.nix,' /etc/nixos/configuration.nix
sed -i -e 's,#PROVIDER_PLACEHOLDER,./guest-agent.nix,' /etc/nixos/configuration.nix
cat << EOF > /etc/nixos/guest-agent.nix
{...}:
{
+1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -ex
apt update
apt install -y qemu-guest-agent
systemctl start qemu-guest-agent
systemctl enable qemu-guest-agent
+1 -2
View File
@@ -1,7 +1,6 @@
#!/bin/sh
set -e
set -x
set -ex
rm -rf /home/vagrant/.ansible
sudo rm -rf /root/.ansible