From 52a515a2f3eeac12699ffef173c1765c92ae11ce Mon Sep 17 00:00:00 2001 From: juadde Date: Tue, 30 Apr 2024 08:39:32 +0200 Subject: [PATCH] Bump Wireshark version and produce plugin variants for linux --- .github/workflows/CI.yml | 113 ++++++++++++++++++++++++++++++++++----- README.md | 4 +- 2 files changed, 101 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2d8014d..48c9534 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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: @@ -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 @@ -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-linux + 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 lib64 + + # Store Wireshark plugin as artifact for future usage + - name: Archive plugin as artifact + uses: actions/upload-artifact@v4 + with: + name: Wireshark-plugin-centos path: Wireshark_plugin.zip if-no-files-found: error @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: @@ -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] diff --git a/README.md b/README.md index 5d5a4dd..431df92 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This program uses the following software to run: | Software | Version | Copyright | License | |-|-|-|-| | Lua Bit Operations Module (Lua BitOp) | 1.0.2^ | 2008-2012 Mike Pall | MIT | -| Wireshark | 4.2.3^ | 1998-2023 Gerald Combs and contributors | GPL-2.0-or-later | +| Wireshark | 4.2.4^ | 1998-2023 Gerald Combs and contributors | GPL-2.0-or-later | See repositories of third-party softwares for more information about their dependencies. @@ -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.