[Bug 194813] New: [patch] www/polipo: Cannot use a cache directory (and some fix)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 4 13:58:34 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194813
Bug ID: 194813
Summary: [patch] www/polipo: Cannot use a cache directory (and
some fix)
Product: Ports Tree
Version: Latest
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Many People
Priority: ---
Component: Individual Port(s)
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: CQG00620 at nifty.ne.jp
CC: frank at pinky.sax.de
CC: frank at pinky.sax.de
Flags: maintainer-feedback?(frank at pinky.sax.de)
Created attachment 149030
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=149030&action=edit
A patch for www/polipo.
(1) Cannot use a cache directory
(2) Don't remove a cache directory unconditionally at uninstallation
(3) Fix messages such as "pkg-static: unlinkat(usr/local/etc/polipo/):
No such file or directory" at uninstallation
(1) Cannot use a cache directory
(Update: pkg-plist files/pkg-install.in)
The owner, group and permission of a cache directory is configured by
the pkg-install script:
| elif [ "$2" = "POST-INSTALL" ]; then
| if [ ! -d "%%DESTDIR%%$POLIPOCACHE" ]; then
| mkdir -p "%%DESTDIR%%$POLIPOCACHE" || exit 1
| chown "$POLIPOUSER:$POLIPOGROUP" "%%DESTDIR%%$POLIPOCACHE" || exit 1
| chmod ug=rwx,o= "%%DESTDIR%%$POLIPOCACHE" || exit 1
| fi
But the directory has already been created in Makefile.
So the above commands are never executed.
As a result, though the proxying works well, polipo cannot use the cache
directory (because a lack of write permission). And polipo outputs a lot of
error messages to /var/log/polipo like this:
| Couldn't create directory /var/cache/polipo/svnweb.freebsd.org/: Permission
denied
To solve the problem, add appropriate arguments (owner, group, permission)
to the @dir keyword in pkg-plist.
(2) Don't remove a cache directory unconditionally at uninstallation
(Update: files/pkg-deinstall.in)
When the port is uninstalled, the cache directory is always deleted (rm -r)
by pkg-deinstall even if it has cache contents.
Now the directory is handled by pkg (with @dir) properly.
I remove the delete routine from pkg-deinstall.
(3) Fix messages such as "pkg-static: unlinkat(usr/local/etc/polipo/):
No such file or directory" at uninstallation
(Update: files/pkg-deinstall.in)
When the port is uninstalled, some directories are deleted manually (rmdir)
by pkg-deinstall. These directories are handled by pkg automatically.
I remove these commands from pkg-deinstall.
--- Comment #1 from Bugzilla Automation <bugzilla at FreeBSD.org> ---
Maintainer CC'd
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list