Non-specific change over time.

This commit is contained in:
cyteen 2020-06-13 11:28:52 +01:00
parent 187ca9826d
commit b0fbbd8445
25 changed files with 386 additions and 26 deletions

View File

@ -9,8 +9,8 @@ AVAILABLE=/etc/apt/sources.list-available
mkdir -p "${AVAILABLE}"
SECTION=(main contrib non-free)
#ACTIVE_LIST=('chimaera' 'chimaera-security' 'chimaera-updates' 'chimaera-backports')
ACTIVE_LIST=('beowulf' 'beowulf-security' 'beowulf-updates' 'beowulf-backports')
ACTIVE_LIST=('chimaera' 'chimaera-security' 'chimaera-updates' 'chimaera-backports')
#ACTIVE_LIST=('beowulf' 'beowulf-security' 'beowulf-updates' 'beowulf-backports')
#ACTIVE_LIST=('ascii' 'ascii-security' 'ascii-updates' 'ascii-backports')
#INACTIVE_LIST=('jessie' 'jessie-security' 'jessie-updates' 'jessie-backports' 'beowulf' 'beowulf-security' 'beowulf-updates' 'beowulf-backports' 'ceres')
INACTIVE_LIST=('jessie' 'jessie-security' 'jessie-updates' 'jessie-backports' 'ascii' 'ascii-security' 'ascii-updates' 'ascii-backports' 'ceres')
@ -65,6 +65,8 @@ bash -c "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-key
apt update && apt install -y --force-yes devuan-keyring
rm /etc/apt/sources.list
#bash -c "cat > /etc/apt/sources.list.d/x2go.list" <<'EOF'
## apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
## X2Go Repository (release builds)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
apt remove -y --purge pulseaudio pulseaudio-module-x11 pulseaudio-utils pavucontrol gstreamer1.0-pulseaudio pacman pavumeter pavucontrol
DEST=/etc/skel
DEST=${1:-/etc/skel}
# Assume clean install
#kill -9 `ps aux | grep -v grep | grep start-pulseaudio | awk {'print $2'}`

View File

@ -20,7 +20,10 @@ apt install -y zsync
apt install -y jq
apt install -y pv
apt install -y rar
#apt install -y kpartx
apt install -y pixz
apt install -y xz
apt install -y unzip
apt install -y kpartx
apt install -y inxi
apt --force-yes install -y xmlstarlet
apt install -y hexedit

View File

@ -34,7 +34,7 @@ EOF
DEST=/etc/skel
DEST=${1:-/etc/skel}
cat > ${DEST}/.zprofile <<'EOF'
if [ -f ${HOME}/.ssh/id_rsa.pub ]; then

View File

@ -111,7 +111,7 @@ echo ${PACKAGE}_${VERSION}_amd64.deb
sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb
sudo apt install-y \
sudo apt install -y \
libbluetooth-dev \
libbsd-dev \
libusb-dev \

View File

@ -3,7 +3,7 @@ apt install -y conky conky-all curl jq ttf-ubuntu-font-family
#USER=default
USER=root
DEST=/etc/skel
DEST=${1:-/etc/skel}
echo "Hidden folder conky is created if it is not there"
[ -d "${DEST}/.conky" ] || mkdir -p ${DEST}/".conky"

100
020_distcc_master.sh Normal file
View File

