[pacman-dev] [PATCH] Update doc gitignore

2018-02-23 Thread Allan McRae
Signed-off-by: Allan McRae <al...@archlinux.org> --- doc/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/.gitignore b/doc/.gitignore index 186f45e4..912a37a7 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,5 +1,6 @@ alpm-hooks.5 PKGBUILD.5 +BUILDINFO.5 lib

Re: [pacman-dev] [PATCH] makepkg: Don't interpret format specifiers in msg

2018-02-23 Thread Allan McRae
On 23/02/18 21:18, Allan McRae wrote: > On 23/02/18 20:42, Niklas Holm wrote: >> Message string containing for example windows paths would have >> unexpected behaviour. For example the message "Check C:\foo\bar" would >> be printed as "Check C: oar". &

Re: [pacman-dev] [PATCH] makepkg: Don't interpret format specifiers in msg

2018-02-23 Thread Allan McRae
On 23/02/18 20:42, Niklas Holm wrote: > Message string containing for example windows paths would have > unexpected behaviour. For example the message "Check C:\foo\bar" would > be printed as "Check C: oar". > > Signed-off-by: Niklas Holm Did you test this patch?

Re: [pacman-dev] [PATCH 1/1] makepkg: Handle dependencies that contain spaces

2018-02-22 Thread Allan McRae
On 23/02/18 13:54, Allan McRae wrote: > On 23/02/18 12:38, Morgan Adamiec wrote: >> I do apologise for the bad patch. I'm not proficient in bash at all. I >> basically wrote this patch out of frustration after having spent an >> hour trying to figure out why a package on the

Re: [pacman-dev] [PATCH 1/1] makepkg: Handle dependencies that contain spaces

2018-02-22 Thread Allan McRae
On 23/02/18 12:38, Morgan Adamiec wrote: > I do apologise for the bad patch. I'm not proficient in bash at all. I > basically wrote this patch out of frustration after having spent an > hour trying to figure out why a package on the AUR would not install > and it ended up being this exact problem.

Re: [pacman-dev] [PATCH 1/1] libalpm: use archive_write_finish for 2.x compat

2018-02-08 Thread Allan McRae
libarchive 3.0 was released at the start of 2012 and archive_write_free() will be removed in libarchive 4.0. Just bump minimum libarchive requirements. Thanks, Allan PS - no need to send a cover letter when only posting one patch. On 08/02/18 18:39, Huáng Jùnliàng wrote: > The

Re: [pacman-dev] [PATCH v2] makepkg --packagelist: just list the built package files we will build

2018-02-07 Thread Allan McRae
On 08/02/18 13:44, Eli Schwartz wrote: > On 02/07/2018 10:37 PM, Allan McRae wrote: >> On 08/02/18 11:22, Eli Schwartz wrote: >>> On 02/07/2018 07:24 PM, Allan McRae wrote: >>>> Newline separation should be fine. makepkg ensures most (all?) of the >>>&g

Re: [pacman-dev] [PATCH v2] makepkg --packagelist: just list the built package files we will build

2018-02-07 Thread Allan McRae
On 08/02/18 11:22, Eli Schwartz wrote: > On 02/07/2018 07:24 PM, Allan McRae wrote: >> Newline separation should be fine. makepkg ensures most (all?) of the >> fields are not allowed to have newlines in them. If any can, we need to >> catch that in out PKGBUILD linting and

Re: [pacman-dev] [PATCH v2] makepkg --packagelist: just list the built package files we will build

2018-02-07 Thread Allan McRae
On 06/02/18 12:47, Eli Schwartz wrote: > Currently this seems to be only theoretically useful. The most likely > reason for wanting a packagelist is in order to script makepkg and > derive the filenames for the packages we want to install or repo-add, > but in the current implementation this

[pacman-dev] RFC: [PATCH] Deprecate --root in favour of --sysroot

2018-01-19 Thread Allan McRae
The --root option was widely misunderstood, and is now replaced by --sysroot. Signed-off-by: Allan McRae <al...@archlinux.org> --- The idea of --sysroot was to provide something that --root never quite did. Is there any reason to keep --root? doc/pacman.8.txt| 10 -- src/

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

2018-01-18 Thread Allan McRae
<je...@vdwaa.nl> Signed-off-by: Allan McRae <al...@archlinux.org> commit 9058d7fe9aa2bb494d5a6572c167db75d6d02d30 Author: Eli Schwartz <eschwa...@archlinux.org> Date: Sat Jan 13 23:39:39 2018 -0500 pacman-key: do not set a default keyserver Recent versions of GnuPG a

