Skip to content

Commit

Permalink
Bump Wireshark version and produce plugin variants for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
juadde committed Apr 30, 2024
1 parent e309db5 commit 04913aa
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 15 deletions.
113 changes: 99 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
# Variables to update in case of new versions
LUABITOP_VERSION: "1.0.2"
WIRESHARK_VERSION: "4.2.3"
WIRESHARK_VERSION: "4.2.4"
LUA_VERSION: "5.2.4"

steps:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
path: bit.dll
if-no-files-found: error

package_linux_plugin:
package_ubuntu_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
Expand All @@ -101,10 +101,58 @@ jobs:
run: zip -r Wireshark_plugin.zip share lib

# Store Wireshark plugin as artifact for future usage
- name: Archive DLL as artifact
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-ubuntu
path: Wireshark_plugin.zip
if-no-files-found: error

package_alpine_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Create directory structure
run: mkdir -p lib/wireshark/plugins share/wireshark
- name: Move plugin files
run: mv cyber_*.lua LICENSE README.md COPYING lib/wireshark/plugins
- name: Move user_dlts file
run: mv user_dlts share/wireshark
- name: Package plugin
run: zip -r Wireshark_plugin.zip share lib

# Store Wireshark plugin as artifact for future usage
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-alpine
path: Wireshark_plugin.zip
if-no-files-found: error

package_centos_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Create directory structure
run: mkdir -p lib64/wireshark/plugins share/wireshark
- name: Move plugin files
run: mv cyber_*.lua LICENSE README.md COPYING lib64/wireshark/plugins
- name: Move user_dlts file
run: mv user_dlts share/wireshark
- name: Package plugin
run: zip -r Wireshark_plugin.zip share lib

# Store Wireshark plugin as artifact for future usage
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-linux
name: Wireshark-plugin-centos
path: Wireshark_plugin.zip
if-no-files-found: error

Expand All @@ -130,7 +178,7 @@ jobs:
run: Compress-Archive -Path Wireshark -DestinationPath Wireshark_plugin.zip

# Store Wireshark plugin as artifact for future usage
- name: Archive DLL as artifact
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-windows
Expand All @@ -139,7 +187,7 @@ jobs:

test_a429_ubuntu:
runs-on: ubuntu-latest
needs: package_linux_plugin
needs: package_ubuntu_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
Expand All @@ -151,7 +199,7 @@ jobs:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-linux
name: Wireshark-plugin-ubuntu
- name: Install luabitop
run: sudo apt-get install lua-bitop
- name: Install TShark
Expand All @@ -167,7 +215,7 @@ jobs:

test_discrete_ubuntu:
runs-on: ubuntu-latest
needs: package_linux_plugin
needs: package_ubuntu_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
Expand All @@ -179,7 +227,7 @@ jobs:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-linux
name: Wireshark-plugin-ubuntu
- name: Install TShark
run: sudo apt-get install tshark
- name: Test TShark availability
Expand Down Expand Up @@ -255,7 +303,7 @@ jobs:
- name: Run diff
run: fc.exe discrete.output test/discrete.output

release_linux_plugin:
release_ubuntu_plugin:
runs-on: ubuntu-latest
needs: [test_a429_ubuntu, test_discrete_ubuntu]
permissions:
Expand All @@ -265,16 +313,53 @@ jobs:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-linux
name: Wireshark-plugin-ubuntu
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-linux-${{ github.ref_name }}.zip
- name: Release Linux plugin
run: mv Wireshark_plugin.zip Wireshark_plugin-ubuntu-${{ github.ref_name }}.zip
- name: Release Ubuntu plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-linux-${{ github.ref_name }}.zip
files: Wireshark_plugin-ubuntu-${{ github.ref_name }}.zip
fail_on_unmatched_files: true

release_alpine_plugin:
runs-on: ubuntu-latest
needs: [package_alpine_plugin]
permissions:
contents: write
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-alpine
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-alpine-${{ github.ref_name }}.zip
- name: Release Alpine plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-alpine-${{ github.ref_name }}.zip
fail_on_unmatched_files: true

release_centos_plugin:
runs-on: ubuntu-latest
needs: [package_centos_plugin]
permissions:
contents: write
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-centos-${{ github.ref_name }}.zip
- name: Release CentOS plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-centos-${{ github.ref_name }}.zip
fail_on_unmatched_files: true

release_windows_plugin:
runs-on: ubuntu-latest
needs: [test_a429_windows, test_discrete_windows]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Protocol name: `a429` for Arinc429 and `discrete` for discrete.
For `ubuntu`:

~~~
unzip `Wireshark_plugin-linux.zip` -d /usr
unzip `Wireshark_plugin-ubuntu.zip` -d /usr
~~~

The `a429` and `discrete` dissector will then be automatically loaded when starting wireshark, for all users, with the mapping active. `user_dlts` file in `/usr/share/wireshark` might be overwritten if you have your own one.
Expand Down

0 comments on commit 04913aa

Please sign in to comment.