Skip to content

Commit

Permalink
Jammy support (#81)
Browse files Browse the repository at this point in the history
* 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 <erik@erikkristensen.com>
  • Loading branch information
digitalsleuth and ekristen authored Jan 31, 2023
1 parent 8766281 commit 15fc5cc
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 148 deletions.
50 changes: 5 additions & 45 deletions sift/config/user/terminal.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 %}
74 changes: 19 additions & 55 deletions sift/config/user/theme.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
19 changes: 0 additions & 19 deletions sift/packages/e2fslibs-dev.sls

This file was deleted.

2 changes: 2 additions & 0 deletions sift/packages/e2fsprogs.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
e2fsprogs:
pkg.installed
8 changes: 4 additions & 4 deletions sift/packages/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions sift/packages/libext2fs2.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libext2fs2:
pkg.installed
2 changes: 2 additions & 0 deletions sift/packages/libglib2-bin.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libglib2.0-bin:
pkg.installed
7 changes: 7 additions & 0 deletions sift/packages/libicu.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if grains['oscodename'] == 'focal' %}
libicu66:
pkg.installed
{% elif grains['oscodename'] == 'jammy' %}
libicu70:
pkg.installed
{% endif %}
5 changes: 5 additions & 0 deletions sift/packages/powershell.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -16,3 +19,5 @@ sift-powershell:
- powershell: /var/cache/sift/archives/{{ filename }}
- watch:
- file: sift-powershell-source
- require:
- sls: sift.packages.libicu
6 changes: 0 additions & 6 deletions sift/packages/powershell_focal.sls

This file was deleted.

14 changes: 0 additions & 14 deletions sift/packages/powershell_jammy.sls

This file was deleted.

14 changes: 9 additions & 5 deletions sift/repos/docker.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 15fc5cc

Please sign in to comment.