X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 2DED3DC0186 for ; Wed, 23 Jul 2014 05:19:44 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id hr17so501839lab.2 for ; Tue, 22 Jul 2014 22:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Xr1eRRVDTMobsZvxDt/ElP8DODAWUtKe+IriqV1VSVo=; b=O4VLh9RlvDEkrhWLIPE7plszHxA6k6dwsvNcqTiABjWFPKRVsl/Imc3n9C8DJQX46O fPoZhLnxTC/hJS3oVB5Kixq/Jbe0+jJULtedIdJiPQcygazZxYFwPjLr7gJGtLGtLDO9 YHJGP6IUkmYu/XIvUSJacOpy9d02uvPKGMNf8hhyaPi9gjMm3Vw7ded+k2uxkxZsLuHS O4X0fPhNGUlLxDo57FR24o8GcMRy3uIU8XH0rDJFNO6hCqa81atiOYBv9LGhvmN5CXxJ Mv7qOXEzhTsI7GSjyiaajcM8coR6eMrRAo1nF6SuiiNT+zPO5SwBzbuinHvjxe1PkKBh zUSQ== X-Received: by 10.152.27.66 with SMTP id r2mr39990388lag.53.1406092783257; Tue, 22 Jul 2014 22:19:43 -0700 (PDT) Received: from vostro ([83.145.235.199]) by mx.google.com with ESMTPSA id a2sm1417013lak.28.2014.07.22.22.19.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jul 2014 22:19:43 -0700 (PDT) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Wed, 23 Jul 2014 08:19:36 +0300 From: Timo Teras To: Isaac Dunham Cc: Natanael Copa , William Pitcock , alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] testing/sword: add new package Message-ID: <20140723081936.2ca2eb87@vostro> In-Reply-To: <20140723040141.GA3905@newbook> References: <1405457044-3186-1-git-send-email-ibid.ag@gmail.com> <20140715162818.0f5adca9@ncopa-desktop.alpinelinux.org> <20140716212248.GA1780@newbook> <20140722142728.6a7efbbe@ncopa-desktop.alpinelinux.org> <20140723040141.GA3905@newbook> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 22 Jul 2014 21:01:42 -0700 Isaac Dunham wrote: > On Tue, Jul 22, 2014 at 02:27:28PM +0200, Natanael Copa wrote: > > How about using /var/lib/sword as default and have a > > 'sword' group with write permissions there? > > > > They you can just add your users to the sword group to be able to > > install the data files. > > > That should work. > One question/minor issue: > > abuild warns about chown in the post-install script. > > But it would seem that there's no other sane way to make sure that > /var/lib/sword belongs to the "sword" group: to make it belong to > root:sword in the package, this group must exist when the package is > built and when it is extracted. > I presume pre-install could do the latter, but manipulating groups in > a build script is insanity. > > If I can ignore that warning (assuming it belongs in abuild), I have a > script ready to go. > > What's the preferred approach? Use pkgusers and pkggroups in APKBUILD, and do chown in the package() or subpkg split function. See 'transmission' or any other package with pkgusers in it for an example. And create the user in pre-install script. This allows apk to keep track of the file permissions properly. Doing chown in post-install would make the file permissions mismatch with what is in the apk database, and thus make 'apk audit' give spurious results. - Timo --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---