diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-01-30 14:44:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-01-30 14:44:04 +0000 |
commit | 61c8a693f00ce1c5141ec5f8339298f796f29707 (patch) | |
tree | 99316c6ebdca7a7b0f3448547aa029172f0979ab /sub | |
parent | 984b96ebcb50565898052a430d3422983c2d7df5 (diff) | |
download | lh-bootstrap-61c8a693f00ce1c5141ec5f8339298f796f29707.tar.xz |
Add network and syslogd
Diffstat (limited to 'sub')
-rw-r--r-- | sub/dropbear/Makefile | 2 | ||||
-rw-r--r-- | sub/layout/permissions | 2 | ||||
-rw-r--r-- | sub/socklog/Makefile | 34 | ||||
-rw-r--r-- | sub/socklog/patch.sed | 5 |
4 files changed, 42 insertions, 1 deletions
diff --git a/sub/dropbear/Makefile b/sub/dropbear/Makefile index b3b791a..823cb28 100644 --- a/sub/dropbear/Makefile +++ b/sub/dropbear/Makefile @@ -15,7 +15,7 @@ $(OUTPUT)/build-host/.lh_dropbear_dled: $(OUTPUT)/sources/dropbear-$(DROPBEAR_VE $(OUTPUT)/build-host/.lh_dropbear_copied: $(OUTPUT)/build-host/.lh_dropbear_dled | $(OUTPUT)/build-build/.lh_skarnet_installed exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/dropbear-$(DROPBEAR_VERSION) - exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar jxpvf $(OUTPUT)/sources/dropbear-$(DROPBEAR_VERSION).tar.bz2 + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -jxpvf $(OUTPUT)/sources/dropbear-$(DROPBEAR_VERSION).tar.bz2 exec setuidgid $(NORMALUSER) s6-touch $@ $(OUTPUT)/build-host/.lh_dropbear_patched: $(OUTPUT)/build-host/.lh_dropbear_copied sub/dropbear/localoptions.h diff --git a/sub/layout/permissions b/sub/layout/permissions index 7f3102f..74469ba 100644 --- a/sub/layout/permissions +++ b/sub/layout/permissions @@ -2,6 +2,8 @@ rootfs/etc/shadow 0 0 0600 rwfs/var/tmp 0 0 1777 rwfs/var/log/klogd 102 61 2700 +rwfs/var/log/syslogd 104 61 2700 +rwfs/var/log/sshd-4 138 61 2700 userfs/home/guest 1000 100 2755 userfs/home/guest/.execline-shell 1000 100 0755 diff --git a/sub/socklog/Makefile b/sub/socklog/Makefile new file mode 100644 index 0000000..003d613 --- /dev/null +++ b/sub/socklog/Makefile @@ -0,0 +1,34 @@ + +SOCKLOG_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),-static,) + +$(OUTPUT)/sources/socklog-2.1.0.tar.gz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget http://smarden.org/socklog/socklog-2.1.0.tar.gz + +$(OUTPUT)/sources/.lh_socklog_dled: $(OUTPUT)/sources/socklog-2.1.0.tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_socklog_copied: $(OUTPUT)/sources/.lh_socklog_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/package/admin/socklog-2.1.0 + exec setuidgid $(NORMALUSER) s6-mkdir -p -- $(OUTPUT)/build-host/package + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/package tar -zxpvf $(OUTPUT)/sources/socklog-2.1.0.tar.gz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_socklog_patched: $(OUTPUT)/build-host/.lh_socklog_copied sub/socklog/patch.sed | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) redirfd -w 1 $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/Makefile.patched sed -f sub/socklog/patch.sed $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/Makefile + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_socklog_configured: $(OUTPUT)/build-host/.lh_socklog_copied | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) redirfd -w 1 $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/conf-cc s6-echo "$(BUILD_HOST_CC) -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include errno.h" + exec setuidgid $(NORMALUSER) redirfd -w 1 $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/conf-ld s6-echo "$(BUILD_HOST_CC) $(SOCKLOG_STATIC)" + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_socklog_built: $(OUTPUT)/build-host/.lh_socklog_configured $(OUTPUT)/build-host/.lh_socklog_patched | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src $(MAKE) -f Makefile.patched socklog + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_socklog_installed: $(OUTPUT)/build-host/.lh_socklog_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec s6-mkdir -p -m 0755 $(OUTPUT)/rootfs/package/admin/socklog-2.1.0/command + exec makenamelink $(OUTPUT)/rootfs/package/admin socklog socklog-2.1.0 $(OUTPUT)/tmp + exec cp -f $(OUTPUT)/build-host/package/admin/socklog-2.1.0/src/socklog $(OUTPUT)/rootfs/package/admin/socklog-2.1.0/command/socklog + exec makelinks $(OUTPUT)/rootfs /command /package/admin/socklog/command + exec setuidgid $(NORMALUSER) s6-touch $@ diff --git a/sub/socklog/patch.sed b/sub/socklog/patch.sed new file mode 100644 index 0000000..0540d27 --- /dev/null +++ b/sub/socklog/patch.sed @@ -0,0 +1,5 @@ +s/choose compile load tryshsgr\.c hasshsgr\.h1 hasshsgr\.h2 chkshsgr /choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 / +s/ar cr /$(TRIPLE)-ar cr / +s/ranlib /$(TRIPLE)-ranlib / +s%\./chkshsgr ||%true ||% +s%\./choose clr tryshsgr hasshsgr\.h1 hasshsgr\.h2 > hasshsgr\.h%cat hasshsgr.h1 > hasshsgr.h% |