Bug 122269 - mail/fetchmail install as non-root user with SU_CMD fails
Summary: mail/fetchmail install as non-root user with SU_CMD fails
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Simon Barner
Depends on:
Reported: 2008-03-30 20:50 UTC by Stefan Sperling
Modified: 2008-04-06 10:10 UTC (History)
0 users

See Also:

file.diff (500 bytes, patch)
2008-03-30 20:50 UTC, Stefan Sperling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Sperling 2008-03-30 20:50:05 UTC
When installing the mail/fetchmail port as a non-root user
with SU_CMD, the install fails because the port Makefile
executes the pkg-install script which needs root privileges
to succeed as a non-root user.

Fix: The port should acquire root privileges before executing
the pkg-install script. The patch below fixes the issue for me.
How-To-Repeat: Set SU_CMD in /etc/make.conf, for example:

	SU_CMD=/usr/bin/su root -c

Try to install fetchmail.

This will happen:

===>  Installing for fetchmail-6.3.8_4
===>   fetchmail-6.3.8_4 depends on file: /usr/local/share/certs/ca-root-nss.crt - found
===>   fetchmail-6.3.8_4 depends on shared library: intl - found
You already have a group "fetchmail", so I will use it.
fetchmail:*:124:124::0:0:Fetchmail mail-retrieval daemon:/var/run/fetchmail:/usr
You already have a user "fetchmail", so I will use it.
install: mkdir /var/run/fetchmail: Permission denied
*** Error code 71

Stop in /usr/ports/mail/fetchmail.
*** Error code 1

Stop in /usr/ports/mail/fetchmail.
Comment 1 Edwin Groothuis freebsd_committer 2008-03-30 20:50:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->barner

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2008-04-06 10:08:37 UTC
barner      2008-04-06 09:08:28 UTC

  FreeBSD ports repository

  Modified files:
    mail/fetchmail       Makefile 
  - Fix installation as non-root user
  Submitted by:   Stefan Sperling
  PR:             ports/122269
  Revision  Changes    Path
  1.192     +1 -1      ports/mail/fetchmail/Makefile
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Simon Barner freebsd_committer 2008-04-06 10:08:59 UTC
State Changed
From-To: open->closed

Committed. Thanks!