Re: [pacman-dev] [PATCH] Revamp pacman signal handler

2011-09-26 Thread dave reisner
On Sep 26, 2011 4:29 PM, "Dan McGee" wrote: > > * All errors now go to stdout I think you meant stderr here. Looks good otherwise. Do we want to handle a SIGQUIT which is easily accessible from a shell (ctrl-/)? D , so do the same here and simplify the > writing of the error message. > * Add S

Re: [pacman-dev] [PATCH 2/3] pkgdelta: clean up quoting

2011-09-28 Thread Dave Reisner
On Wed, Sep 28, 2011 at 07:12:26PM +0200, Martti Kühne wrote: > On Wed, Sep 28, 2011 at 6:58 PM, lolilolicon wrote: > > > Also, remove unnecessary quoting in variable assignments. > > > > actually, this one is being discouraged by #bash/wooledge.org, in > favor of consistently quoting "o/ EVERYT

Re: [pacman-dev] [PATCH 3/3] paccache: verify nonnegative integer for -k option

2011-09-28 Thread Dave Reisner
On Thu, Sep 29, 2011 at 12:58:59AM +0800, lolilolicon wrote: > Allow leading zeros, but always treat it as decimal. If this was your goal, you missed. 'keep' is declared with an integer attribute meaning that all conversions to decimal are done at assignment, i.e. $ declare -i keep=015 # declare

Re: [pacman-dev] [PATCH 1/3] makepkg: proper quoting in [[ expression ]]

2011-09-28 Thread Dave Reisner
On Thu, Sep 29, 2011 at 12:58:50AM +0800, lolilolicon wrote: > Always quote the righthand side of expression when the == or != operator > is used, unless intended as a pattern. Quoting bash(1): > > When the == and != operators are used, the string to the right of the > operator is considered a pa

Re: [pacman-dev] [PATCH 3/3] paccache: verify nonnegative integer for -k option

2011-09-28 Thread Dave Reisner
On Thu, Sep 29, 2011 at 02:46:56AM +0800, lolilolicon wrote: > On Thu, Sep 29, 2011 at 1:52 AM, Dave Reisner wrote: > > On Thu, Sep 29, 2011 at 12:58:59AM +0800, lolilolicon wrote: > >> Allow leading zeros, but always treat it as decimal. > > > > If this was yo

Re: [pacman-dev] [PATCH 1/3] paccache: allow strictly integer for -k option

2011-09-29 Thread Dave Reisner
On Thu, Sep 29, 2011 at 10:58:14AM +0800, lolilolicon wrote: > On Thu, Sep 29, 2011 at 10:45 AM, lolilolicon wrote: > > Verify the argument to -k is a non-negative integer.  Leading zeros > > are simply tripped. > > > > Oops, sorry s/tripped/stripped/ there. > Dave, will you correct this typo for

