diff --git a/.github/workflows/snap-release.yaml b/.github/workflows/snap-release.yaml index bae353cad2..2fde90afc4 100644 --- a/.github/workflows/snap-release.yaml +++ b/.github/workflows/snap-release.yaml @@ -26,7 +26,7 @@ jobs: # Check semantic versioning format (x.y.z) and if the current tag is the latest tag if echo "${current_version}" | grep -q "^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+$" && echo -e "$latest_version\n$current_version" | sort -C -V; then # Current version is the latest version, build it - snapcraft -d snap --destructive-mode + snapcraft snap --debug --destructive-mode fi - name: Upload snap diff --git a/.github/workflows/snap.yaml b/.github/workflows/snap.yaml index ec968dc48f..9176d45d2a 100644 --- a/.github/workflows/snap.yaml +++ b/.github/workflows/snap.yaml @@ -24,4 +24,4 @@ jobs: - name: Build snap if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} run: | - snapcraft -d snap --destructive-mode + snapcraft snap --debug --destructive-mode diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 80633a0451..f7b315c2ed 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -532,8 +532,13 @@ EOT if [ -f "$chrony_systemd_service" ]; then # Remove user option, user could not exist in the rootfs + # Set the /var/lib/chrony for ReadWritePaths to be ignored if + # its nonexistent, this broke the service on boot previously + # due to the directory not being present "(code=exited, status=226/NAMESPACE)" sed -i -e 's/^\(ExecStart=.*\)-u [[:alnum:]]*/\1/g' \ - -e '/^\[Unit\]/a ConditionPathExists=\/dev\/ptp0' ${chrony_systemd_service} + -e '/^\[Unit\]/a ConditionPathExists=\/dev\/ptp0' \ + -e 's/^ReadWritePaths=\(.\+\) \/var\/lib\/chrony \(.\+\)$/ReadWritePaths=\1 -\/var\/lib\/chrony \2/m' \ + ${chrony_systemd_service} fi AGENT_DIR="${ROOTFS_DIR}/usr/bin"