Re: [pacman-dev] [PATCH 1/3] makepkg: refactor archive compression for reusability

2017-09-13 Thread Allan McRae
On 29/08/17 15:01, Eli Schwartz wrote: > This allows for more easily extending the list of allowed compression > methods, as it has to be modified in only one place. > > Also allow the user to specify their own preferred command + options for > source packages in addition to compiled packages. Cur

Re: [pacman-dev] [PATCH] Allow query of file owners to work with non-existing files

2017-09-13 Thread Allan McRae
On 14/09/17 16:16, Vladimir Panteleev wrote: > On 2017-09-14 04:21, Allan McRae wrote: >> This test passes before and after your patch... And the etc/config >> file is installed into the test root, so you are not testing a -Qo on a >> missing file. > > You're rig

Re: [pacman-dev] [PATCH 2/3] makepkg: add support for the zst format

2017-09-13 Thread Allan McRae
On 29/08/17 15:01, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- > > This shouldn't be added until we are sure pacman actually knows how to > read .zst files, which requires libarchive support that is currently > only in git master. > > I have no idea when either libarchive or pacman p

Re: [pacman-dev] [PATCH] Allow query of file owners to work with non-existing files

2017-09-13 Thread Allan McRae
On 02/08/17 12:54, Vladimir Panteleev wrote: > Previously, attempting to query the owner of a file owned by some > package but absent from the filesystem would fail. This could lead to > a small annoyance - if a user or misbehaving software accidentally > deleted a file owned by some package, and t

Re: [pacman-dev] [PATCH] Make the flags used for sed -i configurable

2017-09-13 Thread Allan McRae
On 12/08/17 07:15, Alastair Hughes wrote: > Not all sed implementations on linux accept the --follow-symlinks > argument, so let the user configure the arguments passed to sed if > required. > > Signed-off-by: Alastair Hughes > --- Ack. Required one addition: diff --git a/configure.ac b/config

Re: [pacman-dev] [PATCH] makepkg: add lz4 compression support

2017-09-13 Thread Allan McRae
On 12/09/17 19:09, Alex Butler wrote: > Adds opt-in lz4 compression of *pkg.tar files with makepkg. > This is nice to have as an option for very fast compression. > > Signed-off-by: Alex Butler > --- I think there are already options for very fast compression... but fine. This would need addit

[pacman-dev] [PATCH] libmakepkg: grammar fix

2017-09-13 Thread Allan McRae
Signed-off-by: Allan McRae --- scripts/libmakepkg/lint_package.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libmakepkg/lint_package.sh.in b/scripts/libmakepkg/lint_package.sh.in index ff0894ec..8cf79d73 100644 --- a/scripts/libmakepkg/lint_package.sh.in

Re: [pacman-dev] [PATCH v3] makepkg: respect $SOURCE_DATE_EPOCH to activate reproducible builds

2017-09-12 Thread Allan McRae
On 24/08/17 07:12, Eli Schwartz wrote: > If SOURCE_DATE_EPOCH is set, `touch` all source files before running > build() to fix the modification times. This works around build systems > and compilers that embed the file modification times into the file > contents of release artifacts. > > Signed-of

Re: [pacman-dev] [PATCH v3] libmakepkg/integrity: check for invalid tags

2017-09-12 Thread Allan McRae
On 28/07/17 13:59, Eli Schwartz wrote: > As per > https://lists.archlinux.org/pipermail/arch-general/2017-July/043876.html > git doesn't check that the tag name matches what an annotated tag object > *thinks* it should be called. This is a bit of a theoretical attack and > some would argue that we

Re: [pacman-dev] [Patch 1/1] Fix CVE-2016-5434 (DoS/loop and out of boundary read)

