tinyproxy: patch-comments added. truckle: slot-deps changed. swipl: old env removed.

This commit is contained in:
Denis Knauf 2013-03-16 22:01:53 +01:00
commit 522aad5ad3
9 changed files with 72 additions and 49 deletions

View file

@ -0,0 +1,15 @@
Systemd wants all pidfiles in /run. This patch will patch the config-file,
so systemd gets his pid-file at the right place.
--- a/etc/tinyproxy.conf.in 2010-03-03 10:37:24.000000000 +0100
+++ b/etc/tinyproxy.conf.in 2013-03-09 15:34:41.072135782 +0100
@@ -123,7 +123,11 @@
# can be used for signalling purposes.
#
#PidFile "@localstatedir@/run/tinyproxy/tinyproxy.pid"
+#
+# systemd wants all pidfiles in /run.
+# Do not change the following line:
+PidFile "/run/tinyproxy/tinyproxy.pid"
#
# XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which

View file

@ -0,0 +1,14 @@
tinyproxy will run as user tinyproxy, not nobody.
--- a/etc/tinyproxy.conf.in 2010-03-03 10:37:24.000000000 +0100
+++ b/etc/tinyproxy.conf.in 2013-03-09 15:34:41.072135782 +0100
@@ -12,8 +12,8 @@
# as the root user. Either the user or group name or the UID or GID
# number may be used.
#
-User nobody
-Group nobody
+User tinyproxy
+Group tinyproxy
#
# Port: Specify the port which tinyproxy will listen on. Please note

View file

@ -10,9 +10,9 @@ SLOT="0"
LICENCES="GPL-2"
PLATFORMS="~amd64 ~x86"
DEPENDENCIES="
group/tinyproxy
user/tinyproxy
app-doc/asciidoc
app-doc/asciidoc
group/tinyproxy
user/tinyproxy
"
# PID-file will be created in /var/run, but /var/run is a link to /run.
# in future, tinyproxy needs an other config, that it uses /run.
@ -21,33 +21,20 @@ DEFAULT_SRC_CONFIGURE_PARAMS="--localstatedir=/var"
MYOPTIONS="systemd"
src_prepare() {
c="etc/tinyproxy.conf.in"
b="${c}.bk"
if option systemd
then
sed -e 's,^#PidFile.*,&\
#\
# systemd wants all pidfiles in /run.\
# Do not change the following line:\
PidFile "/run/tinyproxy/tinyproxy.pid",'
else
cat
fi < "${c}" > "${b}"
sed \
-e 's/^User nobody/User tinyproxy/' \
-e 's/^Group nobody/Group tinyproxy/' \
< "${b}" > "${c}"
option systemd && expatch "${FILES}/systemd.patch"
expatch "${FILES}/user.patch"
}
src_install() {
default
keepdir /var/log/tinyproxy
if option systemd
then
install_systemd_files
insinto /usr/${LIBDIR}/tmpfiles.d
hereins tinyproxy.conf <<EOF
default
keepdir /var/log/tinyproxy
if option systemd
then
install_systemd_files
insinto /usr/${LIBDIR}/tmpfiles.d
hereins tinyproxy.conf <<EOF
d /run/tinyproxy 0770 tinyproxy tinyproxy
EOF
fi
fi
}