about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2019-03-04 16:46:25 +0000
committerSilvino Silva <silvino@bk.ru>2019-03-04 16:46:25 +0000
commite0a5c6deb7ca4845763083ae7b4f6901e36deefc (patch)
treebaf772a443f48c3dfa6e7c88adc4f68cd82b1e4b
parentfed632cea589a4fc730dc852538cb40ca6f559fa (diff)
parent947ffc14fd8f0987d094210659bbacc38c1637f5 (diff)
downloaddoc-e0a5c6deb7ca4845763083ae7b4f6901e36deefc.tar.gz
release 0.4.3
-rw-r--r--core/conf/iptables/ipt-bridge.sh14
-rw-r--r--core/conf/iptables/ipt-conf.sh1
-rw-r--r--core/conf/iptables/ipt-firewall.sh2
-rw-r--r--core/conf/rc.d/iptables4
-rw-r--r--core/conf/skel/.tmux.conf2
-rw-r--r--core/scripts/backup-ports.sh104
-rw-r--r--core/scripts/backup-system.sh74
-rw-r--r--core/scripts/portspage.patch27
-rw-r--r--core/scripts/restore-ports.sh53
-rw-r--r--dev/git/index.html12
-rw-r--r--index.html2
-rw-r--r--tools/conf/etc/skel/.vimrc55
-rw-r--r--tools/index.html11
-rw-r--r--tools/scripts/pkgmk-test.conf2
-rw-r--r--tools/vim.html97
15 files changed, 342 insertions, 118 deletions
diff --git a/core/conf/iptables/ipt-bridge.sh b/core/conf/iptables/ipt-bridge.sh
index 6ad26fa..fa987a5 100644
--- a/core/conf/iptables/ipt-bridge.sh
+++ b/core/conf/iptables/ipt-bridge.sh
@@ -109,9 +109,11 @@ $IPT -A INPUT -i ${WIFI_IF} -p udp  --sport 137 --dport 137 -j DROP
 $IPT -A INPUT -i ${WIFI_IF} -p udp  --sport 138 --dport 138 -j DROP
 
 $IPT -A INPUT -i ${BR_IF} -d ${PUB_IP} -s ${BR_NET} -j srv_icmp
+$IPT -A INPUT -i ${BR_IF} -d ${WIFI_NET} -s ${BR_NET} -j srv_icmp
 
 $IPT -A INPUT -i ${BR_IF} -d ${PUB_IP} -s ${BR_NET} -j srv_dns_in
 $IPT -A INPUT -i ${WIFI_IF} -d ${PUB_IP} -s ${WIFI_NET} -j srv_dns_in
+$IPT -A INPUT -i ${WIFI_IF} -s ${WIFI_NET} -d ${WIFI_NET} -j srv_dns_in
   
 $IPT -A INPUT -i ${BR_IF} -j srv_dhcp
 $IPT -A INPUT -i ${BR_IF} -s ${GW} -d ${PUB_IP}  -j srv_dhcp
@@ -129,6 +131,11 @@ $IPT -A INPUT -i ${WIFI_IF} -j cli_http_in
 $IPT -A INPUT -i ${WIFI_IF} -j cli_git_in
 $IPT -A INPUT -i ${WIFI_IF} -j cli_ssh_in
 
+# c2.ank /iso -> c9.ank /srv/qemu/iso
+$IPT -A INPUT -i ${BR_IF} -m physdev --physdev-in tap2 -d ${PUB_IP} -j srv_http_in
+# hyperbola servers
+$IPT -A INPUT -p tcp --dport 1024:65535 --sport 50100 -m state --state RELATED,ESTABLISHED -j ACCEPT
+
 ####### Output Chain ######
 $IPT -A OUTPUT -j blocker
 
@@ -139,6 +146,7 @@ $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d ${DNS} -j cli_dns_out
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d ${BR_NET} -j srv_dns_out
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d ${BR_NET} -j srv_ssh_out
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d ${BR_NET} -j srv_icmp
+$IPT -A OUTPUT -o ${BR_IF} -s ${WIFI_NET} -d ${BR_NET} -j srv_icmp
 
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d ${BR_NET} -j cli_ssh_out
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d ${BR_NET} -j cli_git_out
@@ -149,7 +157,6 @@ $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -j cli_https_out
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -j cli_http_out
 $IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -j cli_git_out
 
-
 $IPT -A OUTPUT -o ${WIFI_IF} -d ${DNS} -j cli_dns_out
 $IPT -A OUTPUT -o ${WIFI_IF} -d ${WIFI_NET} -j srv_dns_out
 $IPT -A OUTPUT -o ${WIFI_IF} -j srv_dns_out
@@ -159,7 +166,10 @@ $IPT -A OUTPUT -o ${WIFI_IF} -j cli_git_out
 $IPT -A OUTPUT -o ${WIFI_IF} -j cli_https_out
 $IPT -A OUTPUT -o ${WIFI_IF} -j cli_http_out
 
