Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
I would like to see a ebuild for Polipo HTTP Proxy in Portage. It is one of the few HTTP proxies that support IPv6 without extra patches. Currently, I do not think any of the current proxies (including Squid) in Portage support IPv6. Reproducible: Always Steps to Reproduce:
please attempt an ebuild http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1
Created an attachment (id=49911) [edit] Polipo-0.9.8 ebuild
Created an attachment (id=49912) [edit] Makefile patch to use /usr instead of /usr/local as prefix
Created an attachment (id=49913) [edit] Init.d script
Created an attachment (id=49914) [edit] conf.d config file
Ok this is my very first ebuild. Have mercy on me :) I hope it's good enough.
Created an attachment (id=49920) [edit] polipo-0.9.8.ebuild Updated ebuild with spelling and tab fixes etc.
(I'm the upstream author of Polipo.) I'd love to see Polipo in Gentoo. I'd like to add a few comments to the ebuild, though. Please forgive me if what I say is completely off, I'm not familiar with Gentoo. While Polipo runs fine diskless, it is much more useful if given a disk cache. So I guess you'll need to create /var/cache/polipo with the right permissions, and add a cron job that runs ``polipo -x'' at regular intervals. A few minor comments... > LICENSE="GPL-2" No, it's an MIT licence. > KEYWORDS="x86" What does that mean? That it's specific to i386? If so, I'd like to mention that Polipo is running right now on my m68k Mac.
KEYWORDS="x86" means all x86 architectures, 386, 486, pentium and so on. You should put all architectures that Polipo compiles under :) Here is a list: alpha amd64 arm hppa ia64 mips ppc ppc64 ppc-macos s390 sh sparc x86 Yes, perhaps some more check for existing/missing directories such as /var/cache/polipo could be added.
Created an attachment (id=50142) [edit] Updated licence and arch keywords New version with updated licence type and added the use of CFLAGS from make.conf. Also made a simple check for /var/cache/polipo.
Created an attachment (id=50143) [edit] Removed cflags
Created an attachment (id=50144) [edit] polipo-0.9.8.ebuild Fix for a spelling error (CDEBUFGLAGS="")
Created an attachment (id=50272) [edit] Cron file to purge old cache
Created an attachment (id=51027) [edit] polipo-0.9.8.ebuild Updated ebuild which include the cron job.
I don't think conf.d is for normal config files. If polipo could possibly have multiple config files, put it in /etc/polipo/config, otherwise make an /etc/polipo.conf. /etc/conf.d/ are files which are automatically sourced by the corresponding init.d script, as a part of Gentoo's runscript init system. This means that /etc/conf.d/polipo would most likely contain environment variables such as (say) POLIPO_ARGS which would be used by the /etc/init.d/polipo script. Also, since the config file appears to be custom, it's usually a good idea to include documentation in the form of comments in the config file. Portage itself has a make.conf.example which does this, and it ships updates to that rather than make.conf.
It would be easy enough to change /etc/conf.d/polipo to /etc/polipo.conf I do however think that we should have some kind of default values/settings in it as we can't run it from init.d otherwise. Possbily we could do a check in the init.d to see if the polipo.conf is the example or not and refuse to start unless it is changed by the user.
Forgive my ignorance, but why can't it be run without a modified config? One, it won't be running until the user runs the init.d script, anyway. Second, it seems to start up just fine in my tests.
Created an attachment (id=52809) [edit] fixed ebuild that works with FEATURES=sandbox My portage is set up with FEATURES="sandbox ccache fixpackages". This ebuild resulted in sandbox errors. Here's a fixed version. (forthcoming is a fixed polipo-0.9.8.diff.) I also fixed a couple other minor things: * typo in an advisory echo statement: "suid your needs" should read "suit your needs" * /etc/cron.daily/polipo.sh was not executable.
Created an attachment (id=52810) [edit] polipo-0.9.8.diff to solve sandbox errors Patch the Makefile to remove the install-info line. It triggers a sandbox error, and I think we don't want the ebuild to install /usr/info/dir itself, anyway. (Correct me if I'm wrong, I'm not a gentoo developer and am unfamiliar with infodir policy.) Secondarily, this patch contains a suggestion of mine: I think LOCAL_ROOT should begin with $PREFIX, instead of hardcoding /usr. One more policy note: I think gentoo wants info files in /usr/share/info, not in /usr/info/. (Isn't one a symlink to the other?) Perhaps the ebuild should pass in an alternate INFODIR. Anyway, with this and the above ebuild, polipo installs properly on my box.
(From update of attachment 52810 [edit]) >--- polipo-0.9.8/Makefile.orig 2005-03-06 12:54:20.343243757 -0800 >+++ polipo-0.9.8/Makefile 2005-03-06 12:54:32.539630406 -0800 >@@ -2,7 +2,7 @@ > BINDIR = $(PREFIX)/bin > MANDIR = $(PREFIX)/man > INFODIR = $(PREFIX)/info >-LOCAL_ROOT = /usr/share/polipo/www >+LOCAL_ROOT = $(PREFIX)/share/polipo/www > DISK_CACHE_ROOT = /var/cache/polipo > > # CDEBUGFLAGS = -O >@@ -84,7 +84,7 @@ > mkdir -p $(TARGET)$(INFODIR) > cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1 > cp polipo.info $(TARGET)$(INFODIR)/ >- install-info --info-dir=$(INFODIR) polipo.info >+# install-info --info-dir=$(INFODIR) polipo.info > > > polipo.info: polipo.texi
Created an attachment (id=52814) [edit] polipo-0.9.8.diff to solve sandbox errors (try 2) Sorry, I'm an idiot. It should read $(PREFIX)/share/polipo, not $(PREFIX)/usr/share/polipo.
@Juliusz Chroboczek: ~x86 means it is untested on x86 arch. for adding other arches to keywords, this ebuild must be tested on them first. is this program still available? I tried to download it but I receive "forbidden" error.
We've just switched to Apache 2, and it looks like mod_autoindex isn't enabled. I've created a static index for now, I'll try to track down our sysadmin. Sorry for the trouble.
I've submitted an ebuild for this package. it will run under a newly created user named polipo. FYI: conf.d is not the place for program configs. it should only set variables used in init.d script