Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-30 Thread Chris Lamb
> Redis is required for their new "transactional file locking" (see https
> ://doc.owncloud.org/server/8.2/admin_manual/configuration_files/files_l
> ocking_transactional.html), and the documentation does not specify the
> best version to use.

Ah, I see - thanks again.

For anyone reading, this has been fixed in unstable, testing and
jessie-backports for some time now and I am proposing a stable update
for jessie in #803467.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-30 Thread Chris Lamb
tags 803233 + pending
thanks

(Just uploaded to stable)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-29 Thread Chris Lamb
> It works, and the .pid and .socket files can now be written in the
> right place:

Thanks for confirming. Out of interest, why are you not using the
version in jessie-backports? :)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-29 Thread Yvan Masson
Le mercredi 28 octobre 2015 à 10:28 +, Chris Lamb a écrit :
> > On Jessie, /var/run/redis/ is not created when the service starts
> 
> It is for me (jessie chroot):
> 
>   $ grep RUNDIR /etc/init.d/redis-server 
>   RUNDIR=/var/run/redis
>   PIDFILE=$RUNDIR/redis-server.pid
>     mkdir -p $RUNDIR
>     chown redis:redis $RUNDIR $PIDFILE
>     chmod 755 $RUNDIR
> 
> 
> Regards,
> 
Hi Chris,

Indeed, I did not see that. But /var/run/redis/ is not created on my
system, a 8.2 fresh install.

The main packages I installed before: ldap, apache, mariadb, php and
owncloud (via owncloud repository). I do not think I did configuration
changes that can cause this problem.

It seems it is because service startup is handled by systemd before
that /var/run/redis/ is created:


# /etc/init.d/redis-server stop

# bash -x /etc/init.d/redis-server start

+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/bin/redis-server
+ DAEMON_ARGS=/etc/redis/redis.conf
+ NAME=redis-server
+ DESC=redis-server
+ RUNDIR=/var/run/redis
+ PIDFILE=/var/run/redis/redis-server.pid
+ test -x /usr/bin/redis-server
+ '[' -r /etc/default/redis-server ']'
+ . /etc/default/redis-server
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-
functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-
functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ '[' -n '' ']'
+++ '[' 1118 -ne 1 ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
 readlink -f /etc/init.d/redis-server
+++ _use_systemctl=1
+++ prog=redis-server
+++ service=redis-server.service
 systemctl -p CanReload show redis-server.service
+++ '[' CanReload=no = CanReload=no ']'
+++ '[' start = reload ']'
+++ '[' 1 = 1 ']'
+++ set +e
+++ set +u
+++ '[' xstart = xstart -o xstart = xstop -o xstart = xrestart -o
xstart = xreload -o xstart = xforce-reload -o xstart = xstatus ']'
+++ systemctl_redirect /etc/init.d/redis-server start
+++ local s
+++ local rc
+++ local prog=redis-server
+++ local command=start
+++ case "$command" in
+++ s='Starting redis-server (via systemctl)'
+++ service=redis-server.service
 systemctl -p LoadState show redis-server.service
+++ state=LoadState=loaded
+++ '[' LoadState=loaded = LoadState=masked ']'
+++ '[' start = status ']'
+++ log_daemon_msg 'Starting redis-server (via systemctl)' redis-
server.service
+++ '[' -z 'Starting redis-server (via systemctl)' ']'
+++ log_daemon_msg_pre 'Starting redis-server (via systemctl)' redis-
server.service
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ '[' xxterm-256color '!=' x ']'
+++ '[' xxterm-256color '!=' xdumb ']'
+++ '[' -x /usr/bin/tput ']'
+++ '[' -x /usr/bin/expr ']'
+++ /usr/bin/tput hpa 60
+++ /usr/bin/tput setaf 1
+++ '[' -z ']'
+++ FANCYTTY=1
+++ case "$FANCYTTY" in
+++ true
+++ echo -n '[] '
[] +++ '[' -z redis-server.service ']'
+++ echo -n 'Starting redis-server (via systemctl): redis-
server.service'
Starting redis-server (via systemctl): redis-server.service+++
log_daemon_msg_post 'Starting redis-server (via systemctl)' redis-
server.service
+++ :
+++ /bin/systemctl start redis-server.service
+++ rc=0
+++ '[' start = status ']'
+++ log_end_msg 0
+++ '[' -z 0 ']'
+++ local retval
+++ retval=0
+++ log_end_msg_pre 0
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ '[' xxterm-256color '!=' x ']'
+++ '[' xxterm-256color '!=' xdumb ']'
+++ '[' -x /usr/bin/tput ']'
+++ '[' -x /usr/bin/expr ']'
+++ /usr/bin/tput hpa 60
+++ /usr/bin/tput setaf 1
+++ '[' -z 1 ']'
+++ true
+++ case "$FANCYTTY" in
+++ true
 /usr/bin/tput setaf 1
