View previous topic :: View next topic |
Author |
Message |
Miles Tux's lil' helper
Joined: 23 Jun 2002 Posts: 97 Location: London, UK
|
Posted: Sun Jun 23, 2002 6:23 pm Post subject: Privoxy ebuild script |
|
|
I've written an ebuild script for Privoxy (http://www.privoxy.org) and the necessary patch files.
It works on my system but I'd like to have others test it out. You can download it at:
http://www.milesbarr.com/privoxy.tar.gz
Then untar it into /usr/portage.
I've hard-wired the location of the config directory (/etc/portage) and the log directory (/var/log/portage) into the scripts and patch files to automate the process. Is this a fairly standard thing to do? |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sun Jun 23, 2002 10:22 pm Post subject: Re: Privoxy ebuild script |
|
|
Miles wrote: | I've hard-wired the location of the config directory (/etc/portage) and the log directory (/var/log/portage) into the scripts and patch files to automate the process. Is this a fairly standard thing to do? |
Well, considering I have neither an /etc/portage directory nor a /var/log/portage directory on any of my gentoo machines (3), I'd say no.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Miles Tux's lil' helper
Joined: 23 Jun 2002 Posts: 97 Location: London, UK
|
Posted: Mon Jun 24, 2002 12:05 am Post subject: |
|
|
Oops
As you've probably guessed I meant to say /etc/privoxy and /var/log/privoxy
The install for privoxy doesn't create the log directory by default and the config file doesn't point to the right place. So I've altered them so it will run after emerge. Is that good or bad? i.e. is it normal to expect some one to alter the config file before a server works or should it include sensible defaults? |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Mon Jun 24, 2002 12:09 am Post subject: |
|
|
Hmm...good question. Regarding logging, I'd say expecting everything to automatically go to /var/log/privoxy is not an ideal solution. An ideal solution would be to allow the user to set their own preferences via either metalog.conf or syslog.conf. Of course, I have no idea how hard that is to incorporate into an ebuild.
As for expecting users to alter config files, I'd say most daemons come with a config file containing sensible (but security-paranoid) defaults. sshd, exim, syslog, etc. all have basic, usable config files. Honestly, I'm not all that familiar with privoxy, so I can't offer a specific opinion there, unfortunately.
The above is just my $.02. I'd be curious to know if others have different opinions.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Miles Tux's lil' helper
Joined: 23 Jun 2002 Posts: 97 Location: London, UK
|
Posted: Mon Jun 24, 2002 1:09 am Post subject: |
|
|
Thanks for the suggestions.
There are only two things in the privoxy config file that need locations, the location of the configuration files (obviously /etc/privoxy, but it was defaulted to '.' so it just wouldn't run ) and the log directory, which was also defaulted to '.' which would mean the logfile would be in /etc/init.d, which is definitely not the right place. I chose /var/log/privoxy because it seemed sensible, users can alter its location in /etc/privoxy/config but they would still have to delete the old log directory. Where would be the normal place to put this type of info? The ebuild process doesn't seem to allow any interaction or displaying information at the end.
I don't know how well privoxy would integrate into a logging daemon since it appears to just dump to its log messages to its own file. I chose metalog for my system but have no idea how it runs. I'll look into how it works but I'm guessing that it's requires more than altering the installation, i.e. the way they generate log messages in code. |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Mon Jun 24, 2002 1:19 am Post subject: |
|
|
Miles wrote: | I'll look into how it works but I'm guessing that it's requires more than altering the installation, i.e. the way they generate log messages in code. |
OK, then never mind. Creating ebuilds shouldn't involve having to modify the code of the original app. Looking over the Developer's HOWTO it simply states that ebuilds need to conform to FHS guidelines. I'm not sure what FHS says about logging (and I'm too lazy to look right now ) but my guess is /var/log/privoxy is just fine. /etc is certainly a good location for the conf file.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Miles Tux's lil' helper
Joined: 23 Jun 2002 Posts: 97 Location: London, UK
|
Posted: Mon Jun 24, 2002 1:42 am Post subject: |
|
|
FHS says /var/log is standard so I'll stick to it.
Just need some one else to try it out now. |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Mon Jun 24, 2002 1:52 am Post subject: |
|
|
Miles wrote: | Just need some one else to try it out now. |
Went to install it, but an emerge -p shows it depends on links. For various anal-retentive reasons, I don't want links on my system -- does it truly have to be installed?
EDIT: Looked at the ebuild and saw I can configure it to depend on any text-based browser. Is that a privoxy dependency?
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Miles Tux's lil' helper
Joined: 23 Jun 2002 Posts: 97 Location: London, UK
|
Posted: Mon Jun 24, 2002 1:59 am Post subject: |
|
|
It needs a text based browser, I don't know why. When I first tried to make it I found it out, there's no mention about it on their web site.
You can edit the ebuild script so it depends on lynx or w3m. To be honest I reckon it will run without one, I think one just needs to be there when you compile it.
When you finish installing it point your browser's proxy to localhost:8118 and see if stuff loads. |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Mon Jun 24, 2002 2:07 am Post subject: |
|
|
Changed the ebuild to depend on w3m and it installed just fine on my system. On unmerge, the following files didn't get deleted:
Code: | m3 privoxy # find / -iname privoxy
/etc/init.d/privoxy
/etc/privoxy
/usr/portage/net-www/privoxy |
Obviously, the /usr/portage one is to be expected, but I'm not sure if unmerging files is supposed to delete the /etc files or not. I'm assuming not in case your unmerging older versions of a still-installed package, but I thought I'd mention it just in case
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Miles Tux's lil' helper
Joined: 23 Jun 2002 Posts: 97 Location: London, UK
|
Posted: Mon Jun 24, 2002 2:28 am Post subject: |
|
|
I was trying to mimic the behaviour of the other ebuild scripts, all of which left anything in /etc behind. Either way I'm not sure how I'd alter it since portage appears to do the unmerge automatically.
Something else that may be left behind on your system is the privoxy user and group. If they are still there just delete the appropriate lines from /etc/passwd; /etc/groups and delete /home/privoxy
Thanks for testing it, it's good to know it works on someone else's machine too |
|
Back to top |
|
|
|