diff options
author | brooks <brooks@FreeBSD.org> | 2005-04-22 04:05:53 +0800 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-04-22 04:05:53 +0800 |
commit | 3f9bf6557daa4a40f5dbd45689239ac22ca13a4f (patch) | |
tree | 09ca6c003d06444f00b88f461c44b27fd904f874 /audio | |
parent | 80b6e87d8de2a716903ee6b35c6bde7a9bb5a143 (diff) | |
download | freebsd-ports-gnome-3f9bf6557daa4a40f5dbd45689239ac22ca13a4f.tar.gz freebsd-ports-gnome-3f9bf6557daa4a40f5dbd45689239ac22ca13a4f.tar.zst freebsd-ports-gnome-3f9bf6557daa4a40f5dbd45689239ac22ca13a4f.zip |
Improve the upgrade process a bit. It was previously possible for
the log file to be owned by root because most files were opened/created
before the uid was switched to non-root. That's not the case anymore
so we need to be sure those files are owned by slimserv:slimserv.
This isn't a problem with new installed because they are made
correctly in the rc script, but on upgrades it may be an issue.
Handle this by resetting the permissions of existing files and
directories during the install.
While I'm here, remove some leftover directory creation. It properly
belongs in the startup script so the files will be created if /var
is clear.
Bump port revision.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/slimserver/Makefile | 1 | ||||
-rw-r--r-- | audio/slimserver/files/pkg-install.in | 21 | ||||
-rw-r--r-- | audio/squeezeboxserver/Makefile | 1 | ||||
-rw-r--r-- | audio/squeezeboxserver/files/pkg-install.in | 21 | ||||
-rw-r--r-- | audio/squeezecenter/Makefile | 1 | ||||
-rw-r--r-- | audio/squeezecenter/files/pkg-install.in | 21 |
6 files changed, 45 insertions, 21 deletions
diff --git a/audio/slimserver/Makefile b/audio/slimserver/Makefile index 682919b6f24a..14ad9229b294 100644 --- a/audio/slimserver/Makefile +++ b/audio/slimserver/Makefile @@ -7,6 +7,7 @@ PORTNAME= slimserver PORTVERSION?= 6.0.1 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://www.slimdevices.com/downloads/${NIGHTLY}SlimServer_v${DISTVERSION}/ DISTNAME= SlimServer_v${DISTVERSION} diff --git a/audio/slimserver/files/pkg-install.in b/audio/slimserver/files/pkg-install.in index 9b720496981e..a35e78368c11 100644 --- a/audio/slimserver/files/pkg-install.in +++ b/audio/slimserver/files/pkg-install.in @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/audio/slimserver/files/Attic/pkg-install.in,v 1.1 2005-04-21 05:17:02 brooks Exp $ +# $FreeBSD: /tmp/pcvs/ports/audio/slimserver/files/Attic/pkg-install.in,v 1.2 2005-04-21 20:05:53 brooks Exp $ name=slimserver u=slimserv @@ -11,6 +11,7 @@ comment="Slim Devices SlimServer pseudo-user" slimdir="%%PREFIX%%/%%SLIMDIR%%" statedir=/var/db/slimserver cachedir=${statedir}/cache +conffile=${statedir}/slimserver.conf playlistdir=${statedir}/playlists pidfile=/var/run/${name}.pid newsyslogfile=/etc/newsyslog.conf @@ -43,18 +44,24 @@ PRE-INSTALL) fi ;; POST-INSTALL) - if [ ! -d ${statedir} ]; then - mkdir -p ${statedir} + if [ -d ${statedir} ]; then chown -R ${u}:${g} ${statedir} fi - if [ ! -d ${cachedir} ]; then - mkdir -p ${cachedir} + if [ -d ${cachedir} ]; then chown -R ${u}:${g} ${cachedir} fi - if [ ! -d ${playlistdir} ]; then - mkdir -p ${playlistdir} + if [ -d ${playlistdir} ]; then chown -R ${u}:${g} ${playlistdir} fi + if [ -d /var/run/slimserver ]; then + chown -R ${u}:${g} /var/run/slimserver + fi + if [ -f ${conffile} ]; then + chown ${u}:${g} ${conffile} + fi + if [ -f ${logfile} ]; then + chown ${u}:${g} ${logfile} + fi if egrep -q "^${logfile}\>" ${newsyslogfile}; then echo "Using existing ${newsyslogfile} entry." else diff --git a/audio/squeezeboxserver/Makefile b/audio/squeezeboxserver/Makefile index 682919b6f24a..14ad9229b294 100644 --- a/audio/squeezeboxserver/Makefile +++ b/audio/squeezeboxserver/Makefile @@ -7,6 +7,7 @@ PORTNAME= slimserver PORTVERSION?= 6.0.1 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://www.slimdevices.com/downloads/${NIGHTLY}SlimServer_v${DISTVERSION}/ DISTNAME= SlimServer_v${DISTVERSION} diff --git a/audio/squeezeboxserver/files/pkg-install.in b/audio/squeezeboxserver/files/pkg-install.in index a210354f5677..ef9c47ecbd6b 100644 --- a/audio/squeezeboxserver/files/pkg-install.in +++ b/audio/squeezeboxserver/files/pkg-install.in @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/audio/squeezeboxserver/files/pkg-install.in,v 1.1 2005-04-21 05:17:02 brooks Exp $ +# $FreeBSD: /tmp/pcvs/ports/audio/squeezeboxserver/files/pkg-install.in,v 1.2 2005-04-21 20:05:53 brooks Exp $ name=slimserver u=slimserv @@ -11,6 +11,7 @@ comment="Slim Devices SlimServer pseudo-user" slimdir="%%PREFIX%%/%%SLIMDIR%%" statedir=/var/db/slimserver cachedir=${statedir}/cache +conffile=${statedir}/slimserver.conf playlistdir=${statedir}/playlists pidfile=/var/run/${name}.pid newsyslogfile=/etc/newsyslog.conf @@ -43,18 +44,24 @@ PRE-INSTALL) fi ;; POST-INSTALL) - if [ ! -d ${statedir} ]; then - mkdir -p ${statedir} + if [ -d ${statedir} ]; then chown -R ${u}:${g} ${statedir} fi - if [ ! -d ${cachedir} ]; then - mkdir -p ${cachedir} + if [ -d ${cachedir} ]; then chown -R ${u}:${g} ${cachedir} fi - if [ ! -d ${playlistdir} ]; then - mkdir -p ${playlistdir} + if [ -d ${playlistdir} ]; then chown -R ${u}:${g} ${playlistdir} fi + if [ -d /var/run/slimserver ]; then + chown -R ${u}:${g} /var/run/slimserver + fi + if [ -f ${conffile} ]; then + chown ${u}:${g} ${conffile} + fi + if [ -f ${logfile} ]; then + chown ${u}:${g} ${logfile} + fi if egrep -q "^${logfile}\>" ${newsyslogfile}; then echo "Using existing ${newsyslogfile} entry." else diff --git a/audio/squeezecenter/Makefile b/audio/squeezecenter/Makefile index 682919b6f24a..14ad9229b294 100644 --- a/audio/squeezecenter/Makefile +++ b/audio/squeezecenter/Makefile @@ -7,6 +7,7 @@ PORTNAME= slimserver PORTVERSION?= 6.0.1 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://www.slimdevices.com/downloads/${NIGHTLY}SlimServer_v${DISTVERSION}/ DISTNAME= SlimServer_v${DISTVERSION} diff --git a/audio/squeezecenter/files/pkg-install.in b/audio/squeezecenter/files/pkg-install.in index 149227db7dec..6281f6397078 100644 --- a/audio/squeezecenter/files/pkg-install.in +++ b/audio/squeezecenter/files/pkg-install.in @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/audio/squeezecenter/files/Attic/pkg-install.in,v 1.1 2005-04-21 05:17:02 brooks Exp $ +# $FreeBSD: /tmp/pcvs/ports/audio/squeezecenter/files/Attic/pkg-install.in,v 1.2 2005-04-21 20:05:53 brooks Exp $ name=slimserver u=slimserv @@ -11,6 +11,7 @@ comment="Slim Devices SlimServer pseudo-user" slimdir="%%PREFIX%%/%%SLIMDIR%%" statedir=/var/db/slimserver cachedir=${statedir}/cache +conffile=${statedir}/slimserver.conf playlistdir=${statedir}/playlists pidfile=/var/run/${name}.pid newsyslogfile=/etc/newsyslog.conf @@ -43,18 +44,24 @@ PRE-INSTALL) fi ;; POST-INSTALL) - if [ ! -d ${statedir} ]; then - mkdir -p ${statedir} + if [ -d ${statedir} ]; then chown -R ${u}:${g} ${statedir} fi - if [ ! -d ${cachedir} ]; then - mkdir -p ${cachedir} + if [ -d ${cachedir} ]; then chown -R ${u}:${g} ${cachedir} fi - if [ ! -d ${playlistdir} ]; then - mkdir -p ${playlistdir} + if [ -d ${playlistdir} ]; then chown -R ${u}:${g} ${playlistdir} fi + if [ -d /var/run/slimserver ]; then + chown -R ${u}:${g} /var/run/slimserver + fi + if [ -f ${conffile} ]; then + chown ${u}:${g} ${conffile} + fi + if [ -f ${logfile} ]; then + chown ${u}:${g} ${logfile} + fi if egrep -q "^${logfile}\>" ${newsyslogfile}; then echo "Using existing ${newsyslogfile} entry." else |