From 1899ca6af7902db36a24deca310678b36156c6b1 Mon Sep 17 00:00:00 2001 From: John Vogel Date: Sun, 15 May 2016 00:44:57 -0400 Subject: [PATCH] Add filesystem port securetty: add ttyAMA0 (pi2 debug serial port) --- filesystem/.footprint | 64 +++++++++++++++++++++++++++++++++ filesystem/.md5sum | 9 +++++ filesystem/Pkgfile | 78 ++++++++++++++++++++++++++++++++++++++++ filesystem/fstab | 21 +++++++++++ filesystem/group | 26 ++++++++++++++ filesystem/issue | 3 ++ filesystem/mime.types | 84 +++++++++++++++++++++++++++++++++++++++++++ filesystem/motd | 0 filesystem/passwd | 8 +++++ filesystem/securetty | 15 ++++++++ filesystem/shadow | 8 +++++ filesystem/shells | 9 +++++ 12 files changed, 325 insertions(+) create mode 100644 filesystem/.footprint create mode 100644 filesystem/.md5sum create mode 100644 filesystem/Pkgfile create mode 100644 filesystem/fstab create mode 100644 filesystem/group create mode 100644 filesystem/issue create mode 100644 filesystem/mime.types create mode 100644 filesystem/motd create mode 100644 filesystem/passwd create mode 100644 filesystem/securetty create mode 100644 filesystem/shadow create mode 100644 filesystem/shells diff --git a/filesystem/.footprint b/filesystem/.footprint new file mode 100644 index 0000000..e336860 --- /dev/null +++ b/filesystem/.footprint @@ -0,0 +1,64 @@ +drwxr-xr-x root/root bin/ +drwxr-xr-x root/root boot/ +drwxr-xr-x root/root dev/ +crw------- root/root dev/console (5, 1) +drwxr-xr-x root/root dev/pts/ +drwxr-xr-x root/root dev/shm/ +drwxr-xr-x root/root etc/ +-rw-r--r-- root/root etc/fstab +-rw-r--r-- root/root etc/group +-rw-r--r-- root/root etc/issue +-rw-r--r-- root/root etc/mime.types +-rw-r--r-- root/root etc/motd (EMPTY) +lrwxrwxrwx root/root etc/mtab -> /proc/self/mounts +-rw-r--r-- root/root etc/passwd +-rw-r--r-- root/root etc/securetty +-rw-r----- root/root etc/shadow +-rw-r--r-- root/root etc/shells +drwxr-xr-x root/root home/ +drwxr-xr-x root/root lib/ +drwxr-xr-x root/root lib/modules/ +drwxr-xr-x root/root mnt/ +drwxr-xr-x root/root opt/ +drwxr-xr-x root/root opt/bin/ +drwxr-xr-x root/root opt/sbin/ +drwxr-xr-x root/root proc/ +drwxr-x--- root/root root/ +drwxr-xr-x root/root run/ +drwxr-xr-x root/root sbin/ +drwxr-xr-x root/root sys/ +drwxrwxrwt root/root tmp/ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/crux +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/lib/ +drwxr-xr-x root/root usr/sbin/ +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +drwxr-xr-x root/root usr/share/man/man2/ +drwxr-xr-x root/root usr/share/man/man3/ +drwxr-xr-x root/root usr/share/man/man4/ +drwxr-xr-x root/root usr/share/man/man5/ +drwxr-xr-x root/root usr/share/man/man6/ +drwxr-xr-x root/root usr/share/man/man7/ +drwxr-xr-x root/root usr/share/man/man8/ +drwxr-xr-x root/root usr/src/ +lrwxrwxrwx root/root usr/var -> ../var +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/cache/ +drwxr-xr-x root/root var/empty/ +drwxr-xr-x root/root var/ftp/ +drwxr-xr-x root/root var/lib/ +drwxr-xr-x root/root var/lib/pkg/ +drwxrwxrwt root/root var/lock/ +drwxr-xr-x root/root var/log/ +drwxr-xr-x root/root var/log/old/ +lrwxrwxrwx root/root var/mail -> spool/mail +drwxr-xr-x root/root var/run/ +-rw-r--r-- root/root var/run/utmp (EMPTY) +drwxr-xr-x root/root var/spool/ +drwxrwxrwt root/root var/spool/mail/ +drwxrwxrwt root/root var/tmp/ +drwxr-xr-x root/root var/www/ diff --git a/filesystem/.md5sum b/filesystem/.md5sum new file mode 100644 index 0000000..0874bb6 --- /dev/null +++ b/filesystem/.md5sum @@ -0,0 +1,9 @@ +e9399bfd7a5e1ea4cfbe7871e282a0fc fstab +7e668cdf21a22956f1bb8ef119c0da07 group +ca2a8cf1bf672f64af8807259b9abf63 issue +346ede8d637940e2898cd29c56a37d30 mime.types +d41d8cd98f00b204e9800998ecf8427e motd +5f548195598fc07c16cf826256d4a471 passwd +4faaa4e1ba24038f8638a0cae5046cfb securetty +cf485c9730cb02e69176eb6aa6b75303 shadow +dc4ff0c96d8dcd2141febc8b766e9a6b shells diff --git a/filesystem/Pkgfile b/filesystem/Pkgfile new file mode 100644 index 0000000..5473fc9 --- /dev/null +++ b/filesystem/Pkgfile @@ -0,0 +1,78 @@ +# Description: Root filesystem package +# URL: http://crux.nu +# Maintainer: CRUX System Team, core-ports at crux dot nu +# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu + +name=filesystem +version=3.2 +release=4 +source=(issue motd shells group passwd shadow securetty fstab mime.types) + +build() { + # Directory structure + install -d $PKG/bin + install -d $PKG/sbin + install -d $PKG/boot + install -d $PKG/dev + install -d $PKG/dev/{pts,shm} + install -d $PKG/proc + install -d $PKG/sys + install -d $PKG/etc + install -d $PKG/mnt + install -d $PKG/run + install -d $PKG/lib + install -d $PKG/lib/modules + install -d $PKG/opt + install -d $PKG/opt/bin + install -d $PKG/opt/sbin + install -d $PKG/usr + install -d $PKG/usr/{bin,include,lib,sbin,share,src} + install -d -p $PKG/usr/share/man/man{1,2,3,4,5,6,7,8} + ln -s ../var $PKG/usr/var + install -d $PKG/var + install -d $PKG/var/cache + install -d $PKG/var/lib + install -d $PKG/var/lib/pkg + install -d $PKG/var/log + install -d $PKG/var/log/old + install -d $PKG/var/run + touch $PKG/var/run/utmp + install -d $PKG/var/spool + install -d $PKG/var/ftp + install -d $PKG/var/www + install -d $PKG/var/empty + ln -s spool/mail $PKG/var/mail + install -d $PKG/home + + install -d -m 1777 $PKG/tmp + install -d -m 0750 $PKG/root + install -d -m 1777 $PKG/var/lock + install -d -m 1777 $PKG/var/spool/mail + install -d -m 1777 $PKG/var/tmp + + # /dev + mknod $PKG/dev/console c 5 1 + chmod 0600 $PKG/dev/console + + # /etc + install -m 0644 issue $PKG/etc + install -m 0644 motd $PKG/etc + install -m 0644 shells $PKG/etc + install -m 0644 group $PKG/etc + install -m 0644 passwd $PKG/etc + install -m 0640 shadow $PKG/etc + install -m 0644 securetty $PKG/etc + install -m 0644 fstab $PKG/etc + install -m 0644 mime.types $PKG/etc + ln -s /proc/self/mounts $PKG/etc/mtab + + # /usr/bin/crux + cat > $PKG/usr/bin/crux << EOF +#!/bin/sh + +echo "CRUX-ARM version $version" + +# End of file +EOF + chmod 755 $PKG/usr/bin/crux +} diff --git a/filesystem/fstab b/filesystem/fstab new file mode 100644 index 0000000..1f70f5b --- /dev/null +++ b/filesystem/fstab @@ -0,0 +1,21 @@ +# +# /etc/fstab: static file system information +# +# + +#/dev/#EXT4FS_ROOT# / ext4 defaults 0 0 +#/dev/#BTRFS_ROOT# / btrfs defaults 0 0 +#/dev/#XFS_ROOT# / xfs defaults 0 0 +#/dev/#SWAP# swap swap defaults 0 0 +#/dev/#EXT4FS_HOME# /home ext4 defaults 0 2 +#/dev/#BTRFS_HOME# /home btrfs defaults 0 0 +#/dev/#XFS_HOME# /home xfs defaults 0 0 +#/dev/cdrom /cdrom iso9660 ro,user,noauto,unhide 0 0 +#/dev/dvd /dvd udf ro,user,noauto,unhide 0 0 +#/dev/floppy/0 /floppy vfat user,noauto,unhide 0 0 +devpts /dev/pts devpts noexec,nosuid,gid=tty,mode=0620 0 0 +#tmp /tmp tmpfs defaults 0 0 +#shm /dev/shm tmpfs defaults 0 0 +#usb /proc/bus/usb usbfs defaults 0 0 + +# End of file diff --git a/filesystem/group b/filesystem/group new file mode 100644 index 0000000..a0a42c3 --- /dev/null +++ b/filesystem/group @@ -0,0 +1,26 @@ +root::0:root +bin::1:root,bin,daemon +daemon::2:root,bin,daemon +sys::3:root,bin +adm::4:root,daemon +tty::5: +disk::6:root +lp::7:daemon +mem::8: +kmem::9: +wheel::10:root +ftp::11: +mail::12: +mlocate::13: +dialout::14: +www::15: +audio::16: +video::17: +floppy::18: +tape::19: +scanner::20: +cdrom::21: +input::22: +nobody::99: +messagebus::81: +users::100: diff --git a/filesystem/issue b/filesystem/issue new file mode 100644 index 0000000..d9dafa1 --- /dev/null +++ b/filesystem/issue @@ -0,0 +1,3 @@ + +CRUX-ARM (\n) (\l) + diff --git a/filesystem/mime.types b/filesystem/mime.types new file mode 100644 index 0000000..6b97c3f --- /dev/null +++ b/filesystem/mime.types @@ -0,0 +1,84 @@ +# +# /etc/mime.types: mime types +# + +application/andrew-inset ez +application/excel xls +application/octet-stream bin +application/oda oda +application/pdf pdf +application/pgp pgp +application/postscript ps PS eps +application/rtf rtf +application/x-arj-compressed arj +application/x-bcpio bcpio +application/x-chess-pgn pgn +application/x-cpio cpio +application/x-csh csh +application/x-debian-package deb +application/x-msdos-program com exe bat +application/x-dvi dvi +application/x-gtar gtar +application/x-gunzip gz +application/x-hdf hdf +application/x-latex latex +application/x-mif mif +application/x-netcdf cdf nc +application/x-perl pl pm +application/x-rar-compressed rar +application/x-sh sh +application/x-shar shar +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tar-gz tgz tar.gz +application/x-tcl tcl +application/x-tex tex +application/x-texinfo texi texinfo +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/x-zip-compressed zip + +audio/basic snd +audio/midi mid midi +audio/ulaw au +audio/x-aiff aif aifc aiff +audio/x-wav wav + +image/gif gif +image/ief ief +image/jpeg jpe jpeg jpg +image/png png +image/tiff tif tiff +image/x-cmu-raster ras +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd + +text/html html htm +text/plain asc txt +text/css css +text/richtext rtx +text/tab-separated-values tsv +text/x-setext etx + +video/dl dl +video/fli fli +video/gl gl +video/mpeg mp2 mpe mpeg mpg +video/quicktime mov qt +video/x-msvideo avi +video/x-sgi-movie movie + +x-world/x-vrml vrm vrml wrl + +# End of file diff --git a/filesystem/motd b/filesystem/motd new file mode 100644 index 0000000..e69de29 diff --git a/filesystem/passwd b/filesystem/passwd new file mode 100644 index 0000000..03ff493 --- /dev/null +++ b/filesystem/passwd @@ -0,0 +1,8 @@ +root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/bin: +daemon:x:2:2:daemon:/sbin: +mail:x:8:12:mail:/var/spool/mail: +ftp:x:14:11:ftp:/var/ftp: +www:x:15:15:www:/var/www:/bin/false +messagebus:x:81:81::/var/empty:/bin/false +nobody:x:99:99:nobody:/: diff --git a/filesystem/securetty b/filesystem/securetty new file mode 100644 index 0000000..4442e8f --- /dev/null +++ b/filesystem/securetty @@ -0,0 +1,15 @@ +# +# /etc/securetty: defines which devices root can log in on +# + +console +ttyAMA0 +ttyS0 +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 + +# End of file diff --git a/filesystem/shadow b/filesystem/shadow new file mode 100644 index 0000000..446e122 --- /dev/null +++ b/filesystem/shadow @@ -0,0 +1,8 @@ +root::0:::::: +bin:x:0:::::: +daemon:x:0:::::: +mail:x:0:::::: +ftp:x:0:::::: +www:x:0:::::: +messagebus:x:0:::::: +nobody:x:0:::::: diff --git a/filesystem/shells b/filesystem/shells new file mode 100644 index 0000000..5ad41c0 --- /dev/null +++ b/filesystem/shells @@ -0,0 +1,9 @@ +# +# /etc/shells: defines valid login shells +# + +/bin/sh +/bin/bash +/bin/dash + +# End of file -- 2.26.2