# # spec file for package uyuni-base # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # # The productprettyname macros is controlled in the prjconf. If not defined, we fallback here %{!?productprettyname: %global productprettyname Uyuni} %global debug_package %{nil} #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif %if 0%{?suse_version} %define www_path /srv/ %define apache_user wwwrun %define apache_group www %else %define www_path %{_var} %define apache_user apache %define apache_group apache %endif Name: uyuni-base Version: 5.2.2 Release: 0.git.23762.1174b63 Summary: %{productprettyname} Base Package License: GPL-2.0-only Group: System/Fhs URL: https://github.com/uyuni-project/uyuni #!CreateArchive: %{name} Source0: uyuni-base-git-23762.50ad4bb.tar.gz %description %{productprettyname} is a systems management application that will inventory, provision, update and control your Linux machines. %package common Summary: Base structure for %{productprettyname} Server and Proxy Group: System/Fhs %if 0%{?suse_version} >= 1500 Requires(pre): group(www) %endif %if 0%{?rhel} || 0%{?fedora} Requires(pre): httpd %endif %description common Basic filesystem hierarchy for %{productprettyname} Server and Proxy. %if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9 %package server Summary: Base structure for %{productprettyname} server Group: System/Fhs Requires(pre): %{_sbindir}/groupadd Requires(pre): %{_sbindir}/usermod Requires(pre): salt Requires(pre): tomcat11 Requires(pre): uyuni-base-common Provides: group(susemanager) %if 0%{?suse_version} >= 1500 Requires(pre): user(wwwrun) %endif %if 0%{?rhel} || 0%{?fedora} Requires(pre): httpd %endif %description server Basic filesystem hierarchy for %{productprettyname} Server. %endif %package proxy Summary: Base structure for %{productprettyname} Proxy Group: System/Fhs Requires(pre): uyuni-base-common %description proxy Basic filesystem hierarchy for %{productprettyname} proxy. %prep %setup -q -n uyuni-base-git-23762.50ad4bb %build # nothing to do here %install mkdir -p %{buildroot}%{_sysconfdir}/rhn mkdir -p %{buildroot}%{_datadir}/rhn/proxy %if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9 install -d -m 0775 %{buildroot}%{_localstatedir}/spacewalk install -d -m 0775 %{buildroot}/%{_localstatedir}/spacewalk/systems install -d -m 0775 %{buildroot}/%{_localstatedir}/spacewalk/packages %endif mkdir -p %{buildroot}%{_datadir}/rhn/config-defaults mkdir -p %{buildroot}/srv/www/distributions %if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9 %pre server getent group susemanager >/dev/null || %{_sbindir}/groupadd -r susemanager getent passwd salt >/dev/null && %{_sbindir}/usermod -a -G susemanager salt getent passwd tomcat >/dev/null && %{_sbindir}/usermod -a -G susemanager,%{apache_group} tomcat getent passwd %{apache_user} >/dev/null && %{_sbindir}/usermod -a -G susemanager %{apache_user} %endif %files common %{!?_licensedir:%global license %doc} %license LICENSE %dir %attr(750,root,%{apache_group}) %{_sysconfdir}/rhn %dir %{_datadir}/rhn %dir %attr(755,root,%{apache_group}) %{_datadir}/rhn/config-defaults %if 0%{?suse_version} >= 1500 || 0%{?rhel} >= 9 %files server %dir %attr(775,%{apache_user}, root) %{_localstatedir}/spacewalk %dir %attr(775,%{apache_user}, %{apache_group}) %{_localstatedir}/spacewalk/systems %dir %attr(775,%{apache_user}, %{apache_group}) %{_localstatedir}/spacewalk/packages %dir %attr(755,root,root) /srv/www/distributions %endif %files proxy %dir %{_datadir}/rhn/proxy %changelog