Skip to content

Commit

Permalink
test: deb package installation on debian
Browse files Browse the repository at this point in the history
  • Loading branch information
thediveo committed Sep 22, 2023
1 parent dbcae5e commit d864954
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ nfpms:
postremove: packaging/linux/post-remove.sh
dependencies:
- desktop-file-utils
overrides:
deb:
dependencies:
- wireshark-common
recommends:
- tshark | wireshark

archives:
- id: default
Expand Down
4 changes: 4 additions & 0 deletions packaging/linux/test/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Do a test installation of the cshargextcap*.deb package on Debian.
FROM debian:12-slim
COPY install.sh /
CMD ["/bin/bash", "install.sh"]
24 changes: 24 additions & 0 deletions packaging/linux/test/debian/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e

RED="\033[1;31m"
GREEN="\033[1;32m"
NOCOLOR="\033[0m"

# test harness
apt-get update
apt-get install --no-install-recommends --no-install-suggests -y xdg-utils

# the real deal...
apt-get install -y /dist/cshargextcap_*_amd64.deb

# Ask tshark to tell us the extcap interfaces it knows of: this must list the
# packetflix extcap so we know we've installed the plugin properly.
tshark -D | grep packetflix \
&& echo -e "${GREEN}OK:${NOCOLOR} tshark detects extcap plugin" \
|| (echo -e "${RED}FAIL:${NOCOLOR} tshark doesn't detect the packetflix extcap"; exit 1)

# Check that the default URL scheme handler registration is in place.
xdg-mime query default x-scheme-handler/packetflix | grep "packetflix.desktop" \
&& echo -e "${GREEN}OK:${NOCOLOR} packetflix URL scheme handler registered" \
|| (echo -e "${RED}FAIL:${NOCOLOR} packetflix URL scheme handler not detected"; exit 1)
12 changes: 12 additions & 0 deletions packaging/linux/test/debian/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e


RED="\033[1;31m"
GREEN="\033[1;32m"
NOCOLOR="\033[0m"

docker build --pull -f Dockerfile -t cshargextcap-debian-test-install .
docker run --rm --name cshargextcap-debian-test-install -v ./../../../../dist:/dist cshargextcap-debian-test-install \
&& echo -e "${GREEN}SUCCESS${NOCOLOR}" \
|| (echo -e "${RED}FAIL${NOCOLOR}"; exit 1)
4 changes: 2 additions & 2 deletions packaging/windows/pluginversion.nsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
!define VERSION "0.9.1-4-g9413ea6"
!define FILEVERSION "0.9.1.0"
!define VERSION "0.9.7"
!define FILEVERSION "0.9.7.0"
!define COPYRIGHT "Copyright © Siemens 2023"
!define BINARYPATH "/cshargextcap/dist/windows_windows_amd64_v1"
!define BINARYNAME "cshargextcap-amd64.exe"
Expand Down

0 comments on commit d864954

Please # to comment.