summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/gerbera')
-rw-r--r--net-misc/gerbera/files/gerbera-1.0.0.confd13
-rw-r--r--net-misc/gerbera/files/gerbera-1.0.0.initd45
-rw-r--r--net-misc/gerbera/files/gerbera.tmpfiles1
-rw-r--r--net-misc/gerbera/gerbera-1.0.0-r2.ebuild (renamed from net-misc/gerbera/gerbera-1.0.0-r1.ebuild)11
-rw-r--r--net-misc/gerbera/gerbera-9999.ebuild11
5 files changed, 27 insertions, 54 deletions
diff --git a/net-misc/gerbera/files/gerbera-1.0.0.confd b/net-misc/gerbera/files/gerbera-1.0.0.confd
index 4c4a44220351..3f4bdf16a75f 100644
--- a/net-misc/gerbera/files/gerbera-1.0.0.confd
+++ b/net-misc/gerbera/files/gerbera-1.0.0.confd
@@ -6,14 +6,6 @@
# NOTE: The minimum value allowed is 49152
GERBERA_PORT=49152
-# Run Gerbera as this user.
-# NOTE: For security reasons do not run Gerbera as root.
-GERBERA_USER="gerbera"
-
-# Run Gerbera as this group.
-# NOTE: For security reasons do not run Gerbera as root.
-GERBERA_GROUP="gerbera"
-
# Path to Gerbera config file.
GERBERA_CONFIG="/etc/gerbera/config.xml"
@@ -21,5 +13,8 @@ GERBERA_CONFIG="/etc/gerbera/config.xml"
GERBERA_LOGFILE="/var/log/gerbera.log"
# Other options you want to pass to Gerbera.
-# Add "--interface ${GERBERA_INTERFACE}" to bind to a named interface.
+# Add "--interface eth0" to bind to a named interface.
GERBERA_OPTIONS=""
+
+# Uncomment if you are running Gerbera against a local MySQL
+# rc_need="mysql"
diff --git a/net-misc/gerbera/files/gerbera-1.0.0.initd b/net-misc/gerbera/files/gerbera-1.0.0.initd
index faee5e3c56cc..758b0c8101e8 100644
--- a/net-misc/gerbera/files/gerbera-1.0.0.initd
+++ b/net-misc/gerbera/files/gerbera-1.0.0.initd
@@ -2,38 +2,23 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+command="/usr/bin/gerbera"
+command_args="--logfile ${GERBERA_LOGFILE}
+ --config ${GERBERA_CONFIG}
+ --port ${GERBERA_PORT}
+ ${GERBERA_OPTIONS}"
+command_user="gerbera:gerbera"
+command_background=true
+start_stop_daemon_args="--wait 500"
+retry="10"
+pidfile="/run/${RC_SVCNAME}.pid"
+
depend() {
need net
- # In order to properly support this (need vs use), we would have to
- # parse ${GERBERA_CONFIG} and see if mysql is enabled and if it is
- # pointing to the local system. #368409
- use mysql
-}
-
-start() {
- ebegin "Starting Gerbera"
-
- checkpath --directory --owner "${GERBERA_USER}:${GERBERA_GROUP}" --mode 0755 /run/gerbera
- checkpath --file --owner "${GERBERA_USER}:${GERBERA_GROUP}" --mode 0644 "${GERBERA_LOGFILE}"
-
- start-stop-daemon \
- --start \
- --exec /usr/bin/gerbera \
- --user ${GERBERA_USER} \
- --group ${GERBERA_GROUP} \
- --background \
- --wait 500 \
- -- \
- --pidfile /run/gerbera/gerbera.pid \
- --logfile ${GERBERA_LOGFILE} \
- --config ${GERBERA_CONFIG} \
- --port ${GERBERA_PORT} \
- ${GERBERA_OPTIONS}
- eend $?
}
-stop () {
- ebegin "Stopping Gerbera"
- start-stop-daemon --stop --retry 10 --quiet --pidfile /run/gerbera/gerbera.pid
- eend $?
+start_pre() {
+ checkpath --owner "gerbera:gerbera" \
+ --mode 0644 \
+ --file "${GERBERA_LOGFILE}"
}
diff --git a/net-misc/gerbera/files/gerbera.tmpfiles b/net-misc/gerbera/files/gerbera.tmpfiles
deleted file mode 100644
index fcc9b5de4908..000000000000
--- a/net-misc/gerbera/files/gerbera.tmpfiles
+++ /dev/null
@@ -1 +0,0 @@
-d /run/gerbera 0755 gerbera gerbera - \ No newline at end of file
diff --git a/net-misc/gerbera/gerbera-1.0.0-r1.ebuild b/net-misc/gerbera/gerbera-1.0.0-r2.ebuild
index 2d2a5ecf2c14..98b91521521e 100644
--- a/net-misc/gerbera/gerbera-1.0.0-r1.ebuild
+++ b/net-misc/gerbera/gerbera-1.0.0-r2.ebuild
@@ -6,12 +6,12 @@ EAPI=6
inherit cmake-utils eutils linux-info systemd tmpfiles user
if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/v00d00/${PN}.git"
+ EGIT_REPO_URI="https://github.com/gerbera/${PN}.git"
KEYWORDS=""
SRC_URI=""
inherit git-r3
else
- SRC_URI="https://github.com/v00d00/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/gerbera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${P}"
fi
@@ -78,18 +78,15 @@ src_install() {
use mysql && systemd_dounit "${S}/scripts/systemd/${PN}-mysql.service"
newinitd "${FILESDIR}/${PN}-1.0.0.initd" "${PN}"
- use mysql || sed -i -e "/use mysql/d" "${ED}/etc/init.d/${PN}"
newconfd "${FILESDIR}/${PN}-1.0.0.confd" "${PN}"
insinto /etc/${PN}
newins "${FILESDIR}/${PN}-1.0.0.config" config.xml
- fperms 0600 /etc/${PN}/config.xml
- fowners gerbera:gerbera /etc/${PN}/config.xml
+ fperms 0640 /etc/${PN}/config.xml
+ fowners root:gerbera /etc/${PN}/config.xml
keepdir /var/lib/${PN}
fowners ${PN}:${PN} /var/lib/${PN}
-
- newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
}
pkg_postinst() {
diff --git a/net-misc/gerbera/gerbera-9999.ebuild b/net-misc/gerbera/gerbera-9999.ebuild
index 2d2a5ecf2c14..98b91521521e 100644
--- a/net-misc/gerbera/gerbera-9999.ebuild
+++ b/net-misc/gerbera/gerbera-9999.ebuild
@@ -6,12 +6,12 @@ EAPI=6
inherit cmake-utils eutils linux-info systemd tmpfiles user
if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/v00d00/${PN}.git"
+ EGIT_REPO_URI="https://github.com/gerbera/${PN}.git"
KEYWORDS=""
SRC_URI=""
inherit git-r3
else
- SRC_URI="https://github.com/v00d00/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/gerbera/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${P}"
fi
@@ -78,18 +78,15 @@ src_install() {
use mysql && systemd_dounit "${S}/scripts/systemd/${PN}-mysql.service"
newinitd "${FILESDIR}/${PN}-1.0.0.initd" "${PN}"
- use mysql || sed -i -e "/use mysql/d" "${ED}/etc/init.d/${PN}"
newconfd "${FILESDIR}/${PN}-1.0.0.confd" "${PN}"
insinto /etc/${PN}
newins "${FILESDIR}/${PN}-1.0.0.config" config.xml
- fperms 0600 /etc/${PN}/config.xml
- fowners gerbera:gerbera /etc/${PN}/config.xml
+ fperms 0640 /etc/${PN}/config.xml
+ fowners root:gerbera /etc/${PN}/config.xml
keepdir /var/lib/${PN}
fowners ${PN}:${PN} /var/lib/${PN}
-
- newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
}
pkg_postinst() {