From owner-freebsd-arch@FreeBSD.ORG Fri May 14 20:38:13 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 718DF106564A for ; Fri, 14 May 2010 20:38:13 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 005AA8FC08 for ; Fri, 14 May 2010 20:38:12 +0000 (UTC) Received: by fxm17 with SMTP id 17so2153929fxm.13 for ; Fri, 14 May 2010 13:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=TUVcFV1TmZWJQJTyYxpzT3WcFI8PkSqKXlrk/99UMag=; b=XNjxuGH/LNNbExiKst9KwHL2Ap7kqS7dQ35i4ahbY3uUSrnzpwUeLzRTQr/vyJhbnb clY3LCrB7PR2T20Uw8ljhhBuF4Miw+j7yDXuaHBzWETQVlWy0QrdGzvgjfH/V+y9mUAG U8nk+ZDcwTxtSfipg2GrBQBXOSAFA4Qz59I00= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=bZYfzSZrc+TrL4jT+ooXAIuSukVi1ZGI+tyv/RZA1PVE9QH2SWJgtsEzAtwz0Vd8WE yqcrXTk463A0zNt04IWUCMKHWw/uvnrVTVSTiG5olDHRP0IUHg86dqGh8+tsU9A9c5TG bamIdRnHhOM1cfRK6iSFpiTBemwPyh4Lu+kjw= Received: by 10.239.135.82 with SMTP id c18mr183293hbc.30.1273867912134; Fri, 14 May 2010 13:11:52 -0700 (PDT) MIME-Version: 1.0 Sender: florent.thoumie@gmail.com Received: by 10.239.165.131 with HTTP; Fri, 14 May 2010 13:11:32 -0700 (PDT) In-Reply-To: References: From: Florent Thoumie Date: Fri, 14 May 2010 21:11:32 +0100 X-Google-Sender-Auth: BJsshbJ_GYSE7orQ4TMFFM-CMk4 Message-ID: To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, portmgr@freebsd.org Subject: Re: [RFC] Deprecate @srcdir in pkg_install manifests X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2010 20:38:13 -0000 On Sun, May 9, 2010 at 5:11 AM, Garrett Cooper wrote: > On Sat, May 8, 2010 at 8:44 PM, Garrett Cooper wrote= : >> On Sat, May 8, 2010 at 8:25 PM, Garrett Cooper wrot= e: >>> Hi Arch and Portmgr, >>> =A0 =A0Found another item that I'm proposing for removal -- @srcdir. No= w, >>> first off, here's what it does (from pkg_create): >>> >>> =A0 =A0 @srcdir directory >>> =A0 =A0 =A0 =A0 =A0 =A0 Set the internal directory pointer for _creatio= n only_ to >>> =A0 =A0 =A0 =A0 =A0 =A0 directory. =A0That is to say that it overrides = @cwd for package >>> =A0 =A0 =A0 =A0 =A0 =A0 creation but not extraction. >>> >>> This construct: >>> >>> 1. Isn't used anywhere in /usr/ports's pkg_plist* files. >>> 2. Isn't used in /usr/src . >>> 3. Is semi-broken in pkg_create as it's treated as a really awkward >>> special case, like so: >>> >>> =A0 =A0 =A0 =A0else if (p->type =3D=3D PLIST_CWD || p->type =3D=3D PLIS= T_SRC) >>> =A0 =A0 =A0 =A0 =A0 =A0fprintf(totar, "-C\n%s\n", p->name); >>> >>> =A0 =A0So if I specify @srcdir multiple times, pkg_create will fall in = on itself. >>> 4. It over-complicates things, as the -p option basically already sort >> >> Correction -- -s and -S handle this functionality: >> >> =A0 =A0 -s srcdir >> =A0 =A0 =A0 =A0 =A0 =A0 srcdir will override the value of @cwd during pa= ckage creation. >> >> =A0 =A0 -S basedir >> =A0 =A0 =A0 =A0 =A0 =A0 basedir will be prefixed to all @cwd during pack= age creation. > > Grr... this isn't nearly as simple as I hoped. -s is the controlling > factor for @srcdir: > > =A0 =A0/* If a SrcDir override is set, add it now */ > =A0 =A0if (SrcDir) { > =A0 =A0 =A0 =A0if (Verbose && !PlistOnly) > =A0 =A0 =A0 =A0 =A0 =A0printf("Using SrcDir value of %s\n", SrcDir); > =A0 =A0 =A0 =A0add_plist(&plist, PLIST_SRC, SrcDir); > =A0 =A0} > > I'll talk this over with flz, but it's definitely obfuscated design. > >>> of provides this level of functionality; the only pro for doing this >>> that I can think of is if someone had tainted vs untainted files that >>> they wanted to install, then using @srcdir with a custom manifest and >>> directory would simplify things. I argue that if they're doing that, >>> they should be using a chroot or a jail anyhow because package >>> maintainers would potentially unnecessarily taint the system with >>> their environment and the packages wouldn't be necessarily as safe to >>> redistribute. >>> =A0 =A0Another item I'll be talking about with flz and other folks at >>> BSDCan, but I wanted to see if anyone had any concerns that they >>> needed to air here before a final decision was made by portmgr. As discussed the other day, I don't see any good reason to use -s (aka @srcdir). The -S option is a different story, even though I'm not sure anybody actually uses it... --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer