problem with @exec in pkg-plist

Dmitry Sivachenko trtrmitya at gmail.com
Tue Jul 1 14:50:35 UTC 2014


On 01 июля 2014 г., at 18:40, Tijl Coosemans <tijl at FreeBSD.org> wrote:

> On Tue, 1 Jul 2014 17:42:07 +0400 Dmitry Sivachenko wrote:
>> Hello!
>> 
>> I have the following line in my pkg-plist:
>> 
>> @exec install -d -o root -g %%HADOOP_GROUP%% -m 0775 %%HADOOP_LOGDIR%%
>> 
>> After installation, directory is created without write access for group:
>> 
>> # ls -la /var/log/hadoop/
>> total 4
>> drwxr-xr-x  2 root  hadoop   512  1 июл 17:39 .
>> 
>> 
>> What am I missing?
> 
> Replace "rmdir" with "rm -d" on this line:
> 
> @unexec rmdir %%HADOOP_LOGDIR%% 2>/dev/null || true
> 
> The new pkg treats @dirrm and @dirrmtry as directory entries that, like
> file entries, can have their own owner, group and mode.  But, to support
> the old pkg_install @dirrmtry is implemented as @unexec rmdir, so pkg
> treats @unexec rmdir as a regular directory entry too.


Oh, dear...  Thanks, that works!


More information about the freebsd-ports mailing list