From 0632591996893fe136a1f2fe44d9b9f404f41f3e Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Thu, 1 Nov 2018 13:30:58 +0100 Subject: Initial commit --- documentation/.gitignore | 1 + documentation/.update | 39 ++ documentation/Makefile | 31 ++ documentation/README.md | 5 + documentation/aux/block-inventory | 10 + documentation/aux/ctrl-c | 7 + documentation/aux/dnf-history | 21 + documentation/aux/git-inventory | 13 + documentation/aux/kvm-inventory | 18 + documentation/blockdevices | 41 ++ documentation/git-system-repos | 64 +++ documentation/kvm-details/domain-arch.xml | 126 +++++ documentation/kvm-details/domain-basfperl.xml | 106 +++++ documentation/kvm-details/domain-centoscl0.xml | 135 ++++++ documentation/kvm-details/domain-centoscl1.xml | 137 ++++++ documentation/kvm-details/domain-centoscl2.xml | 134 ++++++ documentation/kvm-details/domain-debian.xml | 140 ++++++ documentation/kvm-details/domain-firewall.xml | 162 +++++++ .../domain-guestfs-y4pl944s9lh5ows7.xml | 109 +++++ documentation/kvm-details/domain-indiana.xml | 126 +++++ documentation/kvm-details/domain-iscsi.xml | 147 ++++++ documentation/kvm-details/domain-jango105.xml | 137 ++++++ documentation/kvm-details/domain-opensuse-old.xml | 115 +++++ documentation/kvm-details/domain-opensuse.xml | 132 ++++++ documentation/kvm-details/domain-vswitch.xml | 130 +++++ documentation/kvm-details/net-hodenkobold.xml | 10 + documentation/kvm-details/net-hundehuette.xml | 8 + documentation/kvm-details/net-san-cluster.xml | 10 + documentation/kvm-details/net-sosaria05.xml | 11 + documentation/kvm-details/pool-isos.xml | 19 + documentation/kvm-details/pool-kuehe.xml | 19 + documentation/kvm-details/pool-libvirt.xml | 16 + documentation/kvm-details/pool-nvram.xml | 19 + documentation/kvm-details/pool-ovmf.xml | 19 + documentation/kvm-details/pool-virtio-win-git.xml | 19 + documentation/kvm-details/pool-virtio-win.xml | 19 + documentation/kvm-details/pool-vmshare.xml | 19 + documentation/kvm_overview | 36 ++ documentation/packages | 524 +++++++++++++++++++++ documentation/selinux/my-dbusdaemonlau.pp | Bin 0 -> 969 bytes documentation/selinux/my-dbusdaemonlau.te | 11 + documentation/selinux/my-iptables.pp | Bin 0 -> 945 bytes documentation/selinux/my-iptables.te | 11 + documentation/selinux/my-kdumpdepgener.pp | Bin 0 -> 942 bytes documentation/selinux/my-kdumpdepgener.te | 11 + documentation/selinux/my-pklacheckauth.pp | Bin 0 -> 961 bytes documentation/selinux/my-pklacheckauth.te | 11 + documentation/selinux/my-sssd.pp | Bin 0 -> 971 bytes documentation/selinux/my-sssd.te | 11 + documentation/selinux/my-unixchkpwd.pp | Bin 0 -> 966 bytes documentation/selinux/my-unixchkpwd.te | 11 + 51 files changed, 2900 insertions(+) create mode 100644 documentation/.gitignore create mode 100755 documentation/.update create mode 100644 documentation/Makefile create mode 100644 documentation/README.md create mode 100755 documentation/aux/block-inventory create mode 100755 documentation/aux/ctrl-c create mode 100755 documentation/aux/dnf-history create mode 100755 documentation/aux/git-inventory create mode 100755 documentation/aux/kvm-inventory create mode 100644 documentation/blockdevices create mode 100644 documentation/git-system-repos create mode 100644 documentation/kvm-details/domain-arch.xml create mode 100644 documentation/kvm-details/domain-basfperl.xml create mode 100644 documentation/kvm-details/domain-centoscl0.xml create mode 100644 documentation/kvm-details/domain-centoscl1.xml create mode 100644 documentation/kvm-details/domain-centoscl2.xml create mode 100644 documentation/kvm-details/domain-debian.xml create mode 100644 documentation/kvm-details/domain-firewall.xml create mode 100644 documentation/kvm-details/domain-guestfs-y4pl944s9lh5ows7.xml create mode 100644 documentation/kvm-details/domain-indiana.xml create mode 100644 documentation/kvm-details/domain-iscsi.xml create mode 100644 documentation/kvm-details/domain-jango105.xml create mode 100644 documentation/kvm-details/domain-opensuse-old.xml create mode 100644 documentation/kvm-details/domain-opensuse.xml create mode 100644 documentation/kvm-details/domain-vswitch.xml create mode 100644 documentation/kvm-details/net-hodenkobold.xml create mode 100644 documentation/kvm-details/net-hundehuette.xml create mode 100644 documentation/kvm-details/net-san-cluster.xml create mode 100644 documentation/kvm-details/net-sosaria05.xml create mode 100644 documentation/kvm-details/pool-isos.xml create mode 100644 documentation/kvm-details/pool-kuehe.xml create mode 100644 documentation/kvm-details/pool-libvirt.xml create mode 100644 documentation/kvm-details/pool-nvram.xml create mode 100644 documentation/kvm-details/pool-ovmf.xml create mode 100644 documentation/kvm-details/pool-virtio-win-git.xml create mode 100644 documentation/kvm-details/pool-virtio-win.xml create mode 100644 documentation/kvm-details/pool-vmshare.xml create mode 100644 documentation/kvm_overview create mode 100644 documentation/packages create mode 100644 documentation/selinux/my-dbusdaemonlau.pp create mode 100644 documentation/selinux/my-dbusdaemonlau.te create mode 100644 documentation/selinux/my-iptables.pp create mode 100644 documentation/selinux/my-iptables.te create mode 100644 documentation/selinux/my-kdumpdepgener.pp create mode 100644 documentation/selinux/my-kdumpdepgener.te create mode 100644 documentation/selinux/my-pklacheckauth.pp create mode 100644 documentation/selinux/my-pklacheckauth.te create mode 100644 documentation/selinux/my-sssd.pp create mode 100644 documentation/selinux/my-sssd.te create mode 100644 documentation/selinux/my-unixchkpwd.pp create mode 100644 documentation/selinux/my-unixchkpwd.te (limited to 'documentation') diff --git a/documentation/.gitignore b/documentation/.gitignore new file mode 100644 index 0000000..78cce4a --- /dev/null +++ b/documentation/.gitignore @@ -0,0 +1 @@ +packages-raw diff --git a/documentation/.update b/documentation/.update new file mode 100755 index 0000000..5e7105c --- /dev/null +++ b/documentation/.update @@ -0,0 +1,39 @@ +#!/bin/bash + +RETVAL=0;WRONGOPT=0 +declare -x INVLIST + +function invhelp { + echo -e "USAGE:\t$(tput bold)$(basename "$0")$(tput sgr0) [OPTIONS...]" + echo + echo "Update the documentation automatically." + echo + ( + echo "-a;all of the below options" + echo "-b;Update the block devices list" + echo "-d;Update the dnf history rawfile (in case of git repo:" + echo -e "\t; output is in .gitignore and needs to be parsed)" + echo "-h;This help" + echo "-g;Update the git inventory" + echo "-k;Update the KVM inventory" + )|column -ts\; +} +[ -z "$1" ]&&invhelp&&exit 0 +while getopts :abdgkh SHOPT;do + case $SHOPT in + a) INVLIST="block-inventory dnf-history kvm-inventory git-inventory";break 2;; + b) INVLIST+=" block-inventory";; + d) INVLIST+=" dnf-history";; + k) INVLIST+=" kvm-inventory";; + g) INVLIST+=" git-inventory";; + h) invhelp&&exit 0||exit 1;; + *) echo "Not supported option: -""${OPTARG}" >&2;RETVAL=$(($RETVAL+1)) >&2;WRONGOPT=1;; + esac +done +RETVAL=$(($RETVAL+$?)) +shift $(( $OPTIND - 1 )) +[ "$WRONGOPT" -eq 1 ]&&exit 1 +for i in $INVLIST;do + aux/"$i" +done +exit $RETVAL diff --git a/documentation/Makefile b/documentation/Makefile new file mode 100644 index 0000000..205fb74 --- /dev/null +++ b/documentation/Makefile @@ -0,0 +1,31 @@ +VERSION = 3.81 + +all: block-inventory dnf-history kvm-inventory git-inventory + +block-inventory: + @./aux/block-inventory + +dnf-history: + @echo -n 'Fetching user-installed packages...' + @sudo dnf history userinstalled > ./packages&&echo 'done.' + +kvm-inventory: + @./aux/kvm-inventory + +git-inventory: + @./aux/git-inventory + +PHONY: help + +help: + @echo "Update the documentation automatically." + @echo + @echo "Following make targets are understood (try tab-completion)" + @echo + @echo -e "block-inventory\tUpdate the block devices list" + @echo -e "dnf-history\tUpdate the dnf history rawfile (in case of git repo:" + @echo -e "\t\toutput is in .gitignore and needs to be parsed)" + @echo -e "git-inventory\tUpdate the git inventory" + @echo -e "help\t\tThis help" + @echo -e "kvm-inventory\tUpdate the KVM inventory" + @echo -e "all\t\tThe traditional one: all of the worker targets above" diff --git a/documentation/README.md b/documentation/README.md new file mode 100644 index 0000000..dd0b6f7 --- /dev/null +++ b/documentation/README.md @@ -0,0 +1,5 @@ +# Documentation + +Contains all stuff we do not pull directly as is from files on the client but +rather are gathered through investigative commands or are just simple +explanations. diff --git a/documentation/aux/block-inventory b/documentation/aux/block-inventory new file mode 100755 index 0000000..c8dc3f3 --- /dev/null +++ b/documentation/aux/block-inventory @@ -0,0 +1,10 @@ +#!/bin/bash + +SCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source "$SCDIR/ctrl-c"||exit 1 +ODETFIL="$SCDIR/../blockdevices" + +echo -n "Fetching blocks..." +true>"$ODETFIL";[ "$?" -ne 0 ]&&echo "failed."&&exit 1||echo -n "." +echo -n ".";lsblk -im -o+FSTYPE,MIN-IO,MOUNTPOINT 2>/dev/null|sed 's/luks-[^\ ]\+/luks- /g' >"$ODETFIL" +[ "$?" -ne 0 ]&&echo ".failed."||echo ".done." diff --git a/documentation/aux/ctrl-c b/documentation/aux/ctrl-c new file mode 100755 index 0000000..b7530b2 --- /dev/null +++ b/documentation/aux/ctrl-c @@ -0,0 +1,7 @@ +#!/bin/bash + +function ctrl_c() { + echo " CUNT PUNT!" >&2 + exit 187 +} +trap ctrl_c INT diff --git a/documentation/aux/dnf-history b/documentation/aux/dnf-history new file mode 100755 index 0000000..716d22c --- /dev/null +++ b/documentation/aux/dnf-history @@ -0,0 +1,21 @@ +#!/bin/bash + +# we need to use sudo, better fetch the session now so it doesn't feck up our +# nice output later on, tee hee. +sudo echo -n "" +[ "$?" -ne 0 ]&&echo "Not allowed to proceed :("&&exit 1 +SCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +#SCDIR="$HOME" +source "$SCDIR/ctrl-c"||exit 1 +ODETFIL="$SCDIR/../packages-raw" + +echo -n "Fetching dnf history" +true>"$ODETFIL";[ "$?" -ne 0 ]&&echo "failed."&&exit 1||echo -n "." +LCNT=0 +for i in $(sudo dnf history|sed 's/^[\ \t]\+\([0-9]\+\).*/\1/g'|grep -vP -- '^--|^ID');do + ((++LCNT)) + [ "$(($LCNT % 3))" -eq 0 ]&&echo -n "."||true + sudo dnf history info "$i" 2>>"$ODETFIL"|grep -i Command\ line>>"$ODETFIL" + #[ "$?" -ne 0 ]&&break +done;echo "done." +#[ "$?" -ne 0 ]&&echo "failed."||echo "done." diff --git a/documentation/aux/git-inventory b/documentation/aux/git-inventory new file mode 100755 index 0000000..182812a --- /dev/null +++ b/documentation/aux/git-inventory @@ -0,0 +1,13 @@ +#!/bin/bash + +SCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source "$SCDIR/ctrl-c"||exit 1 +GITSYSFILE="$SCDIR/../git-system-repos" + +echo -n "Fetching system git stuff" +( + true>"$GITSYSFILE";[ "$?" -ne 0 ]&&echo "...failed."&&exit 1||true + for i in $(find /usr/src -type d -name ".git"|sed 's|/[^/]\+$||g');do echo -n ".";echo "$i" >> "$GITSYSFILE";cd "$i";CDRETVAL=$?;git remote show origin 2>/dev/null|grep Fetch\ URL >> "$GITSYSFILE";[ "$CDRETVAL" -eq 0 ]&&cd - >/dev/null 2>&1;done +) + +[ "$?" -ne 0 ]&&echo "failed."||echo "done." diff --git a/documentation/aux/kvm-inventory b/documentation/aux/kvm-inventory new file mode 100755 index 0000000..c739514 --- /dev/null +++ b/documentation/aux/kvm-inventory @@ -0,0 +1,18 @@ +#!/bin/bash + +SCDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source "$SCDIR/ctrl-c"||exit 1 +ODETFIL="$SCDIR/../kvm_overview" +ODETDIR="$SCDIR/../kvm-details" + +echo -n "Fetching KVM config" +( + echo -n ".";>"$ODETFIL";[ "$?" -ne 0 ]&&echo "failed."&&exit 1||true + echo -n ".";virsh list --all --title>>"$ODETFIL" 2>/dev/null;[ "$?" -ne 0 ]&&exit 1||true + echo -n ".";echo "" >> "$ODETFIL";virsh net-list --all>>"$ODETFIL" 2>/dev/null;[ "$?" -ne 0 ]&&exit 1||true + echo -n ".";echo "" >> "$ODETFIL";virsh pool-list --all --details>>"$ODETFIL" 2>/dev/null;[ "$?" -ne 0 ]&&exit 1||true + echo -n ".";for i in $(virsh list --all --name);do virsh dumpxml "$i">"$ODETDIR"/domain-"$i".xml||break;done;[ "$?" -ne 0 ]&&exit 1||true + echo -n ".";for i in $(virsh net-list --all --name);do virsh net-dumpxml "$i">"$ODETDIR"/net-"$i".xml||break;done;[ "$?" -ne 0 ]&&exit 1||true + echo -n ".";for i in $(virsh pool-list --all --name);do virsh pool-dumpxml "$i">"$ODETDIR"/pool-"$i".xml||break;done;[ "$?" -ne 0 ]&&exit 1||true +) +[ "$?" -ne 0 ]&&echo "failed."||echo "done." diff --git a/documentation/blockdevices b/documentation/blockdevices new file mode 100644 index 0000000..96278b6 --- /dev/null +++ b/documentation/blockdevices @@ -0,0 +1,41 @@ +NAME SIZE OWNER GROUP MODE FSTYPE MIN-IO MOUNTPOINT +sda 477G root disk brw-rw---- 4096 +|-sda1 360M root disk brw-rw---- vfat 4096 /boot/efi +|-sda2 128M root disk brw-rw---- 4096 +|-sda3 4G root disk brw-rw---- ext4 4096 /boot +|-sda4 200G root disk brw-rw---- crypto_LUKS 4096 +| `-luks- 200G root disk brw-rw---- LVM2_member 4096 +| |-system-root 4G root disk brw-rw---- ext4 4096 / +| |-system-swap 8G root disk brw-rw---- swap 4096 [SWAP] +| |-system-usr 80G root disk brw-rw---- ext4 4096 /usr +| |-system-var 60G root disk brw-rw---- ext4 4096 /var +| |-system-tmp 10G root disk brw-rw---- ext4 4096 /tmp +| |-system-home 20G root disk brw-rw---- ext4 4096 /home +| `-system-varlog 4G root disk brw-rw---- ext4 4096 /var/log +|-sda5 251.2G root disk brw-rw---- crypto_LUKS 4096 +| `-libvirt 251.2G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-jango105 100G root disk brw-rw---- 4096 +| |-libvirt-debian--boot 512M root disk brw-rw---- 4096 +| |-libvirt-debian--root 8.5G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-arch--boot 512M root disk brw-rw---- 4096 +| |-libvirt-arch--sys 19G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-suse--boot 512M root disk brw-rw---- 4096 +| |-libvirt-suse--root 9G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-centoscl0--boot 512M root disk brw-rw---- 4096 +| |-libvirt-centoscl0--root 8G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-centoscl1--boot 512M root disk brw-rw---- 4096 +| |-libvirt-centoscl1--root 8G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-quorum--boot 512M root disk brw-rw---- 4096 +| |-libvirt-quorum--root 3.5G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-quorum--iscsi 128M root disk brw-rw---- LVM2_member 4096 +| |-libvirt-quorum--appdisk1 4G root disk brw-rw---- LVM2_member 4096 +| |-libvirt-centoscl2--boot 512M root disk brw-rw---- 4096 +| |-libvirt-centoscl2--root 8G root disk brw-rw---- 4096 +| |-libvirt-firewall--boot 512M root root brw-rw---- 4096 +| |-libvirt-firewall--root 5.5G root root brw-rw---- LVM2_member 4096 +| |-libvirt-apt 10G root root brw-rw---- LVM2_member 4096 +| |-libvirt-indiana--root 8G root disk brw-rw---- 4096 +| `-libvirt-indiana--pl0 10G root disk brw-rw---- 4096 +|-sda6 980M root disk brw-rw---- ntfs 4096 /elitebook/Windows RE tools +|-sda7 18.3G root disk brw-rw---- ntfs 4096 /elitebook/Recovery Image +`-sda8 2G root disk brw-rw---- vfat 4096 /elitebook/HP_TOOLS diff --git a/documentation/git-system-repos b/documentation/git-system-repos new file mode 100644 index 0000000..3faa55c --- /dev/null +++ b/documentation/git-system-repos @@ -0,0 +1,64 @@ +/usr/src/desktop/plymouth + Fetch URL: git://anongit.freedesktop.org/plymouth +/usr/src/desktop/i3/i3-gaps + Fetch URL: https://github.com/Airblader/i3.git +/usr/src/desktop/i3/display-visor + Fetch URL: https://github.com/beanaroo/display-visor.git +/usr/src/desktop/gnome-twitch/git + Fetch URL: https://github.com/vinszent/gnome-twitch +/usr/src/desktop/fonts/Hack + Fetch URL: https://github.com/source-foundry/Hack.git +/usr/src/desktop/openxenmanager + Fetch URL: https://github.com/OpenXenManager/openxenmanager +/usr/src/desktop/riot.im/riot-web/git + Fetch URL: https://github.com/vector-im/riot-web.git +/usr/src/desktop/Nagstamon + Fetch URL: https://github.com/HenriWahl/Nagstamon.git +/usr/src/desktop/openfortigui/git + Fetch URL: https://github.com/theinvisible/openfortigui +/usr/src/desktop/keepass/plugins/keepasshttp + Fetch URL: https://github.com/pfn/keepasshttp.git +/usr/src/sec/krackattacks-scripts + Fetch URL: https://github.com/vanhoefm/krackattacks-scripts +/usr/src/web/apaxy/git + Fetch URL: https://github.com/oupala/apaxy +/usr/src/kvm/kvm-guest-drivers-windows + Fetch URL: https://github.com/virtio-win/kvm-guest-drivers-windows.git +/usr/src/cli/vim/landscape.vim + Fetch URL: https://github.com/itchyny/landscape.vim.git +/usr/src/cli/vim/indentLine + Fetch URL: https://github.com/Yggdroot/indentLine.git +/usr/src/cli/vim/vim-colors-solarized + Fetch URL: https://github.com/altercation/vim-colors-solarized.git +/usr/src/cli/vim/vim-indent-guides + Fetch URL: https://github.com/nathanaelkane/vim-indent-guides.git +/usr/src/cli/vim/vim-colorschemes + Fetch URL: https://github.com/flazz/vim-colorschemes.git +/usr/src/cli/telnet-password-honeypot + Fetch URL: https://git.zx2c4.com/telnet-password-honeypot +/usr/src/cli/gtop + Fetch URL: https://github.com/aksakalli/gtop.git +/usr/src/cli/taskwarrior/tasknc + Fetch URL: https://github.com/lharding/tasknc.git +/usr/src/cli/taskwarrior/functional/taskserver + Fetch URL: https://github.com/GothenburgBitFactory/taskserver.git +/usr/src/cli/taskwarrior/taskwarrior-time-tracking-hook + Fetch URL: https://github.com/kostajh/taskwarrior-time-tracking-hook.git +/usr/src/cli/taskwarrior/not_functional/task2dot + Fetch URL: https://github.com/garykl/task2dot.git +/usr/src/cli/weechat/matrix-torhve/git + Fetch URL: https://github.com/torhve/weechat-matrix-protocol-script.git +/usr/src/cli/pyphoon/git + Fetch URL: https://github.com/chubin/pyphoon.git +/usr/src/cli/cheat.sh + Fetch URL: https://github.com/chubin/cheat.sh.git +/usr/src/cli/wttr.in/git + Fetch URL: https://github.com/chubin/wttr.in.git +/usr/src/cli/password-store/pass-import + Fetch URL: https://github.com/roddhjav/pass-import.git +/usr/src/cli/password-store/git + Fetch URL: https://git.zx2c4.com/password-store/ +/usr/src/cli/tldr + Fetch URL: https://github.com/tldr-pages/tldr.git +/usr/src/drivers/displaylink-rpm/git + Fetch URL: https://github.com/displaylink-rpm/displaylink-rpm.git diff --git a/documentation/kvm-details/domain-arch.xml b/documentation/kvm-details/domain-arch.xml new file mode 100644 index 0000000..f38103e --- /dev/null +++ b/documentation/kvm-details/domain-arch.xml @@ -0,0 +1,126 @@ + + arch + 95ffbb34-b4b9-4287-9de7-d84dbb9ca650 + triskel05 + Arch + 1572864 + 1572864 + 2 + + hvm + /usr/share/edk2/ovmf/OVMF_CODE.fd + /var/lib/libvirt/qemu/nvram/arch_VARS.fd + + + + + + + + + Broadwell-noTSX + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/qemu-kvm + + + + + +
+ + + + + + +
+ + + + + + +
+ + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + +
+ + + + + + +
+ + + + + + + + + + + +
+ + +
+ + + + + + + + +
+ +