From a5ec230dca60c6fc4bc2bc4c9c846e195f2d8961 Mon Sep 17 00:00:00 2001 From: Mike Staszel Date: Sat, 27 Feb 2010 10:03:24 -0600 Subject: [PATCH] Added filesystem --- core/filesystem/PKGBUILD | 80 ++++++++++++++++++----------------- core/filesystem/fstab | 3 +- core/filesystem/group | 47 ++++++++++---------- core/filesystem/issue | 2 +- core/filesystem/ld.so.conf | 2 + core/filesystem/nsswitch.conf | 10 ++--- core/filesystem/profile | 3 +- core/filesystem/resolv.conf | 4 +- core/filesystem/securetty | 13 +++--- 9 files changed, 84 insertions(+), 80 deletions(-) diff --git a/core/filesystem/PKGBUILD b/core/filesystem/PKGBUILD index 5cec1858b..83cf39542 100644 --- a/core/filesystem/PKGBUILD +++ b/core/filesystem/PKGBUILD @@ -1,64 +1,53 @@ # Maintainer: Mike Staszel pkgname=filesystem -pkgver=2009.12 -pkgrel=1 +pkgver=2010.02 +pkgrel=2 pkgdesc="Base filesystem" arch=('arm') license=('GPL') -url="http://www.archlinux.org" +url="http://plugboxlinux.org" groups=('base') install=filesystem.install depends=('coreutils') backup=(etc/fstab etc/crypttab etc/group etc/hosts etc/ld.so.conf etc/passwd etc/shadow etc/gshadow etc/resolv.conf etc/motd etc/nsswitch.conf etc/shells etc/host.conf etc/securetty etc/profile etc/issue) -source=(group - issue - nsswitch.conf - securetty - host.conf - ld.so.conf - passwd - shadow - fstab - crypttab - hosts - motd - resolv.conf - shells - gshadow - services - protocols - profile - modprobe.d.usb-load-ehci-first) -md5sums=('f4cf8d0a2de2658165148d5f64d81675' - '1bdc5dba66947d74866a5df8ce9ef3b1' - '775464ba7588b4976e0c2a02b83123f4' - '57f4a419d2add37355518373b4d88e1f' +source=(group issue nsswitch.conf securetty host.conf ld.so.conf + passwd shadow fstab crypttab hosts motd resolv.conf shells + gshadow services protocols profile modprobe.d.usb-load-ehci-first) +md5sums=('75c7e1770305e1f3b75c52785c137611' + '336bdaeeff0ccc84a6b84f1d8c4e2127' + '13753e4e0964f3652b0cc60a28528bdf' + '2f890aefb8eee68b5b9d91f4777d0cd9' 'f28150d4c0b22a017be51b9f7f9977ed' - '2c24792d97ef3cf0d73b60d4c429730b' + '6e488ffecc8ba142c0cf7e2d7aeb832e' '8a9042a2cedf6b6b47eb8973f14289cb' '46bc1c4b941f19c1505102bb5bbddb8c' - '9af6f8ff49738b15de40e7aee8ee6fed' + 'b8e469965028271eeb533d723b028cf0' 'e5d8323a4dbee7a6d0d2a19cbf4b819f' '81b3cb42a6ddabc2ed2310511ee9c859' 'd41d8cd98f00b204e9800998ecf8427e' - '934962f05e8d50af883901ea076f4660' + '6f48288b6fcaf0065fcb7b0e525413e0' '40dac0de4c6b99c8ca97effbd7527c84' 'ab9c2a40eba287b2918589ab8e0b2fbf' 'f436d2e0ed02b7b73bd10c6693e95ac3' '65d78e621ed69eed69f854c3ee2e5942' - '288a2e8d63c5ea2c2d852c7147e59d28' + 'f7ba22b78c5d2b53f86227aa2447e7ea' '8098ffd9fbf890468d3198277596b85a') build() { - cd $startdir/pkg + cd $pkgdir mkdir -p bin boot dev etc home lib mnt proc root sbin tmp usr var opt srv sys chmod 555 proc - mkdir -p media/{fl,cd,dvd} - mkdir -p usr/{bin,include,lib,sbin,share/misc,src,man} + mkdir -p media/{usb0,usb1,mmc0} + mkdir -p usr/{bin,include,lib,sbin,share/misc,src} + + mkdir -p usr/share/man/man{1,2,3,4,5,6,7,8} + ln -s man3 $pkgdir/usr/share/man/man3x + + # fhs compliance mkdir -p usr/local/{bin,games,include,lib,man,sbin,share,src} ln -s ../man $startdir/pkg/usr/local/share/man mkdir -p var/{cache/man,local,lock,opt,run,spool/mail,tmp,games} @@ -66,8 +55,10 @@ build() mkdir -p var/log/old mkdir -p etc/{skel,profile.d} mkdir -p lib/modules - (cd $startdir/pkg/usr; ln -s ../var var) + mkdir -p var/lib/misc (cd $startdir/pkg/var; ln -s spool/mail mail) + + # vsftpd won't run with write perms on /srv/ftp mkdir -p srv/ftp chown root.ftp srv/ftp chmod 555 srv/ftp @@ -76,16 +67,27 @@ build() chmod 1777 var/spool/mail tmp var/tmp chmod 0750 root + + # Allow setgid games to write scores: chmod 775 ${startdir}/pkg/var/games chown root:50 ${startdir}/pkg/var/games - cd $startdir/src + cd $srcdir cp fstab crypttab group host.conf hosts issue ld.so.conf motd nsswitch.conf \ passwd protocols resolv.conf securetty services shadow shells profile \ - $startdir/pkg/etc/ - install -m 600 $startdir/src/gshadow $startdir/pkg/etc/gshadow + $pkgdir/etc/ + install -m 600 $startdir/src/gshadow $pkgdir/etc/gshadow chmod 600 $startdir/pkg/etc/shadow chmod 600 $startdir/pkg/etc/crypttab - touch $startdir/pkg/etc/arch-release - install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first ${pkgdir}/etc/modprobe.d/usb-load-ehci-first + + # re-add /etc/arch-release, some software uses it + # to check whether arch is running + touch $pkgdir/etc/arch-release + + # Add /etc/modprobe.d/ + install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first \ + ${pkgdir}/etc/modprobe.d/usb-load-ehci-first.conf + + # Add ld.so.conf.d + mkdir -p $pkgdir/etc/ld.so.conf.d } diff --git a/core/filesystem/fstab b/core/filesystem/fstab index 13761f530..4d00c9235 100644 --- a/core/filesystem/fstab +++ b/core/filesystem/fstab @@ -3,5 +3,4 @@ # # none /dev/pts devpts defaults 0 0 -none /dev/shm tmpfs defaults 0 0 - +none /dev/shm tmpfs nodev,nosuid 0 0 diff --git a/core/filesystem/group b/core/filesystem/group index a34b83fce..4bd635c47 100644 --- a/core/filesystem/group +++ b/core/filesystem/group @@ -1,29 +1,30 @@ -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: -uucp::14: -log::19:root -locate::21: -smmsp::25: -http::33: -games::50: +root:x:0:root +bin:x:1:root,bin,daemon +daemon:x:2:root,bin,daemon +sys:x:3:root,bin +adm:x:4:root,daemon +tty:x:5: +disk:x:6:root +lp:x:7:daemon +mem:x:8: +kmem:x:9: +wheel:x:10:root +ftp:x:11: +mail:x:12: +uucp:x:14: +log:x:19:root +locate:x:21: +rfkill:x:24: +smmsp:x:25: +http:x:33: +games:x:50: network:x:90: video:x:91: -audio::92: -optical::93: +audio:x:92: +optical:x:93: floppy:x:94: storage:x:95: scanner:x:96: power:x:98: -nobody::99: -users::100: +nobody:x:99: +users:x:100: diff --git a/core/filesystem/issue b/core/filesystem/issue index 3db753d78..51f014e4f 100644 --- a/core/filesystem/issue +++ b/core/filesystem/issue @@ -1,3 +1,3 @@  -Arch Linux \r (\n) (\l) +Plugbox Linux \r (\n) (\l) diff --git a/core/filesystem/ld.so.conf b/core/filesystem/ld.so.conf index 2227e1e9a..dfac45683 100644 --- a/core/filesystem/ld.so.conf +++ b/core/filesystem/ld.so.conf @@ -2,4 +2,6 @@ # /etc/ld.so.conf # +include /etc/ld.so.conf.d/*.conf + # End of file diff --git a/core/filesystem/nsswitch.conf b/core/filesystem/nsswitch.conf index 7d8669154..6e459adb6 100644 --- a/core/filesystem/nsswitch.conf +++ b/core/filesystem/nsswitch.conf @@ -9,11 +9,11 @@ publickey: files hosts: files dns networks: files -protocols: db files -services: db files -ethers: db files -rpc: db files +protocols: files +services: files +ethers: files +rpc: files -netgroup: db files +netgroup: files # End /etc/nsswitch.conf diff --git a/core/filesystem/profile b/core/filesystem/profile index 5eabf8eaf..cf461f78b 100644 --- a/core/filesystem/profile +++ b/core/filesystem/profile @@ -42,9 +42,8 @@ HISTCONTROL="erasedups" INPUTRC="/etc/inputrc" LESS="-R" -LC_COLLATE="C" -export HISTSIZE HISTCONTROL INPUTRC LESS LC_COLLATE +export HISTSIZE HISTCONTROL INPUTRC LESS # Load profiles from /etc/profile.d if test -d /etc/profile.d/; then diff --git a/core/filesystem/resolv.conf b/core/filesystem/resolv.conf index 3cd26f183..cecafba03 100644 --- a/core/filesystem/resolv.conf +++ b/core/filesystem/resolv.conf @@ -2,7 +2,7 @@ # /etc/resolv.conf # -nameserver 208.67.222.222 -nameserver 208.67.220.220 +#search +#nameserver # End of file diff --git a/core/filesystem/securetty b/core/filesystem/securetty index 1f40d5c35..8e0cbfaee 100644 --- a/core/filesystem/securetty +++ b/core/filesystem/securetty @@ -4,11 +4,12 @@ ttyS0 console -vc/1 -vc/2 -vc/3 -vc/4 -vc/5 -vc/6 +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +hvc0 # End of file