diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-07-01 13:22:34 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-07-01 13:23:11 -0400 |
commit | 6761e0a48b09d1f88f81dbf620e14676404784cc (patch) | |
tree | a4306494ffb8db92e0484676feb92c4361f2ba8e /www-servers/monkeyd | |
parent | www-servers/monkeyd: remove older unstable version (diff) | |
download | gentoo-6761e0a48b09d1f88f81dbf620e14676404784cc.tar.gz gentoo-6761e0a48b09d1f88f81dbf620e14676404784cc.tar.bz2 gentoo-6761e0a48b09d1f88f81dbf620e14676404784cc.zip |
www-servers/monkeyd: add monkeyd user, fix pidfile and address bug #459274
Package-Manager: portage-2.2.28
Diffstat (limited to 'www-servers/monkeyd')
-rw-r--r-- | www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch | 12 | ||||
-rw-r--r-- | www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild (renamed from www-servers/monkeyd/monkeyd-1.6.9.ebuild) | 20 | ||||
-rw-r--r-- | www-servers/monkeyd/monkeyd-9999.ebuild | 20 |
3 files changed, 44 insertions, 8 deletions
diff --git a/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch b/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch new file mode 100644 index 000000000000..82550aef4d09 --- /dev/null +++ b/www-servers/monkeyd/files/monkeyd-1.6.9-fix-pidfile.patch @@ -0,0 +1,12 @@ +diff -Naur monkey-1.6.9.orig/CMakeLists.txt monkey-1.6.9/CMakeLists.txt +--- monkey-1.6.9.orig/CMakeLists.txt 2016-06-04 19:16:47.000000000 -0400 ++++ monkey-1.6.9/CMakeLists.txt 2016-07-01 13:08:51.237213196 -0400 +@@ -285,7 +285,7 @@ + + # Custom PIDPATH + if(NOT PID_PATH) +- set(MK_PATH_PIDPATH ${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/ CACHE STRING "Server PID path") ++ set(MK_PATH_PIDPATH /run/ CACHE STRING "Server PID path") + else() + set(MK_PATH_PIDPATH ${PID_PATH} CACHE STRING "Server PID path") + endif() diff --git a/www-servers/monkeyd/monkeyd-1.6.9.ebuild b/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild index 3221de52fda3..86b01b6a5748 100644 --- a/www-servers/monkeyd/monkeyd-1.6.9.ebuild +++ b/www-servers/monkeyd/monkeyd-1.6.9-r1.ebuild @@ -4,7 +4,7 @@ EAPI="5" -inherit eutils flag-o-matic toolchain-funcs multilib +inherit eutils flag-o-matic toolchain-funcs user multilib DESCRIPTION="A small, fast, and scalable web server" HOMEPAGE="http://www.monkey-project.com/" @@ -46,6 +46,11 @@ S="${WORKDIR}/${MY_P}" WEBROOT="/var/www/localhost" +pkg_preinst() { + enewgroup monkeyd + enewuser monkeyd -1 -1 /var/tmp/monkeyd monkeyd +} + pkg_setup() { if use debug; then ewarn @@ -59,6 +64,7 @@ pkg_setup() { src_prepare() { # Unconditionally get rid of the bundled jemalloc rm -rf "${S}"/deps + epatch "${FILESDIR}"/${PN}-1.6.9-fix-pidfile.patch epatch "${FILESDIR}"/${PN}-1.6.8-system-mbedtls.patch } @@ -106,13 +112,13 @@ src_configure() { ./configure \ --pthread-tls \ --prefix=/usr \ + --default-user=monkeyd \ --sbindir=/usr/sbin \ --webroot=${WEBROOT}/htdocs \ - --logdir=/var/log/${PN} \ + --logdir=/var/log/monkeyd \ --mandir=/usr/share/man \ --libdir=/usr/$(get_libdir) \ - --pidfile=/run/monkey.pid \ - --sysconfdir=/etc/${PN} \ + --sysconfdir=/etc/monkeyd \ ${myconf} \ || die } @@ -133,9 +139,15 @@ src_install() { "${D}"/usr/share/doc/"${PF}"/htdocs.dist || die keepdir \ + /var/tmp/monkeyd \ /var/log/monkeyd \ ${WEBROOT}/htdocs # This needs to be created at runtime rm -rf "${D}"/run } + +pkg_postinst() { + chown monkeyd:monkeyd /var/{log,tmp}/monkeyd + chmod 770 /var/{log,tmp}/monkeyd +} diff --git a/www-servers/monkeyd/monkeyd-9999.ebuild b/www-servers/monkeyd/monkeyd-9999.ebuild index 3221de52fda3..86b01b6a5748 100644 --- a/www-servers/monkeyd/monkeyd-9999.ebuild +++ b/www-servers/monkeyd/monkeyd-9999.ebuild @@ -4,7 +4,7 @@ EAPI="5" -inherit eutils flag-o-matic toolchain-funcs multilib +inherit eutils flag-o-matic toolchain-funcs user multilib DESCRIPTION="A small, fast, and scalable web server" HOMEPAGE="http://www.monkey-project.com/" @@ -46,6 +46,11 @@ S="${WORKDIR}/${MY_P}" WEBROOT="/var/www/localhost" +pkg_preinst() { + enewgroup monkeyd + enewuser monkeyd -1 -1 /var/tmp/monkeyd monkeyd +} + pkg_setup() { if use debug; then ewarn @@ -59,6 +64,7 @@ pkg_setup() { src_prepare() { # Unconditionally get rid of the bundled jemalloc rm -rf "${S}"/deps + epatch "${FILESDIR}"/${PN}-1.6.9-fix-pidfile.patch epatch "${FILESDIR}"/${PN}-1.6.8-system-mbedtls.patch } @@ -106,13 +112,13 @@ src_configure() { ./configure \ --pthread-tls \ --prefix=/usr \ + --default-user=monkeyd \ --sbindir=/usr/sbin \ --webroot=${WEBROOT}/htdocs \ - --logdir=/var/log/${PN} \ + --logdir=/var/log/monkeyd \ --mandir=/usr/share/man \ --libdir=/usr/$(get_libdir) \ - --pidfile=/run/monkey.pid \ - --sysconfdir=/etc/${PN} \ + --sysconfdir=/etc/monkeyd \ ${myconf} \ || die } @@ -133,9 +139,15 @@ src_install() { "${D}"/usr/share/doc/"${PF}"/htdocs.dist || die keepdir \ + /var/tmp/monkeyd \ /var/log/monkeyd \ ${WEBROOT}/htdocs # This needs to be created at runtime rm -rf "${D}"/run } + +pkg_postinst() { + chown monkeyd:monkeyd /var/{log,tmp}/monkeyd + chmod 770 /var/{log,tmp}/monkeyd +} |