From 27741e6e98c021be1da066ae785d4914d1754568 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Thu, 29 Feb 2024 09:26:59 +0100 Subject: [PATCH 1/3] gh-action: increase systemctl log lines during tests This should allow to see full status / error messages. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ced663..e816b9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,8 +133,8 @@ jobs: - name: Test shoveler service run: | - podman exec pkgtest systemctl start xrootd-monitoring-shoveler - podman exec pkgtest systemctl status xrootd-monitoring-shoveler + podman exec pkgtest systemctl --full --lines=100 start xrootd-monitoring-shoveler + podman exec pkgtest systemctl --full --lines=100 status xrootd-monitoring-shoveler - name: Test shoveler-status run: | From fcdd5848140741264c12834e00b9548b1fb33e9f Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Thu, 29 Feb 2024 09:35:55 +0100 Subject: [PATCH 2/3] gh-action: print permissions and ownership of queue directory This should ease debugging potential issues. --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e816b9e..4a8cac4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -107,6 +107,11 @@ jobs: run: | podman exec pkgtest bash -c "dnf -y install /root/xrootd-monitoring-shoveler/xrootd-monitoring-shoveler*x86_64.rpm" + - name: Check user/group, permissions on queue directory + run: | + podman exec pkgtest bash -c "getent passwd xrootd-monitoring-shoveler" + podman exec pkgtest bash -c "ls -la /var/spool/" + - name: Test createtoken command run: | podman exec pkgtest createtoken --help From 090a12550220ab7aaaa8ef09054bc8ca975dacc8 Mon Sep 17 00:00:00 2001 From: Oliver Freyermuth Date: Thu, 29 Feb 2024 09:48:25 +0100 Subject: [PATCH 3/3] goreleaser: enforce owner/group on user home and queue directory While the user is created via preinst scripts with the given home path in /var/spool/xrootd-monitoring-shoveler, the home directory itself is not created. Install that with the package with appropriate permissions, and pre-create the queue subdirectory. fixes #56 --- .goreleaser.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index a4a7ccc..4b86033 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -103,10 +103,18 @@ nfpms: type: "config|noreplace" - src: config/xrootd-monitoring-shoveler.service dst: /usr/lib/systemd/system/xrootd-monitoring-shoveler.service + - dst: /var/spool/xrootd-monitoring-shoveler + type: dir + file_info: + mode: 0700 + owner: xrootd-monitoring-shoveler + group: xrootd-monitoring-shoveler - dst: /var/spool/xrootd-monitoring-shoveler/queue type: dir file_info: mode: 0700 + owner: xrootd-monitoring-shoveler + group: xrootd-monitoring-shoveler overrides: rpm: file_name_template: >-