summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2013-06-06 17:47:27 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2013-06-06 17:47:27 +0000
commitad16de9d3deef70f3c97d34672f4235cfd4abbab (patch)
treeb6dd6940a4ac898c51f7321486fc80b942380868 /www-servers/publicfile
parentdistutils{,-r1}_pkg_postinst does not exist. (diff)
downloadgentoo-2-ad16de9d3deef70f3c97d34672f4235cfd4abbab.tar.gz
gentoo-2-ad16de9d3deef70f3c97d34672f4235cfd4abbab.tar.bz2
gentoo-2-ad16de9d3deef70f3c97d34672f4235cfd4abbab.zip
Bug #471398: nofiles group should be GID 200.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'www-servers/publicfile')
-rw-r--r--www-servers/publicfile/ChangeLog7
-rw-r--r--www-servers/publicfile/publicfile-0.52-r4.ebuild91
2 files changed, 97 insertions, 1 deletions
diff --git a/www-servers/publicfile/ChangeLog b/www-servers/publicfile/ChangeLog
index d32617c79fcb..d3598099619e 100644
--- a/www-servers/publicfile/ChangeLog
+++ b/www-servers/publicfile/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for www-servers/publicfile
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/publicfile/ChangeLog,v 1.26 2013/01/01 22:27:39 hasufell Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/publicfile/ChangeLog,v 1.27 2013/06/06 17:47:27 robbat2 Exp $
+
+*publicfile-0.52-r4 (06 Jun 2013)
+
+ 06 Jun 2013; Robin H. Johnson <robbat2@gentoo.org> +publicfile-0.52-r4.ebuild:
+ Bug #471398: nofiles group should be GID 200.
01 Jan 2013; Julian Ospald <hasufell@gentoo.org> publicfile-0.52-r3.ebuild,
+files/publicfile-0.52-build.patch:
diff --git a/www-servers/publicfile/publicfile-0.52-r4.ebuild b/www-servers/publicfile/publicfile-0.52-r4.ebuild
new file mode 100644
index 000000000000..ce6cd6cfdb4e
--- /dev/null
+++ b/www-servers/publicfile/publicfile-0.52-r4.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/publicfile/publicfile-0.52-r4.ebuild,v 1.1 2013/06/06 17:47:27 robbat2 Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="publish files through FTP and HTTP"
+HOMEPAGE="http://cr.yp.to/publicfile.html"
+SRC_URI="http://cr.yp.to/publicfile/${P}.tar.gz
+ http://www.ohse.de/uwe/patches/${P}-filetype-diff
+ http://www.publicfile.org/ftp-ls-patch"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="selinux vanilla"
+RESTRICT="mirror bindist test"
+
+RDEPEND="virtual/daemontools
+ >=sys-apps/ucspi-tcp-0.83
+ selinux? ( sec-policy/selinux-publicfile )
+ !net-ftp/netkit-ftpd"
+
+src_prepare() {
+ # verbose build log
+ epatch "${FILESDIR}"/${P}-build.patch
+
+ # filetypes in env using daemontools
+ use vanilla || epatch "${DISTDIR}"/${P}-filetype-diff
+
+ # "normal" ftp listing
+ use vanilla || epatch "${DISTDIR}"/ftp-ls-patch
+
+ # fix for glibc-2.3.2 errno issue
+ sed -i -e 's|extern int errno;|#include <errno.h>|' error.h
+
+ # fix file collision
+ sed -i configure.c \
+ -e 's|/bin/httpd|/bin/publicfile-httpd|' \
+ -e 's|/bin/ftpd|/bin/publicfile-ftpd|' \
+ || die "sed file collision failed"
+}
+
+src_configure() {
+ tc-export AR RANLIB
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+ echo "/usr" > conf-home
+}
+
+src_install() {
+ exeinto /usr/bin
+ newexe ftpd publicfile-ftpd
+ newexe httpd publicfile-httpd
+ newexe configure publicfile-conf
+ dodoc CHANGES README TODO
+}
+
+pkg_preinst() {
+ # nofiles should be GID=200 to match djbdns, qmail, fnord, publicfile
+ nofiles_gid=$(getent group nofiles |cut -d: -f3)
+ if [[ -n $nofiles_gid ]] && [[ $nofiles_gid -ne 200 ]]; then
+ ewarn "Your nofiles group has the wrong GID due to an "
+ ewarn "ebuild bug. Fixing now..."
+ groupmod -g 200 nofiles
+ usermod -g nofiles ftp
+ usermod -g nofiles ftplog
+ fi
+ enewgroup nofiles 200
+ enewuser ftp -1 -1 /home/public nofiles
+ enewuser ftplog -1 -1 /home/public nofiles
+}
+
+pkg_postinst() {
+ if [ ! -d /home/public/httpd ]; then
+ einfo "Setting up server root in /home/public"
+ if [ -d /home/public ]; then
+ backupdir=public.old-$(date +%s)
+ einfo "Serverroot exists... backing up to ${backupdir}"
+ mv /home/public /home/${backupdir}
+ fi
+ /usr/bin/publicfile-conf ftp ftplog /home/public `hostname`
+ fi
+ echo
+ einfo "publichtml-httpd and public-html ftpd are serving out"
+ einfo "of /home/public. Remember to start the servers with:"
+ einfo " ln -s /home/public/public-httpd /home/public/public-ftpd /service"
+ echo
+}