@ -0,0 +1,100 @@
!#/usr/bin/env bash
apt-get install -y distcc distcc-pump ccache dmucs distccmon-gnome
# For avahi/bonjour mdns support
apt-get install avahi-daemon avahi-utils libnss-mdns
apt-get install avahi-ui-utils avahi-discover
# Update the symlinks found in
/usr/sbin/update-ccache-symlinks
## distcc will use Avahi Zeroconf DNS Service Discovery (DNS-SD) to locate any available distccd servers on the local network.
#
# The distccd server must be started with --zeroconf or /etc/default/distcc STARTDISTCC set to true.
#
# NB An important caveat is that in the current implementation, pump mode (",cpp") and compression (",lzo") will never be used for hosts located via zeroconf. Enabling compression makes the distcc client and server use more CPU time, but less network traffic. The added CPU time is insignificant for pump mode. Compression is usually economical on networks slower than 100Mbps
cat > /etc/distcc/hosts <<EOF
# As described in the distcc manpage, this file can be used for a global
# list of available distcc hosts.
#
# The list from this file will only be used, if neither the
# environment variable DISTCC_HOSTS, nor the file $HOME/.distcc/hosts
# contains a valid list of hosts.
#
# Add a list of hostnames in one line, seperated by spaces, here.
+zeroconf
EOF
## /etc/default/distcc
# should distcc be started on boot?
STARTDISTCC="true"
# Which networks/hosts should be allowed to connect to the daemon?
# You can list multiple hosts/networks separated by spaces.
# Networks have to be in CIDR notation, e.g. 192.168.1.0/24
# Hosts are represented by a single IP address
#ALLOWEDNETS="127.0.0.1"
ALLOWEDNETS="127.0.0.1 192.168.1.0/24"
# Which interface should distccd listen on?
# You can specify a single interface, identified by it's IP address, here
LISTENER="127.0.0.1"
# You can specify a (positive) nice level for the distcc process here
NICE="10"
# You can specify a maximum number of jobs, the server will accept concurrently
JOBS=""
# Enable Zeroconf support?
# If enabled, distccd will register via mDNS/DNS-SD.
# It can then automatically be found by zeroconf enabled distcc clients
# without the need of a manually configured host list.
ZEROCONF="true"
sed -i "s,^\(STARTDISTCC=\).*,\1\"${STARTDISTCC}\"," /etc/default/distcc
sed -i "s,^\(ALLOWEDNETS=\).*,\1\"${ALLOWEDNETS}\"," /etc/default/distcc
sed -i "s,^\(LISTENER=\).*,\1\"${LISTENER}\"," /etc/default/distcc
sed -i "s,^\(NICE=\).*,\1\"${NICE}\"," /etc/default/distcc
sed -i "s,^\(JOBS=\).*,\1\"${JOBS}\"," /etc/default/distcc
sed -i "s,^\(ZEROCONF=\).*,\1\"${ZEROCONF}\"," /etc/default/distcc
## dmucs
# Change this to 'yes' if you want to run as a dmucs server.
# Normally only one host a given network need act as a server.
SERVER=yes
# If you want this machine to act as a compilation server edit
# the line below and set USE_SERVER to the name of the dmucs
# server on your network.
USE_SERVER=
sed -i "s,^\(SERVER=\).*,\1\"${SERVER}\"," /etc/default/dmucs
sed -i "s,^\(USE_SERVER=\).*,\1\"${USE_SERVER}\"," /etc/default/dmucs
# Create a hosts-info file in the location /usr/local/share/dmucs/hosts-info (or, if you specified -prefix when configureing, in <prefix>/share/dmucs/hosts-info).
#Here is a sample hosts-info file:
# Format: machine number-of-cpus power-index
#
#linux-comp-1 4 10
#solaris-comp-1 2 5
#solaris-comp-2 2 5
#old-linux-comp-1 1 4
#old-solaris-comp-3 1 2
#169.144.80.25 1 2
cat > /etc/dmuc.conf <<EOF
# Configuration file for dmucs server.
#
# Format: machine number-of-cpus power-index
EOF

101
020_distcc_slave.sh Normal file
View File

