diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 0cc1a2e..3dd7e5d 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -7,7 +7,7 @@ on: [push, pull_request] jobs: rpm: runs-on: ubuntu-20.04 - container: registry.suse.com/bci/bci-base:15.4.27.8.3 + container: registry.suse.com/bci/bci-base:15.3 steps: - name: setup-environment run: | @@ -17,14 +17,14 @@ jobs: - name: build-srpm run: | make rpm - sudo rpmbuild --rebuild ./rpm/SRPMS/squashfs-mount*.src.rpm --define "_topdir $(pwd)/rpm" - sudo rpm --install rpm/RPMS/x86_64/squashfs-mount*.rpm - cp rpm/SRPMS/* . + sudo rpmbuild --rebuild "$(find rpm/SRPMS -name '*.rpm' -type f -print -quit)" --define "_topdir $(pwd)/rpm" + sudo rpm --install "$(find rpm/RPMS -name '*.rpm' -type f -print -quit)" + find rpm -name '*.rpm' -type f -exec cp {} . \; - name: upload-rpm uses: actions/upload-artifact@v3 with: name: rpm - path: squashfs-mount*.src.rpm + path: '*.rpm' tag-release: runs-on: ubuntu-20.04 @@ -38,5 +38,4 @@ jobs: uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: - squashfs-mount*.src.rpm + files: '*.rpm' diff --git a/generate-rpm.sh b/generate-rpm.sh index 68bf8a1..fbe4482 100755 --- a/generate-rpm.sh +++ b/generate-rpm.sh @@ -18,7 +18,7 @@ done # Strip `-dev` from VERSION if exsists because RPM requires version numbers of # the form X.Y.Z # shellcheck disable=SC1003 -version="$(sed 's\-.*$\\' VERSION)" +version="$(sed s/-/~/ VERSION)" pkg_name="squashfs-mount-${version}" mkdir -p "${build_path}" (cd "${build_path}" && mkdir -p SOURCES BUILD RPMS SRPMS SPECS) diff --git a/squashfs-mount.spec.in b/squashfs-mount.spec.in index c4b0af4..f8d9e70 100644 --- a/squashfs-mount.spec.in +++ b/squashfs-mount.spec.in @@ -2,11 +2,14 @@ Name: squashfs-mount Version: SQMNT_VERSION Release: 1%{?dist} Summary: setuid mount squashfs utility. +Prefix: /usr License: BSD3 URL: https://github.com/eth-cscs/squashfs-mount Source0: %{name}-%{version}.tar.gz +%define _build_id_links none + %description A small setuid binary that mounts a squashfs image in a mount namespace then executes a command as the normal user. @@ -17,7 +20,7 @@ A small setuid binary that mounts a squashfs image in a mount namespace then exe make %{?_smp_mflags} %install -sudo make install-suid prefix=%{_prefix} DESTDIR=%{buildroot} +make install-suid prefix=%{_prefix} DESTDIR=%{buildroot} %files %license LICENSE