Skip to content

Commit

Permalink
Remove bionic / xenial support (#79)
Browse files Browse the repository at this point in the history
* Remove bionic / xenial support

* Fix tests and terminal requirements

* Fix DBUS issue and dbus requirements

* Forgot to remove previous DBUS entry
  • Loading branch information
digitalsleuth authored Jan 27, 2023
1 parent 65cc9dc commit 38d67f5
Show file tree
Hide file tree
Showing 41 changed files with 41 additions and 390 deletions.
2 changes: 1 addition & 1 deletion .ci/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -x

DISTRO=${DISTRO:="bionic"}
DISTRO=${DISTRO:="focal"}
STATE=$1
SIFT_VERSION=${2:-stable}

Expand Down
5 changes: 3 additions & 2 deletions .ci/test-all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

SIFT_VERSION=${1:-stable}
DISTRO=${DISTRO:="focal"}
STATE=$1

docker run -it --rm --name="sift-package-${STATE}" -v `pwd`/sift:/srv/salt/sift --cap-add SYS_ADMIN sift-saltstack:bionic /bin/bash
docker run -it --rm --name="sift-package-${STATE}" -v `pwd`/sift:/srv/salt/sift --cap-add SYS_ADMIN teamdfir/sift-saltstack-tester:$DISTRO /bin/bash
6 changes: 1 addition & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ jobs:
strategy:
matrix:
salt: [3004, 3005]
os: [18.04, 20.04]
os: [20.04]
state: ${{ fromJson(needs.changed_states.outputs.matrix) }}
include:
- os: 18.04
code: bionic
- os: 20.04
code: focal
#Note: disabled until we support jammy
Expand All @@ -45,8 +43,6 @@ jobs:
exclude:
- salt: 3004
os: 22.04
- salt: 3005
os: 18.04

container:
image: docker://ghcr.io/teamdfir/sift-saltstack-tester:${{ matrix.salt }}-${{ matrix.code }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/weekly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,20 @@ jobs:
strategy:
matrix:
salt: [3004, 3005]
os: [18.04, 20.04]
os: [20.04]
state:
- sift.packages.python2
- sift.packages.python3
- sift.tests.gift
- sift.config.user.pdfs
include:
- os: 18.04
code: bionic
- os: 20.04
code: focal
- os: 22.04
code: jammy
exclude:
- salt: 3004
os: 22.04
- salt: 3005
os: 18.04

container:
image: docker://ghcr.io/teamdfir/sift-saltstack-tester:${{ matrix.salt }}-${{ matrix.code }}
Expand Down
4 changes: 0 additions & 4 deletions sift/config/user/files/rekall-profile.txt

This file was deleted.

14 changes: 0 additions & 14 deletions sift/config/user/files/terminal-profiles_xenial.txt

This file was deleted.

18 changes: 14 additions & 4 deletions sift/config/user/terminal.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
{%- 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) -%}

include:
- sift.packages.dconf-cli
- sift.packages.dbus-x11

sift-config-terminal-profiles-file:
file.managed:
- name: /usr/share/sift/terminal-profiles.txt
- source: salt://sift/config/user/files/terminal-profiles_bionic.txt
- source: salt://sift/config/user/files/terminal-profiles.txt
- user: root
- group: root
- mode: 0644
Expand All @@ -21,9 +24,16 @@ sift-config-terminal-profiles-install:
- runas: {{ user }}
- cwd: {{ home }}
- shell: /bin/bash
- env:
- DBUS_SESSION_BUS_ADDRESS: "{{ dbus_address }}"
- 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 }}
- require:
- file: sift-config-terminal-profiles-file
- sls: sift.packages.dconf-cli
- sls: sift.packages.dbus-x11
- watch:
- file: sift-config-terminal-profiles-file

6 changes: 0 additions & 6 deletions sift/files/samba/smb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ netbios name = SIFTWORKSTATION
security = USER
map to guest = Bad User
dns proxy = no
{% if grains['oscodename'] == "xenial" -%}
name resolve order = host bcast lmhost wins
{% endif -%}
{% if grains['oscodename'] == "bionic" -%}
name resolve order = host bcast wins
{% endif -%}

include = /etc/samba/smb-%L.conf
guest account = {{ user }}
Expand Down
53 changes: 0 additions & 53 deletions sift/packages/absent/plaso.sls

This file was deleted.

20 changes: 0 additions & 20 deletions sift/packages/arc-icons.sls

This file was deleted.

21 changes: 0 additions & 21 deletions sift/packages/arc-theme.sls

