baselayout: add package

This commit is contained in:
Muhammad Herdiansyah 2019-06-18 17:43:54 +07:00
parent b5d9c3e073
commit f21f57cb39
15 changed files with 194 additions and 0 deletions

50
repo/baselayout/build Executable file
View File

@ -0,0 +1,50 @@
#!/bin/sh -e
# setup base directories
for d in boot dev etc home mnt usr var opt run; do
install -d -m755 "$1"/"$d"
done
install -d -m555 "$1"/proc
install -d -m555 "$1"/sys
install -d -m0750 "$1"/root
install -d -m1777 "$1"/tmp
# setup /usr hierarchy
for d in bin include lib lib32 share src; do
install -d -m755 "$1"/usr/"$d"
done
# setup manpages directories
for d in 1 2 3 4 5 6 7 8; do
install -d -m755 "$1"/usr/share/man/man"$d"
done
# add symlinks
ln -s usr/bin "$1"/bin
ln -s usr/bin "$1"/sbin
ln -s bin "$1"/usr/sbin
ln -s usr/lib "$1"/lib
ln -s usr/lib "$1"/lib64
ln -s lib "$1"/usr/lib64
# setup /var
for d in cache local opt log/old lib/misc empty; do
install -d -m755 "$1"/var/"$d"
done
install -d -m1777 "$1"/var/tmp
install -d -m1777 "$1"/var/spool/mail
ln -s spool/mail "$1"/var/mail
ln -s ../run "$1"/var/run
ln -s ../run/lock "$1"/var/lock
# setup /usr/local (usually for any programs installed outside package manager)
for d in bin etc games include lib man sbin share src; do
install -d -m755 "$1"/usr/local/"$d"
done
ln -s ../man "$1"/usr/local/share/man
# /etc skeleton files
for f in crypttab fstab host.conf hosts issue os-release passwd profile securetty shadow shells; do
install -m644 "$f" "$1"/etc
done
ln -s /proc/self/mounts "$1"/etc/mtab

View File

@ -0,0 +1,13 @@
# crypttab: mappings for encrypted partitions
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# NOTE: Do not list your root (/) partition here.
# <name> <device> <password> <options>
# home /dev/hda4 /etc/mypassword1
# data1 /dev/hda3 /etc/mypassword2
# data2 /dev/hda5 /etc/cryptfs.key
# swap /dev/hdx4 /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256
# vol /dev/hdb7 none

View File

@ -0,0 +1,4 @@
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>

View File

@ -0,0 +1,27 @@
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
wheel:x:4:
tty:x:5:
tape:x:6:
daemon:x:7:
floppy:x:8:
disk:x:9:
lp:x:10:
dialout:x:11:
audio:x:12:
video:x:13:
utmp:x:14:
adm:x:15:
cdrom:x:16:
optical:x:17:
mail:x:18:
storage:x:19:
scanner:x:20:
network:x:21:
kvm:x:24:
input:x:25:
nogroup:x:99:
users:x:100:
xbuilder:x:101:

View File

@ -0,0 +1,4 @@
# /etc/host.conf
# See host.conf(5) for details.
multi on

View File

@ -0,0 +1,10 @@
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost ip6-localhost
# EOF

View File

@ -0,0 +1 @@
KISS Linux \r (\l)

View File

@ -0,0 +1,8 @@
NAME="KISS Linux"
PRETTY_NAME="KISS Linux"
ID=kiss
BUILD_ID=rolling
HOME_URL="https://kissx.github.io"
DOCUMENTATION_URL="https://github.com/kissx/kiss"
SUPPORT_URL="https://github.com/kissx/kiss/issues"
BUG_REPORT_URL="https://github.com/kissx/kiss/issues"

View File

@ -0,0 +1,2 @@
root:x:0:0:root:/root:/bin/sh
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false

View File

@ -0,0 +1,31 @@
# /etc/profile
# System wide environment and startup programs.
appendpath () {
case ":$PATH:" in
*:"$1":*) ;;
*) PATH="${PATH:+$PATH:}$1" ;;
esac
}
# Set our default path (/usr/sbin:/sbin:/bin included for non-KISS Linux chroots)
appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'
appendpath '/usr/sbin'
appendpath '/sbin'
appendpath '/bin'
unset appendpath
export PATH
# Set default umask
umask 022
# Load profiles from /etc/profile.d
if [ -d /etc/profile.d/ ]; then
for f in /etc/profile.d/*.sh; do
[ -r "$f" ] && . "$f"
done
unset f
fi

View File

@ -0,0 +1,26 @@
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
ttyS0
ttyAMA0
ttyUSB0

View File

@ -0,0 +1 @@
root::14871::::::

View File

@ -0,0 +1,4 @@
# Pathnames of valid login shells.
# See shells(5) for details.
/bin/sh

12
repo/baselayout/sources Normal file
View File

@ -0,0 +1,12 @@
files/crypttab
files/fstab
files/group
files/host.conf
files/hosts
files/issue
files/os-release
files/passwd
files/profile
files/securetty
files/shadow
files/shells

1
repo/baselayout/version Normal file
View File

@ -0,0 +1 @@
1 1