[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.2.3-96-g0e37ee8
X2Go dev team
git-admin at x2go.org
Wed Dec 18 20:54:59 CET 2013
The branch, master has been updated
via 0e37ee8857ee96b173f40780acfa95e5a9f9614b (commit)
from 25328d4ffcb3a9cd48be31558e2cad253cbcc298 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0e37ee8857ee96b173f40780acfa95e5a9f9614b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Dec 18 20:53:41 2013 +0100
x2gobroker.spec: Provide x2gobroker.spec file for building RPM packages. Inspired by the packaging work in OpenSuSE.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 3 +
rpm/x2gobroker-daemon.init | 2 +-
x2gobroker.spec | 412 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 416 insertions(+), 1 deletion(-)
create mode 100644 x2gobroker.spec
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 5a6e1c9..01103aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -77,6 +77,9 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
+ Switch to format 1.0.
* rpm/*.init:
+ Provide initscripts that are likely to work on RHEL plus derivatives.
+ * x2gobroker.spec:
+ + Provide x2gobroker.spec file for building RPM packages. Inspired by
+ the packaging work in OpenSuSE.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Fri, 07 Jun 2013 23:25:30 +0200
diff --git a/rpm/x2gobroker-daemon.init b/rpm/x2gobroker-daemon.init
index 6915982..a6e2b48 100644
--- a/rpm/x2gobroker-daemon.init
+++ b/rpm/x2gobroker-daemon.init
@@ -82,7 +82,7 @@ start() {
if is_true $START_BROKER; then
echo -n $"Starting $prog: "
set +e
- su - $X2GOBROKER_DAEMON_USER -c "daemon $exec $OPTS"
+ daemon --user $X2GOBROKER_DAEMON_USER $exec $OPTS
retval=$?
set -e
echo
diff --git a/x2gobroker.spec b/x2gobroker.spec
new file mode 100644
index 0000000..1b7a7bf
--- /dev/null
+++ b/x2gobroker.spec
@@ -0,0 +1,412 @@
+Name: x2gobroker
+Version: 0.0.2.3
+Release: 0.0x2go1
+Summary: X2Go Session Broker
+License: AGPL-3.0+
+Group: Applications/Communications
+Url: http://www.x2go.org/
+
+Source0: http://code.x2go.org/releases/source/%name/%name-%version.tar.gz
+Source1: x2gobroker-daemon.init
+Source2: x2gobroker-authservice.init
+
+%if 0%{?el5}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%endif
+
+BuildRequires: adduser
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+%if 0%{?fedora}
+BuildRequires: systemd
+%endif
+PreReq: permissions
+Requires: logrotate
+Requires: python-argparse
+Requires: python-netaddr
+Requires: python-pam
+Requires: python-paramiko
+Requires: python-setproctitle
+Requires: python-tornado
+Requires: python-wsgilog
+
+%description
+X2Go is a server based computing environment with
+ - session resuming
+ - low bandwidth support
+ - session brokerage support
+ - client side mass storage mounting support
+ - client side printing support
+ - audio support
+ - authentication by smartcard and USB stick
+
+The session broker is a server tool for X2Go that
+tells your X2Go Client application in a terminal
+server cluster what servers and session types are
+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 x2gobroker executable.
+
+%package authservice
+Summary: X2Go Session Broker (PAM authentication service)
+Group: Applications/Communications
+Requires: python2
+Requires: python-argparse
+Requires: python-setproctitle
+Requires: python-pam
+Requires: x2gobroker = %{version}-%{release}
+
+%description authservice
+X2Go is a server based computing environment with
+ - session resuming
+ - low bandwidth support
+ - session brokerage support
+ - client side mass storage mounting support
+ - client side printing support
+ - audio support
+ - authentication by smartcard and USB stick
+
+The session broker is a server tool for X2Go that
+tells your X2Go Client application in a terminal
+server cluster what servers and session types are
+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 authentication service
+against the PAM system.
+
+%package daemon
+Summary: X2Go Session Broker (standalone daemon)
+Group: Applications/Communications
+Requires: x2gobroker = %{version}-%{release}
+
+%description daemon
+X2Go is a server based computing environment with
+ - session resuming
+ - low bandwidth support
+ - session brokerage support
+ - client side mass storage mounting support
+ - client side printing support
+ - audio support
+ - authentication by smartcard and USB stick
+
+The session broker is a server tool for X2Go that
+tells your X2Go Client application in a terminal
+server cluster what servers and session types are
+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 start-stop script that
+installs the X2Go Session Broker as standalone
+daemon.
+
+%package wsgi
+Summary: X2Go Session Broker (WSGI)
+Group: Applications/Communications
+Requires: x2gobroker = %{version}-%{release}
+Requires: httpd, mod_wsgi
+Requires: python2
+
+%description wsgi
+X2Go is a server based computing environment with
+ - session resuming
+ - low bandwidth support
+ - session brokerage support
+ - client side mass storage mounting support
+ - client side printing support
+ - audio support
+ - authentication by smartcard and USB stick
+
+The session broker is a server tool for X2Go that
+tells your X2Go Client application in a terminal
+server cluster what servers and session types are
+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 an Apache2 configuration that
+installs the X2Go Session Broker as a WSGI application
+into a running Apache2 httpd.
+
+%package agent
+Summary: X2Go Session Broker (remote agent)
+Group: Applications/Communications
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: x2goserver >= 4.0.1.0
+Requires: python2
+Requires: python-setproctitle
+Requires: python-argparse
+Requires: python-paramiko
+
+%description agent
+X2Go is a server based computing environment with
+ - session resuming
+ - low bandwidth support
+ - session brokerage support
+ - client side mass storage mounting support
+ - client side printing support
+ - audio support
+ - authentication by smartcard and USB stick
+
+The session broker is a server tool for X2Go that
+tells your X2Go Client application in a terminal
+server cluster what servers and session types are
+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 a setuid agent command that
+is required by the X2Go session broker. This package
+has to be installed on all X2Go servers that shall get
+managed via the X2Go session broker.
+
+WARNING: This package installs a setuid wrapper
+(/usr/lib/x2go/broker/x2gobroker-agent) on your system.
+This setuid wrapper aims to be a secure replacement
+for the deprecated suidperl exectuable that was removed
+from Perl (>= 5.12).
+
+This wrapper is only able to execute the Perl script
+/usr/lib/x2go/broker/x2gobroker-agent.pl. For running
+properly, x2gobroker-agent.pl needs setuid privileges.
+
+If you hesitate to install this package, study the code
+of the named wrapper and the named Perl script beforehand.
+Note that the X2Go session broker will not work without this
+x2gobroker-agent component installed on your to-be-managed
+X2Go servers.
+
+%prep
+%setup -q
+
+%build
+echo "Files where we will be patching libexecedir:"
+find . -type f -exec grep -l "/usr/lib/x2go/" "{}" "+"
+find . -type f -exec grep -l "/usr/lib/x2go/" "{}" "+" | \
+ xargs perl -i -pe 's{/usr/lib/x2go/}{%_libexecdir/x2go/}'
+make %{?_smp_mflags} PREFIX="%_prefix" LIBDIR="%_libexecdir/x2go"
+
+%install
+b="%buildroot"
+make install PREFIX="%_prefix" LIBDIR="%_libexecdir/x2go" DESTDIR="$b"
+
+#
+# Somewhat distro specific (especially the paths), thus this was not
+# done in the shipped tarball's Makefile
+#
+mkdir -p "$b/%_sysconfdir/apache2"/{conf.d,vhosts.d}
+ln -s "%_sysconfdir/x2go/x2gobroker-wsgi.apache.conf" \
+ "$b/%_sysconfdir/apache2/conf.d/x2gobroker-wsgi.conf"
+ln -s "%_sysconfdir/x2go/x2gobroker-wsgi.apache.vhost" \
+ "$b/%_sysconfdir/apache2/vhosts.d/x2gobroker-wsgi.sample"
+
+%if 0%{?fedora}
+# System.d session cleanup script
+mkdir -p %{buildroot}%{_unitdir}
+install -pm0644 x2gobroker-daemon.service %{buildroot}%{_unitdir}
+install -pm0644 x2gobroker-authservice.service %{buildroot}%{_unitdir}
+%else
+# SysV session cleanup script
+%if 0%{?el5}
+mkdir -p %{buildroot}%{_initrddir}
+install -pm0755 "init/x2gobroker-authservice.init" \
+ "$b/%_initrddir/x2gobroker-authservice"
+install -pm0755 "init/x2gobroker-daemon.init" \
+ "$b/%_initrddir/x2gobroker-daemon"
+%else
+mkdir -p "$b/%_initddir"
+install -pm0755 "init/x2gobroker-authservice.init" \
+ "$b/%_initddir/x2gobroker-authservice"
+install -pm0755 "init/x2gobroker-daemon.init" \
+ "$b/%_initddir/x2gobroker-daemon"
+%endif
+%endif
+
+#
+# Totally distro-specific
+#
+mkdir -p "$b/%_sysconfdir/permissions.d"
+pushd "$b/%_sysconfdir/permissions.d/"
+cat >"%name.easy" <<-EOF
+ %_localstatedir/log/x2gobroker x2gobroker.x2gobroker 02750
+ %_localstatedir/lib/x2gobroker x2gobroker.x2gobroker 00750
+EOF
+cp "%name.easy" "%name.secure"
+cp "%name.easy" "%name.paranoid"
+cat >"%name-agent.easy" <<-EOF
+ %_libexecdir/x2go/x2gobroker-agent root.x2gobroker 04750
+EOF
+cp "%name-agent.easy" "%name-agent.secure"
+cp "%name-agent.easy" "%name-agent.paranoid"
+popd
+%if 0%{?fdupes:1}
+%fdupes %buildroot/%_prefix
+%endif
+
+#%if 0%{?suse_version}
+#%verifyscript
+#%verify_permissions -e %_libexecdir/x2go/x2gobroker-agent
+#%endif
+
+%pre
+if ! /usr/bin/getent group x2gobroker >/dev/null 2>/dev/null && \
+ /usr/sbin/groupadd -r x2gobroker; then
+ /usr/bin/getent passwd x2gobroker >/dev/null 2>/dev/null || \
+ /usr/sbin/useradd -c "x2go broker server/user" \
+ -d "%_localstatedir/lib/x2gobroker" \
+ -g x2gobroker -r -s /bin/false x2gobroker || :;
+fi;
+
+%preun
+if /usr/bin/getent passwd x2gobroker >/dev/null 2>/dev/null && ! [ -f %_libexecdir/x2go/x2gobroker-agent ]; then
+ /usr/sbin/userdel x2gobroker;
+fi;
+if /usr/bin/getent group x2gobroker >/dev/null 2>/dev/null && ! [ -f %_libexecdir/x2go/x2gobroker-agent ]; then
+ /usr/sbin/groupdel x2gobroker;
+fi;
+
+
+%post authservice
+%if 0%{?fedora}
+%systemd_post x2gobroker-authservice.service
+%else
+/sbin/chkconfig --add x2gobroker-authservice
+if [ "$1" -ge "1" ] ; then
+ /sbin/service x2gobroker-authservice condrestart >/dev/null 2>&1 || :
+fi
+%endif
+
+%preun authservice
+%if 0%{?fedora}
+%systemd_preun x2gobroker-authservice.service
+%else
+if [ "$1" = 0 ]; then
+ /sbin/service x2gobroker-authservice stop >/dev/null 2>&1
+ /sbin/chkconfig --del x2gobroker-authservice
+fi
+%endif
+
+%if 0%{?fedora}
+%postun authservice
+%systemd_postun x2gobroker-authservice.service
+%endif
+
+
+%post daemon
+%if 0%{?fedora}
+%systemd_post x2gobroker-daemon.service
+%else
+/sbin/chkconfig --add x2gobroker-daemon
+if [ "$1" -ge "1" ] ; then
+ /sbin/service x2gobroker-daemon condrestart >/dev/null 2>&1 || :
+fi
+%endif
+
+%preun daemon
+%if 0%{?fedora}
+%systemd_preun x2gobroker-daemon.service
+%else
+if [ "$1" = 0 ]; then
+ /sbin/service x2gobroker-daemon stop >/dev/null 2>&1
+ /sbin/chkconfig --del x2gobroker-daemon
+fi
+%endif
+
+%if 0%{?fedora}
+%postun daemon
+%systemd_postun x2gobroker-daemon.service
+%endif
+
+
+%pre agent
+if ! /usr/bin/getent group x2gobroker >/dev/null 2>/dev/null && \
+ /usr/sbin/groupadd -r x2gobroker; then
+ /usr/bin/getent passwd x2gobroker >/dev/null 2>/dev/null || \
+ /usr/sbin/useradd -c "x2go broker server/user" \
+ -d "%_localstatedir/lib/x2gobroker" \
+ -g x2gobroker -r -s /bin/false x2gobroker || :;
+fi;
+
+%post agent
+%if 0%{?set_permissions:1}
+%set_permissions %_libexecdir/x2go/x2gobroker-agent
+%else
+%run_permissions
+%endif
+
+%preun agent
+if /usr/bin/getent passwd x2gobroker >/dev/null 2>/dev/null && ! type x2gobroker; then
+ /usr/sbin/userdel x2gobroker;
+fi;
+if /usr/bin/getent group x2gobroker >/dev/null 2>/dev/null && ! type x2gobroker; then
+ /usr/sbin/groupdel x2gobroker;
+fi;
+
+%files
+%config %_sysconfdir/default/python-x2gobroker
+%config %_sysconfdir/pam.d
+%config(noreplace) %_sysconfdir/x2go
+%exclude(%_sysconfdir/x2go/x2gobroker-wsgi.apache.conf)
+%exclude(%_sysconfdir/x2go/x2gobroker-wsgi.apache.vhost)
+
+%_bindir/x2gobroker
+%_bindir/x2gobroker-testauth
+%_sbindir/x2gobroker-keygen
+%_sbindir/x2gobroker-daemon-debug
+%python_sitelib/x2gobroker*
+%_mandir/man1/x2gobroker*.1*
+
+
+%files authservice
+%defattr(-,root,root)
+%_initddir/x2gobroker-authservice
+%config %_sysconfdir/default/x2gobroker-authservice
+%config %_sysconfdir/logrotate.d/x2gobroker-authservice
+%_sbindir/x2gobroker-authservice
+%_mandir/man8/x2gobroker-authservice.8*
+
+
+%files daemon
+%defattr(-,root,root)
+%_initddir/x2gobroker-daemon
+%config %_sysconfdir/default/x2gobroker-daemon
+%config %_sysconfdir/logrotate.d/x2gobroker-daemon
+%config %_sysconfdir/permissions.d/x2gobroker.*
+%attr(02750,x2gobroker,x2gobroker) %_localstatedir/log/x2gobroker
+%attr(00750,x2gobroker,x2gobroker) %_localstatedir/lib/x2gobroker
+#%_mandir/man8/x2gobroker-daemon-debug.8*
+
+
+%files wsgi
+%defattr(-,root,root)
+%_sysconfdir/apache2
+%config %_sysconfdir/logrotate.d/x2gobroker-wsgi
+
+
+%files agent
+%defattr(-,root,root)
+%attr(02750,x2gobroker,x2gobroker) %_localstatedir/log/x2gobroker
+%attr(00750,x2gobroker,x2gobroker) %_localstatedir/lib/x2gobroker
+%config %_sysconfdir/permissions.d/x2gobroker-agent.*
+%dir %_libexecdir/x2go
+%attr(04750,root,x2gobroker) %_libexecdir/x2go/x2gobroker-agent
+%_libexecdir/x2go/x2gobroker-agent.pl
+%_sbindir/x2gobroker-pubkeyauthorizer
+%_mandir/man8/x2gobroker-pubkeyauthorizer.8*
+
+
+%changelog
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list