summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-02-28 08:39:01 -0500
committerAndrew Cady <d@cryptonomic.net>2021-02-28 08:39:01 -0500
commit3c73e2c8aa8b18fc3fdbbdc873d1e5fe24353c33 (patch)
tree107de6069220af63d682e0ea6465b3d49fb7eb4b
parent4fd0b1013e13556c9afc35540e6e411e9cb47e0b (diff)
various rootfs improvements
-rw-r--r--Makefile2
-rw-r--r--rootfs/Makefile4
-rw-r--r--rootfs/buster-backport-kernel.yaml5
-rw-r--r--rootfs/kernel.yaml2
-rw-r--r--rootfs/rc-local.service14
-rw-r--r--rootfs/samizdat-gold.yaml11
-rw-r--r--rootfs/samizdat.patch.yaml9
-rw-r--r--rootfs/samizdat.yaml26
8 files changed, 41 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index b13f3ff..f478160 100644
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@ update-submodules:
140install-submodules: cmd=install 140install-submodules: cmd=install
141install-submodules: update-submodules $(INSTALL_SUBMODULES) 141install-submodules: update-submodules $(INSTALL_SUBMODULES)
142 142
143GOLD = y 143GOLD =
144ifdef GOLD 144ifdef GOLD
145rootfs = samizdat-gold.seed.btrfs 145rootfs = samizdat-gold.seed.btrfs
146patchfs = 146patchfs =
diff --git a/rootfs/Makefile b/rootfs/Makefile
index b7a039c..eb96398 100644
--- a/rootfs/Makefile
+++ b/rootfs/Makefile
@@ -8,7 +8,9 @@ sudo := $(shell [ "$$(id -u)" = 0 ] || echo sudo)
8 8
9rootfs ?= samizdat.seed.btrfs 9rootfs ?= samizdat.seed.btrfs
10patchfs ?= samizdat.patch.btrfs 10patchfs ?= samizdat.patch.btrfs
11gold ?= samizdat-gold.btrfs 11# gold ?= samizdat-gold.btrfs
12
13.DEFAULT_GOAL = all
12 14
13.PHONY: all rootfs patchfs gold 15.PHONY: all rootfs patchfs gold
14all: $(rootfs) $(patchfs) $(gold) 16all: $(rootfs) $(patchfs) $(gold)
diff --git a/rootfs/buster-backport-kernel.yaml b/rootfs/buster-backport-kernel.yaml
deleted file mode 100644
index e2f6236..0000000
--- a/rootfs/buster-backport-kernel.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
1parent: samizdat
2apt-update: true
3packages:
4- linux-image-$(kver)-$(karch)
5
diff --git a/rootfs/kernel.yaml b/rootfs/kernel.yaml
index 1ab32cc..d3768a5 100644
--- a/rootfs/kernel.yaml
+++ b/rootfs/kernel.yaml
@@ -12,6 +12,6 @@ packages:
12- libklibc 12- libklibc
13- libnuma1 13- libnuma1
14- linux-base 14- linux-base
15- linux-image-$(karch) 15- linux-image-$(kver)-$(karch)
16#chroot-commands: 16#chroot-commands:
17#- "apt-get update; apt-get -y install linux-image-$(uname -r | sed 's/.*-//')" 17#- "apt-get update; apt-get -y install linux-image-$(uname -r | sed 's/.*-//')"
diff --git a/rootfs/rc-local.service b/rootfs/rc-local.service
new file mode 100644
index 0000000..4483ad0
--- /dev/null
+++ b/rootfs/rc-local.service
@@ -0,0 +1,14 @@
1[Unit]
2 Description=/etc/rc.local Compatibility
3 ConditionPathExists=/etc/rc.local
4
5[Service]
6 Type=forking
7 ExecStart=/etc/rc.local start
8 TimeoutSec=0
9 StandardOutput=tty
10 RemainAfterExit=yes
11 SysVStartPriority=99
12
13[Install]
14 WantedBy=multi-user.target
diff --git a/rootfs/samizdat-gold.yaml b/rootfs/samizdat-gold.yaml
index b24ffba..0e0d2cd 100644
--- a/rootfs/samizdat-gold.yaml
+++ b/rootfs/samizdat-gold.yaml
@@ -1,4 +1,4 @@
1parent: buster-backport-kernel 1parent: samizdat
2apt-update: true 2apt-update: true
3 3
4binaries: 4binaries:
@@ -9,13 +9,4 @@ chroot-commands:
9- "/usr/local/bin/samizdat-update-apt-cache.sh" 9- "/usr/local/bin/samizdat-update-apt-cache.sh"
10- "/usr/local/bin/samizdat-patch-root.sh" 10- "/usr/local/bin/samizdat-patch-root.sh"
11- "/usr/local/bin/samizdat-hostname.sh" 11- "/usr/local/bin/samizdat-hostname.sh"
12packages:
13- linux-image-$(kver)-$(karch)
14- ../openssh-client_8.4p1-2_$(debarch).deb
15- ../openssh-server_8.4p1-2_$(debarch).deb
16- ../openssh-sftp-server_8.4p1-2_$(debarch).deb
17# ../openssh-tests_8.4p1-2_$(debarch).deb
18- ../ssh_8.4p1-2_all.deb
19- ../ssh-askpass-gnome_8.4p1-2_$(debarch).deb
20- sshfs
21 12
diff --git a/rootfs/samizdat.patch.yaml b/rootfs/samizdat.patch.yaml
index f4b7e55..6240d53 100644
--- a/rootfs/samizdat.patch.yaml
+++ b/rootfs/samizdat.patch.yaml
@@ -9,13 +9,4 @@ chroot-commands:
9- "/usr/local/bin/samizdat-update-apt-cache.sh" 9- "/usr/local/bin/samizdat-update-apt-cache.sh"
10- "/usr/local/bin/samizdat-patch-root.sh" 10- "/usr/local/bin/samizdat-patch-root.sh"
11- "/usr/local/bin/samizdat-hostname.sh" 11- "/usr/local/bin/samizdat-hostname.sh"
12packages:
13- linux-image-$(kver)-$(karch)
14- ../openssh-client_8.4p1-2_$(debarch).deb
15- ../openssh-server_8.4p1-2_$(debarch).deb
16- ../openssh-sftp-server_8.4p1-2_$(debarch).deb
17# ../openssh-tests_8.4p1-2_$(debarch).deb
18- ../ssh_8.4p1-2_all.deb
19- ../ssh-askpass-gnome_8.4p1-2_$(debarch).deb
20- sshfs
21 12
diff --git a/rootfs/samizdat.yaml b/rootfs/samizdat.yaml
index 4696b67..3bbedc3 100644
--- a/rootfs/samizdat.yaml
+++ b/rootfs/samizdat.yaml
@@ -7,18 +7,34 @@ binaries:
7- cokiki 7- cokiki
8- hosts 8- hosts
9packages: 9packages:
10# - sudo 10- sudo
11- dbus-x11 11- dbus-x11
12- linux-image-$(kver)-$(karch)
13- ../openssh-client_8.4p1-2_$(debarch).deb
14- ../openssh-server_8.4p1-2_$(debarch).deb
15- ../openssh-sftp-server_8.4p1-2_$(debarch).deb
16#- ../openssh-tests_8.4p1-2_$(debarch).deb
17#- putty-tools
18- ../ssh_8.4p1-2_all.deb
19- ../ssh-askpass-gnome_8.4p1-2_$(debarch).deb
20- sshfs
21- procps
22- net-tools
23- wireless-tools
24unit-files:
25- rc-local.service
12 26
13skel-files: [] 27skel-files: []
14 28
15chroot-commands: 29chroot-commands:
16#- "dpkg-statoverride" 30#- "dpkg-statoverride"
17- "useradd u -G sudo -m -p '' -s /bin/bash" 31- "useradd u -G sudo -m -p '' -s /bin/bash"
18# - 'loginctl enable-linger u' 32- "useradd d -G sudo -m -p '' -s /bin/bash"
19#- "dpkg --configure sudo" 33- "echo '#!/bin/sh' > /etc/rc.local && chmod +x /etc/rc.local"
20#- "touch /var/lib/sudo/lectured/u" 34- "echo loginctl enable-linger u >> /etc/rc.local"
35- "dpkg --configure sudo || true"
36- "touch /var/lib/sudo/lectured/u"
21- "mkdir -p /etc/sudoers.d; echo 'u ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/u" 37- "mkdir -p /etc/sudoers.d; echo 'u ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/u"
22 38
23- "systemctl enable debug-shell" 39- "systemctl enable debug-shell"
24- "DEBIAN_FRONTEND=noninteractive apt-get -f install; true" 40- "DEBIAN_FRONTEND=noninteractive apt -f install; true"