X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=blobdiff_plain;f=myplc.spec;h=5567fcb2ed9f0ae1815390af3f2c43bc6f95be33;hp=56e7aa4cd1752700558d9c5d760954daa2d918c7;hb=HEAD;hpb=e0fa32ac08e2d8434943a230da7a4740d55d3a85 diff --git a/myplc.spec b/myplc.spec index 56e7aa4..5567fcb 100644 --- a/myplc.spec +++ b/myplc.spec @@ -1,6 +1,6 @@ %define name myplc %define version 5.3 -%define taglevel 4 +%define taglevel 5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} %global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" ) @@ -20,11 +20,68 @@ URL: %{SCMURL} %define nodefamily %{pldistro}-%{distroname}-%{_arch} -####################### myplc + +####################### myplc - mostly a meta-package Summary: PlanetLab Central (PLC) Portable Installation Group: Applications/Systems -# as much as possible, requires should go in the subpackages specfile +# planetlab stuff +Requires: myplc-docs +Requires: myplc-release +Requires: myplc-core +Requires: createrepo +Requires: bootmanager +Requires: bootcd-%{nodefamily} +Requires: bootcd-initscripts +Requires: nodeimage-%{nodefamily} +Requires: nodeconfig +Requires: nodeyum +Requires: www-register-wizard + + +# starting with f16 we depend on this new rpm +%if "%{distro}" == "Fedora" && %{distrorelease} >= 16 +Requires: rpm-sign +%endif + + +%description +MyPLC is a complete PlanetLab Central (PLC) portable installation. +The default installation consists of a web server, an XML-RPC API +server, a boot server, and a database server: the core components of +PLC. The installation may be customized through a graphical +interface. All PLC services are started up and shut down through a +single System V init script. + + +####################### myplc-core +# Warning: it appears that Requires should come here +# BEFORE the %description thingy + +%package core + +Summary: core contents of myplc with API + db + www UI + +# as much as possible, requires should have gone +# with the individual packages, but well +Requires: myplc-config +Requires: plcapi +Requires: plewww + +# this technically is a plcapi dependency +# but it's simpler here for chosing which +%if "%{distro}" == "Fedora" && %{distrorelease} >= 29 +Requires: python2-mod_wsgi +%else +Requires: mod_wsgi +%endif + +# this technically is a plewww dependency +# starting with f27 we depend on this new rpm +%if "%{distro}" == "Fedora" && %{distrorelease} >= 27 +Requires: php-fpm +%endif + Requires: redhat-lsb Requires: bzip2 Requires: tar @@ -37,9 +94,8 @@ Requires: php-pgsql Requires: curl Requires: rsync Requires: python-devel -Requires: yum +Requires: dnf #Requires: PyXML -Requires: createrepo Requires: cpio Requires: wget Requires: php @@ -53,48 +109,12 @@ Requires: xmlsec1 Requires: xmlsec1-openssl Requires: ed Requires: cronie -# starting with f16 we depend on this new rpm -%if "%{distro}" == "Fedora" && %{distrorelease} >= 16 -Requires: rpm-sign -%endif -# starting with f27 we depend on this new rpm -%if "%{distro}" == "Fedora" && %{distrorelease} >= 27 -Requires: php-fpm -%endif -# planetlab stuff -Requires: bootmanager -Requires: bootcd-%{nodefamily} -Requires: bootcd-initscripts -Requires: PLCWWW -Requires: www-register-wizard -Requires: nodeconfig -Requires: nodeyum -Requires: plcapi >= 5.2 -# this technically is a plcapi dependency but it's simpler here for chosing which -%if "%{distro}" == "Fedora" && %{distrorelease} >= 29 -Requires: python2-mod_wsgi -%else -%if "%{distro}" == "Fedora" && %{distrorelease} >= 18 -Requires: mod_wsgi -%else -Requires: mod_python -%endif -%endif -Requires: nodeimage-%{nodefamily} -Requires: myplc-docs -Requires: myplc-release -Requires: myplc-config - -%define debug_package %{nil} -%description -MyPLC is a complete PlanetLab Central (PLC) portable installation. -The default installation consists of a web server, an XML-RPC API -server, a boot server, and a database server: the core components of -PLC. The installation may be customized through a graphical -interface. All PLC services are started up and shut down through a -single System V init script. +%description core +The core of myplc is about its API + database + web interface. +Installing this will not require any node-oriented +package, like bootcd, nodeimage, or bootmanager. ####################### myplc-config @@ -108,6 +128,7 @@ Requires: python This package provides the Python module to configure MyPLC. + %prep %setup -q @@ -205,10 +226,7 @@ if [ $1 -gt 0 ] ; then fi %post -if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig --add plc - /sbin/chkconfig plc on -fi +systemctl enable plc %if "%{distro}" == "Fedora" && %{distrorelease} >= 27 systemctl enable php-fpm @@ -233,21 +251,21 @@ fi # 0 = erase, 1 = upgrade if [ $1 -eq 0 ] ; then %{_sysconfdir}/init.d/plc stop - if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig plc off - /sbin/chkconfig --del plc - fi + systemctl disable plc fi + %files +/usr/share/myplc/bashrc + +%files core %defattr(-,root,root,-) -# Host startup script and configuration file +/usr/lib/systemd/system/plc.service /usr/bin/plc-ctl /etc/plc.d /etc/planetlab /etc/plc_sliceinitscripts /etc/support-scripts -/usr/share/myplc/bashrc # keep a detailed list, to avoid duplicate of plc-config, # that belongs to the myplc-config rpm /usr/bin/plc-config-tty @@ -265,7 +283,7 @@ fi /usr/bin/check-hrns.py* /usr/bin/check-vsys-defaults.py* /usr/bin/spot-dup-accounts.sh -/usr/lib/systemd/system/plc.service + %files config %defattr(-,root,root,-) @@ -274,6 +292,13 @@ fi %changelog +* Mon Jan 07 2019 Thierry Parmentelat - myplc-5.3-5 +- last version suitable for f27/f29 with python2 +- packaging is split up, one more rpm named 'myplc-core' is produced, +- that covers the infrastructure side only (without bootcds and nodeimages and all node-oriented material) +- no more init file, one systemd service only, that leverages new /usr/bin/plc-ctl +- more robust config for httpd and php-fpm and php + * Sun Jul 16 2017 Thierry Parmentelat - myplc-5.3-4 - takes care of creating plcapi log file