Re: [pacman-dev] [PATCH 2/6] Don't do eval

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:02AM +0800, lolilolicon wrote: > Simply `eval'ing configurations from pacman.conf is really bad practice. > Use proper string parsing instead. The parser implemented here aborts > as soon as it gets the first assignment, being consistent with pacman. I'm not really a

Re: [pacman-dev] [PATCH 3/6] bacman: fix missing quotes

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:03AM +0800, lolilolicon wrote: > > Signed-off-by: lolilolicon > --- > contrib/bacman.in | 10 +- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/contrib/bacman.in b/contrib/bacman.in > index 0069d1e..d43bf78 100755 > --- a/contrib/bacm

Re: [pacman-dev] [PATCH] makepkg: unify tarball creation

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:23:37AM +0800, lolilolicon wrote: > Introduce ext_to_tar_opt() to unify package and source package tarball > creation. This requires bsdtar to support the compression options -z, > -j, -J and -Z. Note also the 'compress' command is not available in > Arch (FS#25908), so

Re: [pacman-dev] [PATCH 4/6] bacman: use globbing in place of regex

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:04AM +0800, lolilolicon wrote: > The original regex is also not accurate (should be ^[A-Z]+$). > > Signed-off-by: lolilolicon > --- > contrib/bacman.in |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/contrib/bacman.in b/contrib/bacm

Re: [pacman-dev] [PATCH 5/6] bacman: use block redirection

2011-09-29 Thread Dave Reisner
On Fri, Sep 30, 2011 at 01:14:05AM +0800, lolilolicon wrote: > Doing so is certainly better, but we really should consider reusing > write_pkginfo() from makepkg. Splitting common functions from makepkg > into a library would be nice. So let's do that instead. There's similar work in repo-add. On

[pacman-dev] [PATCH] move prevprogress onto payload handle

2011-09-29 Thread Dave Reisner
This is a poor place for it, and it will likely move again in the future, but it's better to have it here than as a static variable. Initialization of this variable is now no longer necessary as its zeroed on creation of the payload struct. Signed-off-by: Dave Reisner --- lib/libalpm/dl

[pacman-dev] [PATCH] pacman-key: remove errexit flag from shebang

2011-09-30 Thread Dave Reisner
it before dying. Signed-off-by: Dave Reisner --- rage. scripts/pacman-key.sh.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index 8642928..1df7bb6 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.

Re: [pacman-dev] [PATCH 1/1] scripts/library: add config_parser.sh

2011-09-30 Thread Dave Reisner
On Fri, Sep 30, 2011 at 07:37:48PM +0800, lolilolicon wrote: > config_parser.sh provides functions to support parsing simple config > files, pacman.conf in particular. Our scripts should never use a > simple eval to get config values such as DBPath. > > conf_key_val() is modified from pacman-key'

Re: [pacman-dev] [PATCH] manpage update: add real world examples with full path

2011-10-04 Thread Dave Reisner
On Tue, Oct 04, 2011 at 03:08:07PM +0200, Nico Schottelius wrote: > Hello .*, > > This is a resent from the discussion from Mon, 14 Jun 2010 14:26:50 +0200, > which seems never to get through to get applied. http://projects.archlinux.org/pacman.git/commit/?id=9ebb59680530 Looks like the pacman p

Re: [pacman-dev] Tested pacman 4.0.0rc2-1 - the results

2011-10-07 Thread Dave Reisner
On Sat, Oct 08, 2011 at 04:00:33AM +0200, Daniel Nilsson wrote: > > Hi. > I've tested pacman 4.0.0rc2-1 on a fresh arch netinstall in virtualbox to > test the new signature checking. > I followed the instructions on this page (the rc2 announcement): > http://mailman.archlinux.org/pipermail/arch-d

[pacman-dev] [PATCH 1/2] dload: unhook error buffer after transfer finishes

2011-10-09 Thread Dave Reisner
write to our (now out of scope) error buffer. I'm unable to reproduce FS#26327, but I have a suspicion that this should fix it. Signed-off-by: Dave Reisner --- lib/libalpm/dload.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/li

[pacman-dev] [PATCH 2/2] makepkg: Allow install/changelog decls to be arrays

2011-10-09 Thread Dave Reisner
This doesn't actually change the treatment of install and changelog varaibles, but it allows valid bash syntax to get by our parsing of these variables. Fixes FS#25827. Signed-off-by: Dave Reisner --- This is getting pretty ugly... I'm still 50/50 on whether or not we should do th

Re: [pacman-dev] [PATCH 2/2] makepkg: Allow install/changelog decls to be arrays

2011-10-09 Thread Dave Reisner
On Mon, Oct 10, 2011 at 01:53:38PM +1000, Allan McRae wrote: > On 10/10/11 13:35, Dave Reisner wrote: > >This doesn't actually change the treatment of install and changelog > >varaibles, but it allows valid bash syntax to get by our parsing of > >these variab

Re: [pacman-dev] [PATCH 1/2] dload: unhook error buffer after transfer finishes

2011-10-09 Thread Dave Reisner
On Sun, Oct 09, 2011 at 10:50:08PM -0500, Dan McGee wrote: > On Sun, Oct 9, 2011 at 10:35 PM, Dave Reisner wrote: > > Similar to what we did in edd9ed6a, disconnect the relationship with our > > stack allocated error buffer from the curl handle. Just as an FTP > > conne

Re: [pacman-dev] [PATCH] pactree: Add "--config" option

2011-10-10 Thread Dave Reisner
On Mon, Oct 10, 2011 at 02:38:59PM +0200, Lukas Fleischer wrote: > This allows for specifying an alternate configuration file path, similar > to pacman's "--config" option. > > Given that there is currently no other way to tell pactree to read from > another configuration file (except for patching

Re: [pacman-dev] [PATCH] pactree: Make error message smarter in register_syncs()

2011-10-10 Thread Dave Reisner
On Mon, Oct 10, 2011 at 03:22:52PM +0200, Lukas Fleischer wrote: > Our error message used to be very unclear when the configuration file > could not be found: > > $ ./pactree -lsr gtk > error: failed to register sync DBs > > Instead, display an accurate message and include the file name:

Re: [pacman-dev] [PATCH] Remove -f short option for --force

2011-10-12 Thread Dave Reisner
On Wed, Oct 12, 2011 at 02:11:41PM -0500, Dan McGee wrote: > This is not something that should be used on a frequent basis, and > giving it a short option encourages use without making the drawbacks > obvious. For the 1% of situations that require it, the 5 extra > keystrokes are a fair price to pa

Re: [pacman-dev] [PATCH] Add user-visible warning message if public keyring not found

2011-10-12 Thread Dave Reisner
On Wed, Oct 12, 2011 at 05:33:41PM -0500, Dan McGee wrote: > This should help point users in the right direction if they have not > initialized via pacman-key just yet. > > Signed-off-by: Dan McGee > --- > lib/libalpm/signing.c |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > >

[pacman-dev] [PATCH] lib/util: call malloc from MALLOC, not calloc

2011-10-13 Thread Dave Reisner
This was added in cc754bc6 as a "safety" measure, but sort of defeats the purpose of having this macro. If we're using malloc unsafely, then we've already lost. Signed-off-by: Dave Reisner --- lib/libalpm/util.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(

Re: [pacman-dev] [PATCH] curl_gethost() potential bug fixups

2011-10-13 Thread Dave Reisner
On Thu, Oct 13, 2011 at 12:56:25PM -0500, Dan McGee wrote: > This is in the realm of "probably not going to happen", but if someone > were to translate "disk" to a string longer than 256 characters, we > would have a smashed/corrupted stack due to our unchecked strcpy() call. > Rework the function

[pacman-dev] [PATCH 0/5] download diskspace checking

2011-10-16 Thread Dave Reisner
d, we just gather all the records together at once and download them. I've left some comments in the header for each patch... d Dave Reisner (5): diskspace: add _alpm_check_downloadspace() dload: add RO copy of servers list to each payload sync: dont group sync records by repository

[pacman-dev] [PATCH 1/5] diskspace: add _alpm_check_downloadspace()

2011-10-16 Thread Dave Reisner
This function determines if the given cachedir has at least the given amount of free space on it. This will be later used in the sync code to preemptively halt downloads. Signed-off-by: Dave Reisner --- lib/libalpm/diskspace.c | 54 +++ lib/libalpm

[pacman-dev] [PATCH 2/5] dload: add RO copy of servers list to each payload

2011-10-16 Thread Dave Reisner
Signed-off-by: Dave Reisner --- lib/libalpm/dload.h |1 + lib/libalpm/sync.c |2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index 27d865d..158e0b7 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -38,6 +38,7

[pacman-dev] [PATCH 3/5] sync: dont group sync records by repository

2011-10-16 Thread Dave Reisner
Break out the logic of finding payloads into a separate static function to avoid nesting mayhem. After gathering all the records, download them all at once. Signed-off-by: Dave Reisner --- This is mostly just code movement, but there's some string changes in here I'm not entirely sati

[pacman-dev] [PATCH 4/5] sync: check for necessary disk space for download

2011-10-16 Thread Dave Reisner
Signed-off-by: Dave Reisner --- lib/libalpm/sync.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index cac4c8f..3c304a3 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -872,6 +872,31

[pacman-dev] [PATCH 5/5] sync: move file download loop out of download_files

2011-10-16 Thread Dave Reisner
Create a new static function called 'download_single_file' which iterates over the servers for each payload. Signed-off-by: Dave Reisner --- More code movement -- mostly just to improve readability and keep the function size down to something reasonable. lib/libalpm/syn

Re: [pacman-dev] [PATCH 3/5] sync: dont group sync records by repository

2011-10-16 Thread Dave Reisner
On Sun, Oct 16, 2011 at 03:05:35PM -0500, Dan McGee wrote: > On Sun, Oct 16, 2011 at 1:59 PM, Dave Reisner wrote: > s/dont/don't/ > > Break out the logic of finding payloads into a separate static function > > to avoid nesting mayhem. After gathering all the records, downlo

Re: [pacman-dev] Feature request: Show exact matches first

2011-10-19 Thread Dave Reisner
On Wed, Oct 19, 2011 at 09:37:22PM +0200, Markus Jochim wrote: > Dear developers, > > I'd like to request a feature. When I search for some package, let's > say openconnect: > > $ pacman -Ss openconnect (or -Qs) > > it takes quite a while until I get any results on my netbook (Atom > N450 cpu).

Re: [pacman-dev] Feature request: Show exact matches first

2011-10-19 Thread Dave Reisner
On Thu, Oct 20, 2011 at 10:44:18AM +0800, lolilolicon wrote: > I noticed a slight problem here- PKGBUILD(5) states the pkgrel variable is > "not allowed to contain hyphens". > So I realize possibly this, as well as my fix for bacman, is not exactly > correct. I haven't checked the pacman code thou

Re: [pacman-dev] [PATCH] Fix libtool detection of --as-needed flag

2011-10-22 Thread Dave Reisner
On Sat, Oct 22, 2011 at 07:52:39PM +1000, Allan McRae wrote: > The fix for -Wl,--as-needed in commit b0f9477f assumes that > --as-needed/--no-as-needed is the only option given in a -Wl line. > However, it is perfectly valid to specify multiple flags comma > separated after a single -Wl (e.g. the d

Re: [pacman-dev] checkupdates

2011-10-25 Thread Dave Reisner
On Wed, Oct 26, 2011 at 01:26:57PM +1000, Allan McRae wrote: > A few minor comments: > > 1) I think you need to clean up the usage message a bit - maybe like this: > > checkupdate: Safely print a list of pending updates > Usage: checkupdates > > Export the "fakedb" variable to change to path to

Re: [pacman-dev] checkupdates

2011-10-26 Thread Dave Reisner
On Wed, Oct 26, 2011 at 06:43:40AM -0400, keenerd wrote: > Probably necessary. It is extremely easy to interrupt pacman and > leave a lock file floating around. If we're leaving lock files around, its a bug in pacman and we should fix it there rather than bandaiding it. That said, I disagree with

Re: [pacman-dev] checkupdates

2011-10-26 Thread Dave Reisner
On Wed, Oct 26, 2011 at 08:40:37AM -0400, Dave Reisner wrote: > > Currently, lock files are per pacman install, not per DB. ignore this. shows what i know...

Re: [pacman-dev] [PATCH 3/3] Unify buffer size used across the library

2011-10-26 Thread Dave Reisner
On Wed, Oct 26, 2011 at 05:44:43PM -0500, Dan McGee wrote: > Define a single BUFFER_SIZE constant in util.h and use it everywhere. > This also prepares us for libarchive 3.0, where the > ARCHIVE_DEFAULT_BYTES_PER_BLOCK constant has been taken out to the > woodshed. Any particular reason we're not

[pacman-dev] [PATCH] src/util: link vercmp against .lo, not the .o

2011-10-30 Thread Dave Reisner
This seems to fix FS#26652. Signed-off-by: Dave Reisner --- I'm no libtool expert, but this seems to fix the build with --disable-static and the dependencies still look correct for vercmp. src/util/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src

[pacman-dev] [PATCH] makepkg: check for value before using eval'd var

2011-11-10 Thread Dave Reisner
This prevent bsdtar from exploding when install= or changelog= are present without a value. Signed-off-by: Dave Reisner --- scripts/makepkg.sh.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 5d048d2..085fbb9 100644

[pacman-dev] [PATCH 1/3] invert iteration order for ignoregroup

2011-11-12 Thread Dave Reisner
This is a simple change that allows comparions to be more in line with how other checks are done. It will be necessary for ensuing patchwork that implements fnmatch for comparing and assumes a specific argument ordering. Signed-off-by: Dave Reisner --- lib/libalpm/package.c |4 ++-- 1 files

[pacman-dev] [PATCH 2/3] add support for back end fnmatch'd options

2011-11-12 Thread Dave Reisner
Kruse Signed-off-by: Dave Reisner --- doc/pacman.conf.5.txt | 11 +++ lib/libalpm/add.c |4 ++-- lib/libalpm/package.c |4 ++-- lib/libalpm/remove.c |4 ++-- lib/libalpm/util.c |6 ++ lib/libalpm/u

[pacman-dev] [PATCH 3/3] add fnmatch support for HoldPkg

2011-11-12 Thread Dave Reisner
Adds test remove031. Signed-off-by: Dave Reisner --- doc/pacman.conf.5.txt |3 ++- src/pacman/remove.c|8 +++- test/pacman/tests/remove031.py | 11 +++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 test/pacman/tests/remove031.py

Re: [pacman-dev] [PATCH] create a typedef for enum _alpm_errno_t

2011-11-14 Thread Dave Reisner
On Mon, Nov 14, 2011 at 08:34:17AM -0600, Dan McGee wrote: > On Fri, Oct 28, 2011 at 9:03 PM, Jonathan Conder > wrote: > > This is consistent with the other enums and structs, and should be > > slightly more readable. > > > > Signed-off-by: Jonathan Conder > Definitely more readable and consiste

[pacman-dev] [PATCH] makepkg.conf: disable motd printing for rsync DLAGENT

2011-11-15 Thread Dave Reisner
Fixes FS#26806. Signed-off-by: Dave Reisner --- Dear Sirs, It is with great auspiciousness and delight that I present to you this most complex work of art for which many candles were burned into the night. I implore all of you to review my work as I'm sure that the slightest breeze may

[pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-17 Thread Dave Reisner
. NB: We don't need to worry about leading whitespace because it will cause a syntax error (when unquoted), or fail validation (when quoted). Signed-off-by: Dave Reisner --- Too late to squeeze this into maint? scripts/makepkg.sh.in |4 ++-- 1 files changed, 2 insertions(+), 2 dele

[pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-18 Thread Dave Reisner
error, or fail validation. Signed-off-by: Dave Reisner --- scripts/makepkg.sh.in |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 085fbb9..f39e9d1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1

Re: [pacman-dev] [PATCH] allow querying fileowner for directories

2011-11-20 Thread Dave Reisner
On Sun, Nov 20, 2011 at 12:18:59PM -0500, andrew.gregor...@gmail.com wrote: > From: Andrew Gregory > > Not allowing fileowner queries for directories was an unnecessary > limitation. Queries for directories have poor performance due to > having to call real_path on every directory listed in ever

Re: [pacman-dev] [PATCH] allow querying fileowner for directories

2011-11-20 Thread Dave Reisner
On Sun, Nov 20, 2011 at 01:07:14PM -0500, Andrew Gregory wrote: > On Sun, 20 Nov 2011 12:39:11 -0500 > Dave Reisner wrote: > > > On Sun, Nov 20, 2011 at 12:18:59PM -0500, andrew.gregor...@gmail.com > > wrote: > > > From: Andrew Gregory > > > &

[pacman-dev] [PATCH] makepkg: avoid using comm for diff'ing package lists

2011-11-21 Thread Dave Reisner
Whereas comm will check inputs to see if they're sorted (and warn when they aren't), grep doesn't even care about ordering. In this particular instance -- neither do we. We're only interested that the two lists are equivalent. Fixes FS#26580. Signed-off-by: Dave R

Re: [pacman-dev] [PATCH] makepkg: avoid using comm for diff'ing package lists

2011-11-21 Thread Dave Reisner
ignore this garbage... On Mon, Nov 21, 2011 at 11:46:05PM -0500, Dave Reisner wrote: > Whereas comm will check inputs to see if they're sorted (and warn when > they aren't), grep doesn't even care about ordering. In this particular > instance -- neither do we. We're

[pacman-dev] [PATCH] makepkg: avoid using comm for diff'ing package lists

2011-11-21 Thread Dave Reisner
Whereas comm will check inputs to see if they're sorted (and warn when they aren't), grep doesn't even care about ordering. In this particular instance -- neither do we. We're only interested that the two lists are equivalent. Fixes FS#26580. Signed-off-by: Dave R

[pacman-dev] [PATCH] makepkg.5: fix typo s/tar,bz2/tar.bz2/

2011-11-23 Thread Dave Reisner
Signed-off-by: Dave Reisner --- doc/makepkg.conf.5.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index 2778361..db1e6d5 100644 --- a/doc/makepkg.conf.5.txt +++ b/doc/makepkg.conf.5.txt @@ -215,7 +215,7 @@ Options

[pacman-dev] [PATCH] sync: avoid checking file conflicts with --dbonly

2011-11-24 Thread Dave Reisner
Scratches my own itch from FS#25667 Signed-off-by: Dave Reisner --- lib/libalpm/sync.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 3817ec8..534499a 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -1160,7

Re: [pacman-dev] [PATCH] sync: avoid checking file conflicts with --dbonly

2011-11-25 Thread Dave Reisner
On Fri, Nov 25, 2011 at 04:17:12PM +0100, Nagy Gabor wrote: > > Scratches my own itch from FS#25667 > > > > Signed-off-by: Dave Reisner > > --- > > lib/libalpm/sync.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff

Re: [pacman-dev] [PATCH] contrib/paclist: Add "--help" command line parameter

2011-12-05 Thread Dave Reisner
On Mon, Dec 05, 2011 at 09:11:28AM -0600, Dan McGee wrote: > On Sun, Dec 4, 2011 at 10:21 AM, Lukas Fleischer > wrote: > > On Sat, Dec 03, 2011 at 11:56:09AM -0600, Dan McGee wrote: > >> On Fri, Dec 2, 2011 at 6:44 PM, Lukas Fleischer > >> wrote: > >> > On Fri, Dec 02, 2011 at 10:10:14AM -0600, D

Re: [pacman-dev] [PATCH 2/2] repo-add: enforce maximum .sig file size

2011-12-05 Thread Dave Reisner
On Mon, Dec 05, 2011 at 10:09:45AM -0600, Dan McGee wrote: > This prevents user error in adding a file generated via `gpg --sign` > rather than `--detach-sign`, for example. The same 16KiB limit is used > we use in our pacman download code. > > The section is moved above the checksum generation to

Re: [pacman-dev] [PATCH] Add 'silent-rules' to automake setup in configure.ac

2011-12-07 Thread Dave Reisner
On Wed, Dec 07, 2011 at 09:58:49AM -0600, Dan McGee wrote: > This is awesome, and I don't know why we haven't already done this. It > gives us the much more less verbose make output in a few different ways: > > * If you run `make V=0`, you will get the quiet output. > * If you run `./configure --e

