From 2a9efb44a6fcd52af14fc41da3cdb5bee02ea1e4 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 30 Apr 2018 09:57:12 +0100 Subject: [PATCH] Move some buildd hooks to includes.chroot. --- live-build/buildd/hooks/apt.chroot | 14 -------------- live-build/buildd/hooks/fstab.chroot | 5 ----- .../includes.chroot/etc/apt/apt.conf.d/99buildd | 2 ++ .../etc/apt/preferences.d/backports | 3 +++ live-build/buildd/includes.chroot/etc/fstab | 1 + .../usr/local/sbin/policy-rc.d} | 7 ------- 6 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 live-build/buildd/hooks/apt.chroot delete mode 100644 live-build/buildd/hooks/fstab.chroot create mode 100644 live-build/buildd/includes.chroot/etc/apt/apt.conf.d/99buildd create mode 100644 live-build/buildd/includes.chroot/etc/apt/preferences.d/backports create mode 100644 live-build/buildd/includes.chroot/etc/fstab rename live-build/buildd/{hooks/policy-rc.d.chroot => includes.chroot/usr/local/sbin/policy-rc.d} (70%) mode change 100644 => 100755 diff --git a/live-build/buildd/hooks/apt.chroot b/live-build/buildd/hooks/apt.chroot deleted file mode 100644 index 6f0d828d..00000000 --- a/live-build/buildd/hooks/apt.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/sh -set -e - -# Configure APT. -cat >/etc/apt/apt.conf.d/99buildd </etc/apt/preferences.d/backports </etc/fstab diff --git a/live-build/buildd/includes.chroot/etc/apt/apt.conf.d/99buildd b/live-build/buildd/includes.chroot/etc/apt/apt.conf.d/99buildd new file mode 100644 index 00000000..0fd77978 --- /dev/null +++ b/live-build/buildd/includes.chroot/etc/apt/apt.conf.d/99buildd @@ -0,0 +1,2 @@ +DPkg::Options {"--force-unsafe-io";}; +DPkg::Use-Pty "false"; diff --git a/live-build/buildd/includes.chroot/etc/apt/preferences.d/backports b/live-build/buildd/includes.chroot/etc/apt/preferences.d/backports new file mode 100644 index 00000000..605907ec --- /dev/null +++ b/live-build/buildd/includes.chroot/etc/apt/preferences.d/backports @@ -0,0 +1,3 @@ +Package: * +Pin: release a=*-backports +Pin-Priority: 500 diff --git a/live-build/buildd/includes.chroot/etc/fstab b/live-build/buildd/includes.chroot/etc/fstab new file mode 100644 index 00000000..b67dd265 --- /dev/null +++ b/live-build/buildd/includes.chroot/etc/fstab @@ -0,0 +1 @@ +/dev/root / ext2 noatime,errors=remount-ro 0 1 diff --git a/live-build/buildd/hooks/policy-rc.d.chroot b/live-build/buildd/includes.chroot/usr/local/sbin/policy-rc.d old mode 100644 new mode 100755 similarity index 70% rename from live-build/buildd/hooks/policy-rc.d.chroot rename to live-build/buildd/includes.chroot/usr/local/sbin/policy-rc.d index 4f8980ec..cf2290b6 --- a/live-build/buildd/hooks/policy-rc.d.chroot +++ b/live-build/buildd/includes.chroot/usr/local/sbin/policy-rc.d @@ -1,8 +1,3 @@ -#! /bin/sh -set -e - -# Configure policy-rc.d. -cat >/usr/local/sbin/policy-rc.d <<'EOF' #!/bin/sh # policy-rc.d script for chroots. @@ -16,5 +11,3 @@ while true; do *) echo "Not running services in chroot."; exit 101 ;; esac done -EOF -chmod 755 /usr/local/sbin/policy-rc.d