summaryrefslogtreecommitdiff
path: root/libre-testing/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'libre-testing/filesystem')
-rw-r--r--libre-testing/filesystem/PKGBUILD126
-rw-r--r--libre-testing/filesystem/crypttab12
-rwxr-xr-xlibre-testing/filesystem/env-generator3
-rw-r--r--libre-testing/filesystem/fstab4
-rw-r--r--libre-testing/filesystem/group1
-rw-r--r--libre-testing/filesystem/gshadow1
-rw-r--r--libre-testing/filesystem/host.conf4
-rw-r--r--libre-testing/filesystem/hosts2
-rw-r--r--libre-testing/filesystem/issue2
-rw-r--r--libre-testing/filesystem/ld.so.conf4
-rw-r--r--libre-testing/filesystem/locale.sh22
-rw-r--r--libre-testing/filesystem/motd0
-rw-r--r--libre-testing/filesystem/nsswitch.conf18
-rw-r--r--libre-testing/filesystem/os-release8
-rw-r--r--libre-testing/filesystem/passwd1
-rw-r--r--libre-testing/filesystem/profile40
-rw-r--r--libre-testing/filesystem/resolv.conf2
-rw-r--r--libre-testing/filesystem/securetty12
-rw-r--r--libre-testing/filesystem/shadow1
-rw-r--r--libre-testing/filesystem/shells5
-rw-r--r--libre-testing/filesystem/sysctl3
-rw-r--r--libre-testing/filesystem/sysusers28
-rw-r--r--libre-testing/filesystem/tmpfiles17
23 files changed, 316 insertions, 0 deletions
diff --git a/libre-testing/filesystem/PKGBUILD b/libre-testing/filesystem/PKGBUILD
new file mode 100644
index 000000000..769e6acf5
--- /dev/null
+++ b/libre-testing/filesystem/PKGBUILD
@@ -0,0 +1,126 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Tom Gundersen <teg@jklm.no>
+
+pkgname=filesystem
+pkgver=2018.8
+pkgrel=1
+pkgdesc='Base Arch Linux files'
+arch=(x86_64 ppc64le)
+license=('GPL')
+url='https://www.archlinux.org'
+groups=('base')
+depends=('iana-etc')
+backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
+ 'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/motd' 'etc/nsswitch.conf'
+ 'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
+ 'etc/shadow' 'etc/shells')
+source=('crypttab' 'env-generator' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
+ 'issue' 'ld.so.conf' 'locale.sh' 'motd' 'nsswitch.conf' 'os-release'
+ 'passwd' 'profile' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl'
+ 'sysusers' 'tmpfiles')
+md5sums=('5fa6674df7645d7f5895f2d12b4ef4e9'
+ '2b0344e9639f35f3c0d5637a23556089'
+ 'e33f6dfdd61978fcb3ddf1431286e05a'
+ '7fed1e1fb855e41a6d64d41f8521d69a'
+ '1c1e3b08acfa286f4b417c49de3e4366'
+ '7d119a9cce152aa182fb3392ddeecea7'
+ 'a1315ea3e2b64d197b6efaf9c14ff778'
+ '7813c481156f6b280a3ba91fc6236368'
+ '5deb9f890a4d08a245e9752ede77271e'
+ '580cf8b59eebfaac4fad373ffadc9912'
+ 'd41d8cd98f00b204e9800998ecf8427e'
+ '981ee4d7e506a9d6d9ed2d872e16004b'
+ '0a0fbb8e64faabb40023bd180d7190a1'
+ '5182ac38a0de85da8ade93ef71975ca4'
+ '2c79e1762978235e7b4a9ef595f6c029'
+ '0ee015fad07732676d9488ae498eed41'
+ 'f04bcb2803afc4dcb95670fe87343b4d'
+ 'f64466dd77c7bec37a8b47681468211a'
+ 'a78cd8d7f8240a8448edee82f503c34e'
+ 'a51847c012555c843dbdf8df0da171d3'
+ 'af7832eabaac9804c22f1f2b53816a49'
+ '0267a3a463f35eec8a31f40a720dfd86')
+
+package() {
+ cd "$pkgdir"
+
+ # setup root filesystem
+ for d in boot dev etc home mnt usr var opt srv/http run; do
+ install -d -m755 $d
+ done
+ install -d -m555 proc
+ install -d -m555 sys
+ install -d -m0750 root
+ install -d -m1777 tmp
+ # vsftpd won't run with write perms on /srv/ftp
+ # ftp (uid 14/gid 11)
+ install -d -m555 -g 11 srv/ftp
+
+ # setup /etc and /usr/share/factory/etc
+ install -d etc/{ld.so.conf.d,skel,profile.d} usr/share/factory/etc
+ for f in fstab group host.conf hosts issue ld.so.conf motd nsswitch.conf \
+ passwd resolv.conf securetty shells profile; do
+ install -m644 "$srcdir"/$f etc/
+ install -m644 "$srcdir"/$f usr/share/factory/etc/
+ done
+ ln -s ../proc/self/mounts etc/mtab
+ for f in gshadow shadow crypttab; do
+ install -m600 "$srcdir"/$f etc/
+ install -m600 "$srcdir"/$f usr/share/factory/etc/
+ done
+ touch etc/arch-release
+ install -m755 "$srcdir"/locale.sh etc/profile.d/locale.sh
+ install -Dm644 "$srcdir"/os-release usr/lib/os-release
+
+ # setup /var
+ for d in cache local opt log/old lib/misc empty; do
+ install -d -m755 var/$d
+ done
+ install -d -m1777 var/{tmp,spool/mail}
+
+ # allow setgid games (gid 50) to write scores
+ install -d -m775 -g 50 var/games
+ ln -s spool/mail var/mail
+ ln -s ../run var/run
+ ln -s ../run/lock var/lock
+
+ # setup /usr hierarchy
+ for d in bin include lib share/misc src; do
+ install -d -m755 usr/$d
+ done
+ for d in {1..8}; do
+ install -d -m755 usr/share/man/man$d
+ done
+
+ # add lib symlinks
+ ln -s usr/lib lib
+ [[ $CARCH = 'x86_64' ]] && {
+ ln -s usr/lib lib64
+ ln -s lib usr/lib64
+ }
+
+ # add bin symlinks
+ ln -s usr/bin bin
+ ln -s usr/bin sbin
+ ln -s bin usr/sbin
+
+ # setup /usr/local hierarchy
+ for d in bin etc games include lib man sbin share src; do
+ install -d -m755 usr/local/$d
+ done
+ ln -s ../man usr/local/share/man
+
+ # setup systemd-sysctl
+ install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf
+
+ # setup systemd-sysusers
+ install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/arch.conf
+
+ # setup systemd-tmpfiles
+ install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf
+
+ # setup systemd.environment-generator
+ install -D -m755 "$srcdir"/env-generator usr/lib/systemd/system-environment-generators/10-arch
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre-testing/filesystem/crypttab b/libre-testing/filesystem/crypttab
new file mode 100644
index 000000000..3dbc8a46c
--- /dev/null
+++ b/libre-testing/filesystem/crypttab
@@ -0,0 +1,12 @@
+# Configuration for encrypted block devices.
+# See crypttab(5) for details.
+
+# NOTE: Do not list your root (/) partition here, it must be set up
+# beforehand by the initramfs (/etc/mkinitcpio.conf).
+
+# <name> <device> <password> <options>
+# home UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37 /etc/mypassword1
+# data1 /dev/sda3 /etc/mypassword2
+# data2 /dev/sda5 /etc/cryptfs.key
+# swap /dev/sdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
+# vol /dev/sdb7 none
diff --git a/libre-testing/filesystem/env-generator b/libre-testing/filesystem/env-generator
new file mode 100755
index 000000000..5f6391407
--- /dev/null
+++ b/libre-testing/filesystem/env-generator
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo 'PATH=/usr/local/sbin:/usr/local/bin:/usr/bin'
diff --git a/libre-testing/filesystem/fstab b/libre-testing/filesystem/fstab
new file mode 100644
index 000000000..903906d27
--- /dev/null
+++ b/libre-testing/filesystem/fstab
@@ -0,0 +1,4 @@
+# Static information about the filesystems.
+# See fstab(5) for details.
+
+# <file system> <dir> <type> <options> <dump> <pass>
diff --git a/libre-testing/filesystem/group b/libre-testing/filesystem/group
new file mode 100644
index 000000000..18acc30a0
--- /dev/null
+++ b/libre-testing/filesystem/group
@@ -0,0 +1 @@
+root:x:0:root
diff --git a/libre-testing/filesystem/gshadow b/libre-testing/filesystem/gshadow
new file mode 100644
index 000000000..3d5d11168
--- /dev/null
+++ b/libre-testing/filesystem/gshadow
@@ -0,0 +1 @@
+root:::root
diff --git a/libre-testing/filesystem/host.conf b/libre-testing/filesystem/host.conf
new file mode 100644
index 000000000..f6df15f6b
--- /dev/null
+++ b/libre-testing/filesystem/host.conf
@@ -0,0 +1,4 @@
+# Resolver configuration file.
+# See host.conf(5) for details.
+
+multi on
diff --git a/libre-testing/filesystem/hosts b/libre-testing/filesystem/hosts
new file mode 100644
index 000000000..37a930617
--- /dev/null
+++ b/libre-testing/filesystem/hosts
@@ -0,0 +1,2 @@
+# Static table lookup for hostnames.
+# See hosts(5) for details.
diff --git a/libre-testing/filesystem/issue b/libre-testing/filesystem/issue
new file mode 100644
index 000000000..dd702dcfb
--- /dev/null
+++ b/libre-testing/filesystem/issue
@@ -0,0 +1,2 @@
+Arch Linux \r (\l)
+
diff --git a/libre-testing/filesystem/ld.so.conf b/libre-testing/filesystem/ld.so.conf
new file mode 100644
index 000000000..1f620fa67
--- /dev/null
+++ b/libre-testing/filesystem/ld.so.conf
@@ -0,0 +1,4 @@
+# Dynamic linker/loader configuration.
+# See ld.so(8) and ldconfig(8) for details.
+
+include /etc/ld.so.conf.d/*.conf
diff --git a/libre-testing/filesystem/locale.sh b/libre-testing/filesystem/locale.sh
new file mode 100644
index 000000000..48dd748da
--- /dev/null
+++ b/libre-testing/filesystem/locale.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# load locale.conf in XDG paths.
+# /etc/locale.conf loads and overrides by kernel command line is done by systemd
+# But we override it here, see FS#56688
+if [ -z "$LANG" ]; then
+ if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
+ . "$XDG_CONFIG_HOME/locale.conf"
+ elif [ -n "$HOME" ] && [ -r "$HOME/.config/locale.conf" ]; then
+ . "$HOME/.config/locale.conf"
+ elif [ -r /etc/locale.conf ]; then
+ . /etc/locale.conf
+ fi
+fi
+
+# define default LANG to C if not already defined
+LANG=${LANG:-C}
+
+# export all locale (7) variables when they exist
+export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
+ LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
+ LC_IDENTIFICATION
diff --git a/libre-testing/filesystem/motd b/libre-testing/filesystem/motd
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/libre-testing/filesystem/motd
diff --git a/libre-testing/filesystem/nsswitch.conf b/libre-testing/filesystem/nsswitch.conf
new file mode 100644
index 000000000..4a7d9c7e2
--- /dev/null
+++ b/libre-testing/filesystem/nsswitch.conf
@@ -0,0 +1,18 @@
+# Name Service Switch configuration file.
+# See nsswitch.conf(5) for details.
+
+passwd: files mymachines systemd
+group: files mymachines systemd
+shadow: files
+
+publickey: files
+
+hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns
+networks: files
+
+protocols: files
+services: files
+ethers: files
+rpc: files
+
+netgroup: files
diff --git a/libre-testing/filesystem/os-release b/libre-testing/filesystem/os-release
new file mode 100644
index 000000000..d28fdf2c3
--- /dev/null
+++ b/libre-testing/filesystem/os-release
@@ -0,0 +1,8 @@
+NAME="Arch Linux"
+PRETTY_NAME="Arch Linux"
+ID=arch
+ID_LIKE=archlinux
+ANSI_COLOR="0;36"
+HOME_URL="https://www.archlinux.org/"
+SUPPORT_URL="https://bbs.archlinux.org/"
+BUG_REPORT_URL="https://bugs.archlinux.org/"
diff --git a/libre-testing/filesystem/passwd b/libre-testing/filesystem/passwd
new file mode 100644
index 000000000..909d89bca
--- /dev/null
+++ b/libre-testing/filesystem/passwd
@@ -0,0 +1 @@
+root:x:0:0::/root:/bin/bash
diff --git a/libre-testing/filesystem/profile b/libre-testing/filesystem/profile
new file mode 100644
index 000000000..a4f717734
--- /dev/null
+++ b/libre-testing/filesystem/profile
@@ -0,0 +1,40 @@
+# /etc/profile
+
+# Set our umask
+umask 022
+
+# Append our default paths
+appendpath () {
+ case ":$PATH:" in
+ *:"$1":*)
+ ;;
+ *)
+ PATH="${PATH:+$PATH:}$1"
+ esac
+}
+
+appendpath '/usr/local/sbin'
+appendpath '/usr/local/bin'
+appendpath '/usr/bin'
+unset appendpath
+
+export PATH
+
+# Load profiles from /etc/profile.d
+if test -d /etc/profile.d/; then
+ for profile in /etc/profile.d/*.sh; do
+ test -r "$profile" && . "$profile"
+ done
+ unset profile
+fi
+
+# Source global bash config
+if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
+ . /etc/bash.bashrc
+fi
+
+# Termcap is outdated, old, and crusty, kill it.
+unset TERMCAP
+
+# Man is much better than us at figuring this out
+unset MANPATH
diff --git a/libre-testing/filesystem/resolv.conf b/libre-testing/filesystem/resolv.conf
new file mode 100644
index 000000000..7a7d4293c
--- /dev/null
+++ b/libre-testing/filesystem/resolv.conf
@@ -0,0 +1,2 @@
+# Resolver configuration file.
+# See resolv.conf(5) for details.
diff --git a/libre-testing/filesystem/securetty b/libre-testing/filesystem/securetty
new file mode 100644
index 000000000..67fb10cff
--- /dev/null
+++ b/libre-testing/filesystem/securetty
@@ -0,0 +1,12 @@
+# File which lists terminals from which root can log in.
+# See securetty(5) for details.
+
+console
+tty1
+tty2
+tty3
+tty4
+tty5
+tty6
+ttyS0
+hvc0
diff --git a/libre-testing/filesystem/shadow b/libre-testing/filesystem/shadow
new file mode 100644
index 000000000..7edfd69be
--- /dev/null
+++ b/libre-testing/filesystem/shadow
@@ -0,0 +1 @@
+root::14871::::::
diff --git a/libre-testing/filesystem/shells b/libre-testing/filesystem/shells
new file mode 100644
index 000000000..19324ea83
--- /dev/null
+++ b/libre-testing/filesystem/shells
@@ -0,0 +1,5 @@
+# Pathnames of valid login shells.
+# See shells(5) for details.
+
+/bin/sh
+/bin/bash
diff --git a/libre-testing/filesystem/sysctl b/libre-testing/filesystem/sysctl
new file mode 100644
index 000000000..b585ea2cc
--- /dev/null
+++ b/libre-testing/filesystem/sysctl
@@ -0,0 +1,3 @@
+# Raise inotify resource limits
+fs.inotify.max_user_instances = 1024
+fs.inotify.max_user_watches = 524288
diff --git a/libre-testing/filesystem/sysusers b/libre-testing/filesystem/sysusers
new file mode 100644
index 000000000..000917158
--- /dev/null
+++ b/libre-testing/filesystem/sysusers
@@ -0,0 +1,28 @@
+# default arch groups
+# groups first, because we have user/group id mismatch on ftp and mail
+g sys 3 - -
+g mem 8 - -
+g ftp 11 - -
+g mail 12 - -
+g log 19 - -
+g smmsp 25 - -
+g proc 26 - -
+g games 50 - -
+g lock 54 - -
+g network 90 - -
+g floppy 94 - -
+g scanner 96 - -
+g power 98 - -
+
+# default arch users
+u bin 1 - -
+u daemon 2 - -
+u mail 8 - /var/spool/mail
+u ftp 14 - /srv/ftp
+u http 33 - /srv/http
+
+# default membership
+m bin daemon
+m bin sys
+m daemon adm
+m daemon bin
diff --git a/libre-testing/filesystem/tmpfiles b/libre-testing/filesystem/tmpfiles
new file mode 100644
index 000000000..8fc77b57f
--- /dev/null
+++ b/libre-testing/filesystem/tmpfiles
@@ -0,0 +1,17 @@
+# copy from factory when missing
+
+C /etc/crypttab
+C /etc/fstab
+C /etc/group
+C /etc/gshadow
+C /etc/host.conf
+C /etc/hosts
+C /etc/issue
+C /etc/ld.so.conf
+C /etc/motd
+C /etc/nsswitch.conf
+C /etc/passwd
+C /etc/profile
+C /etc/securetty
+C /etc/shadow
+C /etc/shells