Re: [pacman-dev] [PATCH] Add 'silent-rules' to automake setup in configure.ac

2011-12-07 Thread Dave Reisner
On Wed, Dec 07, 2011 at 10:11:18AM -0600, Dan McGee wrote: > On Wed, Dec 7, 2011 at 10:08 AM, Dave Reisner wrote: > > On Wed, Dec 07, 2011 at 09:58:49AM -0600, Dan McGee wrote: > >> This is awesome, and I don't know why we haven't already done this. It > >>

Re: [pacman-dev] [PATCH] Use automake verbose helpers in custom make rules

2011-12-07 Thread Dave Reisner
On Wed, Dec 07, 2011 at 12:33:41PM -0600, Dan McGee wrote: > This converts our script generation to use the built-in AM_V_GEN macro, > which honors the V= setting passed to make and allows one to see the > full command if they truly desire. The AM_V_at macro is also used in > place of an explicit @

[pacman-dev] [PATCH] makepkg: split source elements when looking for sigs

2011-12-10 Thread Dave Reisner
Allows renamed .asc/.sig files to be still discovered by makepkg. This is needed for a package such as PuTTY, which provides abnormally named sig files (.DSA and .RSA) which are valid input for gpg --verify. Signed-off-by: Dave Reisner --- Related: do we want to natively support .SIG and .ASC as

