Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:spacewalk
rhncfg
rhncfg.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rhncfg.spec of Package rhncfg
# # spec file for package rhncfg # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %global rhnroot %{_datadir}/rhn %global rhnconf %{_sysconfdir}/sysconfig/rhn %global client_caps_dir %{rhnconf}/clientCaps.d %if 0%{?fedora} || 0%{?suse_version} > 1320 || 0%{?rhel} >= 8 || 0%{?mageia} %global build_py3 1 %global default_py3 1 %endif %if ( 0%{?fedora} && 0%{?fedora} < 28 ) || ( 0%{?rhel} && 0%{?rhel} < 8 ) || 0%{?ubuntu} || 0%{?debian} || ( 0%{?suse_version} && 0%{?suse_version} < 1320 ) %global build_py2 1 %endif # ------------------------------- Python macros for debian ---------------------------------------- %{!?__python2:%global __python2 /usr/bin/python2} %{!?__python3:%global __python3 /usr/bin/python3} %if %{undefined python2_version} %global python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") %endif %if %{undefined python3_version} %global python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])") %endif %if %{undefined python2_sitelib} %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %endif %if %{undefined python3_sitelib} %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %endif # --------------------------- End Python macros for debian ---------------------------------------- %define pythonX %{?default_py3: python3}%{!?default_py3: python2} %if %{_vendor} == "debbuild" # Bash constructs in scriptlets don't play nice with Debian's default shell, dash %global _buildshell /bin/bash %endif Name: rhncfg Version: 5.10.129 Release: 1.git.81.e0506f8%{?dist} %if %{_vendor} == "debbuild" %endif Summary: Spacewalk Configuration Client Libraries License: GPL-2.0-only Group: admin URL: https://github.com/spacewalkproject/spacewalk Source0: rhncfg-git-81.efdd721.tar.gz BuildArch: noarch BuildRequires: docbook-utils Requires: %{pythonX}-%{name} = %{version}-%{release} %if %{_vendor} != "debbuild" %if 0%{?suse_version} # provide rhn directories and no selinux on suse BuildRequires: rhn-client-tools %else %if 0%{?build_py2} Requires: libselinux-python %else Requires: python3-libselinux %endif %endif %endif %if %{_vendor} == "debbuild" %if 0%{?build_py2} Requires: python-selinux %endif %if 0%{?build_py3} Requires: python3-selinux %endif %endif %description The base libraries and functions needed by all rhncfg-* packages. %if 0%{?build_py2} %package -n python2-%{name} Summary: Spacewalk Configuration Client Libraries Group: admin %{?python_provide:%python_provide python2-%{name}} Requires: %{name} = %{version}-%{release} Requires: python Requires: python2-rhn-client-tools >= 2.8.4 Requires: rhnlib >= 2.8.3 Requires: spacewalk-usix %if 0%{?rhel} && 0%{?rhel} <= 5 Requires: python-hashlib %endif BuildRequires: python %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python-minimal Requires(post): python-minimal %endif %description -n python2-%{name} Python 2 specific files for %{name}. %endif %if 0%{?build_py3} %package -n python3-%{name} Summary: Spacewalk Configuration Client Libraries Group: admin %{?python_provide:%python_provide python3-%{name}} Requires: %{name} = %{version}-%{release} Requires: python3 Requires: python3-rhn-client-tools >= 2.8.4 Requires: python3-rhnlib >= 2.8.3 Requires: python3-spacewalk-usix BuildRequires: python3 %if %{_vendor} != "debbuild" BuildRequires: python3-rpm-macros %endif %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python3-minimal Requires(post): python3-minimal %endif %description -n python3-%{name} Python 3 specific files for %{name}. %endif %package client Summary: Spacewalk Configuration Client Group: admin Requires: %{name} = %{version}-%{release} Requires: %{pythonX}-%{name}-client = %{version}-%{release} %description client A command line interface to the client features of the RHN Configuration Management system. %if 0%{?build_py2} %package -n python2-%{name}-client Summary: Spacewalk Configuration Client Group: admin %{?python_provide:%python_provide python2-%{name}-client} Requires: %{name}-client = %{version}-%{release} %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python-minimal Requires(post): python-minimal %endif %description -n python2-%{name}-client Python 2 specific files for %{name}-client. %endif %if 0%{?build_py3} %package -n python3-%{name}-client Summary: Spacewalk Configuration Client Group: admin %{?python_provide:%python_provide python3-%{name}-client} Requires: %{name}-client = %{version}-%{release} %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python3-minimal Requires(post): python3-minimal %endif %description -n python3-%{name}-client Python 3 specific files for %{name}-client. %endif %package management Summary: Spacewalk Configuration Management Client Group: admin Requires: %{name} = %{version}-%{release} Requires: %{pythonX}-%{name}-management = %{version}-%{release} %description management A command line interface used to manage Spacewalk configuration. %if 0%{?build_py2} %package -n python2-%{name}-management Summary: Spacewalk Configuration Management Client Group: admin %{?python_provide:%python_provide python2-%{name}-management} Requires: %{name}-management = %{version}-%{release} %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python-minimal Requires(post): python-minimal %endif %description -n python2-%{name}-management Python 2 specific files for python2-%{name}-management. %endif %if 0%{?build_py3} %package -n python3-%{name}-management Summary: Spacewalk Configuration Management Client Group: admin %{?python_provide:%python_provide python3-%{name}-management} Requires: %{name}-management = %{version}-%{release} %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python3-minimal Requires(post): python3-minimal %endif %description -n python3-%{name}-management Python 2 specific files for python3-%{name}-management. %endif %package actions Summary: Spacewalk Configuration Client Actions Group: admin Requires: %{name} = %{version}-%{release} Requires: %{pythonX}-%{name}-actions = %{version}-%{release} %description actions The code required to run configuration actions scheduled via the RHN Classic website or Red Hat Satellite or Spacewalk. %if 0%{?build_py2} %package -n python2-%{name}-actions Summary: Spacewalk Configuration Client Actions Group: admin %{?python_provide:%python_provide python2-%{name}-actions} Requires: %{name}-actions = %{version}-%{release} Requires: python2-%{name}-client %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python-minimal Requires(post): python-minimal %endif %description -n python2-%{name}-actions Python 2 specific files for python2-%{name}-actions. %endif %if 0%{?build_py3} %package -n python3-%{name}-actions Summary: Spacewalk Configuration Client Actions Group: admin %{?python_provide:%python_provide python3-%{name}-actions} Requires: %{name}-actions = %{version}-%{release} Requires: python3-%{name}-client %if %{_vendor} == "debbuild" # For scriptlets Requires(preun): python3-minimal Requires(post): python3-minimal %endif %description -n python3-%{name}-actions Python 3 specific files for python2-%{name}-actions. %endif %prep %setup -q -n rhncfg-git-81.efdd721 %build make -f Makefile.rhncfg all %install install -d $RPM_BUILD_ROOT/%{python2_sitelib} %if 0%{?build_py2} make -f Makefile.rhncfg install PREFIX=$RPM_BUILD_ROOT ROOT=%{python2_sitelib} \ MANDIR=%{_mandir} PYTHONVERSION=%{python2_version} %endif %if 0%{?build_py3} install -d $RPM_BUILD_ROOT/%{python3_sitelib} sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' config_*/*.py actions/*.py make -f Makefile.rhncfg install PREFIX=$RPM_BUILD_ROOT ROOT=%{python3_sitelib} \ MANDIR=%{_mandir} PYTHONVERSION=%{python3_version} %endif mkdir -p $RPM_BUILD_ROOT/%{_sharedstatedir}/rhncfg/backups mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/spool/rhn mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log touch $RPM_BUILD_ROOT/%{_localstatedir}/log/rhncfg-actions # create links to default script version %define default_suffix %{?default_py3:-%{python3_version}}%{!?default_py3:-%{python2_version}} for i in \ /usr/bin/rhncfg-client \ /usr/bin/rhncfg-manager \ /usr/bin/rhn-actions-control \ ; do ln -s $(basename "$i")%{default_suffix} "$RPM_BUILD_ROOT$i" done %if 0%{?suse_version} %if 0%{?build_py2} %py_compile -O %{buildroot}/%{python2_sitelib} %endif %if 0%{?build_py3} %py3_compile -O %{buildroot}/%{python3_sitelib} %endif %endif %clean %post if [ -f %{_localstatedir}/log/rhncfg-actions ] then chown root %{_localstatedir}/log/rhncfg-actions chmod 600 %{_localstatedir}/log/rhncfg-actions fi %if %{_vendor} == "debbuild" # Debian requires: # post: Do bytecompilation after install # preun: Remove any *.py[co] files %if 0%{?build_py2} %post -n python2-%{name} pycompile python2-%{name} -V -3.0 %preun -n python2-%{name} pyclean -p python2-%{name} %post -n python2-%{name}-client pycompile python2-%{name}-client -V -3.0 %preun -n python2-%{name}-client pyclean -p python2-%{name}-client %post -n python2-%{name}-management pycompile python2-%{name}-management -V -3.0 %preun -n python2-%{name}-management pyclean -p python2-%{name}-management %post -n python2-%{name}-actions pycompile python2-%{name}-actions -V -3.0 %preun -n python2-%{name}-actions pyclean -p python2-%{name}-actions %endif %if 0%{?build_py3} %post -n python3-%{name} py3compile python3-%{name} -V -4.0 %preun -n python3-%{name} py3clean -p python3-%{name} %post -n python3-%{name}-client py3compile python3-%{name}-client -V -4.0 %preun -n python3-%{name}-client py3clean -p python3-%{name}-client %post -n python3-%{name}-management py3compile python3-%{name}-management -V -4.0 %preun -n python3-%{name}-management py3clean -p python3-%{name}-management %post -n python3-%{name}-actions py3compile python3-%{name}-actions -V -4.0 %preun -n python3-%{name}-actions py3clean -p python3-%{name}-actions %endif %endif %files %if 0%{?suse_version} %dir %{_sharedstatedir} %endif %dir %{_sharedstatedir}/rhncfg # This could be easily packaged as a directory with the %dir flag, # but for whatever reason debbuild just refuses to behave. %{_localstatedir}/spool/rhn %{_sharedstatedir}/rhncfg/backups %doc LICENSE %if 0%{?build_py2} %files -n python2-%{name} %{python2_sitelib}/config_common %endif %if 0%{?build_py3} %files -n python3-%{name} %{python3_sitelib}/config_common %endif %files client %{_bindir}/rhncfg-client %attr(644,root,root) %config(noreplace) %{rhnconf}/rhncfg-client.conf %{_mandir}/man8/rhncfg-client.8* %if 0%{?build_py2} %files -n python2-%{name}-client %{python2_sitelib}/config_client %{_bindir}/rhncfg-client-%{python2_version} %endif %if 0%{?build_py3} %files -n python3-%{name}-client %{python3_sitelib}/config_client %{_bindir}/rhncfg-client-%{python3_version} %endif %files management %{_bindir}/rhncfg-manager %attr(644,root,root) %config(noreplace) %{rhnconf}/rhncfg-manager.conf %{_mandir}/man8/rhncfg-manager.8* %if 0%{?build_py2} %files -n python2-%{name}-management %{python2_sitelib}/config_management %{_bindir}/rhncfg-manager-%{python2_version} %endif %if 0%{?build_py3} %files -n python3-%{name}-management %{python3_sitelib}/config_management %{_bindir}/rhncfg-manager-%{python3_version} %endif %files actions %{_bindir}/rhn-actions-control %config(noreplace) %{client_caps_dir}/* %{_mandir}/man8/rhn-actions-control.8* %ghost %attr(600,root,root) %{_localstatedir}/log/rhncfg-actions %if 0%{?build_py2} %files -n python2-%{name}-actions %{python2_sitelib}/rhn/actions %{_bindir}/rhn-actions-control-%{python2_version} %if 0%{?suse_version} %dir %{python2_sitelib}/rhn %endif %endif %if 0%{?build_py3} %files -n python3-%{name}-actions %{python3_sitelib}/rhn/actions %{_bindir}/rhn-actions-control-%{python3_version} %if 0%{?suse_version} %dir %{python3_sitelib}/rhn %endif %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor