public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: Package Manager Specification: configuration protection
Date: Tue, 12 Sep 2006 15:44:22 -0700	[thread overview]
Message-ID: <45073846.2030307@gentoo.org> (raw)
In-Reply-To: <20060912103130.092c3033@snowdrop.home>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ciaran McCreesh wrote:
> On Tue, 12 Sep 2006 10:19:40 +0200 Simon Stelling <blubb@gentoo.org>
> wrote:
> | > Protected Locations
> | > ===================
> | > 
> | > Protected locations are determined by the ``CONFIG_PROTECT``
> | > environment variable, which is defined in the profiles and which
> | > may be augmented or overridden by the current environment and user
> | > configuration files. This variable contains a space separated list
> | > of values which are matched against the beginning of a full file
> | > path and name of files to be installed.
> | 
> | "which are matched against the beginning of a full file path" would
> | mean that e.g. CONFIG_PROTECT="/etc/foo" would protect the following:
> | 
> | /etc/foobar/doh
> | /etc/foo
> | /etc/foobaz
> | 
> | .. or did I misunderstand something here? I don't know whether that is
> | the current behaviour of portage, but IMO it certainly shouldn't be.
> | It should rather be
> | 
> | /etc/foo (file)
> | or, if /etc/foo is a dir:
> | /etc/foo/*
> 
> Mm. I had a play with this. I'd like someone else to do independent
> tests, because I'm seeing something weird here. But it looks like
> Portage's current behaviour is:
> 
> with CONFIG_PROTECT="/foo":
> * if /foo is a file, it's not protected
> * if /foo is a directory, its contents (including subdirectories) are
> protected
> * /foofoo (file) is not protected
> * /foobar/baz is not protected
> 
> and weirdly, with CONFIG_PROTECT="/foo/"
> * if /foo/ is a directory, its contents are protected during unmerge
> but not during merge
> 
> All of this is rather weird, and doesn't match up to what I've been
> told by Portage people that Portage is supposed to do...
> 

I've attached to bug 14321 [1] a patch that I believe implements the
CONFIG_PROTECT behavior that most people would expect from portage.
The differences from previous behavior are as follows:

1) Allows files (not just directories) in CONFIG_PROTECT and
CONFIG_PROTECT_MASK.

2) Properly accounts for an optional trailing slash on directory paths.

3) Prevents /etc/foo from matching /etc/foobaz or /etc/foobaz/bar.

Testing of the patch (against portage-2.1.1) would be appreciated.

Zac

[1] http://bugs.gentoo.org/show_bug.cgi?id=14321#c15

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFBzhF/ejvha5XGaMRApxqAJ0XcfuqkfNn8L68HLRRynSyXf9grgCcCgok
CNysJhEHA5mUvX84vmB8PU0=
=KPm0
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



  parent reply	other threads:[~2006-09-12 22:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11 22:22 [gentoo-dev] RFC: Package Manager Specification: configuration protection Ciaran McCreesh
2006-09-11 23:02 ` Chris White
2006-09-11 23:15   ` Ciaran McCreesh
2006-09-16  7:21     ` Brian Harring
2006-09-12  1:13   ` Robin H. Johnson
2006-09-12  0:30 ` Michael Cummings
2006-09-13 20:05   ` Peter Volkov (pva)
2006-09-12  8:19 ` Simon Stelling
2006-09-12  9:31   ` Ciaran McCreesh
2006-09-12 17:36     ` Zac Medico
2006-09-12 22:44     ` Zac Medico [this message]
2006-09-12 22:51       ` Ciaran McCreesh
2006-09-12 23:57         ` Zac Medico
2006-09-20 20:11           ` Mike Frysinger
2006-09-13  1:00         ` Ilya A. Volynets-Evenbakh
2006-09-13 17:47 ` Benno Schulenberg
2006-09-13 20:42   ` Daniel Gryniewicz
2006-09-14 17:34     ` Benno Schulenberg
2006-09-14 19:30   ` Thomas de Grenier de Latour
2006-09-15 20:27     ` Benno Schulenberg
2006-09-14  6:51 ` Harald van Dijk
2006-09-15 18:39   ` Ciaran McCreesh
2006-09-16  6:56     ` Harald van Dijk
2006-09-16  7:17 ` Brian Harring
2006-09-16 22:02   ` Ciaran McCreesh
2006-09-17  0:26     ` Brian Harring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45073846.2030307@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox