From owner-freebsd-arch@FreeBSD.ORG Sun May 9 04:11:10 2010 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 779EC106566C; Sun, 9 May 2010 04:11:10 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 1C56D8FC12; Sun, 9 May 2010 04:11:09 +0000 (UTC) Received: by qyk11 with SMTP id 11so3755876qyk.13 for ; Sat, 08 May 2010 21:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=L0VW1394/kEW72EGaCCuG8rJgWsE6EScnAZmMx2UuB4=; b=CVtmaW8RwpJYBJjBa5O4WqhoE/BPYilCfByBhey8Epiu4gwyj2yBrkOzuRFqne5/vE iSFR20+9DGk2RYyDvJUuimrxplRaWyDgjo3rT5Eui425b/MLZVCC0ELqV98eihLPzm5h p+OubinHsX0c0qJNKztxyx8xDrLDBBZgL7RQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=c6bxT4MdWk8Ih+UfvZYHqWaoQAVomLqnPphedbZxRwQ8ZXJ25wPuuL9fhwtpx6267G OgA5G+9W8LpIDBg7y+I/BvedTPwkzxQauIpNlt5zVJwxkuh65fCH0QDP2FTONH8EQ7Ql kGwa4w8qvZCwwD7DnULkrfScFMNNM3kOZsoOw= MIME-Version: 1.0 Received: by 10.224.107.26 with SMTP id z26mr1383447qao.123.1273378269321; Sat, 08 May 2010 21:11:09 -0700 (PDT) Received: by 10.229.193.14 with HTTP; Sat, 8 May 2010 21:11:09 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 May 2010 21:11:09 -0700 Message-ID: From: Garrett Cooper To: portmgr@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@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: Sun, 09 May 2010 04:11:10 -0000 On Sat, May 8, 2010 at 8:44 PM, Garrett Cooper wrote: > On Sat, May 8, 2010 at 8:25 PM, Garrett Cooper wrote= : >> Hi Arch and Portmgr, >> =A0 =A0Found another item that I'm proposing for removal -- @srcdir. Now= , >> 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 _creation= 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 PLIST= _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 o= n 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 pac= kage creation. > > =A0 =A0 -S basedir > =A0 =A0 =A0 =A0 =A0 =A0 basedir will be prefixed to all @cwd during packa= ge creation. Grr... this isn't nearly as simple as I hoped. -s is the controlling factor for @srcdir: /* If a SrcDir override is set, add it now */ if (SrcDir) { if (Verbose && !PlistOnly) printf("Using SrcDir value of %s\n", SrcDir); add_plist(&plist, PLIST_SRC, SrcDir); } 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. Thanks, -Garrett