[X2Go-Commits] [x2gobroker] 10/17: x2gobroker.spec: Adapt to Python3 port.

git-admin at x2go.org git-admin at x2go.org
Mon Oct 9 10:40:05 CEST 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gobroker.

commit 3cdd51cde82c8c8cb117a6ae08ee260ff6cef641
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Sep 23 16:51:47 2017 +0200

    x2gobroker.spec: Adapt to Python3 port.
---
 x2gobroker.spec | 103 ++++++++++++++++++++------------------------------------
 1 file changed, 37 insertions(+), 66 deletions(-)

diff --git a/x2gobroker.spec b/x2gobroker.spec
index 514c65c..51209bd 100644
--- a/x2gobroker.spec
+++ b/x2gobroker.spec
@@ -21,21 +21,18 @@ Source4:        x2gobroker-rpmlintrc
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %endif
 
+BuildRequires:  python3-devel
 %if 0%{?suse_version}
-BuildRequires:  python-devel
 BuildRequires:  fdupes
-%else
-BuildRequires:  python2-devel
 %endif
 BuildRequires:  sudo
-BuildRequires:  python-setuptools
+BuildRequires:  python3-setuptools
 %if 0%{?fedora} || 0%{?el7} || 0%{?suse_version} >= 1230
 BuildRequires:  systemd
 %endif
-Requires:       python-argparse
-Requires:       python-setproctitle
-Requires:       python-wsgilog
-Requires(pre):  python-x2gobroker = %{version}-%{release}
+Requires:       python3-setproctitle
+Requires:       python3-wsgilog
+Requires(pre):  python3-x2gobroker = %{version}-%{release}
 
 %if 0%{?suse_version}
 Requires(pre): pwdutils
@@ -67,33 +64,29 @@ A session broker is most useful in load balanced X2Go server farms.
 
 This package contains the x2gobroker executable.
 
-%package -n python-x2gobroker
-Summary:        X2Go Session Broker (Python modules)
+%package -n python3-x2gobroker
+Summary:        X2Go Session Broker (Python3 module)
 %if 0%{?suse_version}
 Group:          Productivity/Networking/Remote Desktop
 %else
 Group:          Applications/Communications
 %endif
+Requires:       python3
 %if 0%{?suse_version}
-Requires:       python
+Requires:       python3-pampy
 %else
-Requires:       python2
+Requires:       python3-pam
 %endif
-%if 0%{?suse_version}
-Requires:       python-pampy
-%else
-Requires:       python-pam
-%endif
-Requires:       python-netaddr
-Requires:       python-tornado
-Requires:       python-paramiko
-Requires:       python-daemon
-Requires:       python-lockfile
+Requires:       python3-netaddr
+Requires:       python3-tornado
+Requires:       python3-paramiko
+Requires:       python3-daemon
+Requires:       python3-lockfile
 %if 0%{?suse_version}
 Requires(pre):  permissions
 %endif
 
-%description -n python-x2gobroker
+%description -n python3-x2gobroker
 X2Go is a server based computing environment with
     - session resuming
     - low bandwidth support
@@ -109,7 +102,7 @@ most appropriate for the user in front of the X2Go terminal.
 
 A session broker is most useful in load balanced X2Go server farms.
 
-This package contains the broker's Python library.
+This package contains the broker's Python3 library.
 
 
 %package authservice
@@ -119,20 +112,15 @@ Group:          Productivity/Networking/Remote Desktop
 %else
 Group:          Applications/Communications
 %endif
+Requires:       python3
+Requires:       python3-setproctitle
 %if 0%{?suse_version}
-Requires:       python
+Requires:       python3-pampy
 %else
-Requires:       python2
-%endif
-Requires:       python-argparse
-Requires:       python-setproctitle
-%if 0%{?suse_version}
-Requires:       python-pampy
-%else
-Requires:       python-pam
+Requires:       python3-pam
 %endif
 Requires:       logrotate
-Requires(pre):  python-x2gobroker = %{version}-%{release}
+Requires(pre):  python3-x2gobroker = %{version}-%{release}
 %if 0%{?suse_version}
 Requires(pre):  permissions
 %endif
@@ -162,15 +150,10 @@ Group:          Productivity/Networking/Remote Desktop
 %else
 Group:          Applications/Communications
 %endif