2017-09-12 Thread Allan McRae
On 06/09/17 02:04, Nils Freydank wrote: > This is an update to fix style issues (indentation, newlines etc.) that were > addressed on IRC. > > Original message: >> This is a rewrite of Tobias Stoeckmann’s patch from June 2016[1] using >> functions instead of macros. (Thanks to Tobias for explanat

Re: [pacman-dev] Request

2017-08-12 Thread Allan McRae
Pacman is written in C, but makepkg is a shell script. I always recommend new contributors look at something they personally want to see improved. Also, make sure you ask before implementing something too large to avoid it being rejected as an unwanted feature. A On 12/08/17 18:28, Shameem Fair

Re: [pacman-dev] [PATCH] libmakepkg/integrity: check for invalid tags

2017-07-27 Thread Allan McRae
On 06/07/17 03:48, Eli Schwartz wrote: > As per > https://lists.archlinux.org/pipermail/arch-general/2017-July/043876.html > git doesn't check that the tag name matches what an annotated tag object > *thinks* it should be called. This is a bit of a theoretical attack and > some would argue that we

Re: [pacman-dev] [PATCH] makepkg: respect $SOURCE_DATE_EPOCH to activate reproducible builds

2017-07-27 Thread Allan McRae
On 07/07/17 03:26, Eli Schwartz wrote: > If SOURCE_DATE_EPOCH is set, `touch` all source files before running > build() to fix the modification times. This works around build systems > and compilers that embed the file modification times into the file > contents of release artifacts. > I think th

Re: [pacman-dev] [PATCH] Fix coding style issue in pacman/util.c

2017-07-27 Thread Allan McRae
On 14/07/17 05:30, Michael Straube wrote: > Add missing braces to some one-line if blocks. > > Signed-off-by: Michael Straube I'll pull these patches, but for future reference I really don't like patches just to fix minor coding style violations unless they are part of a patchset touching the sa

Re: [pacman-dev] Outdated comments in pacman.conf

2017-07-16 Thread Allan McRae
On 16/07/17 18:48, Andrey Azarov wrote: > Hello! > > I found what comments in ls /etc/pacman.conf about signature verification > is out of date: > This is the copy of pacman.conf provided by Arch Linux, and not the version in the pacman development repository. We only handle bugs for the latter

[pacman-dev] [GIT] The official pacman repository branch, master, updated. v5.0.1-182-gbcc9c417

2017-07-06 Thread Allan McRae
n error by checking if the input list was empty. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae commit c44c649a5280189ea28a54b82e60fc38279fed23 Author: Levente Polyak Date: Thu Jul 6 13:57:27 2017 +1000 makepkg: add more information to .BUILDINFO The .BUIL

[pacman-dev] [PATCH] makepkg: add more information to .BUILDINFO

2017-07-05 Thread Allan McRae
From: Levente Polyak The .BUILDINFO file should retain all the information needed to reproducibly build a package. Add some extra information to the file and also provide a version number to keep track of future changes. Signed-off-by: Allan McRae --- @Levente: with other changes suggested

[pacman-dev] [PATCH] makepkg: set default value for PACKAGER

2017-07-05 Thread Allan McRae
In write_pkginfo, we checked if $PACKAGER was undefined, and gave a default value if not. Just do this upfront to simplify this function. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/makepkg.sh.in b

[pacman-dev] [PATCH] makepkg: always write pkgbase

2017-07-05 Thread Allan McRae
There is little savings in only writing pkgbase when different to pkgname, and it makes determining the pkgbase by parsing .PKGINFO slightly easier. Lets just write it... Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[pacman-dev] [PATCH] makepkg: do not write basever

2017-07-05 Thread Allan McRae
Since 8a02abcf19, this attribute will never exist. Remove check to write it. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 1f1217f4..f9872355 100644 --- a/scripts/makepkg.sh.in

Re: [pacman-dev] [PATCH] libmakepkg/integrity: check for invalid tags

2017-07-03 Thread Allan McRae
On 04/07/17 13:15, Eli Schwartz wrote: > As per > https://lists.archlinux.org/pipermail/arch-general/2017-July/043876.html > git doesn't check that the tag name matches what an annotated tag object > *thinks* it should be called. This is a bit of a theoretical attack and > some would argue that we

Re: [pacman-dev] Correct alpm version to bind to?

2017-06-12 Thread Allan McRae
On 13/06/17 13:12, Colin Woodbury wrote: > Hi all, I'm the Aura dev. I'm writing alpm bindings for it, and I got a > fair distance through before I realized that my up-to-date paper copies and > the version of `alpm.h` actually bundled with pacman on my machine are > quite different. The local one

Re: [pacman-dev] [PATCH 1/1] alpm: use flock() for db lock

2017-06-06 Thread Allan McRae
On 07/06/17 07:56, Christian Hesse wrote: > Allan McRae on Wed, 2017/06/07 07:37: >> On 07/06/17 07:26, Christian Hesse wrote: >>> From: Christian Hesse >>> >>> We used to check for file existens, but that suffers from stale lock >>> files caused b

[pacman-dev] [GIT] The official pacman repository branch, release/5.0.x, updated. v5.0.1-53-g34d8beae

2017-05-31 Thread Allan McRae
ow. - Log - commit 34d8beaef87bab7bb01dd5825b8ffa0a8fda010c Author: Allan McRae Date: Wed May 31 23:47:00 2017 +1000 Pull translation changes for 5.0.2 Signed-off-by: Allan McRae commit d39271ab56a1ac33001d26823e7b563655668eed Aut

Re: [pacman-dev] %PGPSIG% vs .sig

2017-05-28 Thread Allan McRae
On 29/05/17 15:31, Brandon Milton wrote: > Hello all, > > This is my first post to the mailing list, so please feel free to correct > me if I'm in the wrong place. > > While exploring the pacman mirror layout (ie what is hosted by mirrors), I > noticed that for each package, there are two copies

[pacman-dev] Unifying package information files - Was: Repository management

2017-05-16 Thread Allan McRae
On 11/05/17 07:54, Andrew Gregory wrote: >> 2) Do we need a better (read "more easily maintainable") tool for >> handling database generation and updates? libalpm already can read in >> information package files, so we could add libalpm/db_write.c with the >> database creation functions. Should