Re: [pacman-dev] [PATCH 3/4] add pacman-conf utility

2018-01-17 Thread Allan McRae
On 18/01/18 15:29, Allan McRae wrote: > On 18/01/18 14:59, Allan McRae wrote: >> On 14/01/18 02:49, Andrew Gregory wrote: >>> Parsing pacman's configuration file is non-trivial and extremely >>> difficult to do correctly from scripts; even our own do it incorrectly. >

Re: [pacman-dev] [PATCH 3/4] add pacman-conf utility

2018-01-17 Thread Allan McRae
On 18/01/18 14:59, Allan McRae wrote: > On 14/01/18 02:49, Andrew Gregory wrote: >> Parsing pacman's configuration file is non-trivial and extremely >> difficult to do correctly from scripts; even our own do it incorrectly. >> pacman-conf is a dedicated tool specifically to a

Re: [pacman-dev] [PATCH 3/4] add pacman-conf utility

2018-01-17 Thread Allan McRae
created in the src/util with the name '$(top_srcdir)'. This is due to using a variable in the paths (no idea why this is an issue), but replacing it with a relative path "fixes" the issue. I'll squash the following into your patch: >From 4c3d7964da2ba4276e4464920fb795e9f973e3ec Mon S

Re: [pacman-dev] [PATCH 0/4] add pacman-conf utility

2018-01-13 Thread Allan McRae
On 14/01/18 02:49, Andrew Gregory wrote: > Parsing pacman.conf is so hard that even our own scripts don't do it > correctly. pacman-conf is a dedicated utility scripts can use to > correctly parse values from pacman.conf. This is a conversion of an > earlier version of pacconf from pacutils that

Re: [pacman-dev] [PATCH 4/4] use pacman-conf in scripts

2018-01-13 Thread Allan McRae
On 14/01/18 09:21, Eli Schwartz wrote: > On 01/13/2018 11:50 AM, Andrew Gregory wrote: >> Because parsing pacman.conf is so difficult that even we can't do it >> right. >> >> Signed-off-by: Andrew Gregory >> --- >> scripts/completion/zsh_completion.in | 4 ++-- >>

[pacman-dev] [PATCH] Support new OpenPGP format packets lengths

2018-01-10 Thread Allan McRae
the hashed sub packets. requiring the parsing code to moved to its own function. Signed-off-by: Allan McRae <al...@archlinux.org> --- This patch is less daunting than it appears. One large pice of code got and increased indent and one large part got moved to its own function. I adjuste

Re: [pacman-dev] [PATCH] detect pkghash allocation failure

2018-01-09 Thread Allan McRae
On 08/01/18 10:30, Andrew Gregory wrote: > If rehash ever failed with a full hash it would return the old hash > that is already full. get_hash_position would then loop forever > because it would never find an empty bucket. > > Signed-off-by: Andrew Gregory > --- >

Re: [pacman-dev] [PATCH v3] Add BUILDINFO man page

2018-01-09 Thread Allan McRae
On 10/01/18 03:19, Jelle van der Waa wrote: > Add a new man page which describes the structure of a BUILDINFO file > included in a package produced by makepkg. > Thanks. Some wording suggestions provided inline. A > Signed-off-by: Jelle van der Waa > --- >

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

2018-01-09 Thread Allan McRae
"open" and "fstat" but not read from as invalid to avoid this. Signed-off-by: Allan McRae <al...@archlinux.org> --- v3: fix setting the database as invalid. Not entirely sure how the last one worked, but it did! lib/libalpm/be_sync.c | 2 ++ 1 file changed, 2 inser

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

2018-01-09 Thread Allan McRae
"open" and "fstat" but not read from as invalid to avoid this. Signed-off-by: Allan McRae <al...@archlinux.org> --- Review of v1: https://lists.archlinux.org/pipermail/pacman-dev/2017-May/022027.html v2 - do much less stuff to achive the same result... lib/libal

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

2018-01-09 Thread Allan McRae
Passing an empty string to pacman -Qo results in: error: No package owns Catch empty strings and report an error. Signed-off-by: Allan McRae <al...@archlinux.org> --- FYI, v1 was submitted on 2017/05/11... It was suggested I should not just skip empty strings and instead report a