@ -0,0 +1,101 @@
#!/usr/bin/env bash
apt-get install -y distcc distcc-pump ccache dmucs distccmon-gnome
# For avahi/bonjour mdns support
apt-get install avahi-daemon avahi-utils libnss-mdns
#apt-get install avahi-ui-utils avahi-discover
# Update the symlinks found in
/usr/sbin/update-ccache-symlinks
## distcc will use Avahi Zeroconf DNS Service Discovery (DNS-SD) to locate any available distccd servers on the local network.
#
# The distccd server must be started with --zeroconf or /etc/default/distcc STARTDISTCC set to true.
#
# NB An important caveat is that in the current implementation, pump mode (",cpp") and compression (",lzo") will never be used for hosts located via zeroconf. Enabling compression makes the distcc client and server use more CPU time, but less network traffic. The added CPU time is insignificant for pump mode. Compression is usually economical on networks slower than 100Mbps
cat > /etc/distcc/hosts <<EOF
# As described in the distcc manpage, this file can be used for a global
# list of available distcc hosts.
#
# The list from this file will only be used, if neither the
# environment variable DISTCC_HOSTS, nor the file $HOME/.distcc/hosts
# contains a valid list of hosts.
#
# Add a list of hostnames in one line, seperated by spaces, here.
#+zeroconf
EOF
## /etc/default/distcc
# should distcc be started on boot?
STARTDISTCC="true"
# Which networks/hosts should be allowed to connect to the daemon?
# You can list multiple hosts/networks separated by spaces.
# Networks have to be in CIDR notation, e.g. 192.168.1.0/24
# Hosts are represented by a single IP address
#ALLOWEDNETS="127.0.0.1"
ALLOWEDNETS="127.0.0.1 192.168.1.0/24"
# Which interface should distccd listen on?
# You can specify a single interface, identified by it's IP address, here
LISTENER="127.0.0.1"
# You can specify a (positive) nice level for the distcc process here
NICE="10"
# You can specify a maximum number of jobs, the server will accept concurrently
JOBS=""
# Enable Zeroconf support?
# If enabled, distccd will register via mDNS/DNS-SD.
# It can then automatically be found by zeroconf enabled distcc clients
# without the need of a manually configured host list.
ZEROCONF="true"
sed -i "s,^\(STARTDISTCC=\).*,\1\"${STARTDISTCC}\"," /etc/default/distcc
sed -i "s,^\(ALLOWEDNETS=\).*,\1\"${ALLOWEDNETS}\"," /etc/default/distcc
sed -i "s,^\(LISTENER=\).*,\1\"${LISTENER}\"," /etc/default/distcc
sed -i "s,^\(NICE=\).*,\1\"${NICE}\"," /etc/default/distcc
sed -i "s,^\(JOBS=\).*,\1\"${JOBS}\"," /etc/default/distcc
sed -i "s,^\(ZEROCONF=\).*,\1\"${ZEROCONF}\"," /etc/default/distcc
## dmucs
# Change this to 'yes' if you want to run as a dmucs server.
# Normally only one host a given network need act as a server.
SERVER=no
# If you want this machine to act as a compilation server edit
# the line below and set USE_SERVER to the name of the dmucs
# server on your network.
USE_SERVER=
sed -i "s,^\(SERVER=\).*,\1\"${SERVER}\"," /etc/default/dmucs
sed -i "s,^\(USE_SERVER=\).*,\1\"${USE_SERVER}\"," /etc/default/dmucs
# Create a hosts-info file in the location /usr/local/share/dmucs/hosts-info (or, if you specified -prefix when configureing, in <prefix>/share/dmucs/hosts-info).
#Here is a sample hosts-info file:
# Format: machine number-of-cpus power-index
#
#linux-comp-1 4 10
#solaris-comp-1 2 5
#solaris-comp-2 2 5
#old-linux-comp-1 1 4
#old-solaris-comp-3 1 2
#169.144.80.25 1 2
cat > /etc/dmuc.conf <<EOF
# Configuration file for dmucs server.
#
# Format: machine number-of-cpus power-index
EOF

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
apt install -y djmount
DEST=/etc/skel
DEST=${1:-/etc/skel}
DJMOUNT_DIR=${DEST}/dlna
mkdir -p ${DJMOUNT_DIR}

View File

@ -3,7 +3,7 @@
#apt install -y free42-nologo
apt install -y xxd
DEST=/etc/skel
DEST=${1:-/etc/skel}
mkdir -p ${DEST}/.free42/
touch ${DEST}/.free42/print

View File

@ -7,7 +7,7 @@ DSC_FILE="http://deb.debian.org/debian/pool/main/f/free42-nologo/free42-nologo_1
./build_deb_from_dsc.sh "${WORKDIR}" "${DSC_FILE}"
DEST=/etc/skel
DEST=${1:-/etc/skel}
# Set and alias
mkdir -p ${DEST}/zsh_aliases.d

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
apt install -y grc
DEST=/etc/skel
DEST=${1:-/etc/skel}
ALIAS_HOME=${DEST}/.zsh_aliases.d/
ALIAS_FILE=${ALIAS_HOME}/003_grc.sh

View File

@ -7,6 +7,7 @@
URL=ppa.launchpad.net
RELEASE=bionic
APP=mkusb
PPA_KEY="54B8C8AC"
VERSION=unstable # ppa
packages="
mkusb \
@ -32,7 +33,7 @@ else
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
fi
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54B8C8AC
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${PPA_KEY}
sudo apt update

View File

@ -10,7 +10,7 @@ apt install -y #python-neovim python3-neovim
#pip2 install --user --upgrade neovim
#pip3 install --user --upgrade neovim
DEST=/etc/skel
DEST=${1:-/etc/skel}
#ln -sfr ${DEST}/.vim ${DEST}/.config/nvim
mkdir -p ${DEST}/.config/nvim

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
apt install -y powerline
DEST=/etc/skel
DEST=${1:-/etc/skel}
bash -c "cat > /etc/profile.d/powerline.sh" <<EOF
if [ -f $(which powerline-daemon) ]; then
powerline-daemon -q

4
020_qemu-arm64.sh Normal file
View File

@ -0,0 +1,4 @@
sudo apt-get install -y qemu-utils qemu-efi-aarch64 qemu-system-arm

View File