-#$IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -j cli_ssh_out
+# Hyperbola servers
+$IPT -A OUTPUT -p tcp --sport 1024:65535 --dport 50100 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
+# c2.ank /iso -> c9.ank /srv/qemu/iso
+$IPT -A OUTPUT -o ${BR_IF} -s ${PUB_IP} -d 10.0.0.4  -j srv_http_out
 
 ####### PostRouting Chain ######
 #Less noise
diff --git a/core/conf/iptables/ipt-conf.sh b/core/conf/iptables/ipt-conf.sh
index eef0b52..52669dc 100644
--- a/core/conf/iptables/ipt-conf.sh
+++ b/core/conf/iptables/ipt-conf.sh
@@ -12,6 +12,7 @@ GW="10.0.0.1"
 #GW="10.0.0.2"
 #DNS="10.0.0.254"
 DNS="212.55.154.174"
+#DNS="8.8.8.8"
 
 PUB_IP="10.0.0.254"
 PUB_IF="enp8s0"
diff --git a/core/conf/iptables/ipt-firewall.sh b/core/conf/iptables/ipt-firewall.sh
index 4697de0..6ea613a 100644
--- a/core/conf/iptables/ipt-firewall.sh
+++ b/core/conf/iptables/ipt-firewall.sh
@@ -197,7 +197,7 @@ ipt_tables () {
     $IPT -A cli_ftp_in -j RETURN
     $IPT -A cli_ftp_out -p tcp --dport 21 --sport 1024:65535 -m state --state NEW,ESTABLISHED -j ACCEPT
     $IPT -A cli_ftp_out -p tcp --dport 20 --sport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
-    $IPT -A cli_ftp_out -p tcp --sport 1024:65535 --dport 1024:65535 -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT
+    $IPT -A cli_ftp_out -p tcp --sport 1024:65535 --dport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
     $IPT -A cli_ftp_out -j RETURN
 
     ######## GIT client
diff --git a/core/conf/rc.d/iptables b/core/conf/rc.d/iptables
index 26a48b4..9471f99 100644
--- a/core/conf/rc.d/iptables
+++ b/core/conf/rc.d/iptables
@@ -13,13 +13,13 @@ case $1 in
 			## log everything else and drop
 			ipt_log
 
-			iptables-save > /etc/iptables/net.v4
+			iptables-save > /etc/iptables/bridge.v4
 			;;
 		    server)
 			source /etc/iptables/iptables-conf.sh
 
 			## log everything else and drop
-			iptables_log
+			ipt_log
 
 			iptables-save > /etc/iptables/net.v4
 			;;
diff --git a/core/conf/skel/.tmux.conf b/core/conf/skel/.tmux.conf
index 4feb9a4..ee127e8 100644
--- a/core/conf/skel/.tmux.conf
+++ b/core/conf/skel/.tmux.conf
@@ -9,7 +9,7 @@ bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel
 # copy tmux's selection buffer into the primary X selection with PREFIX+CTRL+Y
 bind-key u run "tmux save-buffer - | xsel -ib"
 # copy primary X selection into tmux's selection buffer with PREFIX+CTRL+P
-bind-key e run "xsel -o | tmux load-buffer -"
+bind-key e run "xsel -ob | tmux load-buffer -"
 
 set-option -g set-titles on
 set-option -g set-titles-string '#S> #I.#P #W'