Re: [pacman-dev] [PATCH 5/5] makepkg: unify source file times for improved build reproducibility

2017-05-16 Thread Allan McRae
On 16/05/17 22:28, Eli Schwartz wrote: > On 05/15/2017 08:51 PM, Allan McRae wrote: >> Given I think python packages are the primary problem here, I'm going to >> propose another solution Clearly embedding the timestamp in the >> pyc/o files is a design decision a

Re: [pacman-dev] [PATCH 5/5] makepkg: unify source file times for improved build reproducibility

2017-05-15 Thread Allan McRae
On 13/05/17 01:09, Andrew Gregory wrote: > On 05/12/17 at 12:41pm, Levente Polyak wrote: >> Signed-off-by: Levente Polyak >> --- >> scripts/makepkg.sh.in | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in >> index bd92c526..83c80fa7 100644

Re: [pacman-dev] Repository management

2017-05-10 Thread Allan McRae
On 11/05/17 02:54, Dave Reisner wrote: > On Tue, May 09, 2017 at 10:54:44PM +1000, Allan McRae wrote: >> Hi all, >> >> Every time I attempt to work on repo-add, I find it to be a very >> difficult endeavour. Even though it is half the size of makepkg >> (without

[pacman-dev] Repository management

2017-05-09 Thread Allan McRae
Hi all, Every time I attempt to work on repo-add, I find it to be a very difficult endeavour. Even though it is half the size of makepkg (without even including any of libmakepkg), it is much more convoluted to work on. We also have a weird repository database system. We have: - .db dbs with pa

[pacman-dev] [PATCH] Handle empty string passed to query_owner

2017-05-08 Thread Allan McRae
Passing an empty string to pacman -Qo results in: error: No package owns Treat an empty string being passed the same as recieving a NULL value and exit searching for an owner. Signed-off-by: Allan McRae --- Running 'pacman -Qo ""' will now just exit pacman. I'm not

[pacman-dev] [PATCH] Do not continuously try to open an invalid database

2017-05-08 Thread Allan McRae
e can "open" and "fstat" but not read from as invalid to avoid this. Signed-off-by: Allan McRae --- lib/libalpm/be_sync.c | 3 +++ lib/libalpm/util.c| 1 + 2 files changed, 4 insertions(+) diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c index 06f509a6..46959298

Re: [pacman-dev] [PATCH] Check for all return values of _alpm_key_in_keychain

2017-04-23 Thread Allan McRae
On 21/04/17 14:07, David Phillips wrote: > This fixes a bug I encountered with a GPG keyring where the > key id used to locate a key in the keyring was ambiguous within > my keychain. > > This commit ensures that all valid return values are checked to > catch this and related error cases rather th

Re: [pacman-dev] [RFC] Make PKGBUILD attributes configurable

2017-04-23 Thread Allan McRae
On 23/04/17 10:03, Dustin Falgout wrote: > Sure, no problem. Currently, our build server uses some custom attributes in > the PKGBUILD for additional metadata needed for things like release > monitoring. I would like to start using .SRCINFO files on the server because > they are easier to parse

Re: [pacman-dev] [RFC] Make PKGBUILD attributes configurable

2017-04-22 Thread Allan McRae
On 23/04/17 09:36, Dustin Falgout wrote: > I would like a way to include custom attributes from the PKGBUILD in the > output of the --printsrcinfo option. So basically, this... > > pkgbase = pacman > pkgdesc = A library-based package manager with dependency support > pkgver = 5.0.1 >

Re: [pacman-dev] [PATCH 3/4] makepkg: unify source file times for improved build reproducibility

2017-04-20 Thread Allan McRae
On 21/04/17 13:36, Eli Schwartz wrote: > On 04/20/2017 11:01 PM, Allan McRae wrote: >> I am probably moving this to after source extraction/prepare() running, >> so it can be skipped with --noextract. > > But --noextract depends on your having at some point previously run >

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 23:34, Andrew Gregory wrote: > On 04/17/17 at 08:41pm, Allan McRae wrote: >> This patch introduces the SOURCE_DATE_EPOCH environmental variable. All >> files >> in a package are adjusted to have their modification dates set to the value >> of SOURCE_DA

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 23:37, Andrew Gregory wrote: > On 04/17/17 at 10:04pm, Allan McRae wrote: >> On 17/04/17 20:41, Allan McRae wrote: >>> + # ensure all elements of the package have the same mtime >>> + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; >>> + >&g

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 23:37, Andrew Gregory wrote: > On 04/17/17 at 10:04pm, Allan McRae wrote: >> On 17/04/17 20:41, Allan McRae wrote: >>> + # ensure all elements of the package have the same mtime >>> + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; >>> + >&g

Re: [pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
On 17/04/17 20:41, Allan McRae wrote: > + # ensure all elements of the package have the same mtime > + find . -exec touch -d @$SOURCE_DATE_EPOCH {} \; > + > msg2 "$(gettext "Generating .MTREE file...")" > - list_package_files | LANG=C

[pacman-dev] [PATCH 4/4] [RFC] makepkg: unify times for generated files in srcdir before packaging

2017-04-17 Thread Allan McRae
From: Levente Polyak Signed-off-by: Allan McRae --- [Allan] I'm told his is useful for some python packages that generate pyo/pyc files during package... I am undecided about its suitability for inclusion in makepkg yet. scripts/makepkg.sh.in | 2 ++ 1 file changed, 2 insertions(+)

[pacman-dev] [PATCH 3/4] makepkg: unify source file times for improved build reproducibility

2017-04-17 Thread Allan McRae
From: Levente Polyak Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 7692ade5..df4d6a06 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -475,6 +475,9 @@ run_prepare

[pacman-dev] [PATCH 2/4] makepkg: add more information to .BUILDINFO

2017-04-17 Thread Allan McRae
From: Levente Polyak The .BUILDINFO file should retain all the information needed to reproducibly build a package. Add some extra information to the file and also provide a version number to keep track of future changes. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 8 ++-- 1

[pacman-dev] [PATCH 1/4] makepkg: extract parts of the write_pkginfo for use elsewhere

2017-04-17 Thread Allan McRae
From: Levente Polyak Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 42a76004..d61c7fff 100644 --- a/scripts/makepkg.sh.in

[pacman-dev] [PATCH] makepkg: introduce SOURCE_DATE_EPOCH

2017-04-17 Thread Allan McRae
ment to be (potentially) reproducible in that the checksum of the generated package file will be the same. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in inde

[pacman-dev] [PATCH] makepkg: remove build date from .PKGINFO header

2017-04-17 Thread Allan McRae
This information is duplicated (in less friendly format) in the "builddate" entry and removing it improves reproducible packaging. Signed-off-by: Allan McRae --- scripts/makepkg.sh.in | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in inde

Re: [pacman-dev] [PATCH] be_sync: error out if a db cannot be parsed

2017-04-17 Thread Allan McRae
On 17/04/17 13:28, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > > See FS#49342 for an example of how to break a database in a way that was > previously silently ignored. The linked github issue includes a copy of an > actual broken db. > Looks like the ideal solution requires

[pacman-dev] [PATCH 1/2] makepkg: do not create symlinks in build directory

2017-04-17 Thread Allan McRae
Setting PKGDEST and friends enables us to keep all built packages in a single location. Symlinking these files into the build directory creates unnecessary clutter and requires clean-up in multiple places when removing old version. Signed-off-by: Allan McRae --- Does anyone use these symlinks

[pacman-dev] [PATCH 2/2] makepkg: create signature files outside of fakeroot

2017-04-17 Thread Allan McRae
With recent version of gpg, signing within fakeroot works on the first invocation, but fails on later runs. Sign all packages outside of fakeroot to avoid this issue. Fixes FS#49946. Signed-off-by: Allan McRae --- .../libmakepkg/integrity/generate_signature.sh.in | 34

[pacman-dev] [GIT] The official pacman repository branch, master, updated. v5.0.1-161-g4f2fea24

2017-04-16 Thread Allan McRae
d FS#51075 Includes patch submitted by Christian Braun. Signed-off-by: Michael Straube Signed-off-by: Allan McRae commit 3c013f68ac06d791830fd722b17bc771df47d436 Author: Andrew Gregory Date: Sun Apr 16 08:36:32 2017 -0400 run_chroot: label pipe endpoints for r

Re: [pacman-dev] [PATCH] run_chroot: label pipe endpoints for readability

2017-04-16 Thread Allan McRae
On 16/04/17 08:15, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > lib/libalpm/util.c | 27 +++ > 1 file changed, 15 insertions(+), 12 deletions(-) > > diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c > index 58efa5c7..36d8a7d7 100644 > --- a/lib/libalpm

Re: [pacman-dev] [PATCH 3/5] sortbydeps: factor out dep cycle warning

2017-04-16 Thread Allan McRae
On 16/04/17 07:57, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > lib/libalpm/deps.c | 70 > +- > 1 file changed, 37 insertions(+), 33 deletions(-) > > diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c > index 6f05f0d0..01e55

Re: [pacman-dev] [PATCH 1/5] graph.h: replace hardcoded values with an enum

2017-04-16 Thread Allan McRae
On 16/04/17 07:57, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > +enum __alpm_graph_vertex_state { > + ALPM_GRAPH_STATE_UNPROCESSED = 0, > + ALPM_GRAPH_STATE_PROCESSING = -1, > + ALPM_GRAPH_STATE_PROCESSED = 1 > +}; > + Why keep the -1, 0, 1 state when switching to

Re: [pacman-dev] [PATCH] Add --with-sudo configure option

2017-04-11 Thread Allan McRae
On 13/03/17 10:49, Drew DeVault wrote: > Allows you to specify an alternate command for running things as root, > such as OpenBSD's doas. > > Signed-off-by: Drew DeVault > --- > configure.ac | 9 + > scripts/Makefile.am | 1 + > scripts/makepkg.sh.in | 8 > 3 files ch

[pacman-dev] [GIT] The official pacman repository branch, master, updated. v5.0.1-150-g13ec13c8

2017-04-11 Thread Allan McRae
an be used more safely. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae commit 04d211effa8d65020887112ee30c7b3b0fc28ad3 Author: Andrew Gregory Date: Sun Apr 9 20:42:01 2017 -0400 add --overwrite option to ignore file conflicts Allows for safer, more fi

Re: [pacman-dev] [PATCH] unlink_file: strip trailing slashes

2017-04-11 Thread Allan McRae
On 12/04/17 12:00, Allan McRae wrote: > On 10/04/17 09:49, Andrew Gregory wrote: >> Subtle problems like this could be avoided by removing the trailing slashes >> from libalpm's internal file lists. Is there any reason not to remove them >> and >> use a field

Re: [pacman-dev] [PATCH] unlink_file: strip trailing slashes

2017-04-11 Thread Allan McRae
On 10/04/17 09:49, Andrew Gregory wrote: > Subtle problems like this could be avoided by removing the trailing slashes > from libalpm's internal file lists. Is there any reason not to remove them > and > use a field in the file_t struct to indicate type? It already has a mode > field > that we

Re: [pacman-dev] [PATCH] makepkg: add flag 'recvkeys' to retrieve PGP keys from 'validpgpkeys' in PKGBUILDs

2017-04-03 Thread Allan McRae
On 04/04/17 12:43, Bruno Pagani wrote: > Le 03/04/2017 à 19:02, Alli a écrit : > >>> Are you aware of the |keyserver-options auto-key-retrieve| from GPG? I >>> don’t say that this patch is useless, but just that this feature already >>> exists elsewhere somehow. >> Okay, I didn't know about this

Re: [pacman-dev] [PATCH] Replace @SIZECMD@ with POSIX-compatible command

2017-04-03 Thread Allan McRae
On 25/03/17 10:26, Mike Swanson wrote: > On Mon, 2017-03-20 at 15:19 +1000, Allan McRae wrote: >> On 20/03/17 12:55, Drew DeVault wrote: >>> Now uses wc -c $file | cut -d' ' -f1, which works using only POSIX >>> commands and removes the need for any platform-s

Re: [pacman-dev] [PATCH 1/2] add alpm_list_append_strdup

2017-04-03 Thread Allan McRae
On 19/02/17 08:09, Andrew Gregory wrote: > Makes error detection and handling easier for a common operation. > > Signed-off-by: Andrew Gregory OK Are you intending to spread the use of this function? A

Re: [pacman-dev] [PATCH] libalpm: Use archive_read_extract2

2017-04-03 Thread Allan McRae
On 07/03/17 06:15, Armin K wrote: > archive_read_extract() forces resolution of uid/gid to names > when extracting the tarball. This can lead to wrong file > ownership when using pacman with -r option and when uid/gid > differ in the host and in the chroot. > > archive_read_extract2() uses uid's a

Re: [pacman-dev] [PATCH] pactest: add --review option

2017-04-03 Thread Allan McRae
On 27/03/17 22:33, Andrew Gregory wrote: > Opens the test file(s), test output, and any log files in the test > environment in an editor after the tests run for review. Simplifies > debugging tests by avoiding the need to use --keep-root and manually > opening the relevant files. The editor used

Re: [pacman-dev] [PATCH] Ignore comments in INSTALL files (FS#51916)

2017-04-03 Thread Allan McRae
On 26/03/17 06:36, Michael Straube wrote: > If a comment in an INSTALL file contains the name of a valid > INSTALL file function but the function itself is not present, > pacman tries to execute that function. That leads to an error. > > Ignore comments in the grep function in libalpm/trans.c to >

Re: [pacman-dev] [PATCH] makepkg: add flag 'recvkeys' to retrieve PGP keys from 'validpgpkeys' in PKGBUILDs

2017-04-03 Thread Allan McRae
On 04/04/17 11:45, Bruno Pagani wrote: > Hi, > > Le 03/04/2017 à 18:37, alz...@gmail.com a écrit : > >> This makes automating PGP keys for verifying source file signatures possible. >> >> This may make it easier for package users and maintainers to obtain PGP keys >> used in PKGBUILDs. > > Are

Re: [pacman-dev] [PATCH] Replace @SIZECMD@ with POSIX-compatible command

2017-03-19 Thread Allan McRae
On 20/03/17 12:55, Drew DeVault wrote: > Now uses wc -c $file | cut -d' ' -f1, which works using only POSIX > commands and removes the need for any platform-specific usages. > I'm sure we had this in the past and changed to what we have currently. Can't remember why... compressing filesystems

Re: [pacman-dev] Non-existing user/group ownership and chroot

2017-03-05 Thread Allan McRae
On 06/03/17 09:04, Armin K. wrote: > On 06.03.2017 00:00, Allan McRae wrote: >> On 06/03/17 08:40, Armin K. wrote: >>> On 05.03.2017 23:38, Armin K. wrote: >>>> Hi all. >>>> >>>> I'm using pacman for my LFS install, and as part of that

Re: [pacman-dev] Non-existing user/group ownership and chroot

2017-03-05 Thread Allan McRae
On 06/03/17 08:40, Armin K. wrote: > On 05.03.2017 23:38, Armin K. wrote: >> Hi all. >> >> I'm using pacman for my LFS install, and as part of that, I also use >> hooks >> used by Arch for, say, systemd-sysusers, systemd-tmpfiles, etc. >> >> Some packages require that certain files/directories are

Re: [pacman-dev] [PATCH 1/4] util/pkgbuild: guard against unset variable

2017-03-01 Thread Allan McRae
On 02/03/17 14:46, Andrew Gregory wrote: > On 03/02/17 at 02:37pm, Allan McRae wrote: >> On 26/02/17 03:21, Andrew Gregory wrote: >>> Allows use under 'set -u'. >>> --- >>> scripts/libmakepkg/util/pkgbuild.sh.in | 2 +- >>> 1 file chan

Re: [pacman-dev] [PATCH 4/4] add basic makepkg test

2017-03-01 Thread Allan McRae
On 26/02/17 03:21, Andrew Gregory wrote: > --- > Makefile.am | 6 +- > configure.ac| 2 + > test/makepkg/Makefile.am| 9 +++ > test/makepkg/README | 15 > test/makepkg/test_functions.sh | 143 > ++

Re: [pacman-dev] [PATCH 1/4] util/pkgbuild: guard against unset variable

2017-03-01 Thread Allan McRae
On 26/02/17 03:21, Andrew Gregory wrote: > Allows use under 'set -u'. > --- > scripts/libmakepkg/util/pkgbuild.sh.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in > b/scripts/libmakepkg/util/pkgbuild.sh.in > index 2a4bd3af..08b35f

Re: [pacman-dev] [PATCH 0/2] Deprecate md5sums, show sha256sums as an example-by-default.

2017-02-26 Thread Allan McRae
Any further off-topic posting will result in permanent additions to the moderation queue (which is never checked). A

Re: [pacman-dev] [PATCH 0/2] Deprecate md5sums, show sha256sums as an example-by-default.

2017-02-23 Thread Allan McRae
On 24/02/17 08:59, Giancarlo Razzolini wrote: > Em fevereiro 23, 2017 19:22 Allan McRae escreveu: >> On 24/02/17 07:58, Eli Schwartz wrote: >>> Good luck convincing Allan (you'll *need* it...). >> >> Not going to happen... >> > > Allan, > >

Re: [pacman-dev] [PATCH 0/2] Deprecate md5sums, show sha256sums as an example-by-default.

2017-02-23 Thread Allan McRae
On 24/02/17 07:58, Eli Schwartz wrote: > Good luck convincing Allan (you'll *need* it...). Not going to happen...

Re: [pacman-dev] [PATCH 1/1] split repository and package with VerbosePkgLists

2017-02-13 Thread Allan McRae
On 29/01/17 23:41, Olivier Brunel wrote: > On Thu, 26 Jan 2017 11:02:30 +0100 > Christian Hesse wrote: > >> From: Christian Hesse >> >> Acting on packages from lots of different repositories makes the view >> look cluttered. So split repository and package with VerbosePkgLists. >> >> Signed-off-

Re: [pacman-dev] [PATCH v2] Provide a better guess about who the packager is.

2017-02-01 Thread Allan McRae
On 02/02/17 01:59, Kieran Colford wrote: > The system usually has enough information in various places to guess > the name and email of the person running the makepkg script. We can > use this to make the defaults more intelligent. This particular > implemenation should provide relatively good gu

Re: [pacman-dev] [PATCH] Provide a better guess about who the packager is.

2017-01-31 Thread Allan McRae
On 01/02/17 08:10, Kieran Colford wrote: > The system usually has enough information in various places to guess > the name and email of the person running the makepkg script. Use these > instead of defaulting to "Unknown Packager" to minimize configuration > necessary by the user. This particular

Re: [pacman-dev] [PATCH] zsh: use pacman instead of parsing pacman.conf

2017-01-27 Thread Allan McRae
On 27/01/17 01:53, Andrew Gregory wrote: > Hmmm? What's wrong with `pacconf --repo-list`? I promise I will > eventually finish moving it over to pacman. Great! Because I am not accepting partial fixes to all the issues we currently have with scripts parsing pacman.conf. A

Re: [pacman-dev] [PATCH] hooks: warn if reassignment overwrites previous setting

2017-01-14 Thread Allan McRae
On 15/01/17 00:39, Andrew Gregory wrote: > On 01/02/17 at 04:19pm, Stefan Klinger wrote: >> hooks: complain if multiple Exec options in alpm hook >> >> hooks: test for reassign Exec >> >> hook: Make reassignment to Exec yield a warning >> >> hooks: more consistency checks in hook definition >> >> h

Re: [pacman-dev] [PATCH] hooks: warn if reassignment overwrites previous setting

2017-01-12 Thread Allan McRae
On 03/01/17 01:19, Stefan Klinger wrote: > In hook definition files, repeated assignment to Description, Exec, > Type, and When silently overwrote previous settings. This yields a > warning now. > > Signed-off-by: Stefan Klinger > --- On closer review y ou have exposed two memory leaks here

Re: [pacman-dev] [PATCH] hooks: warn if reassignment overwrites previous setting

2017-01-12 Thread Allan McRae
On 03/01/17 01:19, Stefan Klinger wrote: > In hook definition files, repeated assignment to Description, Exec, > Type, and When silently overwrote previous settings. This yields a > warning now. > > Signed-off-by: Stefan Klinger > --- > lib/libalpm/hook.c | 16

Re: [pacman-dev] [PATCH] libmakepkg: Add missing vim modelines

2017-01-08 Thread Allan McRae
On 09/01/17 00:58, Andrew Gregory wrote: > On 01/08/17 at 01:55am, Eli Schwartz wrote: >> On 01/08/2017 01:22 AM, Allan McRae wrote: >>> They were not mistakenly removed. I want them removed everywhere... >>> (From memory, Andrew will fight me on that!) >> >&g

Re: [pacman-dev] [PATCH] libmakepkg: Add missing vim modelines

2017-01-07 Thread Allan McRae
On 08/01/17 16:03, Eli Schwartz wrote: > This conforms with the rest of the pacman codebase. > > The modelines appear to have been mistakenly dropped when libmakepkg was > separated out into separate files from the original monolithic makepkg > script. > They were not mistakenly removed. I want

Re: [pacman-dev] [PATCH] Add http://EditorConfig.org configuration

2017-01-06 Thread Allan McRae
On 07/01/17 02:14, Eli Schwartz wrote: > On 01/04/2017 12:35 AM, Allan McRae wrote: >> This will not be included. We have already rejected additions for >> several other editors (and the vim mode lines already annoy me...) > > Okay. Will you accept a patch to add vim mode

[pacman-dev] [PATCH] alpm_fetch_pkgurl: fix memory leak

2017-01-03 Thread Allan McRae
Signed-off-by: Allan McRae --- lib/libalpm/dload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 5c4e1f99..17e4f3a6 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -672,7 +672,7 @@ char SYMEXPORT

Re: [pacman-dev] [PATCH] Add http://EditorConfig.org configuration

2017-01-03 Thread Allan McRae
On 04/01/17 15:29, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- > .editorconfig | 15 +++ > 1 file changed, 15 insertions(+) > create mode 100644 .editorconfig > This will not be included. We have already rejected additions for several other editors (and the vim mode li

[pacman-dev] [PATCH] Fix memory leak in alpm_pkg_checkmd5sum

2017-01-03 Thread Allan McRae
Also remove redundant additional return path. Signed-off-by: Allan McRae --- lib/libalpm/package.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index d0f902f0..e9ecc178 100644 --- a/lib/libalpm/package.c +++ b/lib

[pacman-dev] [GIT] The official pacman repository branch, master, updated. v5.0.1-139-g9ad7cda

2017-01-03 Thread Allan McRae
obj:* } Signed-off-by: Rikard Falkeborn Signed-off-by: Allan McRae commit 8b0d59b83a60eb504567590346119fe4cd891cad Author: Allan McRae Date: Mon Dec 5 14:53:08 2016 +1000 Provide source files for useful debug packages Debug packages are fairly useless current

Re: [pacman-dev] [PATCH] Suppress valgrind error in fakechroot

2017-01-03 Thread Allan McRae
On 02/01/17 22:51, Rikard Falkeborn wrote: > This was spotted on Arch Linux, most likely it was introduced > when fakechroot was updated to 2.19-1. > > Valgrind suggests to add the following suppression, which can be > tweaked to fit an already existing one. > > { > > Memcheck:Leak >

Re: [pacman-dev] [PATCH] hooks: warn if reassignment overwrites previous setting

2017-01-03 Thread Allan McRae
On 04/01/17 02:01, g...@stefan-klinger.de wrote: > Do you prefer a patch with all commits squashed into one, or rather > many small commits (that you could squash yourself)? Just one squashed patch thanks. A

Re: [pacman-dev] [PATCH] conflict: skip dir children when replacing a file

2017-01-02 Thread Allan McRae
On 03/01/17 15:37, Allan McRae wrote: > On 18/12/16 00:57, Andrew Gregory wrote: >> When replacing a file with a directory, any files under that directory >> do not need to be checked for conflicts. This prevents possible >> false-positive conflicts where the file being

Re: [pacman-dev] [PATCH] conflict: skip dir children when replacing a file

2017-01-02 Thread Allan McRae
On 18/12/16 00:57, Andrew Gregory wrote: > When replacing a file with a directory, any files under that directory > do not need to be checked for conflicts. This prevents possible > false-positive conflicts where the file being replaced is a symlink. > > We were already skipping the directory chi

Re: [pacman-dev] [PATCH] ini: only recognize comments at beginning of line

2017-01-02 Thread Allan McRae
On 17/12/16 23:18, Andrew Gregory wrote: > Allows the hash sign to be used in values in config files and hooks. > > Fixes #48702 OK

Re: [pacman-dev] [PATCH] makepkg: Verify git signatures

2017-01-02 Thread Allan McRae
On 17/12/16 04:56, Eli Schwartz wrote: > A git repository is marked as signed if it contains the query "signed" > as defined by https://tools.ietf.org/html/rfc3986 > > Adds two utility functions in util/source.sh.in to extract fragments and > queries, and modifies source/git.sh.in to use them. >

Re: [pacman-dev] [PATCH 2/2] pacman: ensure linkage against libarchive

2017-01-02 Thread Allan McRae
On 11/12/16 11:12, Dave Reisner wrote: > Fixes build on ubuntu/debian platforms. > --- OK. I wonder what is different across platforms that breaks this... > src/pacman/Makefile.am | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/pacman/Makefile.am b/src/pacman/

Re: [pacman-dev] [PATCH 1/2] configure.ac: Use POSIX compatible equality checks

2017-01-02 Thread Allan McRae
On 11/12/16 11:12, Dave Reisner wrote: > --- > configure.ac | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > OK.

Re: [pacman-dev] [PATCH 2/5] makepkg: sort package contents

2017-01-02 Thread Allan McRae
On 10/12/16 02:14, Andrew Gregory wrote: > By passing a NUL-separated filelist, this also fixes a bug where files > that look like bsdtar options in the package root could break the > package ("-C" was particularly troublesome because bsdtar interprets it > as an option anywhere in the file list, e

Re: [pacman-dev] [PATCH 5/5] filelist_sort: check if filelist is presorted

2017-01-02 Thread Allan McRae
On 10/12/16 02:14, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > > This patch obviously won't do any good until packages start being built with > their file lists presorted, so we may want to defer it, but in the handful of > packages I tested, it did not cause a significant delay

Re: [pacman-dev] [PATCH 1/5] makepkg: warn about dotfiles in package root

2017-01-02 Thread Allan McRae
On 10/12/16 02:14, Andrew Gregory wrote: > libalpm reserves paths starting with '.' for its own use and will not > extract any other than those it recognizes. > > Signed-off-by: Andrew Gregory OK.

[pacman-dev] Aligning code variables - Was: Add alpm_pkg_get_makedepends and alpm_pkg_get_checkdepends

2017-01-02 Thread Allan McRae
On 09/12/16 12:17, Mark Weiman wrote: > makepkg adds makedepends and checkdepends to a package's .PKGINFO file. > Add functions that allow use of these from libalpm. > > Signed-off-by: Mark Weiman Patch looks fine. > - > - .mtree_open = _pkg_mtree_open, > - .mtree_next = _pkg

Re: [pacman-dev] [RFC] adding a --sysroot option

2017-01-02 Thread Allan McRae
On 19/12/16 00:53, Andrew Gregory wrote: > On 11/29/16 at 10:58am, Andrew Gregory wrote: >> pacman's --root option is regularly (mis)used to use pacman to manage >> a mounted guest system, typically one whose pacman installation is >> currently broken. We have a few configuration defaults in place

<    4   5   6   7   8   9   10   11   12   13   >