@ -5,7 +5,7 @@ apt install -y xmlstarlet
# Make changes to Options, menus2 using xmlstarlet at the bottom of this script.
DEST=/etc/skel
DEST=${1:-/etc/skel}
ROXFILER_HOME=${DEST}/.config/rox.sourceforce.net
MIMETYPES=${ROXFILER_HOME}/MIME-types
mkdir -p ${ROXFILER_HOME}/ROX-Filer/

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
apt install -y shellcheck
DEST=/etc/skel
DEST=${1:-/etc/skel}
# Works with shellcheck 0.7.0 onward
cat > ${DEST}/.shellcheckrc<<EOF
disable=SC1117

View File

@ -2,7 +2,7 @@
# Set enlightenment as the default session.
apt install -y slim
DEST=/etc/skel
DEST=${1:-/etc/skel}
## /etc/slim.conf
# login_cmd exec /bin/bash -login /etc/X11/Xsession %session

View File

@ -1,16 +1,16 @@
#!/usr/bin/env bash
set -e
set -x
apt-cache search tmux
apt-cache search tmux-plugin-manager
apt-cache search tmuxp
#apt-cache search tmux
#apt-cache search tmux-plugin-manager
#apt-cache search tmuxp
apt update
apt install -y tmux
apt install -y tmux-plugin-manager
apt install -y tmuxp # uses python rather than ruby used by tmuxinator.
DEST=/etc/skel
DEST=${1:-/etc/skel}
# https://github.com/Netherdrake/Dotfiles/tree/master/config/tmux
# wget -c --directory-prefix ~/.config/tmux/ https://raw.githubusercontent.com/Netherdrake/Dotfiles/master/config/tmux/default.sh
mkdir -p ${DEST}/.config/tmux
@ -184,7 +184,7 @@ EOF
#echo "source /usr/share/zsh/vendor_completions/_tmuxinator" > ${DEST}/.zshrc.d/006_tmuxinator.zsh
mkdir -p ${DEST}/.tmux/plugins/tpm
mkdir -p ${DEST}/.tmux/.tmuxp
mkdir -p ${DEST}/.tmuxp
#cat > ${DEST}/.config/tmux/tmux.conf << 'EOF'
cat > ${DEST}/.tmux.conf << 'EOF'
@ -276,3 +276,72 @@ run '/usr/share/tmux-plugin-manager/tpm'
EOF
# HOME=${DEST} TMUX_PLUGIN_MANAGER_PATH="${DEST}/.tmux/plugins" bash /usr/share/tmux-plugin-manager/bin/install_plugins
# tmux session manager examples. include in your project directory as .tmuxp.{yaml,json}
# and load with 'tmuxp load .'
# see https://github.com/tony/tmuxp-config
cat > ${DEST}/.tmuxp/docker.yaml <<EOF
session_name: docker
start_directory: ./
windows:
- window_name: dockerfiles
layout: 6da5,239x56,0,0[239x34,0,0,65,239x21,0,35{119x21,0,35,66,119x21,120,35,67}]
options:
automatic-rename: 'off'
panes:
- shell_command:
- vim
- :e README.md
- pane
- pane
- window_name: docs
layout: main-horizontal
options:
main-pane-height: 35
shell_command_before:
- command -v virtualenv >/dev/null 2>&1 || { pip install virtualenv; }
- '[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate || virtualenv .env'
- '[ ! -d .env/build ] || rm -rf .env/build'
- cd ./doc
- command -v .env/bin/tmuxp >/dev/null 2>&1 || { pip install -r requirements.pip; }
panes:
- shell_command:
- reset
- vim
- :Ex
focus: true
- pwd
- echo 'docs built to <http://0.0.0.0:8007/_build/html>'; python -m SimpleHTTPServer 8007
- shell_command:
- command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }
- watching_testrunner --basepath ./ --pattern="*.rst" 'make html'
- window_name: postgresql
layout: 6da5,239x56,0,0[239x34,0,0,65,239x21,0,35{119x21,0,35,66,119x21,120,35,67}]
options:
automatic-rename: 'off'
start_directory: postgresql
panes:
- shell_command:
- vim
- :e Dockerfile
- pane
- pane
EOF
cat > ${DEST}/.tmuxp/top.yaml <<EOF
session_name: top
windows:
- window_name: dev window
layout: tiled
shell_command_before:
- cd ~/ # run as a first command in all panes
panes:
- shell_command:
- sudo top
- shell_command:
- sudo iotop
- shell_command:
- cd /var/log # run multiple commands in this pane
- sudo tail -f /var/log/messages
EOF

66
020_ubuntu-kernels.sh Executable file
View File