[pacman-dev] [PATCH v2] Fix moving source files into debug packages

2018-01-08 Thread Allan McRae
) Using -fdebug-prefix-map altered a lot of assumptions about file locations when copying source files into debug packages. This resulted in lots of messages of failed cp in packaging output. Signed-off-by: Allan McRae <al...@archlinux.org> --- In v1 of this patch, the files got copied

Re: [pacman-dev] [PATCH] Fix moving source files into debug packages

2018-01-08 Thread Allan McRae
On 09/01/18 13:10, Allan McRae wrote: > Commit 8bec63bf92d8dd028aa88dbd5109c314cdb9ebea attempted to switch to > using -fdebug-prefix-map to set file locations in debug packages. It > make a few mistakes... > > 1) Adding debug C{,XX}FLAGS only worked if DBGSRCDIR was defined in

[pacman-dev] [PATCH] Fix moving source files into debug packages

2018-01-08 Thread Allan McRae
-fdebug-prefix-map altered a lot of assumptions about file locations when copying source files into debug packages. This resulted in lots of messages of failed cp in packaging output. Signed-off-by: Allan McRae <al...@archlinux.org> --- scripts/libmakepkg/tidy/strip.sh.in | 6 +++--- s

[pacman-dev] Road to 5.1

2018-01-07 Thread Allan McRae
Hi all, We have not had a release in a long, long time. Lets fix that! There is a substantial number of bugs tagged for a 5.1 release [1]. These were added when we were all younger and more optimistic about the world... I have added a 5.2 target, so we can start bumping some to a future

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

2018-01-07 Thread Allan McRae
to optimize away a call to strcmp based on a comparison of hashes. The call can be skipped if the hashes are different, but different strings could have the same hash. Signed-off-by: Andrew Gregory <andrew.gregor...@gmail.com> Signed-off-by: Allan McRae <al.

Re: [pacman-dev] [PATCH] do not rely on name hashes for matching

2018-01-05 Thread Allan McRae
On 21/12/17 14:22, Andrew Gregory wrote: > 6cfc4757b98e813428d261dbc185e20618ca83a6 was overzealous in attempting > to optimize away a call to strcmp based on a comparison of hashes. The > call can be skipped if the hashes are different, but different strings > could have the same hash. > >

Re: [pacman-dev] [PATCH v2] vercmp: fail when the wrong number of arguments are provided

2018-01-05 Thread Allan McRae
On 18/12/17 13:57, Eli Schwartz wrote: > Fixes FS#49093 > > Signed-off-by: Eli Schwartz > --- > > v2: errors go to stderr > follow style guidelines for arithmetic > minor grammatical correction for error message > > src/util/vercmp.c | 12 > 1 file

Re: [pacman-dev] [PATCH 2/3] vercmp: remove --usage variant of the -help option

2018-01-05 Thread Allan McRae
On 18/12/17 05:28, Eli Schwartz wrote: > I think two ways to ask for this are enough for everyone, and we have > never documented this anyway. > Thanks, A

Re: [pacman-dev] [PATCH] avoid printing NULL string

2018-01-05 Thread Allan McRae
On 17/12/17 03:41, Andrew Gregory wrote: > Signed-off-by: Andrew Gregory > --- > lib/libalpm/be_sync.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c > index 06f509a6..1b7c8b6f 100644 > ---

Re: [pacman-dev] [PATCH 1/2] libmakepkg/integrity: fix regression that broke invalid file sigs

2018-01-05 Thread Allan McRae
On 22/11/17 14:34, Eli Schwartz wrote: > In 42e7020281d3ae260e1e9693495f527b7f476625 creating the gpg statusfile > for a source file was split into a separate function, which used the > return code to indicate unsigned files and proto-specific errors. > However, the fallback return code was set by

Re: [pacman-dev] [PATCH 1/1] Add BUILDINFO man page

2018-01-05 Thread Allan McRae
On 06/01/18 09:56, Jelle van der Waa wrote: >>> +*format*:: >>> + Denotes the file format, represented by a number. >> Can we be more specific here? @Allan: do you intend to keep this as >> a plain integer or use something more complex for updates? > More specific as in? I guess "file format

[pacman-dev] Disallowing comments on closed bugs

2017-12-23 Thread Allan McRae
Because of comments posted on a bug that was closed over a year ago (that achieved nothing...), I have disabled comments on closed bugs. All future comments on closed bugs will have to be achieved through a request to reopen the bug. A

