X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=blobdiff_plain;f=myplc.spec;h=5567fcb2ed9f0ae1815390af3f2c43bc6f95be33;hp=37f500a9cef1858652b6213bf9e55c623b2c8aed;hb=HEAD;hpb=684b8a1afda2cf5137526398ec78728105308093 diff --git a/myplc.spec b/myplc.spec index 37f500a..5567fcb 100644 --- a/myplc.spec +++ b/myplc.spec @@ -1,6 +1,6 @@ %define name myplc -%define version 5.0 -%define taglevel 14 +%define version 5.3 +%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,13 +20,71 @@ 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 +Requires: tar Requires: less Requires: sendmail Requires: sendmail-cf @@ -36,9 +94,8 @@ Requires: php-pgsql Requires: curl Requires: rsync Requires: python-devel -Requires: yum -Requires: PyXML -Requires: createrepo +Requires: dnf +#Requires: PyXML Requires: cpio Requires: wget Requires: php @@ -50,35 +107,14 @@ Requires: vim-minimal Requires: findutils Requires: xmlsec1 Requires: xmlsec1-openssl -%if "%{distro}" == "Fedora" && %{distrorelease} >= 10 +Requires: ed Requires: cronie -%else -Requires: vixie-cron -%endif -# planetlab stuff -Requires: bootmanager -Requires: bootcd-%{nodefamily} -Requires: bootcd-initscripts -Requires: PLCWWW -Requires: www-register-wizard -Requires: nodeconfig -Requires: nodeyum -Requires: PLCAPI -Requires: bootstrapfs-%{nodefamily} -Requires: myplc-docs -Requires: myplc-release -Requires: myplc-config -%define debug_package %{nil} -%description -MyPLC is a complete PlanetLab Central (PLC) portable installation -contained within a chroot jail. 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 installed in the host -system. +%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 @@ -92,6 +128,7 @@ Requires: python This package provides the Python module to configure MyPLC. + %prep %setup -q @@ -108,11 +145,13 @@ install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/plc_config. echo "* Installing scripts in /usr/bin" mkdir -p ${RPM_BUILD_ROOT}/usr/bin 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 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" @@ -187,10 +226,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 @@ -204,43 +245,46 @@ 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/share/myplc/bashrc + +%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 /usr/bin/db-config /usr/bin/dns-config /usr/bin/refresh-peer.py* -/usr/bin/partial-repo.sh /usr/bin/mtail.py* +/usr/bin/mtail /usr/bin/plc-map.py* /usr/bin/plc-kml.py* /usr/bin/clean-empty-dirs.py* /usr/bin/plc-check-ssl-peering.py* /usr/bin/plc-orphan-accounts.py* /usr/bin/spot-aliens.py* +/usr/bin/check-hrns.py* +/usr/bin/check-vsys-defaults.py* /usr/bin/spot-dup-accounts.sh + %files config %defattr(-,root,root,-) /usr/bin/plc-config @@ -248,6 +292,94 @@ 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 + +* 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 + +* Thu Oct 10 2013 Thierry Parmentelat - myplc-5.2-5 +- reduce the scope of check-hrns.py script, now that the SFA layer handles this natively +- add an rpm-sign dependency on feedora>=16 + +* Fri Jun 28 2013 Thierry Parmentelat - myplc-5.2-4 +- drop PLC_OMF_XMPP_{USER,PASSWORD} from config + +* Tue Apr 23 2013 Thierry Parmentelat - myplc-5.2-3 +- plc.d/gpg now does not rm /dev/random but preserves it +- this is because libvirt won't let us run mknod + +* Wed Apr 10 2013 Thierry Parmentelat - myplc-5.2-2 +- fix typo in check-hrns - used to print 'host' while dealing with persons + +* Thu Mar 07 2013 Thierry Parmentelat - myplc-5.2-1 +- supports httpd config for either mod_python (preferred) or mod_wsgi +- requires mod_wsgi on f18 only, otherwise mod_python +- supports httpd config for apache 2.4 (f18) +- new config variable PLC_FLAVOUR_VIRT_MAP to set 'virt' from fcdistro + +* Wed Dec 19 2012 Thierry Parmentelat - myplc-5.1-6 +- bugfix in check-vsys-defaults.py + +* Wed Dec 19 2012 Thierry Parmentelat - myplc-5.1-5 +- define open_basedir in php.ini to stop confidentiality leak +- new utility slice_ssh_keys.py for showing sliver keys (OMF interop) +- new config setting PLC_VSYS_DEFAULTS for vsys tags granted to all +- new utilities check-hrns.py and check-vsys-defaults.py + +* Fri Aug 31 2012 Thierry Parmentelat - myplc-5.1-4 +- set TimeoutSec to 300 in plc.service +- remove ref to deprecated svn $URL$ in db-config usage + +* Mon Jul 09 2012 Thierry Parmentelat - myplc-5.1-3 +- expose mtail.py as simply mtail + +* Mon May 07 2012 Thierry Parmentelat - myplc-5.1-2 +- plc-kml.py now has support for nodegroups + +* Mon Apr 16 2012 Thierry Parmentelat - myplc-5.1-1 +- use nodeimage package instead of deprecated bootstrapfs +- has systemd-friendly startup script +- plc_reload moved to functions/ - no more service plc reload +- no svn keywords anymore + +* Mon Sep 26 2011 Thierry Parmentelat - myplc-5.0-19 +- new maintenance/monitoring script spot-aliens to look for glitches in refreshpeer+sfa + +* Tue Jun 07 2011 Thierry Parmentelat - myplc-5.0-18 +- new settings for myslice (comon&tophat) and monitor (db) +- removed mentions of chroot in description +- can redo myplc-docs on broken f12-latex +- set short_open_tag in php.ini +- fixes in gen-sites-xml (is that still used ?) +- partial-repo.sh has moved to 'build' where it more belongs +- tweaks in convenience tool 'mtail' + +* Tue Mar 22 2011 Thierry Parmentelat - myplc-5.0-17 +- fixed changelog, no change from 5.0-16 + +* Mon Mar 21 2011 Thierry Parmentelat - myplc-5.0-16 +- requires ed for the plc.d/packages step +- sirius initscript to handle stop and restart + +* Fri Feb 04 2011 Thierry Parmentelat - myplc-5.0-15 +- ignore steps in db-config.d if they have a '.' or '~' in their name + * Wed Jan 26 2011 Thierry Parmentelat - myplc-5.0-14 - can redo myplc-docs without the doc for monitor @@ -470,22 +602,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 @@ -500,10 +632,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/