[pacman-dev] [PATCH] include config.h via Makefiles

2011-12-21 Thread Dave Reisner
igned-off-by: Dave Reisner --- Note that when I say "portable", I mean gcc, clang, and icc all support the option. I think that covers most of our bases. lib/libalpm/Makefile.am |3 +++ lib/libalpm/add.c|2 -- lib/libalpm/alpm.c |2 -- lib/libalpm/backup.c

Re: [pacman-dev] [PATCH] Allow comments after repo section header in pacman.conf

2011-12-22 Thread Dave Reisner
On Thu, Dec 22, 2011 at 05:49:47PM +1000, Allan McRae wrote: > Pacman assumes that the final character of a line specifing a repo > in pacman.conf is a "]". But it did not clean whitespace from the > line after removing any comments. So lines like: > > [allanbrokeit] # could break system > > c

Re: [pacman-dev] [PATCH] pacman-key: Add some variable quotes and fix vim modeline for securemodelines

2011-12-23 Thread Dave Reisner
On Fri, Dec 23, 2011 at 03:15:12PM +0100, Timothy Redaelli wrote: > From: Timothy Redaelli > > Signed-off-by: Timothy Redaelli > --- > scripts/pacman-key.sh.in |8 > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.

[pacman-dev] [PATCH 1/3] pacman/util: return size_t from strtrim

