Skip to content

Commit

Permalink
Update core packages in line with KISS.
Browse files Browse the repository at this point in the history
  • Loading branch information
jedavies-dev committed Sep 30, 2021
1 parent 29ff168 commit f3f932e
Show file tree
Hide file tree
Showing 148 changed files with 2,506 additions and 3,234 deletions.
1 change: 1 addition & 0 deletions core/baseinit/README
15 changes: 15 additions & 0 deletions core/baseinit/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh -ef

mkdir -p \
"$1/usr/bin" \
"$1/usr/share/doc/kiss/init"

cp -R etc "$1"
cp -R lib "$1/usr/lib"

# Disable warning as CFLAGS must work this way.
# shellcheck disable=2086
for bin in kpow kall; do
clang -o "$1/usr/bin/$bin" "bin/$bin.c" $CFLAGS -static
cp -f "bin/$bin.c" "$1/usr/share/doc/kiss/init/$bin.c"
done
1 change: 1 addition & 0 deletions core/baseinit/checksums
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
889d02e36c5808b1adadaa4e567df3fef97156e38a477579a20e7c53622018d6
1 change: 1 addition & 0 deletions core/baseinit/sources
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/kisslinux/init/archive/VERSION.tar.gz
1 change: 1 addition & 0 deletions core/baseinit/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.3 2
1 change: 1 addition & 0 deletions core/baselayout/README
129 changes: 65 additions & 64 deletions core/baselayout/build
Original file line number Diff line number Diff line change
Expand Up @@ -14,67 +14,68 @@ get_default_cflags()

}

# Setup base directories.
for d in boot dev etc home mnt usr var opt run; do
install -dm 755 "$1/$d"
done

install -dm 555 "$1/proc"
install -dm 555 "$1/sys"
install -dm 0750 "$1/root"
install -dm 1777 "$1/tmp"

# Setup /usr hierarchy.
for d in bin include lib share src; do
install -dm 755 "$1/usr/$d"
done

# Setup manpages directories.
for d in 1 2 3 4 5 6 7 8; do
install -dm 755 "$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 service; do
install -dm 755 "$1/var/$d"
done

install -dm 1777 "$1/var/tmp"
install -dm 1777 "$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 -dm 755 "$1/usr/local/$d"
done

ln -s ../man "$1/usr/local/share/man"

# Get target triple from the
triple="$(cat $KISS_ROOT/etc/os-arch)"
echo $triple > os-arch
get_default_cflags $triple >> os-buildflags

# /etc skeleton files.
for f in fstab group host.conf hosts issue os-release \
passwd profile securetty shells mime.types \
os-arch os-buildflags; do
install -m 644 "$f" "$1/etc"
done

for f in crypttab shadow; do
install -m 600 "$f" "$1/etc"
done

ln -s /proc/self/mounts "$1/etc/mtab"
mkdir -m 755 \
"$1/boot" \
"$1/dev" \
"$1/etc" \
"$1/home" \
"$1/mnt" \
"$1/opt" \
"$1/run" \
"$1/usr" \
"$1/usr/bin" \
"$1/usr/include" \
"$1/usr/lib" \
"$1/usr/share" \
"$1/usr/share/man" \
"$1/usr/share/man/man1" \
"$1/usr/share/man/man2" \
"$1/usr/share/man/man3" \
"$1/usr/share/man/man4" \
"$1/usr/share/man/man5" \
"$1/usr/share/man/man6" \
"$1/usr/share/man/man7" \
"$1/usr/share/man/man8" \
"$1/var/cache" \
"$1/var/local" \
"$1/var/opt" \
"$1/var/log" \
"$1/var/log/old" \
"$1/var/lib" \
"$1/var/lib/misc" \
"$1/var/empty" \
"$1/var/service" \
"$1/var/spool"

mkdir -m 555 \
"$1/proc" \
"$1/sys"

mkdir -m 0750 \
"$1/root"

mkdir -m 1777 \
"$1/tmp" \
"$1/var/tmp" \
"$1/var/spool/mail"

ln -sf usr/bin "$1/bin"
ln -sf usr/bin "$1/sbin"
ln -sf bin "$1/usr/sbin"
ln -sf usr/lib "$1/lib"
ln -sf usr/lib "$1/lib64"

ln -sf lib "$1/usr/lib64"
ln -sf spool/mail "$1/var/mail"
ln -sf ../run "$1/var/run"
ln -sf ../run/lock "$1/var/lock"
ln -sf /proc/self/mounts "$1/etc/mtab"

cp -f ./* "$1/etc"

chmod 600 \
"$1/etc/crypttab" \
"$1/etc/shadow"

# Get target triple from the package manager
get_default_cflags $KISS_XHOST_TRIPLE >> $1/etc/os-buildflags
3 changes: 1 addition & 2 deletions core/baselayout/checksums
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ a0fa9cd303cf7f1718f51e5624a671a418946718b790508b8988bccd542c6451
eda9afe39a3562406f14cb8a5a142922b63e68467d3ba4821c02eaa142d9c4da
a15a748505f9cae3245a2334e5338858aedda3f701c7a5b2b36cd304daaec14a
0bde8ace73d58897e85c82eb96690bbfd1a4231949d3523d5950ba1910b08892
3e75f201ba3d0f03c57ee2693697aa41971b0b84b5d4f6a6ffd318f48d02ba7e
f83e55ea2f1f363c039916468a3b7eeef941bb48b2a026abf48edf6e38aa4792
7762b65442cd3e930d9b4ec470e01bc53938bc5ed3d7aedeed47977b78f54843
5aa69b5acea1deb625c46ce481d96e4e21558ae2e39ca74fc5b6a5674329f403
7e47176cd83b91bdbc3a0b10ae5d5c093b81a9c8c0c1fb714f5438381124c760
7325a401007ec02596c143788277be46c3e89c98a79cb3f3567d3bef5a9470b0
8ce994663d7588143ad7ed4441b07f468f4f7d3590164dd73ddfa3ea307ece8e
8782af2bf81ca1e81b59d1be531565882d4e0c9a89d189706ed358375f67ca04
13 changes: 0 additions & 13 deletions core/baselayout/etcsums

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/crypttab

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/fstab

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/group

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/host.conf

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/hosts

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/mime.types

This file was deleted.

13 changes: 0 additions & 13 deletions core/baselayout/files-old/os-buildflags

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/passwd

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/profile

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/securetty

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/shadow

This file was deleted.

1 change: 0 additions & 1 deletion core/baselayout/files-old/shells

This file was deleted.

13 changes: 13 additions & 0 deletions core/baselayout/files/crypttab
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions core/baselayout/files/fstab
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>

tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0
27 changes: 27 additions & 0 deletions core/baselayout/files/group
Original file line number Diff line number Diff line change
@@ -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:
4 changes: 4 additions & 0 deletions core/baselayout/files/host.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# /etc/host.conf
# See host.conf(5) for details.

multi on
10 changes: 10 additions & 0 deletions core/baselayout/files/hosts
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
Loading

0 comments on commit f3f932e

Please sign in to comment.