Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2014 10:25:06 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        Ryan Steinmetz <zi@FreeBSD.org>, svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r350763 - head/net-mgmt/net-snmp
Message-ID:  <20140411102506.7f6c8e94@kalimero.tijl.coosemans.org>
In-Reply-To: <53471693.2080007@FreeBSD.org>
References:  <201404100241.s3A2fDrS077880@svn.freebsd.org> <20140410102630.65029403@kalimero.tijl.coosemans.org> <53471693.2080007@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/H1ZobcHJyHl9MPeNXLYLkpN
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

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
>>> +@dirrmtry /var/agentx
>>=20
>> @dirrmtry doesn't work with absolute paths.
>>=20
>> You can replace these 4 lines with:
>>=20
>> @exec mkdir -p /var/agentx
>> @unexec rm -d /var/agentx 2>/dev/null || true
>>=20
>> This should work with both the old pkg_install and the new pkg.
>=20
> 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/nu=
ll || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Preserve 2>/de=
v/null || true
>> net/freebsd-uucp/pkg-plist:@unexec rm -d /var/spool/uucp/.Sequence 2>/de=
v/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/nu=
ll || 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

--Sig_/H1ZobcHJyHl9MPeNXLYLkpN
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iF4EAREKAAYFAlNHpukACgkQfoCS2CCgtiv43QD/UlhxIN0Q9mnNYsZHMubTih1O
yQloitnAicJV6Ir+1N8A/2yy9NMC+KTq82a57ApJu6GhtXboaEvctZEnc85RbIN0
=jTaI
-----END PGP SIGNATURE-----

--Sig_/H1ZobcHJyHl9MPeNXLYLkpN--



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