diff --git a/.github/workflows/build-release-latest.yml b/.github/workflows/build-release-latest.yml index adf56d2e5..c0aff6599 100644 --- a/.github/workflows/build-release-latest.yml +++ b/.github/workflows/build-release-latest.yml @@ -12,7 +12,7 @@ env: repo_dir: nagstamon-jekyll/docs/repo cr_image: ghcr.io/henriwahl/build-nagstamon # to be increased if new updates of build images are necessary - cr_image_version: 3 + cr_image_version: 4 # release type this file is used for release: latest @@ -135,6 +135,50 @@ jobs: retention-days: 1 if-no-files-found: error + fedora-40: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v3 + # docker login is needed for pushing the build image + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed + - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . + - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} + # building in precompiled image makes them way faster instead of creating the build environment every time from scratch + - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} + - uses: actions/upload-artifact@v3 + with: + path: build/*.rpm + retention-days: 1 + if-no-files-found: error + + fedora-41: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v3 + # docker login is needed for pushing the build image + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # if image defined by variable cr_image_version is not pullable aka does not exist it will be created and pushed + - run: docker pull ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} || /usr/bin/docker build -t ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} -f build/docker/Dockerfile-${{ github.job }} . + - run: docker push ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} + # building in precompiled image makes them way faster instead of creating the build environment every time from scratch + - run: /usr/bin/docker run -v ${{ github.workspace }}:/nagstamon ${{ env.cr_image }}-${{ github.job }}:${{ env.cr_image_version }} + - uses: actions/upload-artifact@v3 + with: + path: build/*.rpm + retention-days: 1 + if-no-files-found: error + rhel-9: runs-on: ubuntu-latest needs: test @@ -255,7 +299,7 @@ jobs: repo-debian: runs-on: ubuntu-latest # try to avoid race condition and start uploading only after the last install package has been build - needs: [debian, fedora-37, fedora-38, fedora-39, rhel-9, macos, windows-32, windows-64, windows-64-debug] + needs: [debian, fedora-37, fedora-38, fedora-39, fedora-40, fedora-41, rhel-9, macos, windows-32, windows-64, windows-64-debug] env: family: debian steps: diff --git a/Nagstamon/Config.py b/Nagstamon/Config.py index fd7839744..877025b5d 100644 --- a/Nagstamon/Config.py +++ b/Nagstamon/Config.py @@ -131,7 +131,7 @@ class AppInfo(object): contains app information previously located in GUI.py """ NAME = 'Nagstamon' - VERSION = '3.14.0' + VERSION = '3.15-20240326' WEBSITE = 'https://nagstamon.de' COPYRIGHT = '©2008-2024 Henri Wahl et al.' COMMENTS = 'Nagios status monitor for your desktop' diff --git a/Nagstamon/Servers/ZabbixProblemBased.py b/Nagstamon/Servers/ZabbixProblemBased.py index ffb216a3f..438e4d6eb 100644 --- a/Nagstamon/Servers/ZabbixProblemBased.py +++ b/Nagstamon/Servers/ZabbixProblemBased.py @@ -85,6 +85,10 @@ def do_request(self, method, params={}, no_auth=False): return response_json['result'] + def api_version(self, **options): + obj = self.do_request('apiinfo.version', options, no_auth=True) + return obj + def logged_in(self): if self.zbx_auth is None: return False @@ -98,7 +102,11 @@ def logged_in(self): def login(self, username, password): self.logger.debug("Login in as " + username) - self.zbx_auth = self.do_request('user.login', {'user': username, 'password': password}) + # see issue https://github.com/HenriWahl/Nagstamon/issues/1018 + if self.api_version() < '6.4': + self.zbx_auth = self.do_request('user.login', {'user': username, 'password': password}) + else: + self.zbx_auth = self.do_request('user.login', {'username': username, 'password': password}) class ZabbixLightApiException(Exception): pass diff --git a/Nagstamon/thirdparty/zabbix_api.py b/Nagstamon/thirdparty/zabbix_api.py index 16bb94657..582e6391f 100644 --- a/Nagstamon/thirdparty/zabbix_api.py +++ b/Nagstamon/thirdparty/zabbix_api.py @@ -302,8 +302,7 @@ def logged_in(self): return False def api_version(self, **options): - # kicked out check auth to be able to check vesion before being logged in to use the correct username keyword - #self.__checkauth__() + # kicked out check auth to be able to check version before being logged in to use the correct username keyword obj = self.do_request(self.json_obj('apiinfo.version', options, auth=False)) return obj['result'] diff --git a/build/debian/changelog b/build/debian/changelog index 84010c2e8..596690dd6 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,3 +1,8 @@ +nagstamon (3.15-20240326) unstable; urgency=low + * New upstream + + -- Henri Wahl Tue, Mar 26 2024 08:00:00 +0200 + nagstamon (3.14.0) stable; urgency=low * New upstream - improved Wayland support diff --git a/build/docker/Dockerfile-fedora-40 b/build/docker/Dockerfile-fedora-40 new file mode 100644 index 000000000..013422320 --- /dev/null +++ b/build/docker/Dockerfile-fedora-40 @@ -0,0 +1,28 @@ +FROM fedora:40 +LABEL maintainer=henri@nagstamon.de + +RUN dnf -y upgrade + +RUN dnf -y install createrepo_c \ + desktop-file-utils \ + git \ + python3 \ + python3-beautifulsoup4 \ + python3-cryptography \ + python3-dateutil \ + python3-devel \ + python3-keyring \ + python3-lxml \ + python3-psutil \ + python3-pyqt6 \ + python3-pyqt6-devel \ + python3-requests \ + python3-requests-kerberos \ + python3-SecretStorage \ + python3-setuptools \ + qt6-qtsvg \ + qt6-qtmultimedia \ + rpm-build + +CMD cd /nagstamon/build && \ + /usr/bin/python3 build.py diff --git a/build/docker/Dockerfile-fedora-41 b/build/docker/Dockerfile-fedora-41 new file mode 100644 index 000000000..fc3a4cbdd --- /dev/null +++ b/build/docker/Dockerfile-fedora-41 @@ -0,0 +1,28 @@ +FROM fedora:41 +LABEL maintainer=henri@nagstamon.de + +RUN dnf -y upgrade + +RUN dnf -y install createrepo_c \ + desktop-file-utils \ + git \ + python3 \ + python3-beautifulsoup4 \ + python3-cryptography \ + python3-dateutil \ + python3-devel \ + python3-keyring \ + python3-lxml \ + python3-psutil \ + python3-pyqt6 \ + python3-pyqt6-devel \ + python3-requests \ + python3-requests-kerberos \ + python3-SecretStorage \ + python3-setuptools \ + qt6-qtsvg \ + qt6-qtmultimedia \ + rpm-build + +CMD cd /nagstamon/build && \ + /usr/bin/python3 build.py