Exclude lorax-composer and composer-cli code from the lorax build

These will be built in Extras from the rhel7-extras branch using the
lorax-composer package name.

Resolves: rhbz#1547759
This commit is contained in:
Brian C. Lane 2018-06-19 10:13:56 -07:00
parent bb8c7851d2
commit c4417470da
1 changed files with 12 additions and 67 deletions

View File

@ -2,7 +2,7 @@
Name: lorax Name: lorax
Version: 19.7.16 Version: 19.7.16
Release: 2%{?dist} Release: 3%{?dist}
Summary: Tool for creating the anaconda install images Summary: Tool for creating the anaconda install images
Group: Applications/System Group: Applications/System
@ -78,44 +78,6 @@ It also includes livemedia-creator which is used to create bootable livemedia,
including live isos and disk images. It can use libvirtd for the install, or including live isos and disk images. It can use libvirtd for the install, or
Anaconda's image install feature. Anaconda's image install feature.
%package composer
Summary: Lorax Image Composer API Server
# For Sphinx documentation build
BuildRequires: python-flask python-gobject libgit2-glib python2-pytoml python-semantic_version
Requires: lorax = %{version}-%{release}
Requires(pre): /usr/bin/getent
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
# From EPEL
Requires: python2-pytoml
Requires: python-semantic_version
Requires: libgit2
Requires: libgit2-glib
# From Distribution
Requires: python-flask
Requires: python-gevent
Requires: anaconda-tui
Requires: qemu-img
Requires: tar
%{?systemd_requires}
BuildRequires: systemd
%description composer
lorax-composer provides a REST API for building images using lorax.
%package -n composer-cli
Summary: A command line tool for use with the lorax-composer API server
# From Distribution
Requires: python-urllib3
%description -n composer-cli
A command line tool for use with the lorax-composer API server. Examine recipes,
build images, etc. from the command line.
%prep %prep
%setup -q %setup -q
@ -126,21 +88,15 @@ make docs
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
%pre composer # Do Not Package lorax-composer or composer-cli files
getent group weldr >/dev/null 2>&1 || groupadd -r weldr >/dev/null 2>&1 || : rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/pylorax/api
getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin -c "User for lorax-composer" weldr >/dev/null 2>&1 || : rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/composer
rm -rf $RPM_BUILD_ROOT/%{_datadir}/lorax/composer
%post composer rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/lorax/composer.conf
%systemd_post lorax-composer.service rm -f $RPM_BUILD_ROOT/%{_sbindir}/lorax-composer
%systemd_post lorax-composer.socket rm -f $RPM_BUILD_ROOT/%{_bindir}/composer-cli
rm -f $RPM_BUILD_ROOT/%{_unitdir}/lorax-composer.*
%preun composer rm -f $RPM_BUILD_ROOT/%{_tmpfilesdir}/lorax-composer.conf
%systemd_preun lorax-composer.service
%systemd_preun lorax-composer.socket
%postun composer
%systemd_postun_with_restart lorax-composer.service
%systemd_postun_with_restart lorax-composer.socket
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -148,7 +104,7 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
%doc docs/*ks %doc docs/*ks
%doc docs/html %doc docs/html
%{python_sitelib}/pylorax %{python_sitelib}/pylorax
%exclude %{python_sitelib}/pylorax/api/* %exclude %{python_sitelib}/pylorax/api
%{python_sitelib}/*.egg-info %{python_sitelib}/*.egg-info
%{_sbindir}/lorax %{_sbindir}/lorax
%{_sbindir}/mkefiboot %{_sbindir}/mkefiboot
@ -159,20 +115,9 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
%config(noreplace) %{_sysconfdir}/lorax/lorax.conf %config(noreplace) %{_sysconfdir}/lorax/lorax.conf
%dir %{_datadir}/lorax %dir %{_datadir}/lorax
%{_datadir}/lorax/* %{_datadir}/lorax/*
%exclude %{_datadir}/lorax/composer
%{_mandir}/man1/*.1* %{_mandir}/man1/*.1*
%files composer
%config(noreplace) %{_sysconfdir}/lorax/composer.conf
%{python_sitelib}/pylorax/api/*
%{_sbindir}/lorax-composer
%{_unitdir}/lorax-composer.service
%{_unitdir}/lorax-composer.socket
%{_tmpfilesdir}/lorax-composer.conf
%files -n composer-cli
%{_bindir}/composer-cli
%{python_sitelib}/composer/*
%changelog %changelog
* Fri Jun 15 2018 Brian C. Lane <bcl@redhat.com> 19.7.16-2 * Fri Jun 15 2018 Brian C. Lane <bcl@redhat.com> 19.7.16-2
- Fixup the lorax.spec after rebasing on 19.6.105-1 (bcl) - Fixup the lorax.spec after rebasing on 19.6.105-1 (bcl)