changeset 114:7e280bf26dba

package lists big update, pulling from /var/log/apt on a few hosts
author drewp@bigasterisk.com
date Sat, 29 Oct 2022 21:34:50 -0700
parents c520672d0930
children 8012f6095220
files package_lists.py packages.py
diffstat 2 files changed, 213 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_lists.py	Sat Oct 29 21:34:50 2022 -0700
@@ -0,0 +1,190 @@
+setup = [
+    'atool',
+    'build-essential',
+    'curl',
+    'iproute2',  # needed for wireguard
+    'iptables',
+    'mosquitto-clients',
+    'rsync',
+    'udns-utils',
+    'vim-tiny',
+    'wireguard-tools',
+]
+
+pi_setup = [
+    'apt-utils',
+    'dirmngr',
+    'gnupg2',
+]
+
+general = [
+    'aptitude',
+    'atool',
+    'emacs',
+    'fdisk',
+    'isc-dhcp-client',
+    'keychain',
+    'kitty-terminfo',
+    'less',
+    'libgraphviz-dev',
+    'links',
+    'lua5.3',
+    'mercurial',
+    'netcat-openbsd',
+    'ntpdate',
+    'rclone',
+    'sshfs',
+    'syncthing',
+    'vim-nox',
+    'wget',
+    'wireguard',
+    'zsh',
+]
+
+non_pi = [
+    'lpr',
+    'nfs-client',
+    'nodejs',
+    'npm',
+    'podman-docker',
+    'python3-dulwich',
+    'python3-invoke',
+    'python3-pip',
+    'python3-venv',
+    'python3-virtualenv',
+]
+
+debug = [
+    'debian-goodies',
+    'dstat',
+    'ethtool',
+    'gdb',
+    'htop',
+    'ifstat',
+    'iotop',
+    'iproute2',
+    'mtr-tiny',
+    'ncdu',
+    'net-tools',
+    'nmap',
+    'oping',
+    'speedtest-cli',
+    'strace',
+    'sysstat',
+    'tcpdump',
+]
+
+for_bang = [
+    'dnsmasq',
+    'nfs-common',
+    'openntpd',
+    'zfs-auto-snapshot',
+    'zfs-zed',
+    'zfsutils-linux',
+]
+
+for_pipe = [
+    'dnsmasq',
+    'python3-iptables',
+]
+
+laptop = [
+    'brightnessctl',
+    'i3',
+    'network-manager',
+    'xserver-xorg-input-synaptics',
+]
+
+desktop = [
+    'alsa-utils',
+    'arandr',
+    'ardour',
+    'code',
+    'cuda-minimal-build-11-8',
+    'dolphin',
+    'eog',
+    'evtest',
+    'firefox',
+    'flameshot',
+    'fontmatrix',
+    'fonts-dejavu-core',
+    'fonts-dejavu-extra',
+    'fonts-dejavu',
+    'fonts-droid-fallback',
+    'fonts-emojione',
+    'fonts-font-awesome',
+    'fonts-freefont-ttf',
+    'fonts-lato',
+    'fonts-liberation2',
+    'fonts-noto',
+    'fonts-opensymbol',
+    'fonts-quicksand',
+    'fonts-texgyre',
+    'fonts-ubuntu-console',
+    'fonts-ubuntu',
+    'fonts-urw-base35',
+    'fvwm',
+    'gimp',
+    'google-chrome-unstable',
+    'heif-gdk-pixbuf',
+    'heif-thumbnailer',
+    'humanity-icon-theme',
+    'i3lock',
+    'k4dirstat',
+    'kitty',
+    'libcudnn8',
+    'libreoffice-draw',
+    'libreoffice-impress',
+    'libreoffice-writer',
+    'libxcb-xkb1',  # needed for kitty
+    'lxterminal',
+    'meld',
+    'mpv',
+    'nodm',
+    'pavucontrol',
+    'qjackctl',
+    'qv4l2',
+    'simple-scan',
+    'steam-launcher',
+    'syncthing-gtk',
+    'trayer',
+    'ttf-bitstream-vera',
+    'vlc',
+    'x11-apps',
+    'xclip',
+    'xfonts-base',
+    'xfonts-encodings',
+    'xfonts-utils',
+    'xosview',
+    'xsane',
+    'xterm',
+]
+
+xorg = [
+    'kbd',
+    'libnvidia-cfg1-520',
+    'libnvidia-common-520',
+    'libnvidia-compute-520:i386',
+    'libnvidia-compute-520',
+    'libnvidia-decode-520:i386',
+    'libnvidia-decode-520',
+    'libnvidia-encode-520:i386',
+    'libnvidia-encode-520',
+    'libnvidia-extra-520',
+    'libnvidia-fbc1-520:i386',
+    'libnvidia-fbc1-520',
+    'libnvidia-gl-520:i386',
+    'libnvidia-gl-520',
+    'nvidia-compute-utils-520',
+    'nvidia-dkms-520',
+    'nvidia-driver-520',
+    'nvidia-kernel-common-520',
+    'nvidia-kernel-source-520',
+    'nvidia-modprobe',
+    'nvidia-prime',
+    'nvidia-settings',
+    'nvidia-utils-520',
+    'screen-resolution-extra',
+    'xserver-xorg-video-nvidia-520',
+    'xserver-xorg',
+]
--- a/packages.py	Sat Aug 20 22:35:31 2022 -0700
+++ b/packages.py	Sat Oct 29 21:34:50 2022 -0700
@@ -1,12 +1,13 @@
 from pyinfra import host
 from pyinfra.facts.server import LinuxDistribution
 from pyinfra.operations import apt, files, server
