UIDs:
- Add freevo GIDs: - Add freevo multimedia/freevo - Handle user/group creation via Makefile variables - Stagify - Add License - Bump PORTREVISION - Simplify install - remove pkg-install.in - handle private subdirs in /var via pkg-plist and Makefile - remove user/group handling in pkg-deinstall.in PR: ports/189995 Submitted by: "J.R. Oldroyd" <fbsd@opal.com> (maintainer) Approved by: thierry (mentor), maintainer
This commit is contained in:
parent
695815c8a0
commit
3af48c1f2c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355422
1
GIDs
1
GIDs
@ -174,6 +174,7 @@ radmind:*:506:
|
||||
skkserv:*:507:
|
||||
pwhois:*:512:
|
||||
nullmail:*:522:
|
||||
freevo:*:523:
|
||||
dkimproxy:*:525:
|
||||
pgbouncer:*:534:
|
||||
redis:*:535:
|
||||
|
1
UIDs
1
UIDs
@ -179,6 +179,7 @@ radmind:*:506:506::0:0:radmind User:/var/radmind:/usr/sbin/nologin
|
||||
skkserv:*:507:507::0:0:skkserv User:/nonexistent:/usr/sbin/nologin
|
||||
pwhois:*:512:512::0:0:pwhoisd User:/nonexistent:/usr/sbin/nologin
|
||||
nullmail:*:522:522::0:0:Nullmailer Mail System:/var/spool/nullmailer:/bin/sh
|
||||
freevo:*:523:523::0:0:Freevo User:/var/db/freevo:/bin/sh
|
||||
dkimproxy:*:525:525::0:0:DKIM Proxy Owner:/nonexistent:/usr/sbin/nologin
|
||||
pgbouncer:*:534:534::0:0:Pgbouncer Daemon:/nonexistent:/usr/sbin/nologin
|
||||
redis:*:535:535::0:0:Redis Daemon:/nonexistent:/usr/sbin/nologin
|
||||
|
@ -3,13 +3,15 @@
|
||||
|
||||
PORTNAME= freevo
|
||||
PORTVERSION= 1.9.0
|
||||
PORTREVISION= 9
|
||||
PORTREVISION= 10
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= SF/${PORTNAME}/Freevo%20releases/${PORTVERSION}
|
||||
|
||||
MAINTAINER= fbsd@opal.com
|
||||
COMMENT= Open source digital jukebox
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
RUN_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer \
|
||||
mencoder:${PORTSDIR}/multimedia/mencoder \
|
||||
aumix:${PORTSDIR}/audio/aumix \
|
||||
@ -26,18 +28,15 @@ RUN_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer \
|
||||
|
||||
FREEVO_USER= freevo
|
||||
FREEVO_GROUP= ${FREEVO_USER}
|
||||
FREEVO_UID= 523
|
||||
FREEVO_GID= ${FREEVO_UID}
|
||||
FREEVO_HOME= /var/db/${FREEVO_USER}
|
||||
|
||||
USERS= ${FREEVO_USER}
|
||||
GROUPS= ${FREEVO_GROUP}
|
||||
|
||||
SUB_LIST+= PYTHON_VERSION=${PYTHON_DEFAULT_VERSION} \
|
||||
PORTVERSION=${PORTVERSION} \
|
||||
FREEVO_USER=${FREEVO_USER} \
|
||||
FREEVO_GROUP=${FREEVO_GROUP} \
|
||||
FREEVO_UID=${FREEVO_UID} \
|
||||
FREEVO_GID=${FREEVO_GID} \
|
||||
FREEVO_HOME=${FREEVO_HOME}
|
||||
SUB_FILES= pkg-message pkg-install pkg-deinstall
|
||||
SUB_FILES= pkg-message pkg-deinstall
|
||||
|
||||
USES= twisted:web
|
||||
USE_PYTHON= yes
|
||||
@ -55,8 +54,6 @@ CONFDIR= ${PREFIX}/etc/${PORTNAME}
|
||||
DATADIR= ${PREFIX}/share/${PORTNAME}
|
||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}
|
||||
|
||||
NO_STAGE= yes
|
||||
|
||||
OPTIONS_DEFINE= NLS
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
@ -85,10 +82,9 @@ do-configure:
|
||||
@${DO_NADA}
|
||||
|
||||
post-install:
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
${MKDIR} ${CONFDIR}
|
||||
${CHMOD} a+rx ${CONFDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/local_conf.py.example ${CONFDIR}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
${MKDIR} ${STAGEDIR}${CONFDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/local_conf.py.example ${STAGEDIR}${CONFDIR}
|
||||
${MKDIR} ${STAGEDIR}/var/log/freevo
|
||||
${MKDIR} ${STAGEDIR}/var/run/freevo
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -32,6 +32,9 @@ freevo_dir=`pw usershow ${freevo_user} | awk -F: '{print $9}'`
|
||||
command="%%PREFIX%%/bin/freevo"
|
||||
command_interpreter="%%PREFIX%%/bin/%%PYTHON_VERSION%%"
|
||||
|
||||
# freevo needs PATH set so it can determine python version
|
||||
export PATH=/bin:/usr/bin:%%PREFIX%%/bin:${freevo_dir}/bin
|
||||
|
||||
cd ${freevo_dir}
|
||||
|
||||
msg() {
|
||||
|
@ -1,25 +1,12 @@
|
||||
#!/bin/sh
|
||||
# warn about manually removing user/group/homedir and log/rundirs
|
||||
|
||||
user=%%FREEVO_USER%%
|
||||
group=%%FREEVO_GROUP%%
|
||||
home=%%FREEVO_HOME%%
|
||||
|
||||
if [ "$2" = "POST-DEINSTALL" ]; then
|
||||
if pw usershow "$user" >/dev/null 2>&1; then
|
||||
echo "Warning: if this is a final deinstall, remove user \"$user\" manually"
|
||||
fi
|
||||
if pw groupshow "$group" >/dev/null 2>&1; then
|
||||
echo "Warning: if this is a final deinstall, remove group \"$group\" manually"
|
||||
fi
|
||||
if [ -d "$home" ]; then
|
||||
echo "Warning: if this is a final deinstall, remove directory \"$home\" manually"
|
||||
fi
|
||||
if [ -d "/var/log/freevo" ]; then
|
||||
echo "Warning: if this is a final deinstall, remove directory \"/var/log/freevo\" manually"
|
||||
echo "==> If this is a final deinstall, remove directory \"/var/log/freevo\" manually"
|
||||
fi
|
||||
if [ -d "/var/run/freevo" ]; then
|
||||
echo "Warning: if this is a final deinstall, remove directory \"/var/run/freevo\" manually"
|
||||
echo "==> If this is a final deinstall, remove directory \"/var/run/freevo\" manually"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
# create freevo user/group/homedir and log/rundirs
|
||||
|
||||
user=%%FREEVO_USER%%
|
||||
group=%%FREEVO_GROUP%%
|
||||
uid=%%FREEVO_UID%%
|
||||
gid=%%FREEVO_GID%%
|
||||
home=%%FREEVO_HOME%%
|
||||
|
||||
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
if [ "$2" = "POST-INSTALL" ]; then
|
||||
if pw groupshow "$group" 2>/dev/null; then
|
||||
echo "You already have a group \"$group\", so I will use it."
|
||||
else
|
||||
echo "Creating group \"$group\"..."
|
||||
pw groupadd $group -g $gid || exit 1
|
||||
fi
|
||||
|
||||
if pw usershow "$user" 2>/dev/null; then
|
||||
echo "You already have a user \"$user\", so I will use it."
|
||||
else
|
||||
echo "Creating user \"$user\"..."
|
||||
pw useradd $user -u $uid -g $group -d $home -s /bin/sh \
|
||||
-c "Freevo Owner" || exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$home" ]; then
|
||||
echo "You already have a freevo home directory \"$home\", so I will use it."
|
||||
else
|
||||
echo "Creating freevo home directory \"$home\"..."
|
||||
mkdir -p $home
|
||||
chown $user:$group $home
|
||||
fi
|
||||
|
||||
if [ -d "/var/log/freevo" ]; then
|
||||
echo "You already have a freevo log directory \"/var/log/freevo\", so I will use it."
|
||||
else
|
||||
echo "Creating freevo log directory \"/var/log/freevo\"..."
|
||||
mkdir -p /var/log/freevo
|
||||
chown $user:$group /var/log/freevo
|
||||
fi
|
||||
|
||||
if [ -d "/var/run/freevo" ]; then
|
||||
echo "You already have a freevo log directory \"/var/run/freevo\", so I will use it."
|
||||
else
|
||||
echo "Creating freevo run directory \"/var/run/freevo\"..."
|
||||
mkdir -p /var/run/freevo
|
||||
chown $user:$group /var/run/freevo
|
||||
fi
|
||||
fi
|
@ -2472,3 +2472,11 @@ etc/freevo/local_conf.py.example
|
||||
@dirrm %%DATADIR%%/skins/plugins
|
||||
@dirrm %%DATADIR%%/skins
|
||||
@dirrm %%DATADIR%%
|
||||
@owner freevo
|
||||
@group freevo
|
||||
@unexec rmdir /var/log/freevo 2>/dev/null || true
|
||||
@exec install -d -o freevo -g freevo -m 0755 /var/log/freevo
|
||||
@unexec rmdir /var/run/freevo 2>/dev/null || true
|
||||
@exec install -d -o freevo -g freevo -m 0755 /var/run/freevo
|
||||
@owner
|
||||
@group
|
||||
|
Loading…
Reference in New Issue
Block a user