2011-12-23 Thread Dave Reisner
Instead of returning the same value as the parameter to this function, return the length of the string, which can be useful to the caller when its non-zero (e.g. to find the end of the string). Signed-off-by: Dave Reisner --- This should make an earlier email from dan make a bit more sense when

[pacman-dev] [PATCH 2/3] pactree: update with new strtrim function

2011-12-23 Thread Dave Reisner
Signed-off-by: Dave Reisner --- src/util/pactree.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/util/pactree.c b/src/util/pactree.c index 55d63d7..77ee75e 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -117,13 +117,13 @@ char *strndup

[pacman-dev] [PATCH 3/3] pactree: cleanup register_syncs

2011-12-23 Thread Dave Reisner
- take advantage of the new strtrim return value - tighten scope on line pointer Signed-off-by: Dave Reisner --- src/util/pactree.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/util/pactree.c b/src/util/pactree.c index 77ee75e..0adc2ea 100644 --- a

Re: [pacman-dev] [PATCH] [RFC] makepkg: calculate exact total file size

2011-12-25 Thread Dave Reisner
On Sun, Dec 25, 2011 at 08:37:24PM +1000, Allan McRae wrote: > The current calculation of the total file size for a package using "du" > suffers from issues in portability and correctness. Especially on btrfs, > this can result in clearly wrong package information such as: > > Download Size : 14