+import package_lists
 
 is_pi = host.get_fact(LinuxDistribution)['name'] in ['Debian', 'Raspbian GNU/Linux']
 
 
 def kitty():
-    vers = '0.25.2'  # see https://github.com/kovidgoyal/kitty/releases
+    vers = '0.26.4'  # see https://github.com/kovidgoyal/kitty/releases
     home = '/home/drewp'
     local = f"{home}/.local/kitty"
     dl = f'/tmp/kitty-{vers}-x86_64.txz'
@@ -23,7 +24,7 @@
     server.shell([
         # https://github.com/pnpm/pnpm/releases
         # but also https://pnpm.io/installation#compatibility
-        "npm install -g pnpm@6.32.22",
+        "npm install -g pnpm@6.35.0",
     ])
 
 
@@ -39,7 +40,7 @@
     # 'apt upgrade'?
     apt.packages(
         update=False,  # see system.py
-        packages=['dirmngr', 'gnupg2', 'apt-utils', 'aptitude'])
+        packages=package_lists.pi_setup)
 
     apt.key(src='https://ftp-master.debian.org/keys/archive-key-8.asc')
     apt.key(src='https://ftp-master.debian.org/keys/archive-key-8-security.asc')
@@ -55,33 +56,17 @@
 if not is_pi:
     apt.key(keyserver='keyserver.ubuntu.com', keyid='8B48AD6246925553')
 
+
+if host.name in ['pipe','prime'] or is_pi:
+    apt.packages(packages=['mandb'], present=False)
+
 if host.name == 'pipe':
-    apt.packages(packages=['mandb', 'apt-listchanges'], present=False)
+    apt.packages(packages=['apt-listchanges'], present=False)
     files.template(src='templates/odroid_sources.list.j2', dest='/etc/apt/sources.list', rel='focal')
-    apt.packages(packages=[
-        'python3-iptables',
-        'podman-docker',
-    ])
 elif is_pi:
     pi_sources()
 
-apt.packages(packages=[
-    'build-essential',
-    'dstat',
-    'ifstat',
-    'iptables',
-    'iproute2',  # needed for wireguard
-    'kitty-terminfo',
-    'mosquitto-clients',
-    'ncdu',
-    'rsync',
-    'xosview',
-    'zsh',
-    "atool",
-    "udns-utils",
-    "wireguard-tools",
-])
-
+apt.packages(packages=package_lists.setup)
 if not is_pi:
     if host.name != 'prime':
         apt.key(src='https://dl.google.com/linux/linux_signing_key.pub')
@@ -93,31 +78,7 @@
         apt.key(keyserver='keyserver.ubuntu.com', keyid='F24AEA9FB05498B7')
         apt.repo(src="deb [arch=amd64,i386] https://repo.steampowered.com/steam/ stable steam")
 
-    apt.packages(packages=[
-        'debian-goodies',
-        'ethtool',
-        'htop',
-        'iotop',
-        'keychain',
-        'lpr',
-        'lua5.3',
-        'mercurial',
-        'mtr-tiny',
-        'net-tools',
-        'nodejs',
-        'npm',
-        'oping',
-        'python3-invoke',
-        'python3-pip',
-        'python3-virtualenv',
-        'speedtest-cli',
-        'sysstat',
-        'tcpdump',
-    ])
-    if host.name in ['dash', 'slash', 'bang']:
-        apt.packages(packages=[
-            'podman-docker',
-        ])
+    apt.packages(packages=package_lists.non_pi)
     if host.name != 'pipe':
         apt.packages(packages=[
             'reptyr',
@@ -126,23 +87,20 @@
     kitty()
     pnpm()
 
+proper_locate()
+apt.packages(packages=package_lists.general)
+apt.packages(packages=package_lists.debug)
 
-proper_locate()
 
 if host.name == "bang":
-    apt.packages(packages=[
-        'dnsmasq',
-        'iptables',
-        'ntpdate',
-        'openntpd',
-        'zfs-auto-snapshot',
-        'zfs-zed',
-        'zfsutils-linux',
-    ])
+    apt.packages(packages=package_lists.for_bang)
+
+if host.name == "pipe":
+    apt.packages(packages=package_lists.for_pipe)
 
 if host.name == 'plus':
-    apt.packages(packages=[
-        'network-manager',
-        'brightnessctl',
-        'xserver-xorg-input-synaptics',
-    ])
+    apt.packages(packages=package_lists.laptop)
+
+desktop_env = host.name in ['dash', 'slash', 'plus']
+if desktop_env:
+    apt.packages(packages=package_lists.xorg + package_lists.desktop)