diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-02-03 13:59:46 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-02-03 13:59:46 +0000 |
commit | a8f79b8d50115af4c36c07f83ec7dd9bc4475710 (patch) | |
tree | f30a0668ae41f06be86a037d6d4ef8e265ff4582 /sub | |
parent | b0c2b7e56e62aeb2bca8b4d2ab396f3d83a48def (diff) | |
download | lh-bootstrap-a8f79b8d50115af4c36c07f83ec7dd9bc4475710.tar.xz |
Add strace and an optional mechanism
Diffstat (limited to 'sub')
-rw-r--r-- | sub/strace/Makefile | 32 | ||||
-rw-r--r-- | sub/util-linux/Makefile | 131 |
2 files changed, 32 insertions, 131 deletions
diff --git a/sub/strace/Makefile b/sub/strace/Makefile new file mode 100644 index 0000000..d99ca85 --- /dev/null +++ b/sub/strace/Makefile @@ -0,0 +1,32 @@ + +STRACE_VERSION ?= 5.4 +STRACE_MAKE_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),LDFLAGS=-static,) + +clean-strace: + rm -f $(OUTPUT)/build-host/.lh_strace_* + + +$(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://strace.io/files/$(STRACE_VERSION)/strace-$(STRACE_VERSION).tar.xz + +$(OUTPUT)/build-host/.lh_strace_dled: $(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_copied: $(OUTPUT)/build-host/.lh_strace_dled | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/strace-$(STRACE_VERSION) + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -Jxpvf $(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_configured: $(OUTPUT)/build-host/.lh_strace_copied | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/strace-$(STRACE_VERSION) --enable-mpers=no + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_built: $(OUTPUT)/build-host/.lh_strace_configured | $(OUTPUT)/build-build/.lh_skarnet_installed + exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) $(MAKE) $(STRACE_MAKE_STATIC) + exec setuidgid $(NORMALUSER) s6-touch $@ + +$(OUTPUT)/build-host/.lh_strace_installed: $(OUTPUT)/build-host/.lh_strace_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed + exec cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs + exec makenamelink $(OUTPUT)/rootfs/opt strace strace-$(STRACE_VERSION) $(OUTPUT)/tmp + exec makelinks $(OUTPUT)/rootfs /bin /opt/strace/bin + exec setuidgid $(NORMALUSER) s6-touch $@ diff --git a/sub/util-linux/Makefile b/sub/util-linux/Makefile deleted file mode 100644 index f357a32..0000000 --- a/sub/util-linux/Makefile +++ /dev/null @@ -1,131 +0,0 @@ - -UTLX_NAME := util-linux -UTLX_VERSION := 2.34 -UTLX_MAJOR := $(word 1, $(subst ., ,$(UTLX_VERSION))) -UTLX_MINOR := $(word 2, $(subst ., ,$(UTLX_VERSION))) -UTLX_URLDIR := https://cdn.kernel.org/pub/linux/utils/$(UTLX_NAME)/v$(UTLX_MAJOR).$(UTLX_MINOR) -UTLX_TAREXT := tar.xz -UTLX_TARLETTER := J -UTLX_CONFIGURE_OPTIONS := \ ---prefix=$(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION) \ ---disable-assert \ ---disable-nls \ ---disable-widechar \ -# --disable-all-programs \ ---enable-libuuid \ ---enable-libfdisk \ ---enable-libsmartcols \ ---enable-losetup \ ---enable-libblkid \ ---enable-libmount \ ---enable-mount \ ---disable-zramctl \ ---disable-fsck \ ---disable-partx \ ---disable-uuidd \ ---disable-mountpoint \ ---disable-fallocate \ ---disable-unshare \ ---disable-nsenter \ ---disable-setpriv \ ---disable-eject \ ---disable-agetty \ ---disable-plymouth-support \ ---disable-cramfs \ ---disable-bfs \ ---disable-minix \ ---disable-fdformat \ ---disable-hwclock \ ---disable-lslogins \ ---disable-wdctl \ ---disable-cal \ ---disable-logger \ ---disable-switch_root \ ---disable-pivot_root \ ---disable-lsmem \ ---disable-chmem \ ---disable-ipcrm \ ---disable-ipcs \ ---disable-rfkill \ ---disable-tunelp \ ---disable-kill \ ---disable-last \ ---disable-utmpdump \ ---disable-line \ ---disable-mesg \ ---disable-raw \ ---disable-rename \ ---disable-vipw \ ---disable-newgrp \ ---disable-chfn-chsh \ ---disable-login \ ---disable-nologin \ ---disable-sulogin \ ---disable-su \ ---disable-runuser \ ---disable-ul \ ---disable-more \ ---disable-pg \ ---disable-setterm \ ---disable-schedutils \ ---disable-wall \ ---disable-write \ ---disable-bash-completion \ ---disable-pylibmount \ ---disable-pg-bell \ ---disable-sulogin-emergency-mount \ ---disable-makeinstall-chown \ ---disable-makeinstall-setuid \ ---disable-use-tty-group \ ---disable-colors-default \ ---with-gnu-ld \ ---without-util \ ---without-libiconv-prefix \ ---without-selinux \ ---without-audit \ ---without-udev \ ---without-user \ ---without-python \ ---without-ncurses \ ---without-ncursesw \ ---without-slang \ ---without-tinfo \ ---without-readline \ ---without-utempter \ ---without-cap-ng \ ---without-user \ ---without-btrfs \ ---without-systemd \ ---without-smack - -UTLX_CFLAGS := "" -UTLX_CONFLDFLAGS := "" -UTLX_MAKELDFLAGS := "-s" - -$(OUTPUT)/sources/$(UTLX_NAME)-$(UTLX_VERSION).$(UTLX_TAREXT): | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed - exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget $(UTLX_URLDIR)/$(UTLX_NAME)-$(UTLX_VERSION).$(UTLX_TAREXT) - -$(OUTPUT)/sources/.lh_$(UTLX_NAME)_dled: $(OUTPUT)/sources/$(UTLX_NAME)-$(UTLX_VERSION).$(UTLX_TAREXT) - exec setuidgid $(NORMALUSER) s6-touch $@ - -$(OUTPUT)/build-build/.lh_$(UTLX_NAME)_copied: $(OUTPUT)/sources/.lh_$(UTLX_NAME)_dled | $(OUTPUT)/build-build/.lh_skarnet_installed - exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src - exec setuidgid $(NORMALUSER) s6-mkdir -p $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION) - exec setuidgid $(NORMALUSER) makenamelink $(OUTPUT)/build-build/opt $(UTLX_NAME) $(UTLX_NAME)-$(UTLX_VERSION) $(OUTPUT)/tmp - exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION) tar $(UTLX_TARLETTER)xpvf $(OUTPUT)/sources/$(UTLX_NAME)-$(UTLX_VERSION).$(UTLX_TAREXT) - exec setuidgid $(NORMALUSER) s6-rename $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/$(UTLX_NAME)-$(UTLX_VERSION) $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src - exec setuidgid $(NORMALUSER) s6-touch $@ - -$(OUTPUT)/build-build/.lh_$(UTLX_NAME)_configured: $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_copied $(OUTPUT)/build-build/.lh_kernel_headers_installed | $(OUTPUT)/build-build/.lh_skarnet_installed - exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src export CC "$(BUILD_BUILD_CC)" export CFLAGS $(UTLX_CFLAGS) export LDFLAGS $(UTLX_CONFLDFLAGS) ./configure --prefix=$(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION) $(UTLX_CONFIGURE_OPTIONS) - exec setuidgid $(NORMALUSER) s6-touch $@ - -$(OUTPUT)/build-build/.lh_$(UTLX_NAME)_built: $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_configured | $(OUTPUT)/build-build/.lh_skarnet_installed - exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src $(MAKE) CC="$(BUILD_BUILD_CC)" LDFLAGS=$(UTLX_MAKELDFLAGS) - exec setuidgid $(NORMALUSER) s6-touch $@ - -$(OUTPUT)/build-build/.lh_$(UTLX_NAME)_installed: $(OUTPUT)/build-build/.lh_$(UTLX_NAME)_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed - exec cd $(OUTPUT)/build-build/opt/$(UTLX_NAME)-$(UTLX_VERSION)/src $(MAKE) install CC="$(BUILD_BUILD_CC)" - exec setuidgid $(NORMALUSER) makelinks $(OUTPUT)/build-build /bin /opt/$(UTLX_NAME)/bin - exec setuidgid $(NORMALUSER) makelinks $(OUTPUT)/build-build /bin /opt/$(UTLX_NAME)/sbin - exec setuidgid $(NORMALUSER) s6-touch $@ |