-%if 0%{?suse_version}
-Requires:       python
-%else
-Requires:       python2
-%endif
-Requires:       python-argparse
-Requires:       python-setproctitle
+Requires:       python3
+Requires:       python3-setproctitle
 Requires:       logrotate
-Requires(pre):  python-x2gobroker = %{version}-%{release}
+Requires(pre):  python3-x2gobroker = %{version}-%{release}
 %if 0%{?suse_version}
 Requires(pre):  permissions
 %endif
@@ -274,11 +257,7 @@ Requires:       apache2, apache2-mod_wsgi
 %else
 Requires:       httpd, mod_wsgi
 %endif
-%if 0%{?suse_version}
-Requires:       python
-%else
-Requires:       python2
-%endif
+Requires:       python3
 Requires:       x2gobroker-authservice = %{version}-%{release}
 Requires:       logrotate
 %if 0%{?suse_version}
@@ -323,14 +302,9 @@ Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $versi
 %if 0%{?fedora} || 0%{?rhel}
 BuildRequires:  perl-generators
 %endif
-%if 0%{?suse_version}
-Requires:       python
-%else
-Requires:       python2
-%endif
-Requires:       python-setproctitle
-Requires:       python-argparse
-Requires:       python-paramiko
+Requires:       python3
+Requires:       python3-setproctitle
+Requires:       python3-paramiko
 Requires:       perl(File::Which)
 %if 0%{?suse_version}
 Requires(pre):  permissions
@@ -379,6 +353,9 @@ installed on your to-be-managed X2Go servers.
 %prep
 %setup -q
 
+%check
+python3 test.py
+
 %build
 echo "Files where we will be patching libexecedir:"
 find . -type f -exec grep -l "/usr/lib/x2go/" "{}" "+"
@@ -390,12 +367,6 @@ sed -i etc/broker/x2gobroker-sessionprofiles.conf \
     -e 's/^name=MATE - localhost/name=GNOME - localhost/' \
     -e 's/^command=MATE/command=GNOME/'
 %endif
-%if 0%{?fedora} >= 22
-grep -l -r -E '^#!/usr/bin/env python$' | while read file; do \
-    sed -i "$file" \
-        -e 's#/usr/bin/env python#/usr/bin/env python2#'
-done
-%endif
 sed -i logrotate/x2gobroker-authservice \
     -e 's/adm/root/'
 sed -i logrotate/x2gobroker-loadchecker \
@@ -470,7 +441,7 @@ install -pm0755 %SOURCE1 \
 %endif
 
 
-%pre -n python-x2gobroker
+%pre -n python3-x2gobroker
 if ! /usr/bin/getent group x2gobroker 1>/dev/null 2>/dev/null && /usr/sbin/groupadd -r x2gobroker; then
 	if ! /usr/bin/getent passwd x2gobroker 1>/dev/null 2>/dev/null; then
 		/usr/sbin/useradd -c "X2Go Broker System User" \
@@ -480,11 +451,11 @@ if ! /usr/bin/getent group x2gobroker 1>/dev/null 2>/dev/null && /usr/sbin/group
 fi
 
 %if 0%{?suse_version}
-%post -n python-x2gobroker
+%post -n python3-x2gobroker
 %set_permissions %{_localstatedir}/log/x2gobroker
 
 
-%verifyscript -n python-x2gobroker
+%verifyscript -n python3-x2gobroker
 %verify_permissions -e %{_localstatedir}/log/x2gobroker
 %endif
 
@@ -696,7 +667,7 @@ fi
 %_mandir/man8/x2gobroker-testagent.8*
 
 
-%files -n python-x2gobroker
+%files -n python3-x2gobroker
 %defattr(-,root,root)
 %config(noreplace) %_sysconfdir/x2go
 %exclude %_sysconfdir/x2go/x2gobroker-wsgi.apache.conf
@@ -705,7 +676,7 @@ fi
 %if 0%{?el5} || 0%{?el6} || (0%{?suse_version} && 0%{?suse_version} < 1140)
 %config %_sysconfdir/default/python-x2gobroker
 %endif
-%python_sitelib/x2gobroker*
+%python3_sitelib/x2gobroker*
 %attr(02750,x2gobroker,x2gobroker) %_localstatedir/log/x2gobroker
 %attr(00750,x2gobroker,x2gobroker) %_localstatedir/lib/x2gobroker
 

--
Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git


More information about the x2go-commits mailing list