[pacman-dev] [PATCH 2/3] Implement parsing of the new SigLevel directive

Allan McRae allan at archlinux.org
Fri Jul 29 21:01:48 EDT 2011


On 29/07/11 10:04, Dan McGee wrote:
> Add code to conf.c that parses the new SigLevel directive. An
> overwhelming number of options are presented, but most users will still
> be fine with the Never/Optional/Required trio. More advanced users can
> combine these or any of the other options on a 'SigLevel = ' line, which
> is parsed in a left-to-right fashion and flags turned on and off
> accordingly. For example, all three of these will net the same config:
>
>      SigLevel = Required PackageOptional
>      SigLevel = Optional DatabaseRequired
>      SigLevel = DatabaseRequired PackageOptional
>
> Additionally, database-specific lines assume you wish to start with any
> global default that has been set. For example, if any of the above lines
> were in the [options] section, something such as:
>
>      SigLevel = PackageRequired PackageAllowMarginal
>
> Would continue to enforce required database signatures.
>
> Inspiration-by: Kerrick Staley<mail at kerrickstaley.com>
> Signed-off-by: Dan McGee<dan at archlinux.org>
> ---

Signed-off-by: Allan

Tested using this in my pacman.conf:

[allanbrokeit]
Server = file:///home/allan/web/allanbrokeit/i686/
#Server = http://allanmcrae.com/allanbrokeit/i686/
SigLevel = Required

[kernel64]
Server = file:///home/arch/kernel64/2.6.39/
SigLevel = DatabaseRequired

and everything seems to succeed/fail as expected.

Allan


More information about the pacman-dev mailing list