Merge branch 'python3'
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 7 Jan 2019 11:41:45 +0000 (12:41 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 7 Jan 2019 11:41:45 +0000 (12:41 +0100)
1  2 
nodemanager.spec

diff --combined nodemanager.spec
@@@ -1,8 -1,8 +1,8 @@@
  %define slicefamily %{pldistro}-%{distroname}-%{_arch}
  
  %define name nodemanager-lib
- %define version 5.2
- %define taglevel 20
+ %define version 7.0
+ %define taglevel 0
  
  %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
  
  %define _unpackaged_files_terminate_build      0
  
  ##############################
- # use initscripts or systemd unit files to start installed services
- %if "%{distro}" == "Fedora" && "%{distrorelease}" >= "18"
+ # only systemd unit files to start installed services
  %define make_options WITH_SYSTEMD=true
- %define initdir /usr/lib/systemd/system
+ %define systemddir /usr/lib/systemd/system
  %define build_lxc 1
- %else
- %define make_options WITH_INIT=true
- %define initdir %{_initrddir}
- %define build_vs 1
- %endif
  
  ##############################
  Summary: PlanetLab Node Manager Library
@@@ -43,14 -37,12 +37,12 @@@ URL: %{SCMURL
  #BuildArch: noarch
  
  # make sure we can invoke systemctl in post install script
- %if "%{initdir}" != "%{_initrddir}"
  Requires: systemd
- %endif
  
  # Uses function decorators
- Requires: python >= 2.7
+ Requires: python3
  # connecting PLC
- Requires: python-pycurl
+ Requires: python3-pycurl
  # Signed tickets
  Requires: gnupg
  # sioc/plnet
@@@ -84,22 -76,6 +76,6 @@@ rm -rf $RPM_BUILD_ROO
  
  ##############################
  %post
- ########## traditional init
- %if "%{initdir}" == "%{_initrddir}"
- ##########
- chkconfig --add conf_files
- chkconfig conf_files on
- chkconfig --add nm
- chkconfig nm on
- chkconfig --add fuse-pl
- chkconfig fuse-pl on
- if [ "$PL_BOOTCD" != "1" ] ; then
-     service nm restart
-     service fuse-pl restart
- fi
- ##########
- %else
- ########## systemd
  systemctl enable nm.service
  systemctl enable conf_files.service
  # empty
@@@ -108,33 -84,15 +84,15 @@@ if [ "$PL_BOOTCD" != "1" ] ; the
      systemctl restart nm.service
  #    systemctl restart fuse-pl.service
  fi
- ##########
- %endif
  
  ##############################
  %preun
  # 0 = erase, 1 = upgrade
- ########## traditional init
- %if "%{initdir}" == "%{_initrddir}"
- ##########
- if [ $1 -eq 0 ] ; then
-     chkconfig fuse-pl off
-     chkconfig --del fuse-pl
-     chkconfig nm off
-     chkconfig --del nm
-     chkconfig conf_files off
-     chkconfig --del conf_files
- fi
- ##########
- %else
- ########## systemd
  if [ $1 -eq 0 ] ; then
  #    systemctl disable fuse-pl.service
      systemctl disable conf_files.service
      systemctl disable nm.service
  fi
- ##########
- %endif
  
  ##############################
  %clean
@@@ -179,7 -137,7 +137,7 @@@ rm -rf $RPM_BUILD_ROO
  %{_datadir}/NodeManager/sliver-initscripts/
  %{_datadir}/NodeManager/sliver-systemd/
  %{_bindir}/forward_api_calls
- %{initdir}/
+ %{systemddir}/
  %{_sysconfdir}/logrotate.d/nodemanager
  /var/lib/nodemanager/
  %config(noreplace) /etc/sysconfig/nodemanager
@@@ -192,9 -150,9 +150,9 @@@ Summary: PlanetLab Node Manager Plugin 
  Group: System Environment/Daemons
  # we use libvirt
  Requires: libvirt
- Requires: libvirt-python
+ Requires: python3-libvirt
  # cgroups.py needs this
- Requires: python-inotify
+ Requires: python3-inotify
  # the common package for nodemanager
  Requires: nodemanager-lib = %{version}
  # the lxc-specific tools for using slice images
@@@ -223,7 -181,7 +181,7 @@@ Group: System Environment/Daemon
  
  # old name, when all came as a single package with vserver wired in
  Obsoletes: NodeManager
- # for nodeupdate 
+ # for nodeupdate
  Provides: nodemanager
  
  # our interface to the vserver patch
@@@ -252,9 -210,12 +210,15 @@@ nodemanager-vs provides the vserver cod
  
  ##############################
  %changelog
- * Mon Jan 07 2019 Thierry <Parmentelat> - nodemanager-5.2-20
 -* Mon Jan 07 2019 Thierry <Parmentelat> - nodemanager-7.0-0
++* Mon Jan 07 2019 Thierry Parmentelat <thierry.parmentelat@inria.fr> - nodemanager-7.0-0
+ - ported to python3
+ - add a systemd dependency to network-online so the service won't start too early
+ - only support systemd, removed init-oriented business
+ - also removed debian-oriented business
++* Mon Jan 07 2019 Thierry Parmentelat <thierry.parmentelat@inria.fr> - nodemanager-5.2-20
 +- simply make conf_files.py executable, so that bootmanager can be py2/py3 compliant
 +
  * Sun Jul 10 2016 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-5.2-19
  - tweak to run against libvirt-python-1.3.3 under f24
  - fix by Thomas Dreibholz - misspelled ovs-ovsctl
  * Wed Oct 03 2007 Faiyaz Ahmed <faiyaza@cs.princeton.edu> .
  - Switched to SVN.
  
- * Mon Nov 13 2006 Mark Huang <mlhuang@paris.CS.Princeton.EDU> - 
+ * Mon Nov 13 2006 Mark Huang <mlhuang@paris.CS.Princeton.EDU> -
  - Initial build.