Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31558 - net-www/publicfile ebuild enhancements
Summary: net-www/publicfile ebuild enhancements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2003-10-19 18:16 UTC by adam morley
Modified: 2004-08-28 06:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
publicfile ebuild (publicfile-0.52-r1.ebuild,1.91 KB, text/plain)
2003-10-19 18:16 UTC, adam morley
Details
Manifest --- didn't know if you needed it (Manifest,141 bytes, text/plain)
2003-10-19 18:17 UTC, adam morley
Details
publicfile -r1 digest (digest-publicfile-0.52-r1,273 bytes, text/plain)
2003-10-19 18:17 UTC, adam morley
Details
New version of ebuild (see comment #8) (publicfile-0.52-r1.ebuild,1.65 KB, text/plain)
2003-10-21 12:26 UTC, adam morley
Details
New manifest (see comment #8) (Manifest,141 bytes, text/plain)
2003-10-21 12:27 UTC, adam morley
Details
digest file (see comment #8) (digest-publicfile-0.52-r1,193 bytes, text/plain)
2003-10-21 12:32 UTC, adam morley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adam morley 2003-10-19 18:16:06 UTC
Hi,

I use publicfile, and I liked a few patches I saw at www.publicfile.org, so I added them to an ebuild and made a diff that can be added to portage.  This is my first ebuild modification, so I don't really know if I'm doing this right.  I also reformatted the ebuild so it looked like the qmail and djbdns ebuilds since I basically used them to figure out what to put where.

Thanks!



--- /usr/portage/net-www/publicfile/publicfile-0.52.ebuild      2003-09-05 22:13:26.000000000 -0400
+++ publicfile-0.52-r1.ebuild   2003-10-19 21:02:46.000000000 -0400
@@ -2,19 +2,35 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /home/cvsroot/gentoo-x86/net-www/publicfile/publicfile-0.52.ebuild,v 1.12 2003/09/06 01:54:09 msterret Exp $
 
-S=${WORKDIR}/${P}
+inherit eutils
+
 DESCRIPTION="publish files through FTP and HTTP"
-SRC_URI="http://cr.yp.to/publicfile/${P}.tar.gz"
 HOMEPAGE="http://cr.yp.to/publicfile.html"
-KEYWORDS="x86 ppc sparc "
+SRC_URI="http://cr.yp.to/publicfile/publicfile-0.52.tar.gz
+       http://www.ohse.de/uwe/patches/publicfile-0.52-filetype-diff
+       http://www.episec.com/people/edelkind/patches/publicfile/publicfile-0.52+errors+redirect.patch
+       http://www.publicfile.org/ftp-ls-patch"
 SLOT="0"
-
 LICENSE="as-is"
+KEYWORDS="x86 ppc sparc "
 
 RDEPEND=">=sys-apps/daemontools-0.70
        >=sys-apps/ucspi-tcp-0.83"
 
-src_compile() {
+src_unpack() {
+       unpack publicfile-0.52.tar.gz
+
+       # patch to support variable error pages (html) -- more descriptive
+       cd ${WORKDIR}
+       epatch ${DISTDIR}/publicfile-0.52+errors+redirect.patch
+
+       # patch to support filetypes in env using daemontools
+       cd ${S}
+       epatch ${DISTDIR}/publicfile-0.52-filetype-diff
+
+       # patch to make listing look "normal" -- whatever that means
+       epatch ${DISTDIR}/ftp-ls-patch
+
        echo "gcc ${CFLAGS}" > conf-cc
        echo "gcc" > conf-ld
        echo "/usr" > conf-home
@@ -22,7 +38,10 @@
        # fix for glibc-2.3.2 errno issue
        mv error.h error.h.orig
        sed -e 's|extern int errno;|#include <errno.h>|' <error.h.orig >error.h
+       
+}
 
+src_compile() {
        emake || die "emake failed"
 }

$ cat Manifest                       
MD5 02c861fe053d8ba05469423eb557c7ea publicfile-0.52-r1.ebuild 1951
MD5 5ce6dbcd9e7603e8421c8bb2182382aa files/digest-publicfile-0.52-r1 273

$ cat files/digest-publicfile-0.52-r1 
MD5 e493d69627b4fb2c7c764c0ff34330d7 publicfile-0.52.tar.gz 34892
MD5 6c4dc7f29f2b9961819f3226bd67840e publicfile-0.52-filetype-diff 1101
MD5 ce29f4efe2f5340fb9f0981f24d99f9b publicfile-0.52+errors+redirect.patch 5944
MD5 1f26e232f6d1f99268de2bdf6bd64910 ftp-ls-patch 3280
Comment 1 adam morley 2003-10-19 18:16:59 UTC
Created attachment 19501 [details]
publicfile ebuild

Added as a patch, I couldn't do it on the bug submission page.
Comment 2 adam morley 2003-10-19 18:17:29 UTC
Created attachment 19502 [details]
Manifest --- didn't know if you needed it
Comment 3 adam morley 2003-10-19 18:17:56 UTC
Created attachment 19503 [details]
publicfile -r1 digest
Comment 4 adam morley 2003-10-20 01:49:58 UTC
Hi,

In the event publicfile is unmerged and re-emerged later, the permissions
on the log files will not match.  I see two potential solutions for this:

1.  Add a warning (saying something like "change permissions on log files"
2.  do the permission change in the ebuild, if the files exist.
3.  allocate a global user (ftplog) so that logging files have the right
permissions even if publicfile is unmerged and later re-emerged.

I'd prefer 3, but I understand if that isn't possible.  Thanks!
Comment 5 adam morley 2003-10-21 12:26:27 UTC
Created attachment 19597 [details]
New version of ebuild (see comment #8)
Comment 6 adam morley 2003-10-21 12:27:01 UTC
Created attachment 19598 [details]
New manifest (see comment #8)
Comment 7 adam morley 2003-10-21 12:32:22 UTC
Created attachment 19599 [details]
digest file (see comment #8)
Comment 8 adam morley 2003-10-21 12:34:20 UTC
Hi,

I've updated the ebuild because I found that the error redirect patch and
the ftp-ls patch conflict when running LIST on directories and I don't want
to take the time to fix it now.  So I've deleted the redirect patch from
the ebuild.

I also deleted the postrm section to solve #4, so that ftplog will always
exist in case of a re-emerge after unmerge.  I still think user creation
should be global, not in the ebuild, but I might not know the whole story.

Furthermore, I marked the ebuild as unstable on x86 (~x86), and removed the
other architectures since I didn't test on them.

thanks.
Comment 9 adam morley 2003-11-05 11:45:25 UTC
Hi,

Do I need to do anything to get this put into portage?  Or will it not be
put into portage until its made to fit into the new webapps.eclass?

thanks,
adam
Comment 10 Martin Holzer (RETIRED) gentoo-dev 2003-12-30 07:06:29 UTC
in cvs
Comment 11 Sascha Silbe 2004-08-28 06:42:35 UTC
Could you please add a local use flag for the ftp-ls patch? I'd like the original EPLF output instead.