Browse Source

deprecating .packed directories (#149)

.packed directories are originally created for testing on non-Linux platforms. The usage is mostly obsolete right now, and the binaries are completely out-dated. A better strategy would be to create a hook in the github to release binary packages.
Chia-Che Tsai 6 years ago
parent
commit
6e3c5aea56

+ 0 - 1
LibOS/.packed/glibc.sha384

@@ -1 +0,0 @@
-glibc-build/crt1.o glibc-build/crti.o glibc-build/crtn.o glibc-build/ld-linux-x86-64.so.2 glibc-build/libc.so.6 glibc-build/libdl.so.2 glibc-build/liblibos.so.1 glibc-build/libm.so.6 glibc-build/libnss_dns.so.2 glibc-build/libpthread.so.0 glibc-build/libresolv.so.2 glibc-build/libutil.so.1

BIN
LibOS/.packed/glibc.tar.gz


+ 2 - 7
LibOS/Makefile

@@ -38,19 +38,14 @@ $(GLIBC_SRC)/configure: $(GLIBC_SRC).patch
 	cd $(GLIBC_SRC) && patch -p1 < ../$(GLIBC_SRC).patch
 endif
 
-.PHONY: pack
-pack: $(GLIBC_TARGET)
-	@../Scripts/pack_binaries.sh glibc $^
-	$(MAKE) -C $(SHIM_DIR) pack
-
 .PHONY: clean
 clean:
 	$(MAKE) -C $(SHIM_DIR) clean
 	rm -rf $(BUILD_DIR)
 
 else
-$(GLIBC_TARGET): .packed/glibc.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(GLIBC_TARGET)
+$(GLIBC_TARGET):
 
 .PHONY: clean
 clean:

File diff suppressed because it is too large
+ 0 - 0
LibOS/shim/src/.packed/shim.sha384


BIN
LibOS/shim/src/.packed/shim.tar.gz


+ 2 - 6
LibOS/shim/src/Makefile

@@ -86,13 +86,9 @@ $(graphene_lib):
 libsysdb.a: $(addsuffix .o,$(objs))
 	@echo [ $@ ]
 	$(AR) $(ARFLAGS) $@ $^
-
-.PHONY: pack
-pack: $(shim_target) $(addsuffix .o,$(objs))
-	@../../../Scripts/pack_binaries.sh shim $^
 else
-$(shim_target): .packed/shim.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(shim_target)
+$(shim_target):
 endif
 
 %.asm: %.c $(headers)

+ 0 - 8
LibOS/shim/test/Makefile

@@ -75,14 +75,6 @@ clean: $(clean-extra) $(if $(level),,clean-subdirs)
 build-subdirs:
 	for f in $(subdirs); do (cd $$f; $(MAKE); cd ..); done
 
-ifeq ($(SYS),x86_64-linux-gnu)
-ifeq ($(level),)
-.PHONY: pack
-pack:
-	for f in $(subdirs); do (cd $$f; $(MAKE) pack; cd ..); done
-endif
-endif
-
 .PHONY: clean-subdirs
 clean-subdirs:
 	for f in $(subdirs); do (cd $$f; $(MAKE) clean; cd ..); done

+ 0 - 1
LibOS/shim/test/apps/lmbench/.packed/lmbench.sha384

@@ -1 +0,0 @@
-host/bin/sh host/usr/include/x86_64-linux-gnu/sys/types.h lmbench-2.5/bin/linux

BIN
LibOS/shim/test/apps/lmbench/.packed/lmbench.tar.gz


+ 0 - 23
LibOS/shim/test/apps/lmbench/Makefile

@@ -25,34 +25,11 @@ $(LINUXDIR)Makefile: Makefile.lmbench
 build-manifest: $(LINUXDIR) $(LINUXDIR)Makefile
 	$(MAKE) -C $(LINUXDIR)
 
-ifeq ($(SYS),x86_64-linux-gnu)
-
 $(lmbench_tests): $(LINUXDIR) build-manifest
 
 $(LINUXDIR): $(wildcard $(LMBENCHDIR)/src/*.c) $(wildcard $(LMBENCHDIR)/src/*.h)
 	$(MAKE) -C $(LMBENCHDIR)/src OS=linux
 
-.PHONY: pack
-$(addprefix host,$(host_files)):
-	@echo "$(patsubst host%,%,$@) -> $@"
-	@mkdir -p $(dir $@)
-	@cp -LTrf $(patsubst host%,%,$@) $@
-
-pack: $(host_files) $(lmbench_tests) $(manifests)
-	@../../../../../Scripts/pack_binaries.sh lmbench $^
-
-else
-
-all: $(addprefix /tmp/host,$(HOST_BINARIES))
-
-$(filter-out $(HOST_BINARIES),$(BINARIES)): .packed/lmbench.tar.gz
-	tar -xmozf $< $@
-
-$(addprefix /tmp/host,$(HOST_BINARIES)): .packed/lmbench.tar.gz
-	cd /tmp && tar -xmozf $(abspath $<) $(subst /tmp/,,$@)
-
-endif
-
 lmbench_config = $(LINUXDIR)$(shell $(LMBENCHDIR)/scripts/config)
 
 $(lmbench_config):

+ 0 - 1
LibOS/shim/test/benchmark/.packed/test.sha384

@@ -1 +0,0 @@
-fork_latency rpc_latency2.libos rpc_latency.libos sig_latency start test_start.m 6e227e7bca9aab23525111d516c5425126faee868ef7c9772b9b854b336977fc16b9ace18ea099c702edd7e2f76af4d3

BIN
LibOS/shim/test/benchmark/.packed/test.tar.gz


+ 2 - 6
LibOS/shim/test/benchmark/Makefile

@@ -23,11 +23,7 @@ $(cxx_executables): %: %.cpp
 	@echo [ $@ ]
 	@$(CC) $(CFLAGS) -o $@ $< \
 	$(shell echo $@ | sed 's/^[^\.]*//g' | sed 's/\./ -l/g')
-
-.PHONY: pack
-pack: $(c_executables) $(cxx_executables)
-	@../../../../Scripts/pack_binaries.sh test $^
 else
-$(c_executables) $(cxx_executables): .packed/test.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(c_executables) $(cxx_executables)
+$(c_executables) $(cxx_executables):
 endif

+ 0 - 1
LibOS/shim/test/inline/.packed/test.sha384

@@ -1 +0,0 @@
-fork helloworld vfork 275420fc4df8974dc0923e35876b280e22c56217075de06823528ed7f56ea0e5694d050bc546e359772f558530a04349

BIN
LibOS/shim/test/inline/.packed/test.tar.gz


+ 2 - 6
LibOS/shim/test/inline/Makefile

@@ -17,11 +17,7 @@ $(c_executables): %: %.c $(libs) $(level)../../../Pal/src/user_start.o
 $(cxx_executables): %: %.cpp $(libs) $(level)../../../Pal/src/user_start.o
 	@echo [ $@ ]
 	$(CXX) $(CFLAGS-debug) $(LDFLAGS-debug) -o $@ $^ -lpal -lsysdb_debug
-
-.PHONY: pack
-pack: $(c_executables) $(cxx_executables)
-	@../../../../Scripts/pack_binaries.sh test $^
 else
-$(c_executables) $(cxx_executables): .packed/test.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(c_executables) $(cxx_executables)
+$(c_executables) $(cxx_executables):
 endif

+ 0 - 1
LibOS/shim/test/native/.packed/test.sha384

@@ -1 +0,0 @@
-alarm brk clone condvar.pthread cpuinfo dir divzero dup epoll epoll_socket errno exec exec_fork exec_victim file fork fork_bomb fork_exec fs futextest.pthread get_time.m helloworld helloworld.pthread kill malloc meminfo msg_create msg_create.libos msg_send msg_send.libos multiproc multisleep pid_alloc pid_kill pie pipe pipe_latency proc readdir rename sandbox_create.libos script sem sleep socketpair sqrt.m start.pthread.m static sync.pthread system tcp test_start_pthread_m.m time udp unix vfork vfork_exec 611bc4da88ef4941be3cfbba5c7402d9cc0b95281d139e18ae86d4a0d799fc536785bbc42af5e6951fe230ede19fc7f0

BIN
LibOS/shim/test/native/.packed/test.tar.gz


+ 2 - 6
LibOS/shim/test/native/Makefile

@@ -31,11 +31,7 @@ pie: %: %.c
 	@echo [ $@ ]
 	@$(CC) $(CFLAGS) -fPIC --pie -o $@ $< \
 	$(shell echo $@ | sed 's/^[^\.]*//g' | sed 's/\./ -l/g')
-
-.PHONY: pack
-pack: $(special_executables) $(c_executables) $(cxx_executables)
-	@../../../../Scripts/pack_binaries.sh test $^
 else
-$(special_executables) $(c_executables) $(cxx_executables): .packed/test.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(special_executables) $(c_executables) $(cxx_executables)
+$(special_executables) $(c_executables) $(cxx_executables):
 endif

+ 0 - 1
LibOS/shim/test/regression/.packed/test.sha384

@@ -1 +0,0 @@
-bootstrap bootstrap_pie bootstrap_static c5648a20859f0491b3e1b025fb2f00c2e5cb8729f62e5d939fb8c7df682ba063981b11bd7e3b11e137c987ca14398b7e

BIN
LibOS/shim/test/regression/.packed/test.tar.gz


+ 2 - 6
LibOS/shim/test/regression/Makefile

@@ -36,13 +36,9 @@ bootstrap_pie: %: %.c
 	@echo [ $@ ]
 	@$(CC) $(CFLAGS) -fPIC --pie -o $@ $< \
 	$(shell echo $@ | sed 's/^[^\.]*//g' | sed 's/\./ -l/g')
-
-.PHONY: pack
-pack: $(special_executables) $(c_executables) $(cxx_executables)
-	@../../../../Scripts/pack_binaries.sh test $^
 else
-$(special_executables) $(c_executables) $(cxx_executables): .packed/test.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(special_executables) $(c_executables) $(cxx_executables)
+$(special_executables) $(c_executables) $(cxx_executables):
 endif
 
 PYTHONENV="PYTHONPATH=../../../../Scripts"

+ 0 - 4
Makefile

@@ -3,10 +3,6 @@ export SYS
 
 targets = all clean
 
-ifeq ($(SYS),x86_64-linux-gnu)
-targets += pack
-endif
-
 .PHONY: $(targets)
 $(targets):
 	$(MAKE) -C Pal $@

+ 0 - 1
Pal/regression/.packed/test.sha384

@@ -1 +0,0 @@
-Bootstrap ..Bootstrap Bootstrap2 Bootstrap3 Directory Exception File Ipc Memory Misc Pipe Preload1.so Preload2.so Process Process2 Process3 Semaphore SendHandle Socket Symbols Thread 5851656aa1965a98de2be10613e5bddfb52659eb2fad51a0d1cac35b7b38110765dea769c5bc5b90d3933661794744c0

BIN
Pal/regression/.packed/test.tar.gz


+ 2 - 5
Pal/regression/Makefile

@@ -60,12 +60,9 @@ $(executables): %: %.c ../src/user_start.o \
 $(graphene_lib):
 	$(MAKE) -C ../lib target=$(shell pwd)/.lib/
 
-.PHONY: pack
-pack: $(preloads) $(executables)
-	@../../Scripts/pack_binaries.sh test $^
 else
-$(preloads) $(executables): .packed/test.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(preloads) $(executables)
+$(preloads) $(executables):
 endif
 
 PYTHONENV = "PYTHONPATH=../../Scripts"

+ 0 - 1
Pal/test/.packed/test.sha384

@@ -1 +0,0 @@
-Broadcast Cpuid Event Exception Failure File Fork HandleSend HelloWorld Ipc Memory Pie Pipe Process Segment Select Server Sleep Tcp Thread Udp Wait Yield d9b49db793cf2dd0e277b6ce39c29f2251780b358b4aa5a968e7e55b22ed5ae4822eb705c9f44f6b39ebf5b1a800e382

BIN
Pal/test/.packed/test.tar.gz


+ 2 - 6
Pal/test/Makefile

@@ -43,13 +43,9 @@ $(executables): %: %.c $(graphene_lib) $(pal_lib) ../src/user_start.o
 
 $(graphene_lib):
 	$(MAKE) -C ../lib target=$(shell pwd)/.lib/
-
-.PHONY: pack
-pack: $(executables)
-	@../../Scripts/pack_binaries.sh test $^
 else
-$(executables): .packed/test.tar.gz
-	tar -xmozf $< $@
+.IGNORE: $(executables)
+$(executables):
 endif
 
 .PHONY: clean

+ 0 - 42
Scripts/pack_binaries.sh

@@ -1,42 +0,0 @@
-#!/bin/bash
-
-hash_method=sha384
-
-mkdir -p .packed
-
-file=$1
-shift
-dir=.packed
-packfile=$dir/${file}.tar.gz
-
-hash="$(echo $(for f in $@; do echo $f; done | sort))"
-
-src=$(for f in $@; do
-	prev_f=
-	while [ "$f" != "$prev_f" ]; do
-		for ext in c cpp S; do
-			[ ! -f ${f}.${ext} ] || echo ${f}.${ext}
-		done
-		prev_f=$f
-		f=${f%.*}
-	done
-done | sort)
-
-git rev-parse --show-toplevel 1>/dev/null 2>/dev/null || not_in_git=1
-
-hashfile=$dir/${file}.${hash_method}
-
-[ "$src" == "" ] || hash="$hash $(cat ${src} | ${hash_method}sum | awk '{ print $1 }')"
-
-if [ -f $hashfile ] && [ "$FORCE_PACK" != "1" ]; then
-	if [ "$(cat $hashfile)" = "$hash" ]; then
-		echo "Packed files are up-to-date, no need to repack the file."
-		exit 0
-	fi
-fi
-
-echo -n $hash > $hashfile
-[ "$not_in_git" = "1" ] || git add $hashfile
-
-tar -chzvvf $packfile $@
-[ "$not_in_git" = "1" ] || git add $packfile

Some files were not shown because too many files changed in this diff