X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=myplc.spec;h=aa03ab135a24de44c7bdcac33552eb2456b4e7bf;hb=refs%2Fheads%2Fmaster;hp=c33564ba30b3377dda1e7caee61d50bef3bce5aa;hpb=3bc4ba74a32c86ea10e6c4a2d1a5709f6178e3bb;p=myplc.git diff --git a/myplc.spec b/myplc.spec index c33564b..aa03ab1 100644 --- a/myplc.spec +++ b/myplc.spec @@ -1,9 +1,9 @@ %define name myplc -%define version 5.3 -%define taglevel 1 +%define version 7.1 +%define taglevel 0 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} -%global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" ) + Name: %{name} Version: %{version} @@ -20,14 +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 +## serverside only +#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 +Requires: python3-mod_wsgi + +# 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 +Requires: tar Requires: less Requires: sendmail Requires: sendmail-cf @@ -36,10 +90,9 @@ Requires: expect Requires: php-pgsql Requires: curl Requires: rsync -Requires: python-devel -Requires: yum +Requires: python3-devel +Requires: dnf #Requires: PyXML -Requires: createrepo Requires: cpio Requires: wget Requires: php @@ -53,40 +106,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 -# 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} >= 18 -Requires: mod_wsgi -%else -Requires: mod_python -%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 @@ -94,12 +119,13 @@ single System V init script. Summary: PlanetLab Central (PLC) configuration python module Group: Applications/Systems -Requires: python +Requires: python3 %description config This package provides the Python module to configure MyPLC. + %prep %setup -q @@ -109,9 +135,8 @@ This package provides the Python module to configure MyPLC. rm -rf $RPM_BUILD_ROOT # Install configuration scripts -echo "* Installing plc_config.py in " ${PYTHON_SITEARCH} -PYTHON_SITEARCH=`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'` -install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/plc_config.py +echo "* Installing plc_config.py in %{python3_sitelib}" +install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/%{python3_sitelib}/plc_config.py echo "* Installing scripts in /usr/bin" mkdir -p ${RPM_BUILD_ROOT}/usr/bin @@ -119,10 +144,10 @@ rsync -av --exclude .svn bin/ ${RPM_BUILD_ROOT}/usr/bin/ (cd $RPM_BUILD_ROOT/usr/bin; ln -s mtail.py mtail) chmod 755 ${RPM_BUILD_ROOT}/usr/bin/* -# Install initscript +# Install initscript echo "* Installing plc initscript" -install -D -m 755 plc.init ${RPM_BUILD_ROOT}/etc/init.d/plc -install -D -m 644 plc.service ${RPM_BUILD_ROOT}/lib/systemd/system/plc.service +install -D -m 755 systemd/plc-ctl ${RPM_BUILD_ROOT}/usr/bin/plc-ctl +install -D -m 644 systemd/plc.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/plc.service # Install initscripts echo "* Installing plc.d initscripts" @@ -153,8 +178,8 @@ sed -e "s,@PLDISTRO@,%{pldistro},g" -e "s,@FCDISTRO@,%{distroname},g" -e "s,@ARC default_config.xml > ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml -echo "* Installing bashrc convenience" -install -D -m 644 bashrc ${RPM_BUILD_ROOT}/usr/share/myplc/bashrc +echo "* Installing systemd utilities" +install -D -m 644 systemd/*.service systemd/*.timer ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ # yumgroups.xml and yum repo : let noderepo handle that @@ -197,10 +222,12 @@ 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 +systemctl start php-fpm +%endif %triggerpostun -- %{name} # 0 = erase, 1 = upgrade @@ -214,27 +241,27 @@ if [ $1 -gt 0 ] ; then fi fi done -fi +fi %preun # 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/lib/systemd/system + +%files core %defattr(-,root,root,-) -# Host startup script and configuration file -/etc/init.d/plc +/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 @@ -252,15 +279,31 @@ fi /usr/bin/check-hrns.py* /usr/bin/check-vsys-defaults.py* /usr/bin/spot-dup-accounts.sh -/lib/systemd/system/plc.service + %files config %defattr(-,root,root,-) /usr/bin/plc-config -%{python_sitearch}/plc_config.py* - +%{python3_sitelib}/plc_config.py* +%exclude %{python3_sitelib}/__pycache__/*.pyc %changelog +* Sat Apr 30 2022 Thierry Parmentelat - myplc-7.1-0 +- ready on f35 + +* Mon Jan 07 2019 Thierry Parmentelat - myplc-7.0-0 +- suitable for python3 on both f27 and f29 + +* Sun Jul 16 2017 Thierry Parmentelat - myplc-5.3-4 +- takes care of creating plcapi log file + +* Wed Feb 18 2015 Thierry Parmentelat - myplc-5.3-3 +- tweaked renew_reminder for federation + +* Fri Mar 21 2014 Thierry Parmentelat - myplc-5.3-2 +- tweaks in check-hrns.py +- do not require PyXML any more + * Tue Dec 10 2013 Thierry Parmentelat - myplc-5.3-1 - review check-hrns for plcapi-5.3 - add PLC_HRN_ROOT in usual plc-config-tty's settings @@ -554,22 +597,22 @@ fi - figures in doc package * Fri May 09 2008 Thierry Parmentelat - MyPLC-4.2-11 -- no more doc packaged outside of myplc-docs - doc/ cleaned up +- no more doc packaged outside of myplc-docs - doc/ cleaned up - chroot packaging does not have docs anymore - 'cvs' and 'dev' not required from myplc-native anymore - cosmetic change in kml output * Thu May 08 2008 Thierry Parmentelat - MyPLC-4.2-10 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts -- gethostbyname uses python rather than perl (hope this shrinks deps) +- gethostbyname uses python rather than perl (hope this shrinks deps) - doc: reviewed myplc doc - deprecated everything related to myplc-devel - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn -- make sync now works towards vserver-based myplc only +- make sync now works towards vserver-based myplc only * Mon May 05 2008 Stephen Soltesz - MyPLC-4.2-9 -- +- - added vsys 'pfmount' script to the default netflow slice attributes. -- +- * Thu Apr 24 2008 Thierry Parmentelat - MyPLC-4.2-8 - plc.d/bootcd step altered for handling legacy bootcd smooth migration @@ -584,10 +627,10 @@ fi - resolv file in /etc/resolv.conf, not plc_resolv.conf - improved sirius script - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category -- expires more properly set +- expires more properly set * Mon Apr 07 2008 Stephen Soltesz - MyPLC-4.2-4 MyPLC-4.2-5 -- +- * Wed Mar 26 2008 Thierry Parmentelat - MyPLC-4.2-3 MyPLC-4.2-4 - renew_reminder script moved to support-scripts/