Re: [pacman-dev] [PATCH] [RFC] makepkg: calculate exact total file size

2011-12-25 Thread Dave Reisner
On Sun, Dec 25, 2011 at 06:20:27PM +0100, Florian Pritz wrote: > On 25.12.2011 16:06, Dave Reisner wrote: > > On Sun, Dec 25, 2011 at 08:37:24PM +1000, Allan McRae wrote: > >> The current calculation of the total file size for a package using "du" > >> s

Re: [pacman-dev] [PATCH] [RFC] makepkg: calculate exact total file size

2011-12-25 Thread Dave Reisner
On Sun, Dec 25, 2011 at 11:50:57PM +0100, Florian Pritz wrote: > On 25.12.2011 23:09, Allan McRae wrote: > > On 26/12/11 03:27, Dave Reisner wrote: > >> On Sun, Dec 25, 2011 at 06:20:27PM +0100, Florian Pritz wrote: > >>> On 25.12.2011 16:06, Dave Reisner wrote: &g

Re: [pacman-dev] [PATCH 5/6] contrib: add install rules for bash and zsh completion

2011-12-31 Thread Dave Reisner
On Sat, Dec 31, 2011 at 09:07:12PM -0600, Dan McGee wrote: > Signed-off-by: Dan McGee > --- > > If anyone has any exotic builds that this breaks in, let me know, but since we > now install everything else we should probably do these too. This vastly > simplifies the pacman-contrib PKGBUILD to say

[pacman-dev] [PATCH] add new pactest for syncfirst with recursive deps

2012-01-02 Thread Dave Reisner
Add 1 failing for the -Su case, and the same case using -S (and passing). This is based on a real (current) issue of upgrading staging chroots with the new pacman in staging for a libarchive build, and a new toolchain in testing. Signed-off-by: Dave Reisner --- Longest. pactest. ever. And its

[pacman-dev] [PATCH 1/2] makepkg: abstract license check into separate function

2012-01-07 Thread Dave Reisner
Signed-off-by: Dave Reisner --- scripts/makepkg.sh.in | 16 ++-- 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 13185ee..eada195 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1102,6 +1102,15

[pacman-dev] [PATCH 2/2] makepkg: check for license when creating srcpackage