Re: [pacman-dev] [PATCH] makepkg --packagelist: just list the built package files we will build

2017-12-06 Thread Allan McRae
On 31/10/17 04:37, Eli Schwartz wrote: > Currently this seems to be only theoretically useful. The most likely > reason for wanting a packagelist is in order to script makepkg and > derive the filenames for the packages we want to install or repo-add, > but in the current implementation this

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

2017-12-06 Thread Allan McRae
On 31/10/17 04:15, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- This and the repo-add patch look fine, but will not be pulled until libarchive supporting these formats is released. > > v3: fix typo > > doc/makepkg.conf.5.txt | 3 ++- >

Re: [pacman-dev] [PATCH v2 2/2] makepkg: refactor checking for write permissions into a utility function

2017-12-06 Thread Allan McRae
On 31/10/17 04:03, Eli Schwartz wrote: > Additionally provide a separate error for the confusing if unlikely > event that the user tries to use an existing file as a package output > directory. > > This also means we now consistently try to create any nonexistent *DEST > directories as needed

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

2017-10-17 Thread Allan McRae
a56 Author: Allan McRae <al...@archlinux.org> Date: Sun Oct 8 23:34:48 2017 +1000 libmakepkg: only output package file names when checking for build references The leading directory is distraction from identifying the files containing build references. Signed-off-by:

Re: [pacman-dev] [PATCH] makepkg: tell the compiler to record debugging info for debug packages

2017-10-10 Thread Allan McRae
On 09/10/17 13:41, Eli Schwartz wrote: > On 10/08/2017 09:53 AM, Allan McRae wrote: >> On 08/10/17 16:38, Eli Schwartz wrote: >>> In commit 8b0d59b83a60eb504567590346119fe4cd891cad support was added for >>> storing the source files of binaries in debug packages. This ma

Re: [pacman-dev] [PATCH] makepkg: refactor checking for write permissions into a utility function

2017-10-08 Thread Allan McRae
On 08/10/17 17:05, Eli Schwartz wrote: > Additionally provide a separate error for the confusing if unlikely > event that the user tries to use an existing file as a package output > directory. > > This also means we now consistently try to create any nonexistent *DEST > directories as needed

[pacman-dev] [PATCH] libmakepkg: only output package file names when checking for build references

2017-10-08 Thread Allan McRae
The leading directory is distraction from identifying the files containing build references. Signed-off-by: Allan McRae <al...@archlinux.org> --- scripts/libmakepkg/lint_package/build_references.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libm

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

2017-10-08 Thread Allan McRae
On 08/10/17 16:50, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- > > I'm now wondering if it makes sense to import > libmakepkg/util/compress.sh here for reuse. Currently repo-add checks > the extensions twice and aborts on unknown extensions, but I'm not sure

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

2017-10-08 Thread Allan McRae
On 08/10/17 16:50, Eli Schwartz wrote: > Signed-off-by: Eli Schwartz > --- > doc/makepkg.conf.5.txt | 3 ++- > etc/makepkg.conf.in| 1 + > scripts/libmakepkg/util/compress.sh.in | 1 + > 3 files changed, 4 insertions(+), 1 deletion(-)

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

2017-10-08 Thread Allan McRae
On 08/10/17 16:50, 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.

Re: [pacman-dev] [PATCH] makepkg: tell the compiler to record debugging info for debug packages

2017-10-08 Thread Allan McRae
On 08/10/17 16:38, Eli Schwartz wrote: > In commit 8b0d59b83a60eb504567590346119fe4cd891cad support was added for > storing the source files of binaries in debug packages. This made use of > the debugedit program which is part of the RPM package manager, which is > not very standalone. > > The

Re: [pacman-dev] repo-add and extended attributes

2017-10-06 Thread Allan McRae
> I had a quick search through this mailing list and I don't think this > has been brought up before, so now I'm curious as to whether extended > attributes actually are used for anything in the repo databases, or > are they only there due to bsdtar defaults? Just defaults. There should be no

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

