From a6997d2979fd1aaa9acbbb83cae79a631130e218 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Sun, 5 Nov 2017 13:58:50 +0000
Subject: [PATCH] Copy initial files from apertis-image-customization

Copying overlay and scripts from original repository
with adaptation for Debos.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Differential Revision: https://phabricator.apertis.org/D7201
---
 .../apertis-minimal-hardware-exclusions       |  30 ++
 .../apertis-minimal-hardware-exclusions       |  30 ++
 .../usr/share/initramfs-tools/modules.d/i915  |   1 +
 .../share/initramfs-tools/modules.d/uvcvideo  |   1 +
 overlays/amd64-sdk/.gitignore                 |   0
 overlays/amd64-target/.gitignore              |   0
 overlays/arch-development/.gitignore          |   0
 .../dpkg.cfg.d/apertis-minimal-exclusions     |  13 +
 .../rules.d/60-apertis-minimal-user.rules     |   7 +
 overlays/arch-platform/etc/default/locale     |   1 +
 overlays/arch-platform/etc/hostname           |   1 +
 overlays/arch-platform/etc/hosts              |   6 +
 overlays/arch-platform/etc/network/interfaces |   6 +
 .../var/lib/locales/supported.d/local         | 274 ++++++++++++++++++
 .../arch-sdk/etc/skel/Desktop/devhelp.desktop |  57 ++++
 .../arch-sdk/etc/skel/Desktop/eclipse.desktop |   8 +
 overlays/arch-target/.gitignore               |   0
 overlays/arm64-minimal/.gitignore             |   0
 overlays/arm64-platform/.gitignore            |   0
 overlays/armhf-minimal/.gitignore             |   0
 .../apertis-minimal-hardware-exclusions       |   3 +
 .../etc/initramfs-tools/conf.d/modules        |   1 +
 scripts/add-initramfs-modules.chroot          |  14 +
 scripts/add-xdg-user-metadata.chroot          |  13 +
 scripts/add_user_to_groups.chroot             |  17 ++
 scripts/check_sudoers_for_admin.chroot        |  19 ++
 scripts/create-mtab-symlink.hook.chroot       |  11 +
 scripts/extract_initrd_uuid.binary            |  31 ++
 scripts/generate_openssh_keys.chroot          |  12 +
 scripts/move-root.chroot                      |   7 +
 scripts/remove_var_lib_parts.binary           |  22 ++
 scripts/setup_user.chroot                     |  12 +
 32 files changed, 597 insertions(+)
 create mode 100644 overlays/amd64-development/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
 create mode 100644 overlays/amd64-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
 create mode 100644 overlays/amd64-platform/usr/share/initramfs-tools/modules.d/i915
 create mode 100644 overlays/amd64-platform/usr/share/initramfs-tools/modules.d/uvcvideo
 create mode 100644 overlays/amd64-sdk/.gitignore
 create mode 100644 overlays/amd64-target/.gitignore
 create mode 100644 overlays/arch-development/.gitignore
 create mode 100644 overlays/arch-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-exclusions
 create mode 100644 overlays/arch-minimal/etc/polkit-1/rules.d/60-apertis-minimal-user.rules
 create mode 100644 overlays/arch-platform/etc/default/locale
 create mode 100644 overlays/arch-platform/etc/hostname
 create mode 100644 overlays/arch-platform/etc/hosts
 create mode 100644 overlays/arch-platform/etc/network/interfaces
 create mode 100644 overlays/arch-platform/var/lib/locales/supported.d/local
 create mode 100755 overlays/arch-sdk/etc/skel/Desktop/devhelp.desktop
 create mode 100755 overlays/arch-sdk/etc/skel/Desktop/eclipse.desktop
 create mode 100644 overlays/arch-target/.gitignore
 create mode 100644 overlays/arm64-minimal/.gitignore
 create mode 100644 overlays/arm64-platform/.gitignore
 create mode 100644 overlays/armhf-minimal/.gitignore
 create mode 100644 overlays/armhf-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
 create mode 100644 overlays/armhf-platform/etc/initramfs-tools/conf.d/modules
 create mode 100755 scripts/add-initramfs-modules.chroot
 create mode 100755 scripts/add-xdg-user-metadata.chroot
 create mode 100755 scripts/add_user_to_groups.chroot
 create mode 100755 scripts/check_sudoers_for_admin.chroot
 create mode 100755 scripts/create-mtab-symlink.hook.chroot
 create mode 100755 scripts/extract_initrd_uuid.binary
 create mode 100755 scripts/generate_openssh_keys.chroot
 create mode 100755 scripts/move-root.chroot
 create mode 100755 scripts/remove_var_lib_parts.binary
 create mode 100755 scripts/setup_user.chroot

