summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-02 22:02:59 -0400
committerJune McEnroe <june@causal.agency>2018-08-02 22:02:59 -0400
commit9c5f273f5c462322be3a8312424449953a597740 (patch)
tree1dc93a27d551a92c5f86288edbac1a89621d6e16
parentAdd LICENSE file (diff)
downloadcatgirl-9c5f273f5c462322be3a8312424449953a597740.tar.gz
catgirl-9c5f273f5c462322be3a8312424449953a597740.zip
Add chroot.tar target
Diffstat (limited to '')
-rw-r--r--.gitignore2
-rw-r--r--Makefile35
2 files changed, 36 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 9f3fbc9..91b7c57 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 chat
+chroot.tar
+root
 tags
diff --git a/Makefile b/Makefile
index 32b03e0..0f622b6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+USER = chat
 CFLAGS += -Wall -Wextra -Wpedantic
 CFLAGS += -I/usr/local/include
 LDFLAGS += -L/usr/local/lib
@@ -8,5 +9,37 @@ all: tags chat
 tags: *.c
 	ctags -w *.c
 
+chroot.tar: chat
+	mkdir -p root
+	install -d -o root -g wheel \
+		root/bin \
+		root/etc \
+		root/home \
+		root/lib \
+		root/libexec \
+		root/usr \
+		root/usr/local \
+		root/usr/local/etc \
+		root/usr/local/etc/ssl \
+		root/usr/share \
+		root/usr/share/misc
+	install -d -o $(USER) -g $(USER) root/home/$(USER)
+	install -o root -g wheel -m 555 /libexec/ld-elf.so.1 root/libexec
+	install -o root -g wheel -m 444 \
+		/lib/libc.so.7 \
+		/lib/libncurses.so.8 \
+		/lib/libncursesw.so.8 \
+		/lib/libthr.so.3 \
+		/usr/local/lib/libcrypto.so.43 \
+		/usr/local/lib/libssl.so.45 \
+		/usr/local/lib/libtls.so.17 \
+		root/lib
+	install -o root -g wheel -m 444 /etc/hosts /etc/resolv.conf root/etc
+	install -o root -g wheel -m 444 /usr/local/etc/ssl/cert.pem root/usr/local/etc/ssl
+	install -o root -g wheel -m 444 /usr/share/misc/termcap.db root/usr/share/misc
+	install -o root -g wheel -m 555 /bin/sh root/bin
+	install -o root -g wheel -m 555 chat root/bin
+	tar -c -f chroot.tar -C root bin etc home lib libexec usr
+
 clean:
-	rm -f tags chat
+	rm -f tags chat chroot.tar
ME TRAITORJune McEnroe 2019-12-22Add license header to cgit CSSJune McEnroe As requested. Funny that its license header capitalizes You. 2019-12-22Add The Book of EttaJune McEnroe 2019-12-21Revert "Add first working version of imbox"June McEnroe Moved to <https://git.causal.agency/imbox>. This reverts commit 6aa7f2f6bf47fa9df9c749ce665171fa30800937. 2019-12-21Add first working version of imboxJune McEnroe 2019-12-20Respect mailmap in gl pretty formatJune McEnroe 2019-12-20Set LANG in cgit filtersJune McEnroe ttpre needs to know about UTF-8 too so it can bold/italic non-ASCII chars. 2019-12-20Source .editrc before applying -v or -eJune McEnroe Otherwise a bind -v in .editrc will take precedence and overwrite the ^I binding for sh-complete. 2019-12-20Disable signing commitsJune McEnroe Why did I ever turn this on? This gets me nothing but inconvenience. RIP to all the wasted bytes in my git repos. 2019-12-19Ignore about-filterJune McEnroe 2019-12-19Fix matching make tags with no sourcesJune McEnroe 2019-12-19Avoid matching := assignments as tagsJune McEnroe 2019-12-18Hide line numbers when rendering mdocJune McEnroe Hack: output an extra <td> after rendering mdoc so that line numbers can be hidden based on there being three. This required splitting source-filter and about-filter since on about pages there is no table. 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe :target persists after you click on something else. 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe NULs in the input cause an infinite loop in htmlEscape, not to mention regexes obviously not working, etc. 2019-12-16Post "cgit setup"June McEnroe