2017-09-29 Thread Allan McRae
On 28/09/17 22:02, Nils Freydank wrote: > @@ -1057,9 +1079,21 @@ int SYMEXPORT alpm_extract_keyid(alpm_handle_t > *handle, const char *identifier, > return -1; > } > > + if(length_check(len, pos, 4, handle, identifier)) { > +

Re: [pacman-dev] [idea] Allow pacman to optionally install from a directory instead of just a .pkg.tar.xz file

2017-09-18 Thread Allan McRae
On 19/09/17 12:25, Allan McRae wrote: > On 19/09/17 12:09, Moses Miller wrote: >> Pacman currently only allows installing from .pkg.tar.xz files. Usually, >> this makes sense, as packages are compressed server-side. However, this >> can become a real problem when installing

Re: [pacman-dev] [idea] Allow pacman to optionally install from a directory instead of just a .pkg.tar.xz file

2017-09-18 Thread Allan McRae
On 19/09/17 12:09, Moses Miller wrote: > Pacman currently only allows installing from .pkg.tar.xz files. Usually, > this makes sense, as packages are compressed server-side. However, this > can become a real problem when installing packages, especially large > packages from the aur; you are

Re: [pacman-dev] [PATCH v2 1/2] makepkg: implement error codes

2017-09-17 Thread Allan McRae
On 16/09/17 06:54, Dave Reisner wrote: >> +Errors >> +-- >> +On exit, makepkg will return one of the following error codes. >> + >> +**E_OK**=0:: > I don't see the need to document internal details of how we refer to the > error codes through named variables if we aren't making these public

Re: [pacman-dev] [PATCH 1/2] makepkg: implement error codes

2017-09-15 Thread Allan McRae
On 15/09/17 08:58, ivy.fos...@gmail.com wrote: > index 20e9dd7e..8ef3c48d 100644 > --- a/scripts/makepkg.sh.in > +++ b/scripts/makepkg.sh.in > @@ -87,6 +87,26 @@ SPLITPKG=0 > SOURCEONLY=0 > VERIFYSOURCE=0 > > +# Errors > +E_OK=0 > +E_FAIL=1 # Generic error > +# exit code 2 reserved by bash for

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

2017-09-14 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.

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

2017-09-14 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-14 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

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

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

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

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

2017-09-13 Thread Allan McRae
Signed-off-by: Allan McRae <al...@archlinux.org> --- 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/libm

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. > >

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

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

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

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

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

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

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
ue. Callers can at least detect an error by checking if the input list was empty. Signed-off-by: Andrew Gregory <andrew.gregor...@gmail.com> Signed-off-by: Allan McRae <al...@archlinux.org> commit c44c649a5280189ea28a54b82e60fc38279fed23 Author: Levente Polyak <anth

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

2017-07-05 Thread Allan McRae
From: Levente Polyak <anthr...@archlinux.org> 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 <al...@arch

[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 <al...@archlinux.org> --- scripts/makepkg.sh.in | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff

[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 <al...@archlinux.org> --- scripts/makepkg.sh.in | 4 +--- 1 file changed, 1 insertion

[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 <al...@archlinux.org> --- 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

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

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 <al...@archlinux.org> on Wed, 2017/06/07 07:37: >> On 07/06/17 07:26, Christian Hesse wrote: >>> From: Christian Hesse <m...@eworm.de> >>> >>> We used to check for file existens, but that suffer

[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 <al...@archlinux.org> Date: Wed May 31 23:47:00 2017 +1000 Pull translation changes for 5.0.2 Signed-off-by: Allan McRae <al...@arc

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

2017-05-29 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 and no

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

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

[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 <al...@archlinux.org> --- Running 'pacman -Qo ""' will now just exit pacm

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

2017-05-08 Thread Allan McRae
"open" and "fstat" but not read from as invalid to avoid this. Signed-off-by: Allan McRae <al...@archlinux.org> --- 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.

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

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

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 <anthr...@archlinux.org> Signed-off-by: Allan McRae <al...@archlinux.org> --- [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/makep

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

2017-04-17 Thread Allan McRae
From: Levente Polyak <anthr...@archlinux.org> Signed-off-by: Allan McRae <al...@archlinux.org> --- 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 +

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

2017-04-17 Thread Allan McRae
From: Levente Polyak <anthr...@archlinux.org> 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 <al...@arch

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

2017-04-17 Thread Allan McRae
From: Levente Polyak <anthr...@archlinux.org> Signed-off-by: Allan McRae <al...@archlinux.org> --- scripts/makepkg.sh.in | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in in

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

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

[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 <al...@archlinux.org> --- scripts/makepkg.sh.in | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/makepkg

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

[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 <al...@archlinux.org> ---

[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 <al...@archlinux.org> --- .../libmakepkg/integrity/generate_signature.sh.in

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