diff --git a/overlays/amd64-development/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions b/overlays/amd64-development/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
new file mode 100644
index 0000000..a5d8046
--- /dev/null
+++ b/overlays/amd64-development/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
@@ -0,0 +1,30 @@
+# Drop most kernel modules, but keep the ones we need for boot and networking
+# on reference hardware (Minnowboard Max). In production you'd build these
+# into your kernel, but we're using a generic distro kernel here.
+path-exclude=/lib/modules/*
+# xor: for btrfs
+path-include=/lib/modules/*/kernel/crypto/xor.ko
+# hid: for USB keyboards
+path-include=/lib/modules/*/kernel/drivers/hid/hid-generic.ko
+path-include=/lib/modules/*/kernel/drivers/hid/hid.ko
+path-include=/lib/modules/*/kernel/drivers/hid/usbhid/*
+path-include=/lib/modules/*/kernel/drivers/mmc/*
+path-include=/lib/modules/*/kernel/drivers/net/ethernet/realtek/r8169.ko
+# mii: for r8169
+path-include=/lib/modules/*/kernel/drivers/net/mii.ko
+# usb basics: for USB keyboards and thumb drives so we can debug
+path-include=/lib/modules/*/kernel/drivers/usb/class/*
+path-include=/lib/modules/*/kernel/drivers/usb/common/*
+path-include=/lib/modules/*/kernel/drivers/usb/host/*
+path-include=/lib/modules/*/kernel/drivers/usb/phy/*
+path-include=/lib/modules/*/kernel/drivers/usb/storage/*
+# virtio: for qemu virtual machines
+path-include=/lib/modules/*/kernel/drivers/virtio/*
+path-include=/lib/modules/*/kernel/fs/btrfs/btrfs.ko
+# fat and nls: for the EFI System Partition, USB thumb drives, etc.
+path-include=/lib/modules/*/kernel/fs/fat/*
+path-include=/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko
+path-include=/lib/modules/*/kernel/fs/nls/nls_utf8.ko
+# raid6_pq: for btrfs
+path-include=/lib/modules/*/kernel/lib/raid6/raid6_pq.ko
+path-include=/lib/modules/*/modules.*
diff --git a/overlays/amd64-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions b/overlays/amd64-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
new file mode 100644
index 0000000..a5d8046
--- /dev/null
+++ b/overlays/amd64-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
@@ -0,0 +1,30 @@
+# Drop most kernel modules, but keep the ones we need for boot and networking
+# on reference hardware (Minnowboard Max). In production you'd build these
+# into your kernel, but we're using a generic distro kernel here.
+path-exclude=/lib/modules/*
+# xor: for btrfs
+path-include=/lib/modules/*/kernel/crypto/xor.ko
+# hid: for USB keyboards
+path-include=/lib/modules/*/kernel/drivers/hid/hid-generic.ko
+path-include=/lib/modules/*/kernel/drivers/hid/hid.ko
+path-include=/lib/modules/*/kernel/drivers/hid/usbhid/*
+path-include=/lib/modules/*/kernel/drivers/mmc/*
+path-include=/lib/modules/*/kernel/drivers/net/ethernet/realtek/r8169.ko
+# mii: for r8169
+path-include=/lib/modules/*/kernel/drivers/net/mii.ko
+# usb basics: for USB keyboards and thumb drives so we can debug
+path-include=/lib/modules/*/kernel/drivers/usb/class/*
+path-include=/lib/modules/*/kernel/drivers/usb/common/*
+path-include=/lib/modules/*/kernel/drivers/usb/host/*
+path-include=/lib/modules/*/kernel/drivers/usb/phy/*
+path-include=/lib/modules/*/kernel/drivers/usb/storage/*
+# virtio: for qemu virtual machines
+path-include=/lib/modules/*/kernel/drivers/virtio/*
+path-include=/lib/modules/*/kernel/fs/btrfs/btrfs.ko
+# fat and nls: for the EFI System Partition, USB thumb drives, etc.
+path-include=/lib/modules/*/kernel/fs/fat/*
+path-include=/lib/modules/*/kernel/fs/nls/nls_iso8859-1.ko
+path-include=/lib/modules/*/kernel/fs/nls/nls_utf8.ko
+# raid6_pq: for btrfs
+path-include=/lib/modules/*/kernel/lib/raid6/raid6_pq.ko
+path-include=/lib/modules/*/modules.*
diff --git a/overlays/amd64-platform/usr/share/initramfs-tools/modules.d/i915 b/overlays/amd64-platform/usr/share/initramfs-tools/modules.d/i915
new file mode 100644
index 0000000..03e2c07
--- /dev/null
+++ b/overlays/amd64-platform/usr/share/initramfs-tools/modules.d/i915
@@ -0,0 +1 @@
+i915
diff --git a/overlays/amd64-platform/usr/share/initramfs-tools/modules.d/uvcvideo b/overlays/amd64-platform/usr/share/initramfs-tools/modules.d/uvcvideo
new file mode 100644
index 0000000..13d3132
--- /dev/null
+++ b/overlays/amd64-platform/usr/share/initramfs-tools/modules.d/uvcvideo
@@ -0,0 +1 @@
+uvcvideo
diff --git a/overlays/amd64-sdk/.gitignore b/overlays/amd64-sdk/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/amd64-target/.gitignore b/overlays/amd64-target/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/arch-development/.gitignore b/overlays/arch-development/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/arch-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-exclusions b/overlays/arch-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-exclusions
new file mode 100644
index 0000000..f4100aa
--- /dev/null
+++ b/overlays/arch-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-exclusions
@@ -0,0 +1,13 @@
+path-exclude=/usr/share/doc/*
+path-exclude=/usr/share/locale/*
+path-exclude=/usr/share/man/*
+path-exclude=/usr/share/i18n/*
+path-exclude=/usr/share/info/*
+path-exclude=/usr/share/lintian/*
+path-exclude=/usr/share/linda/*
+path-exclude=/usr/share/zoneinfo/*
+path-exclude=/var/cache/man/*
+
+# Drop udev hwdb as it's not required on a minimal system
+path-exclude=/lib/udev/hwdb.bin
+path-exclude=/lib/udev/hwdb.d/*
diff --git a/overlays/arch-minimal/etc/polkit-1/rules.d/60-apertis-minimal-user.rules b/overlays/arch-minimal/etc/polkit-1/rules.d/60-apertis-minimal-user.rules
new file mode 100644
index 0000000..e0efc46
--- /dev/null
+++ b/overlays/arch-minimal/etc/polkit-1/rules.d/60-apertis-minimal-user.rules
@@ -0,0 +1,7 @@
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.apertis.ribchester.install-bundle" ||
+         action.id == "org.apertis.ribchester.manage-applications") &&
+        subject.user == 'user') {
+            return polkit.Result.YES;
+    }
+});
diff --git a/overlays/arch-platform/etc/default/locale b/overlays/arch-platform/etc/default/locale
new file mode 100644
index 0000000..f9c983c
--- /dev/null
+++ b/overlays/arch-platform/etc/default/locale
@@ -0,0 +1 @@
+LANG=C.UTF-8
diff --git a/overlays/arch-platform/etc/hostname b/overlays/arch-platform/etc/hostname
new file mode 100644
index 0000000..222fbff
--- /dev/null
+++ b/overlays/arch-platform/etc/hostname
@@ -0,0 +1 @@
+apertis
diff --git a/overlays/arch-platform/etc/hosts b/overlays/arch-platform/etc/hosts
new file mode 100644
index 0000000..3b0d403
--- /dev/null
+++ b/overlays/arch-platform/etc/hosts
@@ -0,0 +1,6 @@
+127.0.0.1	localhost
+::1		localhost ip6-localhost ip6-loopback
+fe00::0		ip6-localnet
+ff00::0		ip6-mcastprefix
+ff02::1		ip6-allnodes
+ff02::2		ip6-allrouters
diff --git a/overlays/arch-platform/etc/network/interfaces b/overlays/arch-platform/etc/network/interfaces
new file mode 100644
index 0000000..26762b0
--- /dev/null
+++ b/overlays/arch-platform/etc/network/interfaces
@@ -0,0 +1,6 @@
+# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
+# /usr/share/doc/ifupdown/examples for more information.
+
+# The loopback interface
+auto lo
+iface lo inet loopback
diff --git a/overlays/arch-platform/var/lib/locales/supported.d/local b/overlays/arch-platform/var/lib/locales/supported.d/local
new file mode 100644
index 0000000..b5ef742
--- /dev/null
+++ b/overlays/arch-platform/var/lib/locales/supported.d/local
@@ -0,0 +1,274 @@
+aa_DJ.UTF-8 UTF-8
+aa_ER UTF-8
+aa_ER@saaho UTF-8
+aa_ET UTF-8
+af_ZA.UTF-8 UTF-8
+am_ET UTF-8
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UTF-8
+yi_US.UTF-8 UTF-8
+yo_NG UTF-8
+yue_HK UTF-8
+zh_CN.UTF-8 UTF-8
+zh_HK.UTF-8 UTF-8
+zh_SG.UTF-8 UTF-8
+zh_TW.UTF-8 UTF-8
+zu_ZA.UTF-8 UTF-8
+
diff --git a/overlays/arch-sdk/etc/skel/Desktop/devhelp.desktop b/overlays/arch-sdk/etc/skel/Desktop/devhelp.desktop
new file mode 100755
index 0000000..f2a72a0
--- /dev/null
+++ b/overlays/arch-sdk/etc/skel/Desktop/devhelp.desktop
@@ -0,0 +1,57 @@
+[Desktop Entry]
+Name=Devhelp
+Comment=Developer's Help program
+GenericName=Documentation Browser
+Keywords=documentation;information;manual;developer;api;
+Keywords[as]=তথ্যচিত্ৰ;তথ্য;হাতপুথি;উন্নয়নকাৰী;api;
+Keywords[be]=дакументацыя;інфармацыя;звесткі;даведнік;падручнік;распрацоўшчык;праграміст;api;
+Keywords[bg]=документация;информация;ръководство;апи;разработка;documentation;information;manual;developer;api;
+Keywords[ca]=documentació;informació;manual;desenvolupador;api;
+Keywords[ca@valencia]=documentació;informació;manual;desenvolupador;api;
+Keywords[cs]=dokumentace;informace;příručka;návod;vývojář;vývoj;api;
+Keywords[da]=dokumentation;information;oplysninger;manual;håndbog;udvikler;api;
+Keywords[de]=Dokumentation;Information;Handbuch;Entwickler;API;
+Keywords[el]=τεκμηρίωση;πληροφορίες;εγχειρίδιο;ανάπτυξη;api;
+Keywords[es]=documentación;información;manual;desarrollador;api;
+Keywords[et]=dokumentatsioon;informatsioon;andmed;käsiraamat;manuaal;arendajad;arendus;api;
+Keywords[eu]=dokumentazioa;informazioa;eskuliburua;garatzailea;APIa;
+Keywords[fa]=مستندات;اطلاعات;راهنما;توسعه‌دهنده;api;
+Keywords[fi]=documentation;information;manual;developer;api;dokumentaatio;käsikirja;ohje;kehittäjä;kehitys;ohjelmointirajapinta;
+Keywords[fr]=documentation;information;manuel;développeur;api;
+Keywords[gl]=documentación;información;manual;desenvolvedor;api;
+Keywords[he]=תיעוד;מידע;פרטים;הדרכה;מדריך;פיתוח;תכנות;מפתח;מתכנת;api;
+Keywords[hu]=dokumentáció;információ;kézikönyv;fejlesztő;api;
+Keywords[id]=dokumentasi;informasi;manual;pengembang;api;
+Keywords[it]=documentazione;informazioni;manuale;manuali;sviluppo;api;
+Keywords[ja]=documentation;information;manual;developer;api;ドキュメンテーション;ドキュメント;情報;リファレンスマニュアル;開発者;
+Keywords[ko]=documentation;문서;information;정보;manual;설명서;매뉴얼;developer;개발자;api;레퍼런스;
+Keywords[lt]=dokumentacija;informacija;vadovas;kūrėjas;api;
+Keywords[lv]=dokumentācija;informācija;rokasgrāmata;izstrāde;api;
+Keywords[ml]=documentation;information;manual;developer;api;
+Keywords[nb]=dokumentasjon;informasjon;håndbok;utvikler;api;
+Keywords[nl]=documentatie;informatie;handleiding;ontwikkeling;api;
+Keywords[pl]=dokumentacja;informacje;podręcznik;przewodnik;programista;developer;api;
+Keywords[pt]=documentação;informação;manual;programador;api;
+Keywords[pt_BR]=documentação;documentações;informações;manual;desenvolvedor;programador;api;
+Keywords[ru]=документация;информация;руководство;разработчик;api;
+Keywords[sk]=dokumentácia;informácie;návod;vývojár;api;rozhranie;
+Keywords[sl]=dokumentacija;podrobnosti;podatki;priročnik;razvoj;api;
+Keywords[sr]=документација;подаци;информације;обавештења;упутство;програмер;апи;
+Keywords[sr@latin]=dokumentacija;podaci;informacije;obaveštenja;uputstvo;programer;api;
+Keywords[th]=เอกสารประกอบ;สอบถาม;คู่มือ;นักพัฒนา;api;
+Keywords[ug]=documentation;information;manual;developer;api;قوللانما;ئۇچۇر;چۈشەندۈرۈشى;ئىجادىيەتچى;پروگرامما ئېغىزى;
+Keywords[uk]=документація;інформація;посібник;розробник;api;
+Keywords[zh_CN]=documentation;information;manual;developer;api;文档;信息;说明书;开发;
+Keywords[zh_HK]=documentation;information;manual;developer;api;文件;資訊;手冊;開發者;
+Keywords[zh_TW]=documentation;information;manual;developer;api;文件;資訊;手冊;開發者;
+Exec=devhelp
+Terminal=false
+Type=Application
+Icon=devhelp
+Categories=GNOME;GTK;Development;
+StartupNotify=true
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=devhelp
+X-GNOME-Bugzilla-Component=General
+X-GNOME-Bugzilla-Version=3.12.1
+X-Ubuntu-Gettext-Domain=devhelp
diff --git a/overlays/arch-sdk/etc/skel/Desktop/eclipse.desktop b/overlays/arch-sdk/etc/skel/Desktop/eclipse.desktop
new file mode 100755
index 0000000..f63d9ec
--- /dev/null
+++ b/overlays/arch-sdk/etc/skel/Desktop/eclipse.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Eclipse
+Comment=Eclipse Integrated Development Environment
+Icon=eclipse
+Exec=eclipse
+Terminal=false
+Categories=Development;IDE;Java;
diff --git a/overlays/arch-target/.gitignore b/overlays/arch-target/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/arm64-minimal/.gitignore b/overlays/arm64-minimal/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/arm64-platform/.gitignore b/overlays/arm64-platform/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/armhf-minimal/.gitignore b/overlays/armhf-minimal/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/overlays/armhf-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions b/overlays/armhf-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
new file mode 100644
index 0000000..0d6c6b5
--- /dev/null
+++ b/overlays/armhf-minimal/etc/dpkg/dpkg.cfg.d/apertis-minimal-hardware-exclusions
@@ -0,0 +1,3 @@
+# Drop all kernel modules: we assume the kernel in use on ARM devices
+# already has everything important built-in.
+path-exclude=/lib/modules/*
diff --git a/overlays/armhf-platform/etc/initramfs-tools/conf.d/modules b/overlays/armhf-platform/etc/initramfs-tools/conf.d/modules
new file mode 100644
index 0000000..a724f56
--- /dev/null
+++ b/overlays/armhf-platform/etc/initramfs-tools/conf.d/modules
@@ -0,0 +1 @@
+MODULES=list
diff --git a/scripts/add-initramfs-modules.chroot b/scripts/add-initramfs-modules.chroot
new file mode 100755
index 0000000..14a4eef
--- /dev/null
+++ b/scripts/add-initramfs-modules.chroot
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+# Add extra modules to initramfs
+echo "I: Add extra modules to initramfs"
+echo netprio_cgroup >> /etc/initramfs-tools/modules
+echo cls_cgroup >> /etc/initramfs-tools/modules
+if `update-initramfs -u`
+then
+	echo "I: Updated initramfs with netprio_cgroup and cls_cgroup modules"
+else
+	echo "W: Failed to add netprio_cgroup and cls_cgroup modules to initramfs"
+fi
diff --git a/scripts/add-xdg-user-metadata.chroot b/scripts/add-xdg-user-metadata.chroot
new file mode 100755
index 0000000..925b6d5
--- /dev/null
+++ b/scripts/add-xdg-user-metadata.chroot
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+shopt -s dotglob > /dev/null 2>&1
+
+# Hackish: Add user XDG metadata BUG: #1157
+echo "I: Adding XDG user metadata."
+mkdir -p /etc/skel/{.config,.cache,.dbus}
+mkdir -p /etc/skel/.local/{bin,etc,include,lib,libexec,share}
+
+mkdir -p /root/{.config,.cache,.dbus}
+mkdir -p /root/.local/{bin,etc,include,lib,libexec,share}
+shopt -u
diff --git a/scripts/add_user_to_groups.chroot b/scripts/add_user_to_groups.chroot
new file mode 100755
index 0000000..e73941b
--- /dev/null
+++ b/scripts/add_user_to_groups.chroot
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+DEFGROUPS="admin,adm,dialout,cdrom,plugdev,audio,dip,video,staff,shared"
+
+for group in $(echo $DEFGROUPS | tr ',' ' '); do
+    if /bin/egrep  -i "^$group" /etc/group ; then
+       echo "Group $group exists in /etc/group"
+    else
+       echo "Group $group does not exist in /etc/group, creating"
+       groupadd $group
+    fi
+done
+
+echo "I: add user to ($DEFGROUPS) groups"
+usermod -a -G ${DEFGROUPS} user
diff --git a/scripts/check_sudoers_for_admin.chroot b/scripts/check_sudoers_for_admin.chroot
new file mode 100755
index 0000000..aff62c7
--- /dev/null
+++ b/scripts/check_sudoers_for_admin.chroot
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+# check to make sure sudoers file has ref for admin
+ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
+if [ -z "$ADMINEXISTS" ]; then
+  # append admin entry to sudoers
+  echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
+  echo "%admin  ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
+fi
+
+# make sure that NOPASSWD is set for %admin
+# expecially in the case that we didn't add it to /etc/sudoers
+# just blow the %admin line away and force it to be NOPASSWD
+sed -i -e '
+/\%admin/ c \
+%admin  ALL = (ALL) NOPASSWD: ALL
+' /etc/sudoers
diff --git a/scripts/create-mtab-symlink.hook.chroot b/scripts/create-mtab-symlink.hook.chroot
new file mode 100755
index 0000000..bd9fdbb
--- /dev/null
+++ b/scripts/create-mtab-symlink.hook.chroot
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# Create /etc/mtab symlink, replacing a regular file if necessary
+
+if [ ! -L /etc/mtab ]
+then
+	rm -f /etc/mtab
+	ln -s /proc/self/mounts /etc/mtab
+fi
diff --git a/scripts/extract_initrd_uuid.binary b/scripts/extract_initrd_uuid.binary
new file mode 100755
index 0000000..664a783
--- /dev/null
+++ b/scripts/extract_initrd_uuid.binary
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+
+mkdir -p uuid
+cd uuid
+
+prefix=
+
+if ls ../binary/casper/initrd.img-* > /dev/null 2>&1; then
+  prefix=../binary/boot/filesystem.dir/casper/
+else
+  prefix=../binary/boot/filesystem.dir/boot/
+fi
+
+UUID=`uuidgen -r`
+
+for initrd in `ls $prefix/initrd.img-* 2> /dev/null`; do
+  zcat $initrd | cpio --quiet -id
+  echo $UUID > conf/uuid.conf
+  find . | cpio --quiet --dereference -o -H newc | gzip > $initrd
+  rm -rf *
+done
+
+echo "I: setting rootfs UUID $UUID in initrd... copying to '.disk/casper-uuid'."
+if [ ! -d ../binary/boot/filesystem.dir/.disk ]; then
+    mkdir -p ../binary/boot/filesystem.dir/.disk
+fi
+echo $UUID > ../binary/boot/filesystem.dir/.disk/casper-uuid
+cd ..
+rm -rf uuid
diff --git a/scripts/generate_openssh_keys.chroot b/scripts/generate_openssh_keys.chroot
new file mode 100755
index 0000000..d3cfd2e
--- /dev/null
+++ b/scripts/generate_openssh_keys.chroot
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+# Generate openssh keys
+echo "I: Regenerate SSH keys"
+if dpkg -l openssh-server | tail -n 1 | grep -q ^ii
+then
+	dpkg-reconfigure openssh-server
+else
+	echo "W: openssh-server not found. Avoiding key generation."
+fi
diff --git a/scripts/move-root.chroot b/scripts/move-root.chroot
new file mode 100755
index 0000000..652a4c8
--- /dev/null
+++ b/scripts/move-root.chroot
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+# Move /root to /var/root and add a symlink
+mv /root var/root
+ln -s var/root /root
diff --git a/scripts/remove_var_lib_parts.binary b/scripts/remove_var_lib_parts.binary
new file mode 100755
index 0000000..5b11b7d
--- /dev/null
+++ b/scripts/remove_var_lib_parts.binary
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+fail () { printf "%s\n" "$*"; exit 1; }
+
+test -n "$ROOTDIR" || fail 'error: $ROOTDIR is not set'
+test -d "$ROOTDIR" || fail 'error: $ROOTDIR is not a directory'
+
+cd "$ROOTDIR"
+
+echo "I: commented out such that dpkg and apt will work for NOW"
+#echo "I: rm /var/lib/dpkg"
+#rm -rf ./var/lib/dpkg
+echo "I: rm /var/lib/apt"
+rm -f ./var/lib/apt/lists/*Packages
+rm -f ./var/lib/apt/lists/*Sources
+rm -f ./var/lib/apt/lists/*Release
+rm -f ./var/lib/apt/lists/*Release.gpg
+echo "I: rm /var/cache/apt"
+rm -f ./var/cache/apt/pkgcache.bin
+rm -f ./var/cache/apt/srcpkgcache.bin
diff --git a/scripts/setup_user.chroot b/scripts/setup_user.chroot
new file mode 100755
index 0000000..c6063ad
--- /dev/null
+++ b/scripts/setup_user.chroot
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+shopt -s dotglob
+
+echo "I: create user"
+adduser --gecos User --disabled-login user
+
+echo "I: set user password"
+echo "user:user" | chpasswd
+
+shopt -u
-- 
GitLab