+++ RED=''
 /usr/bin/tput setaf 2
+++ GREEN=''
 /usr/bin/tput setaf 3
+++ YELLOW=''
 /usr/bin/tput op
+++ NORMAL=''
+++ /usr/bin/tput civis
+++ /usr/bin/tput sc
+++ /usr/bin/tput hpa 0
+++ '[' 0 -eq 0 ']'
+++ /bin/echo -ne '[ ok '
[ ok +++ /usr/bin/tput rc
+++ /usr/bin/tput cnorm
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ '[' xxterm-256color '!=' x ']'
+++ '[' xxterm-256color '!=' xdumb ']'
+++ '[' -x /usr/bin/tput ']'
+++ '[' -x /usr/bin/expr ']'
+++ /usr/bin/tput hpa 60
+++ /usr/bin/tput setaf 1
+++ '[' -z 1 ']'
+++ true
+++ case "$FANCYTTY" in
+++ true
 /usr/bin/tput setaf 1
+++ RED=''
 /usr/bin/tput setaf 3
+++ YELLOW=''
 /usr/bin/tput op
+++ NORMAL=''
+++ '[' 0 -eq 0 ']'
+++ echo .
.
+++ log_end_msg_post 0
+++ :
+++ return 0
+++ return 0
+++ exit 0

Regards,
Yvan



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-29 Thread Chris Lamb
Hi,

> It seems it is because service startup is handled by systemd before
> that /var/run/redis/ is created

Ah, systemd- of course. That shell code won't be run. Can you try
dropping the following:

d /run/redis 2775 redis redis -

.. into /usr/lib/tmpfiles.d/redis-server.conf ?


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-29 Thread Yvan Masson
Le jeudi 29 octobre 2015 à 10:10 +, Chris Lamb a écrit :
> >  - made its rights 777
> 
> Why?

Because I did not know the purpose, so at least I was sure that
everybody could use the file.

> >  - restarted the redis with "bash -x"
> 
> Why? You are using systemd - use the system service restart
> mechanism.

Because I thought you would like to compare.

> Oh, you will probably need to poke systemd into re-reading its
> configuration files too so it recognises this file exists.

Indeed, it needs to be reloaded. So finally, here is what I did:
 - created the file (letting the normal rights)
 - used "# systemctl daemon-reload"
 - rebooted (maybe I could also have used "# systemd-tmpfiles", but I  
   do not understand it enough)

It works, and the .pid and .socket files can now be written in the
right place:

# ls -ld /var/run/redis/
drwxrwsr-x 2 redis redis 40 oct.  29 11:36 /var/run/redis/

Regards,
Yvan



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-29 Thread Yvan Masson
Le jeudi 29 octobre 2015 à 09:57 +, Chris Lamb a écrit :
> Hi,
> 
> > It seems it is because service startup is handled by systemd before
> > that /var/run/redis/ is created
> 
> Ah, systemd- of course. That shell code won't be run. Can you try
> dropping the following:
> 
> d /run/redis 2775 redis redis -
> 
> .. into /usr/lib/tmpfiles.d/redis-server.conf ?
> 
I do not understand what you are trying to do, but:
 - I created the file /usr/lib/tmpfiles.d/redis-server.conf with
   "d /run/redis 2775 redis redis -" as content
 - made its rights 777
 - restarted the redis with "bash -x"

Unfortunately, the output is exactly the same and /var/run/redis/ is
not created.

Regards,
Yvan



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-29 Thread Chris Lamb
>  - made its rights 777

Why?

>  - restarted the redis with "bash -x"

Why? You are using systemd - use the system service restart mechanism.
Oh, you will probably need to poke systemd into re-reading its
configuration files too so it recognises this file exists.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-28 Thread Yvan Masson
Package: redis-server
Version: 2:2.8.17-1+deb8u1

Dear maintainer,

On Jessie, /var/run/redis/ is not created when the service starts,
/var/run is not writable by the redis user and /tmp/ is not secure (see
this similar bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?b
ug=801464).

Then, where do you think it is best to put the redis socket file ? 

Would not it be possible to update redis-server package on Jessie to
create /var/run/redis/ on startup ? I think this should not break
running installations if we only create this folder.

Thanks for your time and work,
Yvan



Bug#803233: Where to write redis-server.sock on Jessie ?

2015-10-28 Thread Chris Lamb
> On Jessie, /var/run/redis/ is not created when the service starts

It is for me (jessie chroot):

  $ grep RUNDIR /etc/init.d/redis-server 
  RUNDIR=/var/run/redis
  PIDFILE=$RUNDIR/redis-server.pid
  mkdir -p $RUNDIR
  chown redis:redis $RUNDIR $PIDFILE
  chmod 755 $RUNDIR


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-