@ -0,0 +1,66 @@
#!/usr/bin/env bash
# 18.04 bionic buster
# 17.10 artful stretch
# To obtain the source from which they are built fetch the commit below:
# git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v5.7-rc6
# https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7-rc6/
KERNEL_VERSION="5.7.0"
URL=kernel.ubuntu.com
RELEASE=bionic
APP=~kernel-ppa
PPA_KEY="17C622B0"
VERSION=mainline # ppa
packages="
linux-headers-${KERNEL_VERSION} \
linux-image-${KERNEL_VERSION} \
linux-modules-${KERNEL_VERSION} \
"
#sudo echo "deb http:/${URL}/${APP}/${VERSION} ${RELEASE} main" > /etc/apt/sources.list-available/${APP}.list
#sudo echo "deb-src http://${URL}/${APP}/${VERSION} ${RELEASE} main" >> /etc/apt/sources.list-available/${APP}.list
#
#sudo ln -sf /etc/apt/sources.list-available/${APP}.list /etc/apt/sources.list.d/${APP}.list
#
## Bypass apt-proxy for mkusb packages
#if [ -d /etc/apt/apt.conf.d/02proxy ]; then
# if [ ! -z $(grep ${URL}) ]; then
# echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
# fi
#else
# echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
#fi
#
#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${PPA_KEY}
#
#sudo apt update
#
#sudo apt install -y --no-install-recommends $packages
ARCH=amd64
ARCH=arm64
sudo apt-get upgrade
sudo apt-get update
cd /tmp/
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7-rc6/linux-headers-5.7.0-050700rc6_5.7.0-050700rc6.202005172030_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7-rc6/linux-headers-5.7.0-050700rc6-generic_5.7.0-050700rc6.202005172030_${ARCH}.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7-rc6/linux-image-unsigned-5.7.0-050700rc6-generic_5.7.0-050700rc6.202005172030_${ARCH}.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7-rc6/linux-modules-5.7.0-050700rc6-generic_5.7.0-050700rc6.202005172030_${ARCH}.deb
# https://gitlab.com/ayufan-repos/rock64/linux-mainline-kernel/-/tree/mainline-master
wget -c https://github.com/ayufan-rock64/linux-mainline-kernel/releases/download/5.6.0-1137-ayufan/linux-headers-5.6.0-1137-ayufan-ge57f05e7bf8f_5.6.0-1137-ayufan_arm64.deb
wget -c https://github.com/ayufan-rock64/linux-mainline-kernel/releases/download/5.6.0-1137-ayufan/linux-image-5.6.0-1137-ayufan-ge57f05e7bf8f_5.6.0-1137-ayufan_arm64.deb
sudo dpkg -i *.deb
sudo apt-get update

View File

@ -2,7 +2,7 @@
set -x
apt install -y powerline #vim-airline vim-airline-themes
DEST=/etc/skel
DEST=${1:-/etc/skel}
sed -i -e 's/"syntax on/syntax on/' /etc/vim/vimrc
sed -i -e 's/"set background=dark/set background=dark/' /etc/vim/vimrc
@ -148,6 +148,7 @@ Plugin 'VundleVim/Vundle.vim'
" plugin on GitHub repos
Plugin 'joonty/vdebug'
Plugin 'voldikiss/vim-floaterm'
Plugin 'tpope/vim-fugitive'
Plugin 'jreybert/vimagit'
Plugin 'wincent/command-t'
@ -160,6 +161,7 @@ Plugin 'w0ng/vim-hybrid'
Plugin 'altercation/vim-colors-solarized'
"Plugin 'kien/ctrlp.vim'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'liuchengxu/vim-which-key'
"Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
DEST=/etc/skel
DEST=${1:-/etc/skel}
mkdir -p ${DEST}/.zsh_aliases.d

View File

@ -24,7 +24,7 @@ cd ~ || exit
chsh -s "$(which zsh)" "${USER}"
#DEST=$HOME
DEST=/etc/skel
DEST=${1:-/etc/skel}
HOME=${DEST}
apt install -y git

12
change-DEST.sh Normal file
View File

@ -0,0 +1,12 @@
FIND_DIR=/tmp
FIND_STRING='DEST=/etc/skel'
REPLACE_STRING='DEST=${1:-/etc/skel}'
printf $0
printf "\nBefore: \n"; grep DEST= 020*
sed -i "s|${FIND_STRING}|${REPLACE_STRING}|g" $(find ${FIND_DIR} -type f -name "0*0_*" ! -path "$0" | xargs grep ${FIND_STRING} | awk -F: '{print $1}')
printf "\nAfter: \n"; grep DEST= 020*