This file was deleted.

15 changes: 0 additions & 15 deletions sift/packages/bcrypt.sls

This file was deleted.

2 changes: 2 additions & 0 deletions sift/packages/dbus-x11.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dbus-x11:
pkg.installed
2 changes: 2 additions & 0 deletions sift/packages/dconf-cli.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dconf-cli:
pkg.installed
8 changes: 0 additions & 8 deletions sift/packages/dconf-tools.sls

This file was deleted.

12 changes: 2 additions & 10 deletions sift/packages/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include:
- sift.packages.arp-scan
- sift.packages.autopsy
- sift.packages.avfs
- sift.packages.bcrypt
- sift.packages.bless
- sift.packages.blt
- sift.packages.build-essential
Expand All @@ -23,7 +22,6 @@ include:
- sift.packages.curl
- sift.packages.dc3dd
- sift.packages.dcfldd
- sift.packages.dconf-tools
- sift.packages.default-jre
- sift.packages.disktype
- sift.packages.docker
Expand Down Expand Up @@ -144,8 +142,8 @@ include:
- sift.packages.powershell
- sift.packages.pv
- sift.packages.python-flowgrep
- sift.packages.python-nids
- sift.packages.python3
- sift.packages.python3-debian
- sift.packages.python3-dev
- sift.packages.python3-dfvfs
- sift.packages.python3-fuse
Expand Down Expand Up @@ -175,7 +173,6 @@ include:
- sift.packages.ssldump
- sift.packages.sslsniff
- sift.packages.stunnel4
- sift.packages.system-config-samba
- sift.packages.tcl
- sift.packages.tcpflow
- sift.packages.tcpick
Expand All @@ -201,7 +198,6 @@ include:
- sift.packages.xdot
- sift.packages.xfsprogs
- sift.packages.xmount
- sift.packages.xpdf
- sift.packages.zenity

sift-packages:
Expand All @@ -215,7 +211,6 @@ sift-packages:
- sls: sift.packages.arp-scan
- sls: sift.packages.autopsy
- sls: sift.packages.avfs
- sls: sift.packages.bcrypt
- sls: sift.packages.bless
- sls: sift.packages.blt
- sls: sift.packages.build-essential
Expand All @@ -231,7 +226,6 @@ sift-packages:
- sls: sift.packages.curl
- sls: sift.packages.dc3dd
- sls: sift.packages.dcfldd
- sls: sift.packages.dconf-tools
- sls: sift.packages.default-jre
- sls: sift.packages.disktype
- sls: sift.packages.docker
Expand Down Expand Up @@ -352,8 +346,8 @@ sift-packages:
- sls: sift.packages.powershell
- sls: sift.packages.pv
- sls: sift.packages.python-flowgrep
- sls: sift.packages.python-nids
- 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 Expand Up @@ -383,7 +377,6 @@ sift-packages:
- sls: sift.packages.ssldump
- sls: sift.packages.sslsniff
- sls: sift.packages.stunnel4
- sls: sift.packages.system-config-samba
- sls: sift.packages.tcl
- sls: sift.packages.tcpflow
- sls: sift.packages.tcpick
Expand All @@ -409,5 +402,4 @@ sift-packages:
- sls: sift.packages.xdot
- sls: sift.packages.xfsprogs
- sls: sift.packages.xmount
- sls: sift.packages.xpdf
- sls: sift.packages.zenity
12 changes: 0 additions & 12 deletions sift/packages/magnus.sls
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,5 @@
# License: MIT License (https://github.com/stuartlangridge/magnus/blob/master/LICENSE)
# Notes: magnus

{%- if grains['oscodename'] == "bionic" %}
include:
- sift.repos.flexiondotorg

magnus:
pkg.installed:
- require:
- sls: sift.repos.flexiondotorg

{%- elif grains['oscodename'] == "focal" %}
magnus:
pkg.installed

{%- endif -%}
5 changes: 0 additions & 5 deletions sift/packages/netcat.sls
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
{% if grains['oscodename'] == "bionic" -%}
netcat-openbsd:
pkg.installed
{% else %}
netcat:
pkg.installed
{%- endif -%}
7 changes: 1 addition & 6 deletions sift/packages/phonon.sls
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{% set package_name = salt['grains.filter_by']({
'bionic': 'phonon',
'focal': 'phonon4qt5'
}, grain='oscodename') %}

sift-package-phonon:
pkg.installed:
- name: {{ package_name }}
- name: phonon4qt5
Loading

0 comments on commit 38d67f5

Please sign in to comment.