Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ endif()
if(NOT DEFINED VERSION OR VERSION STREQUAL "")
execute_process(
COMMAND git describe --tags --abbrev=0
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
RESULT_VARIABLE GIT_RESULT)
Expand Down
31 changes: 23 additions & 8 deletions static-subid.spec
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
Name: static-subid
Version: 0.1.0
Release: 1%{?dist}
Release: %autorelease

# Only the test_framework is CC-PDDC
License: BSD-3-Clause and CC-PDDC

URL: https://github.com/fermitools/%{name}
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires: redhat-rpm-config systemd-rpm-macros
BuildRequires: cmake >= 3.21
BuildRequires: gcc
BuildRequires: (rubygem-asciidoctor or asciidoc )


Suggests: %{name}-systemd
Requires: shadow-utils
Summary: Assign deterministic subordinate UID/GID ranges
%description
Expand All @@ -27,6 +25,7 @@ Subordinate IDs are used by user namespaces to map container UIDs/GIDs back to h
%package systemd
Requires: %{name} = %{version}-%{release}
Requires: systemd
Enhances: %{name}
Summary: Systemd integration for static-subid
BuildArch: noarch
%description systemd
Expand All @@ -35,6 +34,7 @@ Provides a systemd service to generate subids for a username
%package systemd-user-permit
Requires: %{name}-systemd = %{version}-%{release}
Requires: systemd
Enhances: %{name}-systemd
Summary: Systemd user integration for static-subid
BuildArch: noarch
%description systemd-user-permit
Expand All @@ -45,8 +45,7 @@ Provides a set of user-scoped systemd services that automatically allow a non-ro
%autosetup

%build
%cmake -Wdev -Wdeprecated --warn-uninitialized \
-DVERSION=%{version} \
%cmake -DVERSION=%{version} \
-DBUILD_TESTING=ON \
-DCMAKE_INSTALL_SYSTEMD_UNITDIR=%{_unitdir} \
-DCMAKE_INSTALL_SYSTEMD_USERUNITDIR=%{_userunitdir} \
Expand All @@ -71,12 +70,28 @@ Provides a set of user-scoped systemd services that automatically allow a non-ro
%doc docs/README.systemd
%{_unitdir}/static-subid@.service

%post systemd
%systemd_post static-subid@.service

%preun systemd
%systemd_preun static-subid@.service

%postun systemd
%systemd_postun_with_restart static-subid@.service

%files systemd-user-permit
%doc docs/README.systemd
%{_userunitdir}/setup-static-subid.service
%{_datarootdir}/polkit-1/rules.d/50-static-subid.rules

%post systemd-user-permit
%systemd_post_user setup-static-subid.service

%preun systemd-user-permit
%systemd_preun_user setup-static-subid.service

%postun systemd-user-permit
%systemd_postun_user setup-static-subid.service

%changelog
* Mon Feb 16 2026 Pat Riehecky <riehecky@fnal.gov> - 0.1.0-1
- Initial release
%autochangelog
Loading