summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaddgroup36
-rwxr-xr-xadduser90
-rwxr-xr-xadelie-build-cd15
-rw-r--r--group-ppc32
-rw-r--r--group-x8633
-rw-r--r--group-x86_6433
-rw-r--r--passwd-ppc18
-rw-r--r--passwd-x8620
-rw-r--r--passwd-x86_6425
-rw-r--r--shadow-ppc18
-rw-r--r--shadow-x8620
-rw-r--r--shadow-x86_6425
12 files changed, 136 insertions, 229 deletions
diff --git a/addgroup b/addgroup
new file mode 100755
index 0000000..051df36
--- /dev/null
+++ b/addgroup
@@ -0,0 +1,36 @@
+#!/bin/sh
+# addgroup - BusyBox compatibility shim
+# bbshim
+#
+# Copyright © 2017 A. Wilcox. All rights reserved.
+# Licensed under the terms of the NCSA Open Source license.
+#
+
+ARG=
+CMDLINE=
+
+while getopts :g:S ARG
+do
+ case $ARG in
+ g) CMDLINE="$CMDLINE -g \"$OPTARG\"" ;;
+ S) CMDLINE="$CMDLINE -r" ;;
+ :) exit 1 ;;
+ \?) exit 1 ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+if [ -z "$*" ]; then
+ echo "$0: group name is required" >&2
+ exit 1
+fi
+
+set "$@"
+
+
+if [ -n "$2" ]; then
+ exec usermod -a -G $2 $1
+fi
+
+groupadd $CMDLINE $1
diff --git a/adduser b/adduser
new file mode 100755
index 0000000..ba9d90a
--- /dev/null
+++ b/adduser
@@ -0,0 +1,90 @@
+#!/bin/sh
+# adduser - BusyBox compatibility shim
+# bbshim
+#
+# Copyright © 2017 A. Wilcox. All rights reserved.
+# Licensed under the terms of the NCSA Open Source license.
+#
+
+# The GECOS for the new user.
+GECOS="Linux User,,,"
+
+# Additional groups in which to add the new user.
+MYGROUPS=
+
+# Path to the home directory for the new user.
+HOMEDIR=
+
+# Don't call passwd(1) for the new user afterwards.
+NOPASSWD=0
+
+# The new user's shell.
+MYSHELL=$SHELL
+
+# An alternative skeleton directory for the new user's home directory.
+SKEL=/etc/skel
+
+# The new user is a system user.
+SYSTEM=0
+
+# Use this UID number for the new user.
+MYUID=
+
+
+ARG=
+
+while getopts h:g:s:G:SDHu:k: ARG
+do
+ case $ARG in
+ h) HOMEDIR=$OPTARG ;;
+ g) GECOS=$OPTARG ;;
+ s) MYSHELL=$OPTARG ;;
+ G) MYGROUPS=$OPTARG ;;
+ S) SYSTEM=1
+ MYSHELL="/bin/false";;
+ D) NOPASSWD=1 ;;
+ H) unset HOMEDIR ;;
+ u) MYUID=$OPTARG ;;
+ k) SKEL=$OPTARG ;;
+ :) exit 1 ;;
+ \?) exit 1 ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+if [ -z "$*" ]; then
+ echo "$0: user name is required" >&2
+ exit 1
+fi
+
+set "$@"
+
+
+CMDLINE="-s $MYSHELL"
+
+if [ -n "$MYGROUPS" ]; then
+ CMDLINE="$CMDLINE -g $MYGROUPS"
+fi
+
+if [ -n "$HOMEDIR" ]; then
+ CMDLINE="$CMDLINE -m -d \"$HOMEDIR\" -k \"$SKEL\""
+fi
+
+if [ $SYSTEM -ne 0 ]; then
+ CMDLINE="$CMDLINE -r"
+fi
+
+if [ -n "$MYUID" ]; then
+ CMDLINE="$CMDLINE -u $MYUID"
+fi
+
+if [ -n "$2" ]; then
+ CMDLINE="$CMDLINE -g $2"
+fi
+
+useradd -c "$GECOS" $CMDLINE $1
+
+#if [ $NOPASSWD -eq 0 ]; then
+# passwd $1
+#fi
diff --git a/adelie-build-cd b/adelie-build-cd
index 2c94449..ab45a92 100755
--- a/adelie-build-cd
+++ b/adelie-build-cd
@@ -135,6 +135,11 @@ install_pkgs() {
mkdir -p squashroot-$ARCH/etc/apk/keys
cp 'packages@adelielinux.org.pub' squashroot-$ARCH/etc/apk/keys/
+ # XXX: Handle pre-install scripts.
+ mkdir -p squashroot-$ARCH/dev
+ mknod squashroot-$ARCH/dev/urandom c 1 9
+ mkdir -p squashroot-$ARCH/usr/sbin
+ cp addgroup adduser squashroot-$ARCH/usr/sbin/
apk --arch $ARCH \
-X "https://distfiles.adelielinux.org/adelie/$VERSION/system/$EXTRA_MIRROR" \
-X "https://distfiles.adelielinux.org/adelie/$VERSION/user/$EXTRA_MIRROR" \
@@ -172,9 +177,9 @@ make_structure() {
proc /proc proc defaults 0 1
FSTAB
- cp passwd-$ARCH squashroot-$ARCH/etc/passwd
- cp group-$ARCH squashroot-$ARCH/etc/group
- cp shadow-$ARCH squashroot-$ARCH/etc/shadow
+ echo 'live:x:1000:1000:Live User:/home/live:/bin/bash' >> squashroot-$ARCH/etc/passwd
+ echo 'live:x:1000:' >> squashroot-$ARCH/etc/group
+ echo 'live::::::::' >> squashroot-$ARCH/etc/shadow
cat >squashroot-$ARCH/etc/shells <<- SHELLS
/bin/bash
@@ -199,8 +204,6 @@ make_structure() {
ISSUE
- chmod 600 squashroot-$ARCH/etc/shadow
-
if test -n "${DO_FULL+full}"; then
declare -r PACKAGES_DIR=squashroot-$ARCH/packages/$ARCH
mkdir -p $PACKAGES_DIR
@@ -258,7 +261,9 @@ make_initrd() {
cp squashroot-$ARCH/bin/udevadm initrd-$ARCH/sbin/
cp squashroot-$ARCH/sbin/udevd initrd-$ARCH/sbin/
cp squashroot-$ARCH/lib/libkmod.so.2 initrd-$ARCH/lib/
+ cp squashroot-$ARCH/usr/lib/liblzma.so.5 initrd-$ARCH/lib/
cp squashroot-$ARCH/lib/libudev.so.1 initrd-$ARCH/lib/
+ cp squashroot-$ARCH/lib/libz.so.1 initrd-$ARCH/lib/
cp squashroot-$ARCH/etc/udev/hwdb.bin initrd-$ARCH/etc/udev/
# init
diff --git a/group-ppc b/group-ppc
deleted file mode 100644
index 072eb0e..0000000
--- a/group-ppc
+++ /dev/null
@@ -1,32 +0,0 @@
-root:x:0:root
-tty:x:5:
-wheel:x:10:live
-mail:x:12:postfix
-uucp:x:14:
-man:x:15:
-cron:x:16:
-console:x:17:
-audio:x:18:
-cdrom:x:19:
-sshd:x:22:
-at:x:25:
-video:x:27:live
-games:x:35:
-apache:x:81:
-usb:x:85:
-users:x:100:
-clamav:x:200:
-scanner:x:201:
-sddm:x:202:
-rtkit:x:203:
-polkitd:x:204:
-plugdev:x:205:
-fcron:x:206:
-postfix:x:207:
-postdrop:x:208:
-postmaster:x:245:
-messagebus:x:246:
-crontab:x:248:
-input:x:249:
-utmp:x:406:
-live:x:1000:
diff --git a/group-x86 b/group-x86
deleted file mode 100644
index b0e2908..0000000
--- a/group-x86
+++ /dev/null
@@ -1,33 +0,0 @@
-root:x:0:root
-tty:x:5:
-wheel:x:10:live
-mail:x:12:postfix
-uucp:x:14:
-man:x:15:
-cron:x:16:
-console:x:17:
-audio:x:18:
-cdrom:x:19:
-sshd:x:22:
-at:x:25:
-video:x:27:live
-games:x:35:
-apache:x:81:
-usb:x:85:
-users:x:100:
-uptimed:x:103:
-sddm:x:104:
-clamav:x:105:
-rtkit:x:117:
-polkitd:x:118:
-plugdev:x:119:
-scanner:x:120:
-messagebus:x:121:
-postmaster:x:122:
-ntp:x:123:
-postfix:x:207:
-postdrop:x:208:
-fcron:x:248:
-input:x:249:
-utmp:x:406:
-live:x:1000:
diff --git a/group-x86_64 b/group-x86_64
deleted file mode 100644
index fad1d03..0000000
--- a/group-x86_64
+++ /dev/null
@@ -1,33 +0,0 @@
-root:x:0:root
-tty:x:5:
-wheel:x:10:live
-mail:x:12:postfix
-uucp:x:14:
-man:x:15:
-cron:x:16:
-audio:x:18:
-sshd:x:22:
-at:x:25:
-games:x:35:
-apache:x:81:
-users:x:100:
-uptimed:x:101:
-unbound:x:102:
-nofiles:x:103:
-clamav:x:104:
-sddm:x:105:
-lpadmin:x:106:
-ntp:x:123:
-lp:x:199:
-rtkit:x:200:
-plugdev:x:201:
-polkitd:x:202:
-messagebus:x:203:
-scanner:x:204:
-input:x:205:
-fcron:x:206:
-postfix:x:207:
-postdrop:x:208:
-postmaster:x:249:
-utmp:x:406:
-live:x:1000:
diff --git a/passwd-ppc b/passwd-ppc
deleted file mode 100644
index aedc61b..0000000
--- a/passwd-ppc
+++ /dev/null
@@ -1,18 +0,0 @@
-root:x:0:0:Charlie Root:/root:/bin/bash
-mail:x:8:12:Portable mailer daemon user:/var/spool/mail:/sbin/nologin
-man:x:13:15:man-db:/usr/share/man:/sbin/nologin
-postmaster:x:14:245:Portable postmaster user:/var/spool/mail:/sbin/nologin
-cron:x:16:16:Portable cron daemon user:/var/spool/cron:/sbin/nologin
-sshd:x:22:22:SSH Daemon unprivileged user:/var/empty:/sbin/nologin
-at:x:25:25:at daemon:/var/spool/at/atjobs:/sbin/nologin
-games:x:36:35:Games metauser:/usr/games:/bin/bash
-apache:x:81:81:Apache daemon user:/var/www:/sbin/nologin
-messagebus:x:102:246:DBus unprivileged user:/dev/null:/sbin/nologin
-fcron:x:103:206:fcron daemon user:/dev/null:/sbin/nologin
-polkitd:x:104:204:PolicyKit unprivileged user:/var/lib/polkit-1:/sbin/nologin
-rtkit:x:105:203:RTKit unprivileged user:/dev/null:/sbin/nologin
-sddm:x:106:202:X Display Manager user:/var/lib/sddm:/sbin/nologin
-saned:x:107:201:Scanner unprivileged user:/dev/null:/sbin/nologin
-clamav:x:108:200:Anti-Virus Daemon user:/dev/null:/sbin/nologin
-postfix:x:207:207:Postfix unprivileged user:/var/spool/postfix:/sbin/nologin
-live:x:1000:1000:Live User:/home/live:/bin/bash
diff --git a/passwd-x86 b/passwd-x86
deleted file mode 100644
index 26f13ea..0000000
--- a/passwd-x86
+++ /dev/null
@@ -1,20 +0,0 @@
-root:x:0:0:Charlie Root:/root:/bin/bash
-mail:x:8:12:Portable mailer daemon user:/var/spool/mail:/sbin/nologin
-man:x:13:15:man-db:/usr/share/man:/sbin/nologin
-postmaster:x:14:122:Portable postmaster user:/var/spool/mail:/sbin/nologin
-cron:x:16:16:Portable cron daemon user:/var/spool/cron:/sbin/nologin
-sshd:x:22:22:SSH Daemon unprivileged user:/var/empty:/sbin/nologin
-at:x:25:25:at daemon:/var/spool/at/atjobs:/sbin/nologin
-games:x:36:35:Games metauser:/usr/games:/bin/bash
-apache:x:81:81:Apache daemon user:/var/www:/sbin/nologin
-fcron:x:101:248:fcron daemon user:/dev/null:/sbin/nologin
-messagebus:x:102:121:DBus unprivileged user:/dev/null:/sbin/nologin
-saned:x:103:120:Scanner unprivileged user:/dev/null:/sbin/nologin
-polkitd:x:104:118:PolicyKit unprivileged user:/var/lib/polkit-1:/sbin/nologin
-rtkit:x:105:117:RTKit unprivileged user:/dev/null:/sbin/nologin
-clamav:x:106:105:Anti-Virus Daemon user:/dev/null:/sbin/nologin
-sddm:x:107:104:X Display Manager user:/var/lib/sddm:/sbin/nologin
-uptimed:x:108:103:Uptime Daemon unprivileged user:/dev/null:/sbin/nologin
-ntp:x:123:123:Network Time Synchronisation daemon user:/dev/null:/sbin/nologin
-postfix:x:207:207:Postfix unprivileged user:/var/spool/postfix:/sbin/nologin
-live:x:1000:1000:Live User:/home/live:/bin/bash
diff --git a/passwd-x86_64 b/passwd-x86_64
deleted file mode 100644
index a2c6229..0000000
--- a/passwd-x86_64
+++ /dev/null
@@ -1,25 +0,0 @@
-root:x:0:0:Charlie Root:/root:/bin/bash
-mail:x:8:12:Portable mailer daemon user:/var/spool/mail:/sbin/nologin
-man:x:13:15:man-db:/usr/share/man:/sbin/nologin
-postmaster:x:14:249:Portable postmaster user:/var/spool/mail:/sbin/nologin
-cron:x:16:16:Portable cron daemon user:/var/spool/cron:/sbin/nologin
-sshd:x:22:22:SSH Daemon unprivileged user:/var/empty:/sbin/nologin
-at:x:25:25:at daemon:/var/spool/at/atjobs:/sbin/nologin
-games:x:36:35:Games metauser:/usr/games:/bin/bash
-apache:x:81:81:Apache daemon user:/var/www:/sbin/nologin
-fcron:x:101:206:fcron daemon user:/dev/null:/sbin/nologin
-saned:x:102:204:Scanner unprivileged user:/dev/null:/sbin/nologin
-messagebus:x:103:203:DBus unprivileged user:/dev/null:/sbin/nologin
-polkitd:x:104:202:PolicyKit unprivileged user:/var/lib/polkit-1:/sbin/nologin
-rtkit:x:105:200:RTKit unprivileged user:/dev/null:/sbin/nologin
-lp:x:106:199:Printer daemon user:/dev/null:/sbin/nologin
-sddm:x:107:105:X Display Manager user:/var/lib/sddm:/sbin/nologin
-clamav:x:108:104:Anti-Virus Daemon user:/dev/null:/sbin/nologin
-dnscache:x:109:103:DNS Caching user:/dev/null:/sbin/nologin
-dnslog:x:110:103:DNS Logging user:/dev/null:/sbin/nologin
-tinydns:x:111:103:DNS Resolver user:/dev/null:/sbin/nologin
-unbound:x:112:102:DNS Resolver user:/etc/unbound:/sbin/nologin
-uptimed:x:112:101:Uptime Daemon unprivileged user:/dev/null:/sbin/nologin
-ntp:x:123:123:Network Time Synchronisation daemon user:/dev/null:/sbin/nologin
-postfix:x:207:207:Postfix unprivileged user:/var/spool/postfix:/sbin/nologin
-live:x:1000:1000:Live User:/home/live:/bin/bash
diff --git a/shadow-ppc b/shadow-ppc
deleted file mode 100644
index f81d4e5..0000000
--- a/shadow-ppc
+++ /dev/null
@@ -1,18 +0,0 @@
-root::::::::
-mail::::::::
-man::::::::
-postmaster::::::::
-cron::::::::
-sshd::::::::
-at::::::::
-games::::::::
-apache::::::::
-fcron::::::::
-saned::::::::
-messagebus::::::::
-polkitd::::::::
-rtkit::::::::
-sddm::::::::
-clamav::::::::
-postfix::::::::
-live::::::::
diff --git a/shadow-x86 b/shadow-x86
deleted file mode 100644
index 31e21a2..0000000
--- a/shadow-x86
+++ /dev/null
@@ -1,20 +0,0 @@
-root::::::::
-mail::::::::
-man::::::::
-postmaster::::::::
-cron::::::::
-sshd::::::::
-at::::::::
-games::::::::
-apache::::::::
-fcron::::::::
-saned::::::::
-messagebus::::::::
-polkitd::::::::
-rtkit::::::::
-sddm::::::::
-clamav::::::::
-uptimed::::::::
-ntp::::::::
-postfix::::::::
-live::::::::
diff --git a/shadow-x86_64 b/shadow-x86_64
deleted file mode 100644
index 0a67e43..0000000
--- a/shadow-x86_64
+++ /dev/null
@@ -1,25 +0,0 @@
-root::::::::
-mail::::::::
-man::::::::
-postmaster::::::::
-cron::::::::
-sshd::::::::
-at::::::::
-games::::::::
-apache::::::::
-fcron::::::::
-saned::::::::
-messagebus::::::::
-polkitd::::::::
-rtkit::::::::
-lp::::::::
-sddm::::::::
-clamav::::::::
-dnscache::::::::
-dnslog::::::::
-tinydns::::::::
-unbound::::::::
-uptimed::::::::
-ntp::::::::
-postfix::::::::
-live::::::::