included is publicfile.tar.gz which is an ebuild of DJB's publicfile http and ftp daemon. it is completely described at the url provided. we may want to provide a virtual/httpd and virtual/ftpd sometime to avoid possible port collisions.
Created attachment 713 [details] publicfile.tgz
# # S=${WORKDIR}/${P} DESCRIPTION="publish files through FTP and HTTP" SRC_URI="http://cr.yp.to/publicfile/${P}.tar.gz" HOMEPAGE="http://cr.yp.to/publicfile.html" RDEPEND=">=sys-apps/daemontools-0.70 >=sys-apps/ucspi-tcp-0.83" src_compile() { echo "gcc ${CFLAGS}" > conf-cc echo "gcc" > conf-ld echo "/usr/local/publicfile" > conf-home emake || die "emake failed" } src_install() { into /usr/local dobin ftpd httpd into /usr/local/publicfile dobin configure dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION }
I'll take this one.
Thanks for the submission. Could you please update the ebuild the following way: 1. It should install under /usr (it is not Gentoo's policy to install anything under /usr/local). 2. If you meant /usr/local/publicfile as a place where publicfile will keep the served files and stuff, perhaps it would be a better idea to use /home/publicfile instead, the way Gentoo's apache does it. If not, then what was that directory for? 3. It would be nice to include a startup script.
Arcady~ 1. I installed it in /usr/local to comply with DJBs distribution restrictions and online usage instructions (stated here: http://cr.yp.to/publicfile/install.html). He basically wants a consistent user experience across all platforms while adhering to the current documentation on his site. 2. /usr/local/publicfile is meant to adhere to that stated in 1 and to give a namespace to the 'configure' program in this directory. 3. /usr/local/publicfile/configure creates both the serving directory and startup scripts (it's svscan based). Doing this at buildtime would be bad iff apache, ftpd, or another httpd/ftpd server is running. svscan will spin and hog the processor trying to start up these services when the ports are already bound. This is why I mentioned perhaps providing a virtual/httpd and virtual/ftpd to give warning to the user(?). I wanted to voice these concerns before changing anything. Suggestions? Please have a read of http://cr.yp.to/distributors.html for DJBs distribution restrictions. tag,jakd
Just to play a bit of devils advocate re DJB's distribution policy. Gentoo is only mirroring the source -- this is allowed Gentoo is not distributing pre-compiled binaries (as such) In relation to: "installing your package produces exactly the same files, in exactly the same locations, that a user would obtain by installing one of my packages listed above" What is stopping an end user of the packages manually modifying the configure process to install the components where they want them to go -- not where DJB wants them (it's my system, not his!)? I guess what it comes down to is that gentoo is not distributing modified versions of DJB's source, or precompiled binaries (the end user does that!) -- they are simply providing a convenient method to install that application on their system.
*** Bug 2314 has been marked as a duplicate of this bug. ***
Thilo: since you seem to be our DJBware specialist, would you like to deal with thius one? Feel free to punt it back to me if you don't have the time. [reassigning to bangert]
good point. here's an updated ebuild: # # S=${WORKDIR}/${P} DESCRIPTION="publish files through FTP and HTTP" SRC_URI="http://cr.yp.to/publicfile/${P}.tar.gz" HOMEPAGE="http://cr.yp.to/publicfile.html" RDEPEND=">=sys-apps/daemontools-0.70 >=sys-apps/ucspi-tcp-0.83" src_compile() { echo "gcc ${CFLAGS}" > conf-cc echo "gcc" > conf-ld echo "/usr" > conf-home emake || die "emake failed" } src_install() { exeinto /usr/bin doexe ftpd httpd newexe configure publicfile-conf dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION } pkg_setup() { groupadd nofiles id ftp || useradd -g nofiles -d /public ftp id ftplog || useradd -g nofiles -d /public ftplog } pkg_postinst() { /usr/bin/publicfile-conf ftp ftplog /public `hostname` echo echo -e "\e[32;01m httpd and ftpd are serving out of /public.\033[0m" echo -e "\e[32;01m remember to start the servers with:\033[0m" echo -e "\e[32;01m ln -s /public/httpd /public/ftpd /service\033[0m" echo } pkg_postrm() { userdel ftplog }
is committed! i changed /public to /home/public and added a LICENSE (as-is for now) its in net-www thanks for the contribution regards Thilo
excellent. one fix: we need to change the postinst description to read "serving out of /home/public" instead of "serving out of /public". also, the soft link description needs to be updated to: "ln -s /home/public/httpd /home/public/ftpd /service". thanks!