From owner-freebsd-ports@FreeBSD.ORG Tue Jul 1 14:41:51 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A625AA37 for ; Tue, 1 Jul 2014 14:41:51 +0000 (UTC) Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by mx1.freebsd.org (Postfix) with ESMTP id 46067285A for ; Tue, 1 Jul 2014 14:41:50 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgGAGDHslNbsKhu/2dsb2JhbABagw2EGr96gxkBgQsXdYQDAQEFIzMjEAkCDgoCAgUhAgIPKh4GiFkBkBCcJ5weF4ErjXQHgneBTAEEmmSUBINEOw Received: from 110.168-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.168.110]) by relay.skynet.be with ESMTP; 01 Jul 2014 16:40:40 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id s61Eed2E019923; Tue, 1 Jul 2014 16:40:39 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Tue, 1 Jul 2014 16:40:38 +0200 From: Tijl Coosemans To: Dmitry Sivachenko Subject: Re: problem with @exec in pkg-plist Message-ID: <20140701164038.293a0819@kalimero.tijl.coosemans.org> In-Reply-To: <5BB0CB32-A70C-4B8F-B10B-BD410DB326A8@gmail.com> References: <5BB0CB32-A70C-4B8F-B10B-BD410DB326A8@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "ports@freebsd.org Ports" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 14:41:51 -0000 On Tue, 1 Jul 2014 17:42:07 +0400 Dmitry Sivachenko wrote: > Hello! >=20 > I have the following line in my pkg-plist: >=20 > @exec install -d -o root -g %%HADOOP_GROUP%% -m 0775 %%HADOOP_LOGDIR%% >=20 > After installation, directory is created without write access for group: >=20 > # ls -la /var/log/hadoop/ > total 4 > drwxr-xr-x 2 root hadoop 512 1 =D0=B8=D1=8E=D0=BB 17:39 . >=20 >=20 > 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.