diff --git a/releasetools/applywhitelist.sh b/releasetools/applywhitelist.sh new file mode 100755 index 000000000..eadc224ef --- /dev/null +++ b/releasetools/applywhitelist.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Assume $1 is whitelist working directory +cd $1 +mkdir -p $SRC/$2 +while read dir +do + cp -rf $dir $SRC/$2 +done + +cd $MINIX diff --git a/releasetools/minix.txt b/releasetools/minix.txt new file mode 100644 index 000000000..c4fd950b1 --- /dev/null +++ b/releasetools/minix.txt @@ -0,0 +1,9 @@ +minix +build.sh +distrib +docs +etc +Makefile +releasetools +.gitignore +.gitreview diff --git a/releasetools/netbsd2minix.sh b/releasetools/netbsd2minix.sh new file mode 100755 index 000000000..77efa691e --- /dev/null +++ b/releasetools/netbsd2minix.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +# Current source tree +: ${MINIX=`pwd`} +# releasetools folder +: ${RT=$MINIX/releasetools} +# NetBSD source tree +: ${NETBSD=$MINIX/../netbsd} +# New source tree +: ${SRC=$MINIX/../newsrc} + +export MINIX NETBSD SRC + +echo "Setup NetBSD" +cd $NETBSD || (git clone --depth 1 git://github.com/jsonn/src $NETBSD && cd $NETBSD) +git pull +git reset --hard +echo "Clear new src tree" +mkdir -p $SRC +rm -rf $SRC/* + +echo "Apply whitelists" + +cd $RT/whitelist +for item in `ls` +do + $RT/applywhitelist.sh $NETBSD/$item $item < $item + echo "$item moved" +done + +$RT/applywhitelist.sh $MINIX . < $RT/minix.txt + +echo "Apply special-cases" + +cd $MINIX + +for dir in "external bin games gnu libexec sbin tools usr.bin usr.sbin" +do + cp -f $MINIX/$dir/Makefile $SRC/$dir/Makefile +done + +cp -r $MINIX/include/cdbr.h $SRC/include/cdbr.h +cp -r $MINIX/share/zoneinfo $SRC/share/zoneinfo +cp -r $MINIX/tools/llvm-librt $SRC/tools/llvm-librt +cp -r $MINIX/tools/mkfs.mfs $SRC/tools/mkfs.mfs +cp -r $MINIX/tools/mkproto $SRC/tools/mkproto +cp -r $MINIX/tools/partition $SRC/tools/partition +cp -r $MINIX/tools/toproto $SRC/tools/toproto +cp -r $MINIX/tools/writeisofs $SRC/tools/writeisofs + diff --git a/releasetools/whitelist/bin b/releasetools/whitelist/bin new file mode 100644 index 000000000..8a9a7aed4 --- /dev/null +++ b/releasetools/whitelist/bin @@ -0,0 +1,28 @@ +cat +chmod +cp +date +dd +df +echo +ed +expr +hostname +kill +ksh +ln +ls +Makefile +Makefile.inc +mkdir +mv +pax +ps +pwd +rm +rmdir +sh +sleep +stty +sync +test diff --git a/releasetools/whitelist/common b/releasetools/whitelist/common new file mode 100644 index 000000000..76b2b46b5 --- /dev/null +++ b/releasetools/whitelist/common @@ -0,0 +1,3 @@ +dist +include +lib diff --git a/releasetools/whitelist/external b/releasetools/whitelist/external new file mode 100644 index 000000000..ca56fc5a2 --- /dev/null +++ b/releasetools/whitelist/external @@ -0,0 +1,8 @@ +bsd +gpl3 +historical +lgpl3 +Makefile +mit +public-domain +README diff --git a/releasetools/whitelist/games b/releasetools/whitelist/games new file mode 100644 index 000000000..53e1bb8b7 --- /dev/null +++ b/releasetools/whitelist/games @@ -0,0 +1,23 @@ +adventure +arithmetic +banner +bcd +caesar +colorbars +factor +fish +fortune +Makefile +Makefile.inc +monop +morse +number +pig +ppt +primes +rain +random +rogue +snake +tetris +wargames diff --git a/releasetools/whitelist/gnu b/releasetools/whitelist/gnu new file mode 100644 index 000000000..8c6b3b617 --- /dev/null +++ b/releasetools/whitelist/gnu @@ -0,0 +1,4 @@ +dist +Makefile +README +usr.bin diff --git a/releasetools/whitelist/include b/releasetools/whitelist/include new file mode 100644 index 000000000..95cca8fbc --- /dev/null +++ b/releasetools/whitelist/include @@ -0,0 +1,108 @@ +aio.h +a.out.h +ar.h +arpa +assert.h +atomic.h +bitstring.h +bm.h +cdbw.h +complex.h +cpio.h +ctype.h +db.h +dirent.h +disktab.h +dlfcn.h +err.h +errno.h +fenv.h +fmtmsg.h +fnmatch.h +fstab.h +fts.h +ftw.h +getopt.h +glob.h +grp.h +hesiod.h +iconv.h +ieeefp.h +ifaddrs.h +inttypes.h +iso646.h +kvm.h +langinfo.h +libgen.h +limits.h +link_aout.h +link_elf.h +link.h +locale.h +login_cap.h +lwp.h +Makefile +malloc.h +math.h +md2.h +memory.h +mntopts.h +monetary.h +mpool.h +mqueue.h +ndbm.h +netconfig.h +netdb.h +netgroup.h +nlist.h +nl_types.h +nsswitch.h +paths.h +protocols +pwd.h +quota.h +randomid.h +ranlib.h +re_comp.h +regex.h +regexp.h +resolv.h +res_update.h +rmt.h +rpc +rpcsvc +sched.h +search.h +semaphore.h +setjmp.h +sgtty.h +signal.h +spawn.h +ssp +stab.h +stdbool.h +stddef.h +stdio.h +stdlib.h +string.h +stringlist.h +strings.h +struct.h +sysexits.h +tar.h +tgmath.h +time.h +ttyent.h +tzfile.h +ucontext.h +ulimit.h +unistd.h +util.h +utime.h +utmp.h +utmpx.h +uuid.h +vis.h +wchar.h +wctype.h +wordexp.h diff --git a/releasetools/whitelist/lib b/releasetools/whitelist/lib new file mode 100644 index 000000000..5b0257793 --- /dev/null +++ b/releasetools/whitelist/lib @@ -0,0 +1,26 @@ +bumpversion +checkoldver +checkver +checkvers +csu +libbz2 +libc +libcrypt +libcurses +libc_vfp +libedit +libexecinfo +libform +libm +libmenu +libpci +libprop +libpuffs +librefuse +librmt +libterminfo +libutil +libz +lua +Makefile +Makefile.inc diff --git a/releasetools/whitelist/libexec b/releasetools/whitelist/libexec new file mode 100644 index 000000000..3d1039115 --- /dev/null +++ b/releasetools/whitelist/libexec @@ -0,0 +1,7 @@ +fingerd +ftpd +getty +ld.elf_so +Makefile +Makefile.inc +makewhatis diff --git a/releasetools/whitelist/sbin b/releasetools/whitelist/sbin new file mode 100644 index 000000000..e4ed177e3 --- /dev/null +++ b/releasetools/whitelist/sbin @@ -0,0 +1,12 @@ +chown +fsck +fsck_ext2fs +init +Makefile +Makefile.inc +mknod +newfs_ext2fs +nologin +ping +reboot +shutdown diff --git a/releasetools/whitelist/share b/releasetools/whitelist/share new file mode 100644 index 000000000..0456cab68 --- /dev/null +++ b/releasetools/whitelist/share @@ -0,0 +1,6 @@ +legal +Makefile +Makefile.inc +misc +mk +terminfo diff --git a/releasetools/whitelist/sys b/releasetools/whitelist/sys new file mode 100644 index 000000000..177e0d6b9 --- /dev/null +++ b/releasetools/whitelist/sys @@ -0,0 +1,14 @@ +arch +compat +conf +dev +external +fs +lib +Makefile +net +netinet +netinet6 +sys +ufs +uvm diff --git a/releasetools/whitelist/tests b/releasetools/whitelist/tests new file mode 100644 index 000000000..d39979daf --- /dev/null +++ b/releasetools/whitelist/tests @@ -0,0 +1,22 @@ +bin +crypto +dev +fs +games +h_macros.h +include +ipf +kernel +lib +libexec +Makefile +Makefile.inc +modules +net +README +rump +sbin +share +sys +usr.bin +usr.sbin diff --git a/releasetools/whitelist/tools b/releasetools/whitelist/tools new file mode 100644 index 000000000..9e3735c99 --- /dev/null +++ b/releasetools/whitelist/tools @@ -0,0 +1,53 @@ +awk +binstall +binutils +cat +cksum +compat +file +gcc +genassym +gmake +gmp +headerlist +host-mkdep +installboot +join +lex +llvm +llvm-clang +llvm-clang-tblgen +llvm-include +llvm-lib +llvm-lld +llvm-mcld +llvm-tblgen +lorder +m4 +make +Makefile +Makefile.gmakehost +Makefile.gnuhost +Makefile.gnuwrap +Makefile.host +Makefile.nbincludes +makewhatis +mandoc +mkdep +mkheaderlist.sh +mknod +mktemp +mpc +mpfr +mtree +nbperf +pax +pwd_mkdb +sed +stat +strfile +texinfo +tic +tsort +yacc +zic diff --git a/releasetools/whitelist/usr.bin b/releasetools/whitelist/usr.bin new file mode 100644 index 000000000..3b5053248 --- /dev/null +++ b/releasetools/whitelist/usr.bin @@ -0,0 +1,124 @@ +apropos +asa +banner +basename +bdes +bzip2 +bzip2recover +cal +calendar +checknr +chpass +cksum +col +colcrt +colrm +column +comm +csplit +ctags +cut +deroff +dirname +du +env +expand +false +finger +fold +fpr +from +fsplit +ftp +genassym +getopt +gzip +head +hexdump +id +indent +infocmp +join +jot +lam +last +ldd +leave +lock +login +logname +lorder +m4 +machine +make +Makefile +Makefile.inc +man +menuc +mesg +mkdep +mkfifo +mkstr +mktemp +msgc +nbperf +newgrp +nice +nl +nohup +passwd +paste +patch +pathchk +pr +printenv +printf +pwhash +renice +rev +sdiff +sed +seq +shar +shlock +shuffle +soelim +sort +split +stat +su +tail +tee +tic +touch +tput +tr +true +tsort +tty +ul +uname +unexpand +unifdef +uniq +units +unvis +unzip +users +uudecode +uuencode +uuidgen +vis +w +wall +wc +what +whatis +whereis +who +whois +write +xargs +xinstall +xstr +yes diff --git a/releasetools/whitelist/usr.sbin b/releasetools/whitelist/usr.sbin new file mode 100644 index 000000000..2c85f2d81 --- /dev/null +++ b/releasetools/whitelist/usr.sbin @@ -0,0 +1,16 @@ +chroot +i2cscan +installboot +link +Makefile +Makefile.inc +mtree +postinstall +pwd_mkdb +rdate +traceroute +unlink +user +vipw +vnconfig +zic