Browse Source

Setup Timezones; Add s6log user and group; Remove some unused service defs;

Fix some script interpreters (glibc);
odin^2
Nathan Fisher 3 weeks ago
parent
commit
272b12a142
  1. 2
      include/mk/src-config.mk
  2. 1
      world/Makefile
  3. 1
      world/fs_skeleton/etc/group
  4. 3
      world/fs_skeleton/etc/passwd
  5. 6
      world/fs_skeleton/etc/profile.d/tz.sh
  6. 6
      world/fs_skeleton/etc/zshenv.d/tz.zsh
  7. 1
      world/glibc/Makefile
  8. 18
      world/glibc/glibc-fix-interpreter.patch
  9. 1
      world/s6-scripts/etc/s6/sv/setup/contents
  10. 1
      world/s6-scripts/etc/s6/sv/sysuser/dependencies
  11. 1
      world/s6-scripts/etc/s6/sv/sysuser/type
  12. 2
      world/s6-scripts/etc/s6/sv/sysuser/up
  13. 42
      world/tzdata/Makefile

2
include/mk/src-config.mk

@ -4,7 +4,7 @@
include versions.mk
os_name = Hitch Hiker Linux
os_abbrev = hhl
os_version = 2022q2
os_version = 2022q3
basedir = /src
include $(basedir)/config.mk

1
world/Makefile

@ -8,6 +8,7 @@ include src-config.mk
subdirs += fs_skeleton
subdirs += man-pages
subdirs += iana-etc
subdirs += tzdata
subdirs += libz
subdirs += libbz2_static
subdirs += libbz2_shared

1
world/fs_skeleton/etc/group

@ -22,3 +22,4 @@ kvm:x:61:
wheel:x:97:
nogroup:x:99:
users:x:999:
s6log:x:963:

3
world/fs_skeleton/etc/passwd

@ -3,4 +3,5 @@ bin:x:1:1:bin:/dev/null:/bin/false
daemon:x:6:6:Daemon User:/dev/null:/bin/false
messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
_file:x:964:964::/home/_file:/usr/sbin/nologin
_file:x:964:964::/dev/null:/sbin/nologin
s6log:x:963:963::/dev/null:/sbin/nologin

6
world/fs_skeleton/etc/profile.d/tz.sh

@ -0,0 +1,6 @@
if [ -r "/etc/tz" ]
then source /etc/tz
else
TZ="America/New_York"
fi
export TZ

6
world/fs_skeleton/etc/zshenv.d/tz.zsh

@ -0,0 +1,6 @@
if [ -r "/etc/tz" ]
then source /etc/tz
else
TZ="America/New_York"
fi
export TZ

1
world/glibc/Makefile

@ -5,6 +5,7 @@ distname = glibc
patches += glibc-2.31-fhs-1.patch
patches += glibc-no-test-installation.patch
patches += glibc-fix-interpreter.patch
include world.mk
-include locales.mk

18
world/glibc/glibc-fix-interpreter.patch

@ -0,0 +1,18 @@
diff '--color=auto' -Naur glibc-2.36.orig/elf/ldd.bash.in glibc-2.36/elf/ldd.bash.in
--- glibc-2.36.orig/elf/ldd.bash.in 2022-08-25 16:05:09.631944502 -0400
+++ glibc-2.36/elf/ldd.bash.in 2022-09-06 11:36:31.356744917 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Copyright (C) 1996-2022 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
diff '--color=auto' -Naur glibc-2.36.orig/timezone/tzselect.ksh glibc-2.36/timezone/tzselect.ksh
--- glibc-2.36.orig/timezone/tzselect.ksh 2022-08-25 16:05:10.408624969 -0400
+++ glibc-2.36/timezone/tzselect.ksh 2022-09-06 11:42:46.123011925 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.

1
world/s6-scripts/etc/s6/sv/setup/contents

@ -5,7 +5,6 @@ net-lo
swap
random-seed
tmpfiles-setup
sysuser
dmesg
sysctl
binfmt

1
world/s6-scripts/etc/s6/sv/sysuser/dependencies

@ -1 +0,0 @@
remount-root

1
world/s6-scripts/etc/s6/sv/sysuser/type

@ -1 +0,0 @@
oneshot

2
world/s6-scripts/etc/s6/sv/sysuser/up

@ -1,2 +0,0 @@
#!/bin/execlineb -P
exec sysusers

42
world/tzdata/Makefile

@ -2,26 +2,38 @@
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = tzdata
zoneinfo = /usr/share/zoneinfo
tabs = ${srcdir}/zone.tab ${srcdir}/zone1970.tab ${srcdir}/iso3166.tab
zoneinfo = $(DESTDIR)/usr/share/zoneinfo
tabs = $(srcdir)/zone.tab $(srcdir)/zone1970.tab $(srcdir)/iso3166.tab
no_objdir = 1
use_configure = 0
include world.mk
distfullname = $(distname)$($(distname)_version)
distlocal = $(distdir)/$(distfullname).tar.gz
${srcdir}/.installed: ${srcdir}/.dirstamp
install -d ${zoneinfo}/posix
install -d ${zoneinfo}/right
install: $(srcdir)/.installed
$(info $(grn)=== $(distname) installed ===$(reset))
.PHONY: install
${srcdir}/.installed: $(srcdir)/.dirstamp
install -d $(zoneinfo)/posix
install -d $(zoneinfo)/right
for tz in etcetera southamerica northamerica europe africa \
antarctica asia australasia backward pacificnew systemv; do \
zic -L /dev/null -d ${zoneinfo} ${srcdir}/$${tz} ; \
zic -L /dev/null -d ${zoneinfo}/posix ${srcdir}/$${tz} ; \
zic -L leapseconds -d ${zoneinfo}/right ${srcdir}/$${tz} ; done
install -m0644 ${tabs} ${zoneinfo}
zic -d ${zoneinfo} -p America/New_York
ln -sfv /usr/share/zoneinfo/America/New_York /etc/localtime
antarctica asia australasia backward; do \
zic -L /dev/null -d $(zoneinfo) $(srcdir)/$${tz} ; \
zic -L /dev/null -d $(zoneinfo)/posix $(srcdir)/$${tz} ; \
zic -L $(srcdir)/leapseconds -d $(zoneinfo)/right $(srcdir)/$${tz} ; done
install -m0644 $(tabs) $(zoneinfo)
zic -d $(zoneinfo) -p America/New_York
#ln -sfv /usr/share/zoneinfo/America/New_York $(DESTDIR)/etc/localtime
touch $@
${srcdir}/.dirstamp: ${distlocal}
install -d ${srcdir}
tar xf ${distlocal} -C ${srcdir}
$(srcdir):
install -d $@
$(srcdir)/.dirstamp: $(distlocal) | $(srcdir)
tar -xzf $(distlocal) -C $(srcdir)
touch $@
$(distlocal):
make -C $(distdir) $(distname)

Loading…
Cancel
Save