svn commit: r350763 - head/net-mgmt/net-snmp

Tijl Coosemans tijl at FreeBSD.org
Fri Apr 11 08:25:27 UTC 2014


On Thu, 10 Apr 2014 17:09:23 -0500 Bryan Drewery wrote:
> On 4/10/2014 3:26 AM, Tijl Coosemans wrote:
>> On Thu, 10 Apr 2014 02:41:13 +0000 (UTC) Ryan Steinmetz wrote:
>>> @@ -622,3 +621,4 @@ sbin/snmptrapd
>>>  @cwd /
>>>  @exec mkdir -p var/agentx
>>>  @unexec rmdir var/agentx 2>/dev/null || true
>>> + at dirrmtry /var/agentx
>> 
>> @dirrmtry doesn't work with absolute paths.
>> 
>> You can replace these 4 lines with:
>> 
>> @exec mkdir -p /var/agentx
>> @unexec rm -d /var/agentx 2>/dev/null || true
>> 
>> This should work with both the old pkg_install and the new pkg.
> 
> pkg specifically looks for 'rmdir' for directory tracking. It doesn't
> support rm -d.

I've had problems with this in the past.  pkg seems to replace rmdir with
a real directory in the package, but there are situations where you want
to keep it as unexec.  The directory may not exist in the staging area or
it may have the wrong permissions.  In the cases below the directories
are created with "@exec install" to set special owner/group/mode and using
rmdir somehow breaks that.

mail/bsmtp/pkg-plist even contains a comment about that:
@comment Do not use rmdir to avoid inappropriate pkg tools magic

It may be that in the case of net-snmp rmdir is fine because the directory
is created with mkdir.

>> devel/aegis/pkg-plist:@unexec rm -d %D/com/aegis 2>/dev/null || true
>> mail/bsmtp/pkg-plist:@unexec rm -d /var/spool/bsmtp 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucppublic 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Preserve 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Sequence 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Status 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Temp 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Xqtdir 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp 2>/dev/null || true
>> net/freebsd-uucp/pkg-plist:%%VAR_LOG%%@unexec rm -d /var/log/uucp 2>/dev/null || true
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20140411/11cb6bff/attachment.sig>


More information about the svn-ports-head mailing list