2012-01-07 Thread Dave Reisner
Signed-off-by: Dave Reisner --- scripts/makepkg.sh.in |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index eada195..89681ea 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1336,6 +1336,8

Re: [pacman-dev] [PATCH 1/2] makepkg: abstract license check into separate function

2012-01-08 Thread Dave Reisner
On Sun, Jan 08, 2012 at 10:16:49PM +1000, Allan McRae wrote: > On 08/01/12 04:27, Dave Reisner wrote: > > Signed-off-by: Dave Reisner > > --- > > scripts/makepkg.sh.in | 16 ++-- > > 1 files changed, 10 insertions(+), 6 deletions(-) > > > &g

Re: [pacman-dev] [PATCH] makepkg: fix missing source file detection

2012-01-08 Thread Dave Reisner
On Sun, Jan 08, 2012 at 10:04:20PM +1000, Allan McRae wrote: > Declaring the variable as local on the same line as the assignment > results in result of the assignment being returned rather than the > result of the function on the righthand side of the assignment. > > Declaring the variable as loc

Re: [pacman-dev] Couple of questions about libalpm doc, and pacman/copyright

2012-01-09 Thread Dave Reisner
On Mon, Jan 09, 2012 at 07:09:12PM +0100, jjacky wrote: > Hey there, > > So I've been working on a little app using libalpm, and I have a > couple of questions. Hopefully it's okay to ask this here. > > First off, a quick question regarding the doc. Looking at the source > code i see functions ar

Re: [pacman-dev] Couple of questions about libalpm doc, and pacman/copyright

2012-01-09 Thread Dave Reisner
On Mon, Jan 09, 2012 at 12:47:29PM -0600, Dan McGee wrote: > On Mon, Jan 9, 2012 at 12:41 PM, jjacky wrote: > > > > On 01/09/12 19:28, Dave Reisner wrote: > >> > >> On Mon, Jan 09, 2012 at 07:09:12PM +0100, jjacky wrote: > >>> > >>> He

[pacman-dev] [PATCH] updpkgsums: add new contrib script

2012-01-09 Thread Dave Reisner
n-place in PKGBUILDs +# +# Copyright (C) 2012 Dave Reisner +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any lat

Re: [pacman-dev] [PATCH] updpkgsums: add new contrib script

2012-01-10 Thread Dave Reisner
On Mon, Jan 09, 2012 at 08:51:57PM -0500, Dave Reisner wrote: > updpkgsums updates checksums in a PKGBUILD "in place" > --- > This is really a whole lot of sanity checking and very little actual noise, > but given what this script does (deleting a file), I chose to err on

[pacman-dev] [mkinitcpio][PATCH 1/5] dsdt: remove hook. this has been defunct for years

2012-01-12 Thread Dave Reisner
Refer to commit 9a9e0d68555 in the kernel where Linus removes this and says "to be revisited later". The only option (currently) is to built this into your kernel image. Suggested by FS#27906. Signed-off-by: Dave Reisner --- install/dsdt | 14 -- 1 files changed, 0

[pacman-dev] [mkinitcpio][PATCH 2/5] udev: update for udev 176

2012-01-12 Thread Dave Reisner
- firmware handling is now a udevd builtin - udevadm may move -- let a path lookup find it Signed-off-by: Dave Reisner --- PKGBUILD |2 +- install/udev |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index a6a083f..fc6b398 100644 --- a

[pacman-dev] [mkinitcpio][PATCH 4/5] init: mount separate /usr

2012-01-12 Thread Dave Reisner
Use findmnt to detect the existance of a separate /usr partition existing in the real root. If it does exist, fetch the options for it and mount it. This currently makes a lot of assumptions and won't be very friendly towards something such as a dm-crypt device. Signed-off-by: Dave Re

[pacman-dev] [mkinitcpio][PATCH 3/5] base: add findmnt as a part of the base layout

2012-01-12 Thread Dave Reisner
This is required for mounting a separate /usr. While the shutdown hook is essentially a soft requirement for a separate /usr, we shouldn't break init. Signed-off-by: Dave Reisner --- install/base |1 + install/shutdown |2 +- 2 files changed, 2 insertions(+), 1 deletions(-)

[pacman-dev] [mkinitcpio][PATCH 5/5] autodetect: try to find /usr partition fstype

2012-01-12 Thread Dave Reisner
Signed-off-by: Dave Reisner --- install/autodetect | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/install/autodetect b/install/autodetect index abc0fa0..7f40b9c 100644 --- a/install/autodetect +++ b/install/autodetect @@ -3,6 +3,12 @@ build

[pacman-dev] [PATCH] fetch_url: look for files in cache before downloading

2012-01-14 Thread Dave Reisner
We lost this logic somewhere between the libfetch and libcurl transition, as it existed in the internal downloader, but was pulled back only into the sync workflow. Add a helper function that will let us check for existance in the filecache prior to calling the downloader. Signed-off-by: Dave

Re: [pacman-dev] XfreCommand curl option in pacman.conf and makepkg.conf

