From 15fc5cc4b96e6bc4d0cb2f069553c787ae7c7fcd Mon Sep 17 00:00:00 2001 From: Digital Sleuth <62841822+digitalsleuth@users.noreply.github.com> Date: Tue, 31 Jan 2023 18:19:52 -0500 Subject: [PATCH] Jammy support (#81) * Update packages for Jammy compatibility * Fix kdewallet issue * update .cast.yaml to support 22.04 * fix libregf and libvshadow python references * fix: bad references * fix: re-enable liblightgrep/sleuthkit * fix: add includes back * Fix KDE Wallet issue (#74) * Update Cyberchef (#75) * Update docker-compose (#76) * Update docker-compose * Fix typo * Update desktop-based theme, terminal, and e2fs requirements * Fix DBUS issues between Jammy and Focal --------- Co-authored-by: Erik Kristensen --- sift/config/user/terminal.sls | 50 ++------------------ sift/config/user/theme.sls | 74 ++++++++---------------------- sift/packages/e2fslibs-dev.sls | 19 -------- sift/packages/e2fsprogs.sls | 2 + sift/packages/init.sls | 8 ++-- sift/packages/libext2fs2.sls | 2 + sift/packages/libglib2-bin.sls | 2 + sift/packages/libicu.sls | 7 +++ sift/packages/powershell.sls | 5 ++ sift/packages/powershell_focal.sls | 6 --- sift/packages/powershell_jammy.sls | 14 ------ sift/repos/docker.sls | 14 ++++-- 12 files changed, 55 insertions(+), 148 deletions(-) delete mode 100644 sift/packages/e2fslibs-dev.sls create mode 100644 sift/packages/e2fsprogs.sls create mode 100644 sift/packages/libext2fs2.sls create mode 100644 sift/packages/libglib2-bin.sls create mode 100644 sift/packages/libicu.sls delete mode 100644 sift/packages/powershell_focal.sls delete mode 100644 sift/packages/powershell_jammy.sls diff --git a/sift/config/user/terminal.sls b/sift/config/user/terminal.sls index 13e88d9..63a09ec 100644 --- a/sift/config/user/terminal.sls +++ b/sift/config/user/terminal.sls @@ -4,14 +4,12 @@ {%- else -%} {%- set home = salt['user.info'](user).home -%} {%- endif -%} - -include: - - sift.packages.dconf-cli - - sift.packages.dbus-x11 +{% set userid = (salt['user.info'](user))['uid'] %} include: - sift.config.user.user - sift.packages.dbus-x11 + - sift.packages.dconf-cli sift-config-terminal-profiles-file: file.managed: @@ -22,55 +20,17 @@ sift-config-terminal-profiles-file: - mode: 0644 - makedirs: True -{% if grains['oscodename'] != "jammy" %} - sift-config-terminal-profiles-install: cmd.run: - - name: dconf load /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ < /usr/share/sift/terminal-profiles.txt + - name: dconf load /org/gnome/terminal/legacy/profiles:/ < /usr/share/sift/terminal-profiles.txt - runas: {{ user }} - cwd: {{ home }} - shell: /bin/bash - - onlyif: - - fun: cmd.run - cmd: export DBUS_SESSION_BUS_ADDRESS=$(dbus-launch | grep DBUS_SESSION_BUS_ADDRESS | cut -d= -f2-) - shell: /bin/bash - python_shell: True - runas: {{ user }} + - env: + - DBUS_SESSION_BUS_ADDRESS: 'unix:path=/run/user/{{ userid }}/bus' - require: - file: sift-config-terminal-profiles-file - sls: sift.packages.dconf-cli - sls: sift.packages.dbus-x11 - watch: - file: sift-config-terminal-profiles-file - -{% else %} - -sift-config-terminal-profiles-jammy-script: - file.managed: - - name: {{ home }}/.config/terminal.sh - - contents: | - #!/bin/bash - export DBUS_SESSION_BUS_ADDRESS=$(dbus-launch | grep DBUS_SESSION_BUS_ADDRESS | cut -d= -f2-) - dconf load /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ < /usr/share/sift/terminal-profiles.txt - - makedirs: True - - user: {{ user }} - - group: {{ user }} - - mode: 755 - - require: - - sls: sift.packages.dbus-x11 - - user: sift-user-{{ user }} - -sift-config-terminal-profiles-jammy: - cmd.run: - - name: {{ home }}/.config/terminal.sh - - runas: {{ user }} - - shell: /bin/bash - - cwd: {{ home }} - - require: - - file: sift-config-terminal-profiles-jammy-script - - user: sift-user-{{ user }} - - watch: - - file: sift-config-terminal-profiles-jammy-script - - user: sift-user-{{ user }} - -{% endif %} diff --git a/sift/config/user/theme.sls b/sift/config/user/theme.sls index 9e97913..7a93a2f 100644 --- a/sift/config/user/theme.sls +++ b/sift/config/user/theme.sls @@ -4,11 +4,12 @@ {%- else -%} {%- set home = salt['user.info'](user).home -%} {%- endif -%} -{%- set dbus_address = salt['cmd.run']("dbus-launch | grep DBUS_SESSION_BUS_ADDRESS | cut -d= -f2-", shell="/bin/bash", runas=user, cwd=home, python_shell=True) -%} +{% set userid = (salt['user.info'](user))['uid'] %} include: - sift.config.user.user - sift.packages.dbus-x11 + - sift.packages.libglib2-bin sift-config-theme-set-background-directory: file.directory: @@ -23,52 +24,12 @@ sift-config-theme-set-background-file: - require: - file: sift-config-theme-set-background-directory -{% if grains['oscodename'] != "jammy" %} - -sift-config-theme-set-background-file-gsettings: - cmd.run: - - name: gsettings set org.gnome.desktop.background picture-uri file:///usr/share/backgrounds/sift.png - - runas: {{ user }} - - cwd: {{ home }} - - shell: /bin/bash - - env: - - DBUS_SESSION_BUS_ADDRESS: "{{ dbus_address }}" - - require: - - file: sift-config-theme-set-background-file - -{% else %} - -sift-config-background-jammy-script: - file.managed: - - name: {{ home }}/.config/background.sh - - contents: | - #!/bin/bash - export DBUS_SESSION_BUS_ADDRESS=$(dbus-launch | grep DBUS_SESSION_BUS_ADDRESS | cut -d= -f2-) - gsettings set org.gnome.desktop.background picture-uri file:///usr/share/backgrounds/sift.png - - makedirs: True - - user: {{ user }} - - group: {{ user }} - - mode: 755 - - require: - - sls: sift.packages.dbus-x11 - -sift-config-background-jammy: - cmd.run: - - name: {{ home }}/.config/background.sh - - runas: {{ user }} - - cwd: {{ home }} - - shell: /bin/bash - - require: - - file: sift-config-background-jammy-script - - watch: - - file: sift-config-background-jammy-script - -{% endif %} - sift-config-theme-manage-autostart: file.directory: - name: {{ home }}/.config/autostart/ - makedirs: True + - user: {{ user }} + - group: {{ user }} sift-config-theme-manage-gnome-terminal: file.managed: @@ -79,20 +40,23 @@ sift-config-theme-manage-gnome-terminal: - file: sift-config-theme-manage-autostart - user: sift-user-{{ user }} -sift-config-theme-gnome-shell-favorites: - cmd.run: - - name: gsettings set org.gnome.shell favorite-apps "['gnome-terminal.desktop', 'firefox.desktop', 'org.gnome.Nautilus.desktop']" - - runas: {{ user }} - - cwd: {{ home }} - - shell: /bin/bash - - require: - - user: sift-user-{{ user }} - -sift-config-theme-gnome-launcher-position: +sift-config-theme-set-background-file-gsettings: cmd.run: - - name: gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM + - names: + - gsettings set org.gnome.desktop.background picture-uri file:///usr/share/backgrounds/sift.png + - gsettings set org.gnome.shell.extensions.dash-to-dock dock-position BOTTOM + {% if grains['oscodename'] == 'focal' %} + - gsettings set org.gnome.shell favorite-apps "['gnome-terminal.desktop', 'firefox.desktop', 'org.gnome.Nautilus.desktop']" + {% elif grains['oscodename'] == 'jammy' %} + - gsettings set org.gnome.shell favorite-apps "['gnome-terminal.desktop', 'firefox_firefox.desktop', 'org.gnome.Nautilus.desktop']" + - gsettings set org.gnome.desktop.background picture-uri-dark file:///usr/share/backgrounds/sift.png + {% endif %} - runas: {{ user }} - cwd: {{ home }} - shell: /bin/bash + - env: + - DBUS_SESSION_BUS_ADDRESS: 'unix:path=/run/user/{{ userid }}/bus' - require: - - user: sift-user-{{ user }} + - file: sift-config-theme-set-background-file + - sls: sift.packages.libglib2-bin + - sls: sift.packages.dbus-x11 diff --git a/sift/packages/e2fslibs-dev.sls b/sift/packages/e2fslibs-dev.sls deleted file mode 100644 index 0fbe60f..0000000 --- a/sift/packages/e2fslibs-dev.sls +++ /dev/null @@ -1,19 +0,0 @@ -# Name: e2fslibs-dev -# Website: http://e2fsprogs.sourceforge.net/ -# Description: File system utilities for use with the ext2 file system -# Category: -# Author: Theodore Ts'o -# License: GNU General Public License v2 -# Notes: - -{% if grains['oscodename'] != "jammy" %} - -e2fslibs-dev: - pkg.installed - -{% else %} - -e2fslib-dev-not-in-jammy: - test.nop - -{% endif %} diff --git a/sift/packages/e2fsprogs.sls b/sift/packages/e2fsprogs.sls new file mode 100644 index 0000000..213f69b --- /dev/null +++ b/sift/packages/e2fsprogs.sls @@ -0,0 +1,2 @@ +e2fsprogs: + pkg.installed diff --git a/sift/packages/init.sls b/sift/packages/init.sls index e75e7d0..e227ee3 100644 --- a/sift/packages/init.sls +++ b/sift/packages/init.sls @@ -27,7 +27,7 @@ include: - sift.packages.docker - sift.packages.driftnet - sift.packages.dsniff -### - sift.packages.e2fslibs-dev + - sift.packages.e2fsprogs - sift.packages.ent - sift.packages.epic5 - sift.packages.etherape @@ -80,6 +80,7 @@ include: - sift.packages.libewf-dev ### - sift.packages.libewf-python - sift.packages.libewf-tools + - sift.packages.libext2fs2 - sift.packages.libffi-dev - sift.packages.libfsapfs-tools - sift.packages.libfuse-dev @@ -142,7 +143,6 @@ include: - sift.packages.pv - sift.packages.python-flowgrep - sift.packages.python3 - - sift.packages.python3-debian - sift.packages.python3-dev - sift.packages.python3-dfvfs - sift.packages.python3-fuse @@ -233,7 +233,7 @@ sift-packages: - sls: sift.packages.docker - sls: sift.packages.driftnet - sls: sift.packages.dsniff -### - sls: sift.packages.e2fslibs-dev + - sls: sift.packages.e2fsprogs - sls: sift.packages.ent - sls: sift.packages.epic5 - sls: sift.packages.etherape @@ -286,6 +286,7 @@ sift-packages: - sls: sift.packages.libewf-dev ### - sls: sift.packages.libewf-python - sls: sift.packages.libewf-tools + - sls: sift.packages.libext2fs2 - sls: sift.packages.libffi-dev - sls: sift.packages.libfsapfs-tools - sls: sift.packages.libfuse-dev @@ -348,7 +349,6 @@ sift-packages: - sls: sift.packages.pv - sls: sift.packages.python-flowgrep - sls: sift.packages.python3 - - sls: sift.packages.python3-debian - sls: sift.packages.python3-dev - sls: sift.packages.python3-dfvfs - sls: sift.packages.python3-fuse diff --git a/sift/packages/libext2fs2.sls b/sift/packages/libext2fs2.sls new file mode 100644 index 0000000..bdef231 --- /dev/null +++ b/sift/packages/libext2fs2.sls @@ -0,0 +1,2 @@ +libext2fs2: + pkg.installed diff --git a/sift/packages/libglib2-bin.sls b/sift/packages/libglib2-bin.sls new file mode 100644 index 0000000..e7c96b0 --- /dev/null +++ b/sift/packages/libglib2-bin.sls @@ -0,0 +1,2 @@ +libglib2.0-bin: + pkg.installed diff --git a/sift/packages/libicu.sls b/sift/packages/libicu.sls new file mode 100644 index 0000000..04ab6fa --- /dev/null +++ b/sift/packages/libicu.sls @@ -0,0 +1,7 @@ +{% if grains['oscodename'] == 'focal' %} +libicu66: + pkg.installed +{% elif grains['oscodename'] == 'jammy' %} +libicu70: + pkg.installed +{% endif %} diff --git a/sift/packages/powershell.sls b/sift/packages/powershell.sls index 2dba968..844cca5 100644 --- a/sift/packages/powershell.sls +++ b/sift/packages/powershell.sls @@ -3,6 +3,9 @@ {%- set filename = "powershell_7.2.6-1.deb_amd64.deb" -%} {%- set hash = "A0D810FE381B77E4BFB99CC67F713F6D483545E94BDEB4150524C085CF20E2DA" -%} +include: + - sift.packages.libicu + sift-powershell-source: file.managed: - name: /var/cache/sift/archives/{{ filename }} @@ -16,3 +19,5 @@ sift-powershell: - powershell: /var/cache/sift/archives/{{ filename }} - watch: - file: sift-powershell-source + - require: + - sls: sift.packages.libicu diff --git a/sift/packages/powershell_focal.sls b/sift/packages/powershell_focal.sls deleted file mode 100644 index 957d83c..0000000 --- a/sift/packages/powershell_focal.sls +++ /dev/null @@ -1,6 +0,0 @@ -{%- set base_url = "https://github.com/Powershell/Powershell/releases/download/v" -%} -{%- set version = "6.0.0-alpha.13" -%} -{%- set filename = "powershell_6.0.0-alpha.13-1ubuntu1." ~ grains['osrelease'] ~ ".1_amd64.deb" -%} - -sift-powershell: - test.nop \ No newline at end of file diff --git a/sift/packages/powershell_jammy.sls b/sift/packages/powershell_jammy.sls deleted file mode 100644 index 3d418bc..0000000 --- a/sift/packages/powershell_jammy.sls +++ /dev/null @@ -1,14 +0,0 @@ -{%- set base_url = "https://github.com/Powershell/Powershell/releases/download/v" -%} -<<<<<<< HEAD -{%- set version = "6.0.0-alpha.13" -%} -{%- set filename = "powershell_6.0.0-alpha.13-1ubuntu1." ~ grains['osrelease'] ~ ".1_amd64.deb" -%} - -sift-powershell: - test.nop -======= -{%- set version = "7.2.6" -%} -{%- set filename = "powershell_7.2.6-1.deb_amd64.deb" -%} - -sift-powershell: - test.nop ->>>>>>> c09ba8c (Update packages for Jammy compatibility) diff --git a/sift/repos/docker.sls b/sift/repos/docker.sls index ba71795..7596d7b 100644 --- a/sift/repos/docker.sls +++ b/sift/repos/docker.sls @@ -2,16 +2,20 @@ include: - sift.packages.software-properties-common - sift.packages.apt-transport-https +sift-docker-key: + file.managed: + - name: /usr/share/keyrings/DOCKER-PGP-KEY.asc + - source: https://download.docker.com/linux/ubuntu/gpg + - skip_verify: True + - makedirs: True + sift-docker-repo: pkgrepo.managed: - humanname: Docker - - name: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ grains['lsb_distrib_codename'] }} stable + - name: deb [arch=amd64 signed-by=/usr/share/keyrings/DOCKER-PGP-KEY.asc] https://download.docker.com/linux/ubuntu {{ grains['lsb_distrib_codename'] }} stable - dist: {{ grains['lsb_distrib_codename'] }} - file: /etc/apt/sources.list.d/docker.list - # - keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 - # - keyserver: hkp://p80.pool.sks-keyservers.net:80 - - key_url: https://download.docker.com/linux/ubuntu/gpg - - refresh: true + - refresh: True - require: - sls: sift.packages.software-properties-common - sls: sift.packages.apt-transport-https