diff --git a/core/scripts/backup-ports.sh b/core/scripts/backup-ports.sh
new file mode 100644
index 0000000..b5667e4
--- /dev/null
+++ b/core/scripts/backup-ports.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+
+DEST_SYS=/usr/ports/releases/stable
+DEST_ARC=/usr/ports/releases/archives
+
+#PRT_GET_FLAGS="-fr -if -is"
+PRT_GET_FLAGS="-fr"
+
+# Build Name = R1 (System number) D1 (Droid/Machine number)
+BUILD_NAME="R1D9"
+#echo "Give build NAME;"
+#echo "${DEST_ARC}/NAME-0.0.0.targ.gz"
+#read BUILD_NAME
+
+echo "Give build CRUX_RELEASE.VERSION (3.4.X);"
+echo "${DEST_ARC}/${BUILD_NAME}-VERSION.tar.gz"
+read BUILD_VERSION
+
+mkdir -p ${DEST_SYS}
+mkdir -p ${DEST_ARC}
+
+backup_collections() {
+
+    # backup collection packages
+    while read COLL_VERSION; do
+        COLL_NAME=$(echo $COLL_VERSION | cut -d "-" -f 1)
+        COLL_RELEASE=$(echo $COLL_VERSION | cut -d "-" -f 2)
+
+        while read PORT_NAME; do
+            # get installed version not version on ports
+            PACKAGE=$(grep "^${PORT_NAME}#" ${DEST_SYS}/all-installed.pkg)
+            echo "Backing up package:	${PACKAGE}"
+
+            # check if binary package exist
+            if [ ! -f /usr/ports/packages/${PACKAGE} ]; then
+                echo "Building package: ${PACKAGE};"
+                sudo prt-get update ${PRT_GET_FLAGS} ${PORT_NAME}
+            fi
+
+            if [ -f /usr/ports/packages/${PACKAGE} ]; then
+                echo ${PACKAGE} >> ${DEST_SYS}/${COLL_NAME}-backup.pkg
+                tar rvf ${DEST_SYS}/${COLL_NAME}-${COLL_RELEASE}.tar --directory=/usr/ports/packages ${PACKAGE}
+            else
+                echo "Package ${PACKAGE} from ${PORT_NAME} port not found."
+                echo ${PACKAGE} >> ${DEST_SYS}/${COLL_NAME}-${COLL_RELEASE}-notfound.pkg
+            fi
+        done < ${DEST_SYS}/${COLL_NAME}-installed.pkg
+    done < ${DEST_SYS}/ports_versions.pkg
+}
+
+create_metadata() {
+    echo "${BUILD_NAME}-${BUILD_VERSION}" >> ${DEST_SYS}/build_version
+
+    # archive pkgutils data
+    tar --xattrs -zcpf ${DEST_SYS}/pkg-db.tar.gz /var/lib/pkg/db .
+
+    # archive ports data
+    tar --xattrs -zcpf ${DEST_SYS}/etc_ports.tar.gz --directory=/etc/ports .
+
+    # must be using gwak instead of sed
+    prt-get listinst -v | sed 's/ /#/g' | sed 's/$/.pkg.tar.gz/g' > ${DEST_SYS}/all-installed.pkg 
+
+    if [ -f ${DEST_SYS}/ports_versions ]; then
+        rm ${DEST_SYS}/ports_versions.pkg
+    fi
+
+    for filename in /etc/ports/*.git; do
+        source $filename
+
+        echo "${NAME} port collection release (exp; ${BUILD_VERSION}):"
+
+        read RELEASE
+        echo ${NAME}-${RELEASE} >> ${DEST_SYS}/ports_versions.pkg
+
+        # backup ports collection
+        echo "Backing up collection: 	${NAME}"
+        tar --xattrs -zcpf ${DEST_SYS}/${NAME}-ports-${RELEASE}.tar.gz \
+            --directory=/usr/ports/${NAME} \
+            --exclude=.git/ \
+            .
+
+        # create list of installed packages 
+        prt-get printf "%i %p %n\n" | grep "yes /usr/ports/${NAME}" | cut -d " " -f 3 > ${DEST_SYS}/${NAME}-installed.pkg
+    done
+}
+
+create_archive() {
+    echo "Creating  ${DEST_ARC}/${BUILD_NAME}-${BUILD_VERSION}.tar.gz ..."
+    tar --xattrs -zcpf ${DEST_ARC}/${BUILD_NAME}-${BUILD_VERSION}.tar.gz --directory=${DEST_SYS} .
+}
+
+update_host() {
+    echo "Creating links to /usr/ports/installed"
+    rm -r /usr/ports/installed
+    pkg_installed
+
+    echo "Creating ports page"
+    portspage --title=${BUILD_NAME}-${BUILD_VERSION} /usr/ports/installed > /usr/ports/installed/index.html
+}
+
+create_metadata
+backup_collections
+create_archive
+update_host
diff --git a/core/scripts/backup-system.sh b/core/scripts/backup-system.sh
index 7faf676..17c8c6a 100644
--- a/core/scripts/backup-system.sh
+++ b/core/scripts/backup-system.sh
@@ -193,77 +193,3 @@ do
         *) echo "Please enter only y or n"
     esac
 done
-
-# Port System
-while true
-do
-    echo "Backup Port System ?" 
-    echo "Please confirm (y or n) :"
-    read CONFIRM
-    case $CONFIRM in
-        n|N|no|NO|No) break ;;
-        y|Y|YES|yes|Yes)
-            echo "Accept - you entered $CONFIRM"
-
-	    # archive pkgutils data
-	    tar --xattrs -zcpf $DEST_SYS/pkg-db.tar.gz \
-		/var/lib/pkg/db
-
-	    # archive ports data
-	    tar --xattrs -zcpf $DEST_SYS/etc_ports.tar.gz \
-		    --directory=/etc/ports \
-		    .	
-
-	    METADATA=${DEST_SYS}/meta-data
-	    mkdir -p $METADATA
-
-	    # must be using gwak instead of sed
- 	    prt-get listinst -v | sed 's/ /#/g' | sed 's/$/.pkg.tar.gz/g' > ${METADATA}/all-installed.pkg 
-
-	    for filename in /etc/ports/*.git; do
-	    	source $filename
-
-		# backup ports collection
-		echo "Backing up collection: $NAME"
-		tar --xattrs -zcpf $PORT_PRT/${NAME}-ports.tar.gz \
-		--directory=$ROOT_DIR/usr/ports/${NAME} \
-		--exclude=.git/ \
-		.
-
-
-		# create list of installed packages 
-		prt-get printf "%i %p %n\n" | grep "yes /usr/ports/${NAME}" | cut -d " " -f 3 > ${METADATA}/${NAME}-installed.pkg
-
-		# backup collection packages
-		while read line; do
-			echo "Backing up package: ${NAME}/${line}"
-			# get installed version not version on ports
-			PACKAGE="$(cat ${METADATA}/all-installed.pkg | grep "^${line}#")"
-			if [ ! -f /usr/ports/packages/${PACKAGE} ]; then
-				echo "Building package: ${PACKAGE};\n"
-				sudo prt-get update -fr -if -is ${line}
-				(cd /usr/ports/${NAME}/${line} \
-				       	&& sudo pkgmk -uf)
-			fi
-
-			if [ -f /usr/ports/packages/${PACKAGE} ]; then
-				echo ${PACKAGE} >> ${METADATA}/${NAME}-backup.pkg
-				#cp /usr/ports/packages/${PACKAGE} ${PORT_PKG}/${NAME}/
-				tar rvf ${PORT_PKG}/${NAME}.tar \
-					--directory=/usr/ports/packages \
-					${PACKAGE}
-			else
-				echo "Package $PORT_NAME not found: ${line}"
-				echo ${PACKAGE} >> ${METADATA}/${NAME}-notfound.pkg
-			fi
-		done < ${METADATA}/${NAME}-installed.pkg
-	    done
-            break
-            ;;
-        *) echo "Please enter only y or n"
-    esac
-done
-
-RELEASE_NAME=$(basename ${DEST_DIR})
-cd $(dirname ${DEST_DIR}) && tar -zcpf  ${RELEASE_NAME}.tar.gz ${RELEASE_NAME}/
-rm -rf ${DEST_DIR}
diff --git a/core/scripts/portspage.patch b/core/scripts/portspage.patch
new file mode 100644
index 0000000..c94ea4a
--- /dev/null
+++ b/core/scripts/portspage.patch
@@ -0,0 +1,27 @@
+220c220
+< 	print "  <h2>$options{title}</h2>\n";
+---
+> 	print "  <h2><a href=\"https://hive.gnu.systems/wiki/mirror\">Mirror</a> | <a href=\"https://hive.gnu.systems/wiki/crux\">Crux</a> | <a href=\"https://hive.gnu.systems/git/\">Git</a> | <a href=\"https://hive.gnu.systems/mirror/bugs/\">Build errors</a> | <a href=\"https://hive.gnu.systems/mirror/distfiles/\">Distfiles</a> | <a href=\"https://hive.gnu.systems/mirror/releases/archives/$options{title}.tar.gz\">$options{title}.tar.gz</a> | <a href=\"https://hive.gnu.systems/mirror/archive/\">Archive</a></h2>\n";
+233c233,238
+< 	print "   <tr class=\"header\"><td><b>Port</b></td><td><b>Version</b></td><td><b>Description</b></td>";
+---
+> 	print "   <tr class=\"header\">
+> 	<td><b>Project page</b></td>
+> 	<td><b>Port</b></td>
+> 	<td><b>Package</b></td>
+> 	<td><b>Description</b></td>";
+> 
+244,248c249,255
+< 		print "   <tr class=\"$odd\"><td>";
+< 		$db{$port}{URL} ? print "<a href=\"$db{$port}{URL}\">$port</a>" : print "$port";
+< 		print "</td><td><a href=\"$options{directory}/$port/\">$db{$port}{version}-$db{$port}{release}</a></td><td>";
+< 		print $db{$port}{Description} if $db{$port}{Description};
+< 		print "</td>";
+---
+> 		my $port_collection=`prt-get info $port | grep "Path:" | cut -d ":" -f 2 | xargs basename`;
+> 		print "   <tr class=\"$odd\">";
+> 		$db{$port}{URL} ? print "<td><a href=\"$db{$port}{URL}\">$port</a></td>" : print "<td>$port</td>";
+> 		#print "</td><td><a href=\"$options{directory}/$port/\">$db{$port}{version}-$db{$port}{release}</a></td><td>";
+> 		print "<td><a href=\"https://hive.gnu.systems/git/$port_collection.git/tree/refs/heads/master\:/$port\">$db{$port}{version}-$db{$port}{release}</a></td>";
+> 		print "<td><a href=\"https://hive.gnu.systems/mirror/packages/$port%23$db{$port}{version}-$db{$port}{release}.pkg.tar.gz\">$port#$db{$port}{version}-$db{$port}{release}.pkg.tar.gz</a></td>";
+> 		print "<td>$db{$port}{Description}</td>" if $db{$port}{Description};
diff --git a/core/scripts/restore-ports.sh b/core/scripts/restore-ports.sh
new file mode 100644
index 0000000..39f5178
--- /dev/null
+++ b/core/scripts/restore-ports.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+BUILD_NAME=R1D9
+BUILD_VERSION=3.4.1
+WORK_DIR=/usr/ports/work/${BUILD_NAME}-${BUILD_VERSION}
+
+prepare_archive() {
+    mkdir -p ${WORK_DIR}
+    wget --directory-prefix=${WORK_DIR} https://hive.gnu.systems/mirror/releases/archives/${BUILD_NAME}-${BUILD_VERSION}.tar.gz
+    echo "extracting ${WORK_DIR}/${BUILD_NAME}-${BUILD_VERSION}.tar.gz..."
+    tar -C ${WORK_DIR} -xf ${WORK_DIR}/${BUILD_NAME}-${BUILD_VERSION}.tar.gz
+    rm ${WORK_DIR}/${BUILD_NAME}-${BUILD_VERSION}.tar.gz
+}
+
+extract_archives() {
+    while read COLL_VERSION; do
+        COLL_NAME=$(echo $COLL_VERSION | cut -d "-" -f 1)
+        COLL_RELEASE=$(echo $COLL_VERSION | cut -d "-" -f 2)
+        echo "extracting ${COLL_VERSION}.tar to /usr/ports/packages"
+        tar -C /usr/ports/packages -xf ${WORK_DIR}/${COLL_VERSION}.tar
+        rm ${WORK_DIR}/${COLL_VERSION}.tar
+    done < ${WORK_DIR}/ports_versions.pkg
+}
+
+update_system() {
+    mkdir -p ${WORK_DIR}/etc/ports
+    tar -C ${WORK_DIR}/etc/ports -xf ${WORK_DIR}/etc_ports.tar.gz
+    cp ${WORK_DIR}/etc/ports/*.git /etc/ports/
+
+    while read COLL_VERSION; do
+        COLL_NAME=$(echo $COLL_VERSION | cut -d "-" -f 1)
+        ports -u $COLL_NAME
+    done < ${WORK_DIR}/ports_versions.pkg
+
+    # first update with prt-get
+    prt-get sysup
+    prt-get --pre-install --post-install update $(prt-get listinst)
+    prt-get depinst $(prt-get printf "%p %n\n" | grep "/usr/ports/core" | cut -d " " -f 2)
+    prt-get update $(revdep)
+
+    rejmerge
+}
+
+install_distro() {
+    while read PACKAGE; do
+        prt-get depinst $(echo $PACKAGE | cut -d "#" -f 1);
+    done < ${WORK_DIR}/all-installed.pkg
+}
+
+prepare_archive
+extract_archives
+update_system
+install_distro
diff --git a/dev/git/index.html b/dev/git/index.html
index e23e2a0..ed64efa 100644
--- a/dev/git/index.html
+++ b/dev/git/index.html
@@ -26,15 +26,19 @@
     <p>Paging based on output size with less;</p>
 
     <pre>
-    git config --global --replace-all core.pager "less -F -X"
+    $ git config --global core.pager "less -F -X"
     </pre>
 
-    <p>Example to disable for just one subcommand and local repository;</p>
+    <p>Use <a href="../../tools/vim.html#vimdiff">vimdiff</a> as diff and merge tool;</p>
 
     <pre>
-    $ git config pager.diff cat
+    $ git config --global diff.tool vimdiff
+    $ git config --global merge.tool vimdiff
+    $ git config --global difftool.prompt false
     </pre>
 
+    <h2 id="teamwork">1. Team WorkFlow</h2>
+
     <p>Assumptions of this document;</p>
 
     <ul>
@@ -57,8 +61,6 @@
        $ git remote -v
     </pre>
 
-    <h2 id="teamwork">1. Team WorkFlow</h2>
-
     <p>This work flow is based on
     <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vicent Driessen</a>
     development model, it defines rules how branches are forked,
diff --git a/index.html b/index.html
index 9713326..92df2e6 100644
--- a/index.html
+++ b/index.html
@@ -38,7 +38,7 @@
         <p>Version;</p>
 
         <pre>
-        rev 0.4.2
+        rev 0.4.3
         </pre>
 
         <a href="links.html">Links</a> contains relevant
diff --git a/tools/conf/etc/skel/.vimrc b/tools/conf/etc/skel/.vimrc
index 9958538..2a45faf 100644
--- a/tools/conf/etc/skel/.vimrc
+++ b/tools/conf/etc/skel/.vimrc
@@ -37,22 +37,24 @@ set incsearch		" do incremental searching
 if &t_Co > 2 || has("gui_running")
   syntax on
   set hlsearch
+  set background=dark
   colorscheme wombat256mod
+  " colorscheme desert
 endif
 
-"
+
 "" Only do this part when compiled with support for autocommands.
-"if has("autocmd")
+if has("autocmd")
 "
 "  " Enable file type detection.
 "  " Use the default filetype settings, so that mail gets 'tw' set to 72,
 "  " 'cindent' is on in C files, etc.
 "  " Also load indent files, to automatically do language-dependent indenting.
-"  filetype plugin indent on
+  filetype plugin indent on
 "
 "  " Put these in an autocmd group, so that we can delete them easily.
-"  augroup vimrcEx
-"  au!
+  augroup vimrcEx
+  au!
 "
 "  " For all text files set 'textwidth' to 78 characters.
 "  autocmd FileType text setlocal textwidth=78
@@ -60,19 +62,18 @@ endif
 "  " When editing a file, always jump to the last known cursor position.
 "  " Don't do it when the position is invalid or when inside an event handler
 "  " (happens when dropping a file on gvim).
-"  autocmd BufReadPost *
-"    \ if line("'\"") >= 1 && line("'\"") <= line("$") |
-"    \   exe "normal! g`\"" |
-"    \ endif
-"
-"  augroup END
-"
-"else
-"
-"  set autoindent		" always set autoindenting on
-"
-"endif " has("autocmd")
-"
+  autocmd BufReadPost *
+    \ if line("'\"") >= 1 && line("'\"") <= line("$") |
+    \   exe "normal! g`\"" |
+    \ endif
+
+  augroup END
+
+else
+  set autoindent		" always set autoindenting on
+
+endif " has("autocmd")
+
 "" Convenient command to see the difference between the current buffer and the
 "" file it was loaded from, thus the changes you made.
 "" Only define it when not defined already.
@@ -87,7 +88,23 @@ endif
 "  " compatible).
 "  set langnoremap
 "endif
-"
+
+" Search down into subfolders
+" Provides tab-completion for all file-related tasks
+set path+=**
+
+" Display all matching files when we tab complete
+set wildmenu
+
+" Better file browsing
+let g:netrw_banner=0        " disable annoying banner
+let g:netrw_browse_split=4  " open in prior window
+let g:netrw_altv=1          " open splits to the right
+let g:netrw_liststyle=3     " tree view
+let g:netrw_list_hide=netrw_gitignore#Hide()
+let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
+
+
 map <F2> :tabnew
 map <F3> :tabprevious<CR>
 map <F4> :tabnext<CR>
diff --git a/tools/index.html b/tools/index.html
index e2eef45..0afdf3e 100644
--- a/tools/index.html
+++ b/tools/index.html
@@ -27,10 +27,13 @@
                 <ul>
                     <li><a href="vim.html#vimrc">1. Vim RC</a></li>
                     <li><a href="vim.html#color">2. Color schemes</a></li>
-                    <li><a href="vim.html#spacetab">3. Split and tab</a></li>
-                    <li><a href="vim.html#block">4. Editing Files</a></li>
-                    <li><a href="vim.html#spellcheck">5. Spell check</a></li>
-                    <li><a href="vim.html#plugin">6. Plugins</a></li>
+                    <li><a href="vim.html#split">3. Split and tab</a></li>
+                    <li><a href="vim.html#filebrowser">4. File browser</a></li>
+                    <li><a href="vim.html#block">5. Editing files</a></li>
+                    <li><a href="vim.html#ctags">6. Tags</a></li>
+                    <li><a href="vim.html#spellcheck">7. Spellcheck</a></li>
+                    <li><a href="vim.html#plugin">8. Plugins</a></li>
+                    <li><a href="vim.html#vimdiff">9. Vimdiff</a></li>
                 </ul>
             </li>
             <li><a href="gnupg.html">Gpg</a>
diff --git a/tools/scripts/pkgmk-test.conf b/tools/scripts/pkgmk-test.conf
index c5f70e4..14248aa 100644
--- a/tools/scripts/pkgmk-test.conf
+++ b/tools/scripts/pkgmk-test.conf
@@ -4,7 +4,7 @@
 
 source /etc/pkgmk.conf
 
-PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/)
+#PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/)
 PKGMK_SOURCE_DIR="$PWD"
 PKGMK_PACKAGE_DIR="$PWD"
 PKGMK_WORK_DIR="$PWD/work"
diff --git a/tools/vim.html b/tools/vim.html
index b3354d8..dd1e8a6 100644
--- a/tools/vim.html
+++ b/tools/vim.html
@@ -2,12 +2,12 @@
 <html dir="ltr" lang="en">
     <head>
         <meta charset='utf-8'>
-        <title> Vim</title>
+        <title>Vim</title>
     </head>
     <body>
 
-        <a href="index.html">Systools Index</a>
-        <h1 id="vim"> Vim</h1>
+        <a href="index.html">Tools Index</a>
+        <h1 id="vim">Vim</h1>
 
         <p>&lt;leader&gt; with default configuration is key \, so when
         you see &lt;leader&gt;-W means pressing \W</p>
@@ -29,7 +29,7 @@
         personalizing it;</p>
 
         <pre>
-        $ sudo cp ~/sysdoc/conf/etc/skel/.vimrc /etc/skel/
+        $ sudo cp ~/doc/conf/etc/skel/.vimrc /etc/skel/
         $ sudo mkdir /etc/skel/.vim
         $ sudo mkdir /etc/skel/.vim/swap
         $ sudo mkdir /etc/skel/.vim/views
@@ -44,7 +44,7 @@
         <p>Default vimrc skeleton is configured to use wombat2mod,
         which is installed by adduser skeleton.</p>
 
-        <h2 id="spacetab">3. Split and Tab</h2>
+        <h2 id="split">3. Split and Tab</h2>
 
         <p>Horizontal split;</p>
         <pre>
@@ -85,6 +85,19 @@
             <dd>Open vertical split with file browser.</dd>
         </dl>
 
+        <p>To find files, run vim at top level of project and then use find auto completion or *;</p>
+
+        <pre>
+        :find nameofdirectory + Tab
+        :find nameofdir* + Tab
+        </pre>
+
+        <p>For file browsing there is also a option to use edit;</p>
+
+        <pre>
+        :edit nameofdirectory/
+        <pre>
+
         <h2 id="edit">5. Editing files</h2>
 
         <p>Come from background;</p>
@@ -179,13 +192,81 @@
             comma (,), press esc to confirm.</dd>
         </dl>
 
-        <h2 id="spellcheck">6. Spell check</h2>
+        <h2 id="ctags">6. Tags</h2>
+
+        <p>Tags, at top level of project;</p>
+
+        <pre>
+        $ ctags -R .
+        $ vim src/hello_world.c
+        </pre>
+
+        <p>To follow a tag;</p>
+
+        <pre>
+        Ctrl-]
+        </pre>
+
+        <p>To get back;</p>
+
+        <pre>
+        Ctrl-t
+        </pre>
+
+        <p>Autocomplete, press to see all options;</p>
+
+        <pre>
+        Ctrl-n
+        </pre>
+
+        <p>To move forward and backward in options;</p>
+
+        <pre>
+        Ctrl-n Ctrl-p
+        </pre>
+
+        <p>Show auto completion with references to only this file;</p>
+
+        <pre>
+        Ctrl-x Ctrl-n
+        </pre>
+
+        <p>Show auto completion with filenames, * Tab can be used;</p>
+
+        <pre>
+        Ctrl-x Ctrl-f
+        </pre>
+
+        <p>Show auto completion with only tags;</p>
+
+        <pre>
+        Ctrl-x Ctrl-]
+        </pre>
+
+        <h2 id="spellcheck">7. Spellcheck</h2>
 
         <p>Press z= over the bad written word and select desired one.</p>
 
-        <h2 id="plugin">7. Plugins</h2>
+        <h2 id="plugin">8. Plugins</h2>
+
+        <h2 id="vimdiff">9. Vimdiff</h2>
+
+	<p>If two files are open in <a href="#split">split</a> type :diffthis in both windows to get vimdiff of the files. To close type :diffoff.</p>
+
+	<dl>
+	<dt>do<dt>
+	<dd> Get changes from other window into the current window.</dd>
+	<dt>dp</dt>
+	<dd>Put the changes from current window into the other window.</dd>
+	<dt>]c</dt>
+	<dd>Jump to the next change.</dd>
+        <dt>[c</dt>
+        <dd>Jump to the previous change.</dd>
+        <dt>Ctrl W + Ctrl W</dt>
+        <dd>Switch to the other split window.</dd>
+	</dl>
 
-        <a href="index.html">Systools Index</a>
+        <a href="index.html">Tools Index</a>
         <p>This is part of the Hive System Documentation.
         Copyright (C) 2019
         Hive Team.
m> 2014-07-17 08:16:22 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2014-07-17 08:16:54 -0700 26 - cleanup tests' href='/akkartik/mu/commit/mu.arc.t?h=main&id=8ccc6ebf0f90a3b1e939d6ef845df7bfd4501f8a'>8ccc6ebf ^
6264ac68 ^
409e66cc ^
6264ac68 ^

b90a10d2 ^


d95ed21d ^
6264ac68 ^

8ccc6ebf ^
77f8e6cd ^
409e66cc ^
77f8e6cd ^

b90a10d2 ^


d95ed21d ^
a5e757e1 ^

8ccc6ebf ^
a5e757e1 ^
409e66cc ^
a5e757e1 ^

b90a10d2 ^


d95ed21d ^
c8d7559a ^
8ccc6ebf ^

c8d7559a ^
409e66cc ^
c8d7559a ^

b90a10d2 ^


d95ed21d ^
c8d7559a ^

8ccc6ebf ^

409e66cc ^
8ccc6ebf ^

b90a10d2 ^


d95ed21d ^
8ccc6ebf ^


c8d7559a ^
409e66cc ^
c8d7559a ^

b90a10d2 ^


d95ed21d ^
c8d7559a ^

8ccc6ebf ^
c8d7559a ^
409e66cc ^
c8d7559a ^

b90a10d2 ^


77f8e6cd ^
d95ed21d ^
77f8e6cd ^

8ccc6ebf ^
b83c85c8 ^
409e66cc ^
b83c85c8 ^

b90a10d2 ^


368e76cd ^
b90a10d2 ^
d95ed21d ^
b83c85c8 ^

8ccc6ebf ^
fbe15a98 ^
b83c85c8 ^
409e66cc ^
b83c85c8 ^

b90a10d2 ^




368e76cd ^
b90a10d2 ^
d95ed21d ^
b83c85c8 ^
a5e757e1 ^
8ccc6ebf ^
b83c85c8 ^
409e66cc ^
b83c85c8 ^

b90a10d2 ^




368e76cd ^
b90a10d2 ^
d95ed21d ^
b83c85c8 ^
a5e757e1 ^
8ccc6ebf ^
368e76cd ^
409e66cc ^
368e76cd ^
b794da7f ^
b90a10d2 ^





b794da7f ^
b90a10d2 ^
d95ed21d ^
b794da7f ^



409e66cc ^
b794da7f ^
52c3822e ^


d95ed21d ^
52c3822e ^



409e66cc ^
52c3822e ^



b20165a8 ^
d95ed21d ^
52c3822e ^

b20165a8 ^
52c3822e ^
409e66cc ^
52c3822e ^
d90d6629 ^




d95ed21d ^
d90d6629 ^

7b6e5972 ^
d90d6629 ^
409e66cc ^
d90d6629 ^
f9dd51f6 ^




d95ed21d ^
f9dd51f6 ^





b9fef047 ^
7b6e5972 ^



d95ed21d ^
7b6e5972 ^






689a480e ^




6a2edbe8 ^
d95ed21d ^
689a480e ^
6a2edbe8 ^











d95ed21d ^
6a2edbe8 ^


689a480e ^





b9fef047 ^



d95ed21d ^
b9fef047 ^

7b6e5972 ^
b9fef047 ^


72406d19 ^
b90a10d2 ^







368e76cd ^
b90a10d2 ^


d95ed21d ^
368e76cd ^


b1637649 ^
8ccc6ebf ^
d95ed21d ^


8ccc6ebf ^
409e66cc ^
8ccc6ebf ^

b90a10d2 ^









0cd4bfc8 ^
b90a10d2 ^



8ccc6ebf ^
b90a10d2 ^


d95ed21d ^
8ccc6ebf ^



b1637649 ^
8ccc6ebf ^
d95ed21d ^
8ccc6ebf ^
409e66cc ^
8ccc6ebf ^

b90a10d2 ^














8ccc6ebf ^
b90a10d2 ^





d95ed21d ^
8ccc6ebf ^





b1637649 ^
8ccc6ebf ^
6215fec2 ^
b90a10d2 ^


6215fec2 ^
b90a10d2 ^


6215fec2 ^

b90a10d2 ^





6215fec2 ^
b794da7f ^

b90a10d2 ^


b794da7f ^



b90a10d2 ^



b794da7f ^


b90a10d2 ^


b794da7f ^
b90a10d2 ^

b794da7f ^
b90a10d2 ^
b794da7f ^


b90a10d2 ^





b794da7f ^
c82603ca ^
b794da7f ^
b90a10d2 ^

b794da7f ^
b90a10d2 ^
b794da7f ^
b90a10d2 ^
b794da7f ^
b90a10d2 ^

b794da7f ^

b90a10d2 ^





b794da7f ^
c82603ca ^
be342901 ^
409e66cc ^
b90a10d2 ^

be342901 ^
b90a10d2 ^
be342901 ^
b90a10d2 ^
be342901 ^
b90a10d2 ^

be342901 ^

d95ed21d ^
be342901 ^



409e66cc ^
b90a10d2 ^

be342901 ^
b90a10d2 ^
be342901 ^
b90a10d2 ^
be342901 ^
b90a10d2 ^

be342901 ^

d95ed21d ^
be342901 ^


230415b4 ^





d95ed21d ^
230415b4 ^










d95ed21d ^
230415b4 ^




f3b0f4dc ^






033d558a ^
f3b0f4dc ^













1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694