This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from ca222fa Configure broker / authservice environment via .service files. new 15aeeb6 No adm group on non-Debian systems by default. Using root instead on RPM based systems. new 1f1db96 Load defaults.conf via authservices and for logger configuration, as well. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 3 +++ logrotate/x2gobroker-authservice | 2 +- sbin/x2gobroker-authservice | 33 +++++++++++++++++++++++++++++++++ x2gobroker.spec | 6 ++++++ x2gobroker/loggers.py | 8 ++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 15aeeb6d7f979907ae29042c5e3f4dd4d9fc0cda Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Oct 28 23:27:43 2014 +0100 No adm group on non-Debian systems by default. Using root instead on RPM based systems. --- debian/changelog | 2 ++ logrotate/x2gobroker-authservice | 2 +- x2gobroker.spec | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3f6e4ad..b293f38 100644 --- a/debian/changelog +++ b/debian/changelog @@ -216,6 +216,8 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low + For distro versions with systemd, provide /etc/x2go/broker/defaults.conf. For SysV distro versions, use /etc/defaults/* and source them via the init scripts. + + No adm group on non-Debian systems by default. Using root instead on RPM + based systems. [ Josh Lukens ] * New upstream version (0.0.3.0): diff --git a/logrotate/x2gobroker-authservice b/logrotate/x2gobroker-authservice index a2f499c..56a92eb 100644 --- a/logrotate/x2gobroker-authservice +++ b/logrotate/x2gobroker-authservice @@ -6,7 +6,7 @@ delaycompress notifempty create 640 root adm - su x2gobroker adm + su root adm sharedscripts postrotate invoke-rc.d x2gobroker-authservice restart > /dev/null diff --git a/x2gobroker.spec b/x2gobroker.spec index c62a69b..0307812 100644 --- a/x2gobroker.spec +++ b/x2gobroker.spec @@ -335,6 +335,12 @@ sed -i etc/broker/x2gobroker-sessionprofiles.conf \ -e 's/^name=MATE - localhost/name=GNOME - localhost/' \ -e 's/^command=MATE/command=GNOME/' %endif +sed -i logrotate/x2gobroker-authservice \ + -e 's/adm/root/' +sed -i logrotate/x2gobroker-daemon \ + -e 's/adm/root/' +sed -i logrotate/x2gobroker-wsgi \ + -e 's/adm/root/' make %{?_smp_mflags} PREFIX="%_prefix" LIBDIR="%_libexecdir/x2go" %install -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 1f1db9609ab8e652685fbf5fb434b16c938439a0 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Oct 29 08:42:17 2014 +0100 Load defaults.conf via authservices and for logger configuration, as well. --- debian/changelog | 1 + sbin/x2gobroker-authservice | 33 +++++++++++++++++++++++++++++++++ x2gobroker/loggers.py | 8 ++++++++ 3 files changed, 42 insertions(+) diff --git a/debian/changelog b/debian/changelog index b293f38..d1d57d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -172,6 +172,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low - Provide legacy support for deprecated x2gobroker.conf global parameter 'check-credentials'. - Configure broker / authservice environment via .service files. + - Load defaults.conf via authservices and for logger configuration, as well. * debian/control: + Provide separate bin:package for SSH brokerage: x2gobroker-ssh. + Replace LDAP support with session brokerage support in LONG_DESCRIPTION. diff --git a/sbin/x2gobroker-authservice b/sbin/x2gobroker-authservice index 318c2f0..af8cb6e 100755 --- a/sbin/x2gobroker-authservice +++ b/sbin/x2gobroker-authservice @@ -30,6 +30,7 @@ import getpass import logging.config import pam import atexit +import ConfigParser if os.path.isdir('/run'): RUNDIR = '/run' @@ -110,26 +111,58 @@ def cleanup_on_exit(): except: pass +# load the defaults.conf file, if present +iniconfig_loaded = None +iniconfig_section = '-'.join(PROG_NAME.split('-')[1:]) +X2GOBROKER_DEFAULTS = "/etc/x2go/broker/defaults.conf" +if os.path.isfile(X2GOBROKER_DEFAULTS) and os.access(X2GOBROKER_DEFAULTS, os.R_OK): + iniconfig = ConfigParser.SafeConfigParser() + iniconfig.optionxform = str + iniconfig_loaded = iniconfig.read(X2GOBROKER_DEFAULTS) + # normally this would go into defaults.py, however, we do not want to pull in defaults.py here as that will create # unwanted logfiles (access.log, broker.log, error.log) when x2gobroker-authservice is installed as standalone service if os.environ.has_key('X2GOBROKER_DEBUG'): X2GOBROKER_DEBUG = ( os.environ['X2GOBROKER_DEBUG'].lower() in ('1', 'on', 'true', 'yes', ) ) +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_DEBUG'): + X2GOBROKER_DEBUG=iniconfig.get(iniconfig_section, 'X2GOBROKER_DEBUG') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_DEBUG'): + X2GOBROKER_DEBUG=iniconfig.get('common', 'X2GOBROKER_DEBUG') else: X2GOBROKER_DEBUG = False if os.environ.has_key('X2GOBROKER_TESTSUITE'): X2GOBROKER_TESTSUITE = ( os.environ['X2GOBROKER_TESTSUITE'].lower() in ('1', 'on', 'true', 'yes', ) ) +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_TESTSUITE'): + X2GOBROKER_TESTSUITE=iniconfig.get(iniconfig_section, 'X2GOBROKER_TESTSUITE') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_TESTSUITE'): + X2GOBROKER_TESTSUITE=iniconfig.get('common', 'X2GOBROKER_TESTSUITE') else: X2GOBROKER_TESTSUITE = False + if os.environ.has_key('X2GOBROKER_DAEMON_USER'): X2GOBROKER_DAEMON_USER=os.environ['X2GOBROKER_DAEMON_USER'] +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_DAEMON_USER'): + X2GOBROKER_DAEMON_USER=iniconfig.get(iniconfig_section, 'X2GOBROKER_DAEMON_USER') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_DAEMON_USER'): + X2GOBROKER_DAEMON_USER=iniconfig.get('common', 'X2GOBROKER_DAEMON_USER') else: X2GOBROKER_DAEMON_USER="x2gobroker" + if os.environ.has_key('X2GOBROKER_AUTHSERVICE_LOGCONFIG'): X2GOBROKER_AUTHSERVICE_LOGCONFIG=os.environ['X2GOBROKER_AUTHSERVICE_LOGCONFIG'] +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_AUTHSERVICE_LOGCONFIG'): + X2GOBROKER_AUTHSERVICE_LOGCONFIG=iniconfig.get(iniconfig_section, 'X2GOBROKER_AUTHSERVICE_LOGCONFIG') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_AUTHSERVICE_LOGCONFIG'): + X2GOBROKER_AUTHSERVICE_LOGCONFIG=iniconfig.get('common', 'X2GOBROKER_AUTHSERVICE_LOGCONFIG') else: X2GOBROKER_AUTHSERVICE_LOGCONFIG="/etc/x2go/broker/x2gobroker-authservice-logger.conf" + if os.environ.has_key('X2GOBROKER_AUTHSERVICE_SOCKET'): X2GOBROKER_AUTHSERVICE_SOCKET=os.environ['X2GOBROKER_AUTHSERVICE_SOCKET'] +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_AUTHSERVICE_SOCKET'): + X2GOBROKER_AUTHSERVICE_SOCKET=iniconfig.get(iniconfig_section, 'X2GOBROKER_AUTHSERVICE_SOCKET') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_AUTHSERVICE_SOCKET'): + X2GOBROKER_AUTHSERVICE_SOCKET=iniconfig.get('common', 'X2GOBROKER_AUTHSERVICE_SOCKET') else: X2GOBROKER_AUTHSERVICE_SOCKET="{run}/x2gobroker/x2gobroker-authservice.socket".format(run=RUNDIR) diff --git a/x2gobroker/loggers.py b/x2gobroker/loggers.py index c4b77df..c46c13c 100644 --- a/x2gobroker/loggers.py +++ b/x2gobroker/loggers.py @@ -55,10 +55,18 @@ def init_console_loggers(): # normally this would go into defaults.py, however, we do not want to create a dependency loop between loggers.py and defaults.py... if os.environ.has_key('X2GOBROKER_DAEMON_USER'): X2GOBROKER_DAEMON_USER=os.environ['X2GOBROKER_DAEMON_USER'] +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_DAEMON_USER'): + X2GOBROKER_DAEMON_USER=iniconfig.get(iniconfig_section, 'X2GOBROKER_DAEMON_USER') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_DAEMON_USER'): + X2GOBROKER_DAEMON_USER=iniconfig.get('common', 'X2GOBROKER_DAEMON_USER') else: X2GOBROKER_DAEMON_USER="x2gobroker" if os.environ.has_key('X2GOBROKER_LOGCONFIG'): X2GOBROKER_LOGCONFIG=os.environ['X2GOBROKER_LOGCONFIG'] +elif iniconfig_loaded and iniconfig.has_option(iniconfig_section, 'X2GOBROKER_LOGCONFIG'): + X2GOBROKER_LOGCONFIG=iniconfig.get(iniconfig_section, 'X2GOBROKER_LOGCONFIG') +elif iniconfig_loaded and iniconfig.has_option('common', 'X2GOBROKER_LOGCONFIG'): + X2GOBROKER_LOGCONFIG=iniconfig.get('common', 'X2GOBROKER_LOGCONFIG') else: X2GOBROKER_LOGCONFIG="/etc/x2go/broker/x2gobroker-loggers.conf" -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git