Commit 92b66be5 authored by Phil's avatar Phil

update filesystem and added iana-etc

parent 19afde9b
# Chakra Packages for Chakra, part of
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgdesc="Base filesystem"
pkgdesc='Base filesystem'
#depends=('sh' 'coreutils')
backup=(etc/fstab etc/crypttab etc/group etc/hosts etc/ 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
passwd shadow fstab crypttab hosts motd resolv.conf shells
gshadow services protocols profile modprobe.d.usb-load-ehci-first)
depends=('iana-etc' 'bash' 'coreutils')
backup=('etc/fstab' 'etc/crypttab' 'etc/group' 'etc/hosts' 'etc/' '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' ''
'passwd' 'shadow' 'fstab' 'crypttab' 'hosts' 'motd' 'resolv.conf' 'shells'
'gshadow' 'profile' 'modprobe.d.usb-load-ehci-first')
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}
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 ${pkgdir}/usr/local/share/man
mkdir -p var/{cache/man,local,lock,opt,run,spool/mail,tmp,games}
chmod 1777 var/lock
mkdir -p var/log/old
mkdir -p etc/{,skel,profile.d}
mkdir -p lib/modules
mkdir -p var/lib/misc
(cd ${pkgdir}/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
package() {
cd ${srcdir}
install -d -o root -g root -m 755 srv/http
# setup root filesystem
for d in bin boot dev etc home lib/modules media mnt sbin usr var opt srv/http sys; do
install -d -m755 ${pkgdir}/${d}
install -d -m555 ${pkgdir}/proc
install -d -m0750 ${pkgdir}/root
install -d -m1777 ${pkgdir}/tmp
# vsftpd won't run with write perms on /srv/ftp
install -d -m555 -g ftp ${pkgdir}/srv/ftp
chmod 1777 var/spool/mail tmp var/tmp
chmod 0750 root
# setup /etc
install -d ${pkgdir}/etc/{,skel,profile.d}
for f in fstab group host.conf hosts issue motd nsswitch.conf passwd resolv.conf securetty shells profile; do
install -m644 ${srcdir}/${f} ${pkgdir}/etc/
for f in gshadow shadow crypttab; do
install -m600 ${srcdir}/${f} ${pkgdir}/etc/
touch ${pkgdir}/etc/arch-release
install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first ${pkgdir}/etc/modprobe.d/usb-load-ehci-first.conf
#Allow setgid games to write scores:
chmod 775 ${pkgdir}/var/games
chown root:50 ${pkgdir}/var/games
# setup /var
for d in cache/man local opt run log/old lib/misc empty; do
install -d -m755 ${pkgdir}/var/${d}
install -d -m1777 ${pkgdir}/var/{lock,tmp,spool/mail}
# allow setgid games to write scores
install -d -m775 -g games ${pkgdir}/var/games
ln -s spool/mail ${pkgdir}/var/mail
# prevent pacman from removing directory (FS#16886)
touch ${pkgdir}/var/empty/.keep
cd ${srcdir}
cp fstab crypttab group host.conf hosts issue motd nsswitch.conf \
passwd protocols resolv.conf securetty services shadow shells profile \
install -m 600 ${srcdir}/gshadow ${pkgdir}/etc/gshadow
chmod 600 ${pkgdir}/etc/shadow
chmod 600 ${pkgdir}/etc/crypttab
# no version any more
#cat issue | sed "s/#VERSION#/${pkgver}/" >${pkgdir}/etc/issue
# setup /usr hierarchy
for d in bin include lib sbin share/misc src; do
install -d -m755 ${pkgdir}/usr/${d}
for d in $(seq 8); do
install -d -m755 ${pkgdir}/usr/share/man/man${d}
# re-add /etc/arch-release, some software uses it
# to check whether arch is running
touch ${pkgdir}/etc/arch-release
touch ${pkgdir}/etc/chakra-release
# Add /etc/modprobe.d/
install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first \
# Prevent pacman from removing directory (FS#16886)
mkdir ${pkgdir}/var/empty
touch ${pkgdir}/var/empty/.keep
# setup /usr/local hierarchy
for d in bin etc games include lib man sbin share src; do
install -d -m755 ${pkgdir}/usr/local/${d}
ln -s ../man ${pkgdir}/usr/local/share/man
# arg 1: the new package version
post_install() {
[ -f var/log/lastlog ] || : >var/log/lastlog
[ -f var/log/wtmp ] || : >var/log/wtmp
[ -f var/run/utmp ] || : >var/run/utmp
[ -f var/log/btmp ] || (: >var/log/btmp && bin/chmod 600 var/log/btmp)
# workaround for bug #7194
# readded due to bug #9465
# please do not remove!
chmod 1777 var/spool/mail tmp var/tmp var/lock
[ -f var/log/lastlog ] || : >var/log/lastlog
[ -f var/log/wtmp ] || : >var/log/wtmp
[ -f var/run/utmp ] || : >var/run/utmp
[ -f var/log/btmp ] || (: >var/log/btmp && bin/chmod 600 var/log/btmp)
# workaround for bug #7194
# readded due to bug #9465
# please do not remove!
bin/chmod 1777 var/spool/mail tmp var/tmp var/lock
# args: <group> [options]
_addgroup() {
if ! bin/grep -q "^$1:" etc/group; then
usr/sbin/groupadd ${@} >/dev/null
# args: <group> [options]
_adduser() {
if ! bin/grep -q "^$1:" etc/passwd; then
usr/sbin/useradd ${@} >/dev/null
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
if [ ! "`grep ^optical: etc/group`" ]; then
echo "adding new groups: audio optical"
usr/sbin/groupadd -g 92 audio >/dev/null
usr/sbin/groupadd -g 93 optical >/dev/null
if [ ! "`grep ^video: etc/group`" ]; then
echo "adding new groups: video floppy storage"
usr/sbin/groupadd -g 91 video >/dev/null
usr/sbin/groupadd -g 94 floppy >/dev/null
usr/sbin/groupadd -g 95 storage >/dev/null
if [ ! "`grep ^log: etc/group`" ]; then
echo "adding new group: log"
usr/sbin/groupadd -g 19 log >/dev/null
if [ ! "`grep ^power: etc/group`" ]; then
echo "adding new group: power"
usr/sbin/groupadd -g 98 power >/dev/null
if [ ! "`grep ^network: etc/group`" ]; then
echo "adding new group: network"
usr/sbin/groupadd -g 90 network >/dev/null
if [ ! "`grep ^games: etc/group`" ]; then
echo "adding new group: games"
usr/sbin/groupadd -g 50 games >/dev/null
if [ ! "`grep ^uucp: etc/group`" ]; then
echo "adding new group: uucp"
usr/sbin/groupadd -g 14 uucp >/dev/null
if [ ! "`grep ^http: etc/group`" ]; then
echo "adding new group: http"
usr/sbin/groupadd -g 33 http >/dev/null
if [ ! "`grep ^http: etc/passwd`" ]; then
echo "adding new user http"
usr/sbin/useradd -u 33 -d /srv/http -g http -s /bin/false http >/dev/null
if [ ! "`grep ^scanner: etc/group`" ]; then
echo "adding new group: scanner"
usr/sbin/groupadd -g 96 scanner >/dev/null
if [ ! "`grep ^rfkill: etc/group`" ]; then
echo "adding new group: rfkill"
usr/sbin/groupadd -g 24 rfkill >/dev/null
_addgroup cdemu -g 103
_addgroup optical -g 93
_addgroup audio -g 92
_addgroup video -g 91
_addgroup floppy -g 94
_addgroup storage -g 95
_addgroup log -g 19
_addgroup power -g 98
_addgroup network -g 90
_addgroup games -g 50
_addgroup uucp -g 14
_addgroup http -g 33
_adduser http -u 33 -d /srv/http -g http -s /bin/false http
_addgroup scanner -g 96
_addgroup rfkill -g 24
# sync gshadow to group (fixes FS#19869
if ! bin/grep -q '^rfkill:' etc/gshadow; then
usr/sbin/grpconv >/dev/null
if ! bin/grep -q '^include /etc/\*.conf$' etc/; then
bin/echo 'include /etc/*.conf' >> etc/
grep -q '^include /etc/\*.conf$' etc/ \
|| echo 'include /etc/*.conf' >> etc/
# set "Last password change" > 0; otherwise su $user wont work
for user in bin daemon mail ftp http nobody; do
if LANG=C usr/bin/chage -l ${user} | bin/grep -q 'password must be changed'; then
usr/bin/chage -d 14871 ${user}
......@@ -4,8 +4,3 @@
# <file system> <dir> <type> <options> <dump> <pass>
devpts /dev/pts devpts defaults 0 0
shm /dev/shm tmpfs nodev,nosuid 0 0
/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
/dev/fd0 /media/fl auto user,noauto 0 0
......@@ -27,4 +27,4 @@ storage:x:95:
......@@ -14,6 +14,7 @@ mail:::
......@@ -3,6 +3,7 @@
#<ip-address> <> <hostname> localhost.localdomain localhost localhost.localdomain localhost
::1 localhost.localdomain localhost
# End of file

Chakra Linux \r (\n) (\l)
Chakra Linux (2011.03 - Cyrus)\r (\n) (\l)
# /etc/profile
# This file is intended to be used for ALL common
# Bourne-compatible shells. Shell specifics should be
# handled in /etc/profile.$SHELL where $SHELL is the name
# of the binary being run (discounting symlinks)
# Sections taken from SuSe's /etc/profile
# Note the explicit use of 'test' to cover all bases
# and potentially incompatible shells
#Determine our shell without using $SHELL, which may lie
if test -f /proc/mounts; then
case $(/bin/ls -l /proc/$$/exe) in
*bash) shell=bash ;;
*dash) shell=dash ;;
*ash) shell=ash ;;
*ksh) shell=ksh ;;
*zsh) shell=zsh ;;
# Load shell specific profile settings
test -f "/etc/profile.$shell" && . "/etc/profile.$shell"
#Set our umask
umask 022
# Set our default path
export PATH
# Export default pkg-config path
# Some readline stuff that is fairly common
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -x $profile && . $profile
unset profile
for profile in /etc/profile.d/*.sh; do
test -r $profile && . $profile
unset profile
# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
. /etc/bash.bashrc
# Termcap is outdated, old, and crusty, kill it.
# Internet (IP) protocols
# Updated from and other
# sources.
# New protocols will be added on request if they have been officially
# assigned by IANA and are not historical.
# If you need a huge list of used numbers please install the nmap package.
ip 0 IP # internet protocol, pseudo protocol number
#hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # Internet Group Management
ggp 3 GGP # gateway-gateway protocol
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
st 5 ST # ST datagram mode
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
igp 9 IGP # any private interior gateway (Cisco)
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4 [RFC905]
xtp 36 XTP # Xpress Transfer Protocol
ddp 37 DDP # Datagram Delivery Protocol
idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
ipv6 41 IPv6 # Internet Protocol, version 6
ipv6-route 43 IPv6-Route # Routing Header for IPv6
ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
idrp 45 IDRP # Inter-Domain Routing Protocol
rsvp 46 RSVP # Reservation Protocol
gre 47 GRE # General Routing Encapsulation
esp 50 IPSEC-ESP # Encap Security Payload [RFC2406]
ah 51 IPSEC-AH # Authentication Header [RFC2402]
skip 57 SKIP # SKIP
ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
rspf 73 RSPF CPHB # Radio Shortest Path First (officially CPHB)
vmtp 81 VMTP # Versatile Message Transport
eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
ospf 89 OSPFIGP # Open Shortest Path First IGP
ax.25 93 AX.25 # AX.25 frames
ipip 94 IPIP # IP-within-IP Encapsulation Protocol
etherip 97 ETHERIP # Ethernet-within-IP Encapsulation [RFC3378]
encap 98 ENCAP # Yet Another IP encapsulation [RFC1241]
# 99 # any private encryption scheme
pim 103 PIM # Protocol Independent Multicast
ipcomp 108 IPCOMP # IP Payload Compression Protocol
vrrp 112 VRRP # Virtual Router Redundancy Protocol
l2tp 115 L2TP # Layer Two Tunneling Protocol [RFC2661]
isis 124 ISIS # IS-IS over IPv4
sctp 132 SCTP # Stream Control Transmission Protocol
fc 133 FC # Fibre Channel
udplite 136 UDPLite # UDP-Lite
......@@ -9,6 +9,7 @@ tty3
# End of file
# Network services, Internet style
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, officially ports have two entries
# even if the protocol doesn't support UDP operations.
# Updated from and other
# sources like .
# New ports will be added on request if they have been officially assigned
# by IANA and used in the real-world or are needed by a debian package.
# If you need a huge list of used numbers please install the nmap package.
tcpmux 1/tcp # TCP port service multiplexer
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
daytime 13/tcp
daytime 13/udp
netstat 15/tcp
qotd 17/tcp quote
msp 18/tcp # message send protocol
msp 18/udp
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp 21/tcp
fsp 21/udp fspd
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp
telnet 23/tcp
smtp 25/tcp mail
time 37/tcp timserver
time 37/udp timserver
rlp 39/udp resource # resource location
nameserver 42/tcp name # IEN 116
whois 43/tcp nicname
tacacs 49/tcp # Login Host Protocol (TACACS)
tacacs 49/udp
re-mail-ck 50/tcp # Remote Mail Checking Protocol
re-mail-ck 50/udp
domain 53/tcp # name-domain server
domain 53/udp
mtp 57/tcp # deprecated
tacacs-ds 65/tcp # TACACS-Database Service
tacacs-ds 65/udp
bootps 67/tcp # BOOTP server
bootps 67/udp
bootpc 68/tcp # BOOTP client
bootpc 68/udp
tftp 69/udp
gopher 70/tcp # Internet Gopher
gopher 70/udp
rje 77/tcp netrjs
finger 79/tcp
www 80/tcp http # WorldWideWeb HTTP
www 80/udp # HyperText Transfer Protocol
link 87/tcp ttylink
kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5
kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5
supdup 95/tcp
hostnames 101/tcp hostname # usually from sri-nic
iso-tsap 102/tcp tsap # part of ISODE
acr-nema 104/tcp dicom # Digital Imag. & Comm. 300
acr-nema 104/udp dicom # Digital Imag. & Comm. 300
csnet-ns 105/tcp cso-ns # also used by CSO name server
csnet-ns 105/udp cso-ns
rtelnet 107/tcp # Remote Telnet
rtelnet 107/udp
pop2 109/tcp postoffice pop-2 # POP version 2
pop2 109/udp pop-2
pop3 110/tcp pop-3 # POP version 3
pop3 110/udp pop-3
sunrpc 111/tcp portmapper # RPC 4.0 portmapper
sunrpc 111/udp portmapper
auth 113/tcp authentication tap ident
sftp 115/tcp
uucp-path 117/tcp
nntp 119/tcp readnews untp # USENET News Transfer Protocol
ntp 123/tcp
ntp 123/udp # Network Time Protocol
pwdgen 129/tcp # PWDGEN service
pwdgen 129/udp # PWDGEN service
loc-srv 135/tcp epmap # Location Service
loc-srv 135/udp epmap
netbios-ns 137/tcp # NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp # NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp # NETBIOS session service
netbios-ssn 139/udp
imap2 143/tcp imap # Interim Mail Access P 2 and 4
imap2 143/udp imap
snmp 161/tcp # Simple Net Mgmt Protocol
snmp 161/udp # Simple Net Mgmt Protocol
snmp-trap 162/tcp snmptrap # Traps for SNMP
snmp-trap 162/udp snmptrap # Traps for SNMP
cmip-man 163/tcp # ISO mgmt over IP (CMOT)
cmip-man 163/udp
cmip-agent 164/tcp
cmip-agent 164/udp
mailq 174/tcp # Mailer transport queue for Zmailer
mailq 174/udp # Mailer transport queue for Zmailer
xdmcp 177/tcp # X Display Mgr. Control Proto
xdmcp 177/udp
nextstep 178/tcp NeXTStep NextStep # NeXTStep window
nextstep 178/udp NeXTStep NextStep # server
bgp 179/tcp # Border Gateway Protocol
bgp 179/udp
prospero 191/tcp # Cliff Neuman's Prospero
prospero 191/udp
irc 194/tcp # Internet Relay Chat
irc 194/udp
smux 199/tcp # SNMP Unix Multiplexer
smux 199/udp
at-rtmp 201/tcp # AppleTalk routing
at-rtmp 201/udp
at-nbp 202/tcp # AppleTalk name binding
at-nbp 202/udp
at-echo 204/tcp # AppleTalk echo
at-echo 204/udp
at-zis 206/tcp # AppleTalk zone information
at-zis 206/udp
qmtp 209/tcp # Quick Mail Transfer Protocol
qmtp 209/udp # Quick Mail Transfer Protocol
z3950 210/tcp wais # NISO Z39.50 database
z3950 210/udp wais
ipx 213/tcp # IPX
ipx 213/udp
imap3 220/tcp # Interactive Mail Access
imap3 220/udp # Protocol v3
pawserv 345/tcp # Perf Analysis Workbench
pawserv 345/udp
zserv 346/tcp # Zebra server
zserv 346/udp
fatserv 347/tcp # Fatmen Server
fatserv 347/udp
rpc2portmap 369/tcp
rpc2portmap 369/udp # Coda portmapper
codaauth2 370/tcp
codaauth2 370/udp # Coda authentication server
clearcase 371/tcp Clearcase
clearcase 371/udp Clearcase
ulistserv 372/tcp # UNIX Listserv
ulistserv 372/udp
ldap 389/tcp # Lightweight Directory Access Protocol
ldap 389/udp
imsp 406/tcp # Interactive Mail Support Protocol
imsp 406/udp
https 443/tcp # http protocol over TLS/SSL
https 443/udp
snpp 444/tcp # Simple Network Paging Protocol
snpp 444/udp
microsoft-ds 445/tcp # Microsoft Naked CIFS
microsoft-ds 445/udp
kpasswd 464/tcp
kpasswd 464/udp
saft 487/tcp # Simple Asynchronous File Transfer
saft 487/udp
isakmp 500/tcp # IPsec - Internet Security Association
isakmp 500/udp # and Key Management Protocol
rtsp 554/tcp # Real Time Stream Control Protocol
rtsp 554/udp # Real Time Stream Control Protocol
nqs 607/tcp # Network Queuing system
nqs 607/udp
npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS
npmp-local 610/udp dqs313_qmaster
npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS
npmp-gui 611/udp dqs313_execd
hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS
hmmp-ind 612/udp dqs313_intercell
ipp 631/tcp # Internet Printing Protocol
ipp 631/udp
# UNIX specific services
exec 512/tcp
biff 512/udp comsat
login 513/tcp
who 513/udp whod
shell 514/tcp cmd # no passwords used
syslog 514/udp
printer 515/tcp spooler # line printer spooler
talk 517/udp
ntalk 518/udp
route 520/udp router routed # RIP
timed 525/udp timeserver
tempo 526/tcp newdate
courier 530/tcp rpc