Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Nov 2014 13:58:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 194813] New: [patch] www/polipo: Cannot use a cache directory (and some fix)
Message-ID:  <bug-194813-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: CQG00620@nifty.ne.jp
                CC: frank@pinky.sax.de
                CC: frank@pinky.sax.de
             Flags: maintainer-feedback?(frank@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@FreeBSD.org> ---
Maintainer CC'd

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194813-13>