Re: [pacman-dev] [PATCH 1/3] Revise siglevel_t, adding PACKAGE_HASH_OK field

2011-07-17 Thread Kerrick Staley
And... I didn't actually hit save, so this is missing the ALPM_SIG_ERROR part. Here's the fixed version. Revise siglevel_t, adding PACKAGE_HASH_OK field The ALPM_SIG_PACKAGE_HASH_OK field indicates that secure hashes are to be acceptable as signatures. Also, having ALPM_SIG_USE_DEFAULT = (1 << 3

[pacman-dev] [PATCH 2/3] Document new SigLevel config directive

2011-07-17 Thread Kerrick Staley
The SigLevel config option replaces the VerifySig option, and has similar semantics, but adds a set of advanced configuration options that correspond to the recently introduced alpm_siglevel_t fields. Signed-off-by: Kerrick Staley --- doc/pacman.conf.5.txt | 20 1 files ch

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

2011-07-17 Thread Kerrick Staley
Add code to conf.c that parses the new SigLevel directive. Signed-off-by: Kerrick Staley --- src/pacman/conf.c | 97 +++- 1 files changed, 80 insertions(+), 17 deletions(-) diff --git a/src/pacman/conf.c b/src/pacman/conf.c index fac6da3..de5b46

[pacman-dev] [PATCH 1/3] Revise siglevel_t, adding PACKAGE_HASH_OK field

2011-07-17 Thread Kerrick Staley
The ALPM_SIG_PACKAGE_HASH_OK field indicates that secure hashes are to be acceptable as signatures. Also, having ALPM_SIG_USE_DEFAULT = (1 << 31) will cause alpm_siglevel_t to be treated as an unsigned value on machines where int is 32 bits, meaning negative numbers cannot be returned on error con

[pacman-dev] Implement SigLevel config parsing, v2.0

2011-07-17 Thread Kerrick Staley
These revised patches make some fixes based on Dave's suggestions and also fix some problems I noticed after submitting the original patches. I don't think Optional is actually the default if no SigLevel is specified, but it's probably a good default going forward. -Kerrick Staley

[pacman-dev] [PATCH] repo-add: do not print full path of signature file

2011-07-17 Thread Allan McRae
The full path to the signature file when it is created is in a temporary directory so only print the filename. Signed-off-by: Allan McRae --- scripts/repo-add.sh.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 19f

Re: [pacman-dev] [PATCH 1/2] Documented SigLevel in pacman.conf.5.txt

2011-07-17 Thread Dave Reisner
On Sun, Jul 17, 2011 at 11:06:29PM -0500, Kerrick Staley wrote: > Added the documentation for the SigLevel to pacman.conf.5.txt; the code > that implements this will be put into place with the next commit. > A general comment -- we write our commit messages in the present tense, rather than the p

Re: [pacman-dev] Added SigLevel parsing code

2011-07-17 Thread Kerrick Staley
I don't know where the summary went, but anyway, this adds parsing to the conf file for the new SigLevel syntax. There are actually some problems with the second patch; I'll get it resent shortly. Also, can anyone recommend a way to easily test a change such as this? Thanks, Kerrick Staley

[pacman-dev] [PATCH 2/2] Changed SigLevel parsing in conf.c

2011-07-17 Thread Kerrick Staley
Changed the SigLevel parsing in conf.c to handle the new options. Signed-off-by: Kerrick Staley --- src/pacman/conf.c | 93 1 files changed, 78 insertions(+), 15 deletions(-) diff --git a/src/pacman/conf.c b/src/pacman/conf.c index fac6da3.

[pacman-dev] [PATCH 1/2] Documented SigLevel in pacman.conf.5.txt

2011-07-17 Thread Kerrick Staley
Added the documentation for the SigLevel to pacman.conf.5.txt; the code that implements this will be put into place with the next commit. Signed-off-by: Kerrick Staley --- doc/pacman.conf.5.txt | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/doc/p

[pacman-dev] Added SigLevel parsing code

2011-07-17 Thread Kerrick Staley
-Kerrick Staley

[pacman-dev] [PATCH 3/3] PKGBUILD.vim: add new var and assert bash syntax

2011-07-17 Thread Dave Reisner
* assert is_bash to pickup more valid syntax * add checkdepends highlighting Signed-off-by: Dave Reisner --- Someone should really update this file to properly support split PKGBUILDs. I wanted to delete it until I realized that we've been keeping this somewhat up to date in places. contrib/PKG

[pacman-dev] [PATCH 2/3] pacman/callback: show .sig suffix on sig download

2011-07-17 Thread Dave Reisner
Signed-off-by: Dave Reisner --- src/pacman/callback.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pacman/callback.c b/src/pacman/callback.c index d34aca1..237ccea 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -604,10 +604,17 @@ void c

[pacman-dev] [PATCH 1/3] contrib/paclog-pkglist: fix script name in usage

2011-07-17 Thread Dave Reisner
Signed-off-by: Dave Reisner --- Just an oversight when I renamed the script, as pointed out by Allan. Sadly, awk doesn't have an equivalent of ${0##*/} when excuted under a #!/bin/awk shebang (ARGV[0] will always show 'awk'), so we just hard code it. contrib/paclog-pkglist |4 ++-- 1 files c

Re: [pacman-dev] [PATCH 1/2] Remove most usages of strncmp()

2011-07-17 Thread Sebastian Nowicki
On Wed, Jul 6, 2011 at 3:20 AM, Dan McGee wrote: > The supposed safety blanket of this function is better handled by > explicit length checking and usages of strlen() on known NULL-terminated > strings rather than hoping things fit in a buffer. We also have no need > to fully fill a PATH_MAX lengt

Re: [pacman-dev] [RFC] Iterator interface for reading databases

2011-07-17 Thread Sebastian Nowicki
On Sun, Jul 17, 2011 at 12:32 AM, Rémy Oudompheng wrote: > Hello, > > I am thinking an iterator-like interface for database reading could be > useful. The most obvious example use is the pkgfile functionality. > It could be a convenient tool to do one-pass work on databases > without loading them

Re: [pacman-dev] [PATCH] Handle removal of empty directories properly

2011-07-17 Thread Xavier Chantry
On Sat, Jul 16, 2011 at 5:11 PM, Dan McGee wrote: > This addresses FS#25141. We shouldn't remove every empty directory we > come across during the removal process unless it is truly not known to > any other package. This will prevent removal of essential directories > such as '/var/lock/'. > > Thi