2012-01-18 Thread Dave Reisner
On Wed, Jan 18, 2012 at 04:13:29PM +0530, Keshav P R wrote: > Hi, > Using > > XferCommand = /usr/bin/curl -C - -f -o %o %u > > XferCommand = /usr/bin/curl -C - -f %u > %o > > enables curl to resume downloads to %o , if it is supported. Using > file redirection "> %o" makes curl restart the (

Re: [pacman-dev] [PATCH] makepkg: fix error on unnecessary -r

2012-01-20 Thread Dave Reisner
On Fri, Jan 20, 2012 at 11:24:23PM +1000, Allan McRae wrote: > The grep statement used to check for a difference between the > installed package list before and after resolving dependencies > returns 1 if there is no difference. This sets of the error > trap when "-r" is used "unnecessarily". > >

Re: [pacman-dev] compiling pacman and python wrapper

2012-01-22 Thread Dave Reisner
On Sun, Jan 22, 2012 at 07:22:44PM +, Andrea Crotti wrote: > On 01/22/2012 04:56 PM, Dan McGee wrote: > >./autogen.sh if you are building from git and not a tarball. -Dan > > Ok thanks, the point was just that it was not written anywhere, maybe > it would be good to add a section INSTALL FROM

[pacman-dev] [PATCH 1/2] lib/dload: enforce usage of TCP keepalives

2012-01-22 Thread Dave Reisner
This is particularly important in the case of FTP control connections, which may be closed by rogue NAT/firewall devices detecting idle connections on larger transfers which may take 5-10+ minutes. Signed-off-by: Dave Reisner --- This is basically on the advice of Daniel Stenberg, who mentions

[pacman-dev] [PATCH 2/2] lib/dload: give uniform naming to curl CB functions

2012-01-22 Thread Dave Reisner
Signed-off-by: Dave Reisner --- lib/libalpm/dload.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 790080c..c1be528 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -90,7 +90,7 @@ static void inthandler

Re: [pacman-dev] [PATCH] makepkg: fix error on unnecessary -r

2012-01-22 Thread Dave Reisner
On Mon, Jan 23, 2012 at 12:08:14PM +1000, Allan McRae wrote: > On 20/01/12 23:59, Dave Reisner wrote: > > On Fri, Jan 20, 2012 at 11:24:23PM +1000, Allan McRae wrote: > >> The grep statement used to check for a difference between the > >> installed package list

Re: [pacman-dev] [PATCH] makepkg: fix error on unnecessary -r

2012-01-22 Thread Dave Reisner
On Mon, Jan 23, 2012 at 12:48:37PM +1000, Allan McRae wrote: > On 23/01/12 12:13, Dave Reisner wrote: > > On Mon, Jan 23, 2012 at 12:08:14PM +1000, Allan McRae wrote: > >> On 20/01/12 23:59, Dave Reisner wrote: > >>> On Fri, Jan 20, 2012 at 11:24:23PM +1000, Alla

Re: [pacman-dev] [PATCH 2/2] lib/dload: give uniform naming to curl CB functions

2012-01-23 Thread Dave Reisner
On Mon, Jan 23, 2012 at 09:25:18AM -0600, Dan McGee wrote: > On Sun, Jan 22, 2012 at 7:31 PM, Dave Reisner wrote: > > Signed-off-by: Dave Reisner > > --- > >  lib/libalpm/dload.c |    8 > >  1 files changed, 4 insertions(+), 4 deletions(-) > > > >

[pacman-dev] [PATCH 1/2] add library support for tuning TCP_KEEPALIVE

2012-01-23 Thread Dave Reisner
This adds three new options to control the behavior of TCP keepalives: - CURLOPT_TCP_KEEPALIVE: enable/disable probes - CURLOPT_TCP_KEEPIDLE: idle time before sending first probe - CURLOPT_TCP_KEEPINTVL: delay between successive probes While not all operating systems support the TCP_KEEPIDLE and

[pacman-dev] [PATCH 2/2] curl: use new library-side TCP_KEEPALIVE options

2012-01-23 Thread Dave Reisner
Use the new library CURLOPT_TCP_KEEPALIVE rather than disabling this via the sockopt callback. If --keepalive-time is used, apply the value to CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. --- The matching changes for the front end to use the new options from the previous patch. docs/curl.1

[pacman-dev] [PATCH] lib/sync: use full delta size as max download size

2012-02-12 Thread Dave Reisner
The max filesize for a delta download must be the full size of the delta file, not just what's remaining. Fixes FS#28345 Signed-off-by: Dave Reisner --- lib/libalpm/sync.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c

Re: [pacman-dev] pacman -R default answer

2012-02-12 Thread Dave Reisner
On Mon, Feb 13, 2012 at 01:55:03AM +, Diogo Sousa wrote: > Hello, > > when removing packages the default answer to "Do you want to remove > these packages?" is Yes. Shouldn't we be conservative and provide "no" > as the default? > > Diogo Sousa > Presumably the user intends to do what they

<    1   2   3   4   5   6   7   8   9   10   >