[arch-projects] [dbscripts] checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text

2018-08-26 Thread Luke Shumaker
From: Luke Shumaker --- On Sat, 25 Aug 2018 07:14:34 -0400, Jelle van der Waa wrote: > This patch series intends to be an RFC for adding man pages for every > tool provided by devtools. The first man page for lddd is written in > mdoc and is lacking a way to reduce duplication of commo

Re: [arch-projects] [dbscripts] [PATCH] Don't parse .db files ourselves; use pyalpm instead

2018-07-09 Thread Luke Shumaker
On Sun, 08 Jul 2018 22:38:06 -0400, Eli Schwartz wrote: > > On 07/08/2018 09:14 PM, Luke Shumaker wrote: > > From: Luke Shumaker > > > > In a patchset that I recently submitted, Eli was concerned that I was > > parsing .db files with bsdtar+awk, when the format

[arch-projects] [dbscripts] [PATCH] Don't parse .db files ourselves; use pyalpm instead

2018-07-08 Thread Luke Shumaker
From: Luke Shumaker In a patchset that I recently submitted, Eli was concerned that I was parsing .db files with bsdtar+awk, when the format of .db files isn't "public"; the only guarantees made about it are that libalpm can parse it. https://lists.archlinux.org/pipermail/arch-pro

Re: [arch-projects] [dbscripts] [PATCH 0/5] Be less tightly coupled with SVN

2018-06-23 Thread Luke Shumaker
On Fri, 22 Jun 2018 15:49:19 -0400, Luke Shumaker wrote: > On Fri, 22 Jun 2018 12:52:04 -0400, > Eli Schwartz wrote: > > and > > IMHO also has a lot more code clarity than a mini awk program reading > > f

Re: [arch-projects] [dbscripts] [PATCH 0/5] Be less tightly coupled with SVN

2018-06-22 Thread Luke Shumaker
On Fri, 22 Jun 2018 12:52:04 -0400, Eli Schwartz wrote: > On 06/19/2018 12:20 AM, Luke Shumaker wrote: > > From: Luke Shumaker > > > > This patchset is intended to clean up dbscripts' interaction with SVN. > > Besides (IMO) improved code clarity, this should make it ea

[arch-projects] [dbscripts] [PATCH v2 3/6] db-move: Clarify the flow of the preflight check

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker This should have the same result, but be a bit less confusing to read. Also, have a slightly more specific error message on a missing PKGBUILD. --- db-move | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/db-move b/db-move index 03debfc

[arch-projects] [dbscripts] [PATCH v2 1/6] test: db-move: Verify that it works on single-arch packages

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker --- test/cases/db-move.bats | 19 +++ 1 file changed, 19 insertions(+) diff --git a/test/cases/db-move.bats b/test/cases/db-move.bats index df3dbdf..27fe8d1 100644 --- a/test/cases/db-move.bats +++ b/test/cases/db-move.bats @@ -39,6 +39,25 @@ load ../lib

[arch-projects] [dbscripts] [PATCH v2 0/6] Be less tightly coupled with SVN

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker This patchset is intended to clean up dbscripts' interaction with SVN. Besides (IMO) improved code clarity, this should make it easier for those who wish to replace SVN with something else. There are two major themes here: 1. Avoid asking SVN for information; to the extent

[arch-projects] [dbscripts] [PATCH v2 4/6] testing2x: Discover correct repos based on the DBEXT files, not SVN

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker testing2x needs to: 1. Verify that the new version of the package is found in TESTING_REPO 2. Determine which of STABLE_REPOS the old version of the package is in Currently, to do those things, it checks for the existence of PKGBUILD files in SVN. That information

[arch-projects] [dbscripts] [PATCH v2 6/6] db-move, db-abs: Simplify calling the abs_move_* functions

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker Currently, abs_move_preflight_check and abs_move_arch require the exact pkgarch (i.e. "any" or "x86_64"). Modify them so that they take the tarch (i.e. "x86_64") and figure out themselves if it needs to set pkgarch=$tarch or pkgarch=any. a

[arch-projects] [dbscripts] [PATCH v2 5/6] Centralize all SVN access into 'abs_*' functions in a new 'db-abs' file

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker Moving all SVN code in to a separate file means both that: 1. It is easier to identify the interactions with SVN, when considering a replacement. 2. It is easier to swap out the one file if/when replacing SVN with something else. Put another way: try to be less

[arch-projects] [dbscripts] [PATCH v2 2/6] db-move, db-remove: Don't parse PKGBUILD files

2018-06-22 Thread Luke Shumaker
From: Luke Shumaker Don't try to parse PKGBUILD files from SVN; all of the information we need is already in the DBEXT files. Several programs use [[ -f PKGBUILD ]] or [[ -r PKGBUILD ]] on files from SVN; those checks can stay, just remove all instances of actually trying to *parse* those files

[arch-projects] [dbscripts] Expected behavior of db-remove?

2018-06-20 Thread Luke Shumaker
From: Luke Shumaker Following is a test-case for db-remove demonstrating a case where I'm not sure what the intended behavior is. Note that the test-case is identical to the existing "remove multiple packages" test-case, except that 'pkg-single-arch' has been added to the pkg

[arch-projects] [dbscripts] [PATCH 0/5] Be less tightly coupled with SVN

2018-06-18 Thread Luke Shumaker
From: Luke Shumaker This patchset is intended to clean up dbscripts' interaction with SVN. Besides (IMO) improved code clarity, this should make it easier for those who wish to replace SVN with something else. There are two major themes here: 1. Avoid asking SVN for information; to the extent

[arch-projects] [dbscripts] [PATCH 4/5] Centralize all SVN access into 'abs_*' functions in a new 'db-abs' file

2018-06-18 Thread Luke Shumaker
From: Luke Shumaker Moving all SVN code in to a separate file means both that: 1. It is easier to identify the interactions with SVN, when considering a replacement. 2. It is easier to swap out the one file if/when replacing SVN with something else. Put another way: try to be less

[arch-projects] [dbscripts] [PATCH 2/5] db-move: Clarify the flow of the preflight check

2018-06-18 Thread Luke Shumaker
From: Luke Shumaker This should have the same result, but be a bit less confusing to read. --- db-move | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/db-move b/db-move index 03debfc..5f197b8 100755 --- a/db-move +++ b/db-move @@ -29,15 +29,22 @@ arch_svn

[arch-projects] [dbscripts] [PATCH 5/5] db-move, db-abs: Simplify the abs_move_* functions

2018-06-18 Thread Luke Shumaker
From: Luke Shumaker Currently, abs_move_preflight_check and abs_move_arch require the exact pkgarch (i.e. "any" or "x86_64"). Modify them so that they take the tarch (i.e. "x86_64") and figure out themselves if it needs to set pkgarch=$tarch or pkgarch=any. a

[arch-projects] [dbscripts] [PATCH 3/5] testing2x: Discover correct repos based on the DBEXT files, not SVN

2018-06-18 Thread Luke Shumaker
From: Luke Shumaker testing2x needs to: 1. Verify that the new version of the package is found in TESTING_REPO 2. Determine which of STABLE_REPOS the old version of the package is in Currently, to do those things, it checks for the existence of PKGBUILD files in SVN. That information

[arch-projects] [devtools] [PATCH] test: common.bash: Fix syntax mistake: $pkgarches[@] -> ${pkgarches[@]}

2018-06-15 Thread Luke Shumaker
From: Luke Shumaker This mistake was introduced in 7628525156110022fa70ad91e4bc13ee8a3cceb0 --- test/lib/common.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/common.bash b/test/lib/common.bash index 36c735f..b82643e 100644 --- a/test/lib/common.bash +++ b

[arch-projects] [devtools] [PATCH] test: ftpdir-cleanup: Fix variable name mistake: ${pkg[0]} -> ${pkgs[0]}

2018-06-15 Thread Luke Shumaker
From: Luke Shumaker This mistake was introduced in 7628525156110022fa70ad91e4bc13ee8a3cceb0 --- test/cases/ftpdir-cleanup.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cases/ftpdir-cleanup.bats b/test/cases/ftpdir-cleanup.bats index 8c713c6..74215d0 100644

Re: [arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Luke Shumaker
On Wed, 14 Mar 2018 00:11:12 -0400, Eli Schwartz wrote: > > On 03/13/2018 09:52 PM, Luke Shumaker wrote: > > From: Luke Shumaker <luke...@parabola.nu> > > > > `grep -q` may exit as soon as it finds a match; this is a good optimization > > for when the inp

Re: [arch-projects] [dbscripts] [PATCH 8/8] devlist-mailer: Make LIST and FROM configurable

2018-03-13 Thread Luke Shumaker
On Wed, 14 Mar 2018 00:11:40 -0400, Eli Schwartz wrote: > > On 03/13/2018 09:52 PM, Luke Shumaker wrote: > > From: Luke Shumaker <luke...@parabola.nu> > > TBH we don't even send out integrity check email anymore, do you? No, but we have a different cron-job that calls d

Re: [arch-projects] [dbscripts] [PATCH 1/8] Fix quoting around variables, especially arrays.

2018-03-13 Thread Luke Shumaker
ome the point to me that maybe we really don't need to do this. > Configurable directories need to be quoted, yes, but then dropping out > to expand a wildcard, failing to quote the - for good measure, and > quoting pkgarch only to resort to expanding PKGEXTS as a glob pattern... > > It is only possible anyways for $STAGING to have spaces. At some point, I'd like to have `make lint` run shellcheck over dbscripts. That's a long way off, both because of a whole bunch of changes needed in dbscripts to make it come back clean, and a few features needed in shellcheck to avoid having to drop entirely too many shellcheck directives in to the dbscripts source. Anyway, I know linters should be taken with a grain of salt, but when there's something simple like this, that you know just about any linter would complain about... why not? -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Luke Shumaker
On Tue, 13 Mar 2018 21:52:01 -0400, Luke Shumaker wrote: > > From: Luke Shumaker <luke...@parabola.nu> > > `grep -q` may exit as soon as it finds a match; this is a good optimization > for when the input is a file. However, if the input is the output of > another

[arch-projects] [dbscripts] [PATCH 2/8] Use printf-formatters instead of string interpolation on msg, error, etc.

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> --- cron-jobs/ftpdir-cleanup | 8 cron-jobs/integrity-check | 2 +- cron-jobs/sourceballs | 8 db-functions | 6 +++--- db-move | 4 ++-- db-remove | 2 +- db-re

[arch-projects] [dbscripts] [PATCH 1/8] Fix quoting around variables, especially arrays.

2018-03-13 Thread Luke Shumaker
<pre>From: Luke Shumaker <luke...@parabola.nu> Other than pure quoting, this involved: - swapping */@ for array access in a few places - fiddling with printf in a pipeline - replacing `$(echo ${array[@]})` with `${array[*]}` - replacing `echo $(...)` with `...` Wh

[arch-projects] [dbscripts] [PATCH 8/8] devlist-mailer: Make LIST and FROM configurable

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> --- config | 5 + cron-jobs/devlist-mailer | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config b/config index d703e7b..fd79b6e 100644 --- a/config +++ b/config @@ -35,6 +35,11 @@ PKGEXTS=".p

[arch-projects] [dbscripts] [PATCH 6/8] Consistently use "$(dirname "$(readlink -e "$0")")"

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This does correct handling of - executing a program by symlink - any weird characters in the full path - I'm sure there's another case I thought about when I originally did this. --- cron-jobs/ftpdir-cleanup | 4 ++-- cron-jobs/integrity-che

[arch-projects] [dbscripts] [PATCH 4/8] Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> `grep -q` may exit as soon as it finds a match; this is a good optimization for when the input is a file. However, if the input is the output of another program, then that other program will receive SIGPIPE, and further writes will fail.

[arch-projects] [dbscripts] [PATCH 0/8] Backports from Parabola

2018-03-13 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> These are commits from Parabola's dbscripts that I think are upstreamable. No real theme to them, but because some of them are wide-sweeping (eg. clean up quoting), they are a good base layer to apply before backporting other changes. I've done m

Re: [arch-projects] [dbscripts] [PATCH] db-functions: unify the repo-add/repo-remove caller

2018-03-13 Thread Luke Shumaker
d, 18 insertions(+), 28 deletions(-) +1 from me. I'm not re-submitting my last patchset right now because it would conflict with this, and that's just pointless noise until someone's is applied. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH v2 3/3] Update messages to make fuller use of printf formatters

2018-02-26 Thread Luke Shumaker
gt; > + || error 'repo-remove %q %s' "$dbfile" "${pkgs[*]@Q}" > > set_repo_permission "${repo}" "${arch}" > > I think for consistency we should use the same style which means using > "${dbfile@Q}" I was going for consistency with the repo-add version, which doesn't have a single dbfile variable to @Q. Would you have me introduce a dbfile variable in arch_repo_add? -- Happy hacking, ~ Luke Shumaker

[arch-projects] [dbscripts] [PATCH v2 3/3] Update messages to make fuller use of printf formatters

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> These are things that were (IMO) missed in 5afac1e. I found them using: git grep -E '(plain|msg|msg2|warning|error|die) "[^"]*\$' I went a little above-and-beyond for escaping strings for the error messages in db-function

[arch-projects] [dbscripts] [PATCH v2 2/3] test: Fixup glob matching

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> - ftpdir-cleanup.bats: Glob expansion does not occur in [[ -f ]] tests. The [[ ! -f .../${pkgname}-*${PKGEXT} ]] checks were checking that there were no files containing a literal '*' for that part of their name. Obviously, this isn'

[arch-projects] [dbscripts] [PATCH v2 1/3] test: common.bash:__getCheckSum: Don't rely on IFS

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> I managed to stumble across a bug in BATS where the run() function screwed with the global IFS. The bug has been fixed in git, but isn't in a release yet. https://github.com/sstephenson/bats/issues/89 Anyway, this bug breaks __getCh

[arch-projects] [dbscripts] [PATCH v2 0/3] Misc touchup

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> These are a few minor unrelated touch-ups that I noticed when doing the PKGEXT work. There's no real theme to them. v2: - Use Bash 4.4 feature to avoid introducing temporary variables in the printf commit - Mention splitting declaring and s

Re: [arch-projects] [dbscripts] [PATCH 1/3] test: common.bash:__getCheckSum: Don't rely on IFS

2018-02-22 Thread Luke Shumaker
On Thu, 22 Feb 2018 19:27:04 -0500, Eli Schwartz wrote: > > [1 Re: [arch-projects] [dbscripts] [PATCH 1/3] test: > common.bash:__getCheckSum: Don't rely on IFS ] > [1.1 ] > On 02/22/2018 06:43 PM, Luke Shumaker wrote: > > On Thu, 22 Feb 2018 16:43:36 -0500, &

Re: [arch-projects] [dbscripts] [PATCH 3/3] Update messages to make fuller use of printf formatters

2018-02-22 Thread Luke Shumaker
On Thu, 22 Feb 2018 19:23:17 -0500, Eli Schwartz wrote: > > On 02/22/2018 06:54 PM, Luke Shumaker wrote: > >> I do see what you're doing, I'm just not sure why. Is the whole idea > >> with this extra variable floating around, to avoid tokenizing > >> "${pkgs

Re: [arch-projects] [dbscripts] [PATCH 3/3] Update messages to make fuller use of printf formatters

2018-02-22 Thread Luke Shumaker
). The separate variable applies %q escaping to each package filename separately. Without it, if I did something like: + || error 'repo-remove %q %q' "$dbfile" "${pkgs[*]}" Then it would also escape the spaces that separate them. Anyway, correctly applying %q escaping probably isn't super-important. But, we don't really expect repo-add or repo-remove to fail; if something is wrong, any of the numerous checks leading up to actually calling them should have already caught that. If we trigger one of these error messages, something *weird* is going on, and I'd like the most precise error message possible. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH 1/3] test: common.bash:__getCheckSum: Don't rely on IFS

2018-02-22 Thread Luke Shumaker
does run the test suite with `set -e`, so splitting it does mean that BATS will now detect errors from sha1sum. We don't really expect that to happen, but if BATS will give us error checking on it for free, why not? -- Happy hacking, ~ Luke Shumaker

[arch-projects] [dbscripts] [PATCH 1/3] test: common.bash:__getCheckSum: Don't rely on IFS

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> I managed to stumble across a bug in BATS where the run() function screwed with the global IFS. The bug has been fixed in git, but isn't in a release yet. https://github.com/sstephenson/bats/issues/89 Anyway, this bug breaks __getCh

[arch-projects] [dbscripts] [PATCH 0/3] Misc touchup

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> These are a few minor unrelated touch-ups that I noticed when doing the PKGEXT work. There's no real theme to them. Luke Shumaker (3): test: common.bash:__getCheckSum: Don't rely on IFS test: Fixup glob matching Update messages to make full

[arch-projects] [dbscripts] [PATCH 2/3] test: Fixup glob matching

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> - ftpdir-cleanup.bats: Glob expansion does not occur in [[ -f ]] tests. The [[ ! -f .../${pkgname}-*${PKGEXT} ]] checks were checking that there were no files containing a literal '*' for that part of their name. Obviously, this isn'

[arch-projects] [dbscripts] [PATCH 3/3] Update messages to make fuller use of printf formatters

2018-02-22 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> These are things that were (IMO) missed in 5afac1e. I found them using: git ls-files|xargs grep -E '(plain|msg|msg2|warning|error|die) "[^"]*\$' I went a little above-and-beyond for escaping strings for the error messages

[arch-projects] [dbscripts] [PATCH v4] test: db-update: verify that PKGEXT(S) is treated as a glob

2018-02-19 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> Commit b61a714 introduced a regression that in a db-functions function called by db-update, config:PKGEXT is treated like a fixed string, instead of as a glob. Because of inadequacy of the test-suite, this did not cause a test failure.

Re: [arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Luke Shumaker
gument! > Maybe: ... > if cp -Lv ${cache}/*${PKGEXT}{,.sig} ${pkgdest} 2>/dev/null; then > return 0 > else > > This would avoid the need for __isGlobfile function altogether. I like that! Good idea! > I'd also like a more descriptive commit message. Don't tell me what you > changed, tell me why you changed it. :p Ok, I'll go in to that more. -- Happy hacking, ~ Luke Shumaker

[arch-projects] [dbscripts] [PATCH v3] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-19 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This has the test change PKGEXT the second time it tries to release the package. Currently, this causes the tests to fail. That's a good thing; it's checking for the regression where db-functions:check_pkgrepos isn't treating PKGEXT as a glob. W

Re: [arch-projects] [dbscripts] [PATCH v2 5/5] Globally set $PKGEXT to a bash extended glob representing valid choices.

2018-02-19 Thread Luke Shumaker
based on > the unquotedness of $1 within the -f test. (I had the same function, with the same comment, as is_globfile in db-functions and as __isGlobfile in common.bash) -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH v2 5/5] Globally set $PKGEXT to a bash extended glob representing valid choices.

2018-02-19 Thread Luke Shumaker
z|Z)" > SRCEXT=".src.tar.gz" > Is there a reason you reject '.pkg.tar' (no compression, which makepkg accepts)? (I also found it curious that you swapped lzo and lrz from the order the extensions are in in the makepkg source.) (Also, I'd move it down a line, so that it's more obvious that the comment doesn't apply to SRCEXT.) -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH v2 3/5] db-update: replace external find command with bash globbing

2018-02-19 Thread Luke Shumaker
&& ! -h $f ]]; then printf '%s\0' "${f/*}" fi done | sort -uz ) The original `find` command rejected symlinks; I don't know if that's an important property; but that's what the `&& ! -h $f` bit is for. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH v2 4/8] Correctly treat PKGEXT_glob as a glob

2018-02-18 Thread Luke Shumaker
On Sun, 18 Feb 2018 12:17:32 -0500, Luke Shumaker wrote: > > diff --git a/test/cases/ftpdir-cleanup.bats b/test/cases/ftpdir-cleanup.bats > index 7dfad4a..efc18a8 100644 > --- a/test/cases/ftpdir-cleanup.bats > +++ b/test/cases/ftpdir-cleanup.bats > @@ -13,8 +13,8 @@ __check

Re: [arch-projects] [dbscripts] [PATCH v2 0/8] PKGEXT fixup

2018-02-18 Thread Luke Shumaker
On Sun, 18 Feb 2018 12:29:31 -0500, Eli Schwartz wrote: > On 02/18/2018 12:17 PM, Luke Shumaker wrote: > > I don't mean to take credit away from Eli by re-working his patches (I > > credit him in the commit messages); I just wanted to make it clearer > > what is accomp

[arch-projects] [dbscripts] [PATCH v2 8/8] ftpdir-cleanup, sourceballs: swap out [ -ge 1 ] for (( > 0 ))

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This is based on a patch by Eli Schwartz <eschwa...@archlinux.org> --- cron-jobs/ftpdir-cleanup | 2 +- cron-jobs/sourceballs| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ft

[arch-projects] [dbscripts] [PATCH v2 7/8] Replace all instances of `find` command with bash globbing

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This fully removes the use of find from the codebase, and leads to a micro-optimization in a couple cases. Of the 5 instances in these files: - (ftpdir-cleanup) One was unnecessary as `cat` can natively consume all files passed to it (from

[arch-projects] [dbscripts] [PATCH v2 5/8] config: let PKGEXT_glob be an extglob; have its value match makepkg

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> 1. In order to support PKGEXT_glob being an extglob, we must switch several uses of `find` (in db-update and ftpdir-cleanup) to use bash globbing instead, as `find` can't be made to use extended globbing. In general, this technique re

[arch-projects] [dbscripts] [PATCH v2 2/8] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This has the test change PKGEXT the second time it tries to release the package. Currently, this causes the tests to fail. That's a good thing; it's checking for the regression where db-functions:check_pkgrepos isn't treating PKGEXT as a glob. W

[arch-projects] [dbscripts] [PATCH v2 4/8] Correctly treat PKGEXT_glob as a glob

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> Several places treated PKGEXT as a fixed string in [[ -f ]] existence checks. Fix that elegantly by introducing an is_globfile function. This fixes the failing db-update.bats "update same any package to same repository fails" test

[arch-projects] [dbscripts] [PATCH v2 0/8] PKGEXT fixup

2018-02-18 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This incorporates and improves on work from 3 previously submitted patch sets: 1. My testcase patch, but - take Eli's suggestion to simplify db-update.bats - add another commit so we don't hit a bug in BATS 2. Renaming PKGEXT->PKGEXT_

Re: [arch-projects] [dbscripts] [PATCH 2/3] ftpdir-cleanup, sourceballs: replace external find command with bash globbing

2018-02-17 Thread Luke Shumaker
+if (( ${#old_pkgs[@]} > 1 )); then Likewise. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH 1/1] test: db-update: @test "update same any package to same repository fails": change PKGEXT

2018-02-16 Thread Luke Shumaker
cached version with the wrong $PKGEXT? > It might make more sense to change __buildPackage() to use is_globfile > ${cache}*${PKGEXT} rather than [[ -d ${cache} ]] > > This should prevent needing to move anything, leading to cleaner code on > both sides. That's a good idea. I'll do that! -- Happy hacking, ~ Luke Shumaker

[arch-projects] [dbscripts] [PATCH 0/1] Update tests to check for glob regression

2018-02-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This updates the tests to check for the regression we've been discussing. This doesn't include a fix. I haven't looked too closely, or actually tested them, but Eli's fix LGTM so far. Luke Shumaker (1): test: db-update: @test "update same

Re: [arch-projects] [dbscripts] [GIT] Official repo DB scripts branch master updated. 20131102-59-g36b71d3

2018-02-15 Thread Luke Shumaker
On Thu, 15 Feb 2018 15:09:57 -0500, Eli Schwartz wrote: > > On 02/15/2018 02:04 PM, Luke Shumaker wrote: > >> - [ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}"${PKGEXT} > >> ] && return 1 > >> - [ -f > >> "${F

Re: [arch-projects] [dbscripts] [PATCH 1/2] Don't quote $PKGEXT

2018-02-15 Thread Luke Shumaker
On Thu, 15 Feb 2018 16:57:26 -0500, Eli Schwartz wrote: > > On 02/15/2018 04:43 PM, Luke Shumaker wrote: > > That's not a bad idea. But then someone reading the code might wonder > > "why does such a trivial function exist?". I think it would be silly, > > and

Re: [arch-projects] [dbscripts] [PATCH 1/2] Don't quote $PKGEXT

2018-02-15 Thread Luke Shumaker
On Thu, 15 Feb 2018 15:11:13 -0500, Dave Reisner wrote: > > On Thu, Feb 15, 2018 at 02:49:45PM -0500, Luke Shumaker wrote: > > - [[ -f ${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-${pkgarch}${PKGEXT} > > ]] && return 1 > > - [[ -f > > ${FTP_BASE}/${P

[arch-projects] [dbscripts] [PATCH 0/2] Better handling of PKGEXT

2018-02-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This fixes a mistake introduced in b61a714 around quoting PKGEXT, then renames PKGEXT to PKGEXT_glob to avoid that type of confusion in the future. Luke Shumaker (2): Don't quote $PKGEXT config: Rename PKGEXT to PKGEXT_glob

[arch-projects] [dbscripts] [PATCH 2/2] config: Rename PKGEXT to PKGEXT_glob

2018-02-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> Unlike the other *EXT variables, which are prescriptive, PKGEXT is descriptive, and is a blob. This is confusing because of the other variables, and because it is used prescriptively in makepkg.conf. Simply, the configuration variable name

[arch-projects] [dbscripts] [PATCH 1/2] Don't quote $PKGEXT

2018-02-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This partially reverts commit b61a7148eaf546a31597b74d9dd8948e4a39dea1. In dbscripts, PKGEXT is a glob pattern--it needs to be "unquoted"; and The magic-quoting done by `[[ ... ]]` breaks that. The closing-quote coming before ${P

Re: [arch-projects] [dbscripts] [GIT] Official repo DB scripts branch master updated. 20131102-59-g36b71d3

2018-02-15 Thread Luke Shumaker
gver}-${pkgarch}${PKGEXT}.sig ]] && > return 1 You don't want to do that here. In dbscripts, PKGEXT is a glob pattern--it needs to be "unquoted"; and `[[ ... ]]`'s magic-quoting breaks that. The closing-quote coming before ${PKGEXT} was quite intentional. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [PATCH] [namcap] Treat all non-tar files as PKGBUILD files, regardless of filename

2018-01-25 Thread Luke Shumaker
On Thu, 25 Jan 2018 13:50:19 -0500, Dave Reisner wrote: > On Thu, Jan 25, 2018 at 01:31:45PM -0500, Luke Shumaker wrote: > > From: Luke Shumaker <luke...@parabola.nu> > > > > https://bugs.archlinux.org/task/57193 > > > > If the user mistakenly passes i

[arch-projects] [PATCH] [namcap] Treat all non-tar files as PKGBUILD files, regardless of filename

2018-01-25 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> https://bugs.archlinux.org/task/57193 If the user mistakenly passes in some other (non-package, non-PKGBUILD) file, instead of refusing to process it (saying "Error: Cannot process ${filename}"), it will now try to parse it as a PK

Re: [arch-projects] [namcap] possibility to use renamed PKGBUILD files

2018-01-25 Thread Luke Shumaker
GBUILD", "project2.PKGBUILD", ... > But it would be better to just consider every non-archive file as a PKGBUILD > file. +1 -- Happy hacking, ~ Luke Shumaker

[arch-projects] [archweb] Origin of konami.js

2018-01-15 Thread Luke Shumaker
=true) ? "TAP" : result; if (result==this.keys[0]) this.keys = this.keys.slice(1,this.keys.length) if (this.keys.length==0) { -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 5/7] lib/common.sh: Adjust to work properly with `set -u`

2018-01-15 Thread Luke Shumaker
On Mon, 15 Jan 2018 12:25:22 -0500, Eli Schwartz via arch-projects wrote: > > [1 Re: [arch-projects] [devtools] [PATCH 5/7] lib/common.sh: Adjust to work > properly with `set -u` ] > [1.1 ] > On 01/15/2018 11:57 AM, Luke Shumaker wrote: > > From: Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 3/7] arch-nspawn: make sure that makepkg.conf is always parsed as text

2018-01-15 Thread Luke Shumaker
On Mon, 15 Jan 2018 12:11:29 -0500, Eli Schwartz wrote: > > On 01/15/2018 11:57 AM, Luke Shumaker wrote: > > From: Luke Shumaker <luke...@parabola.nu> > > > > https://lists.parabola.nu/pipermail/dev/2017-June/005576.html > > --- > > arch-nspawn.in | 2

[arch-projects] [devtools] Rebasing devtools32 to contribute upstream

2018-01-15 Thread Luke Shumaker
I'll generally keep it up-to-date as I keep an eye out for anything that I might want to backport into Parabola. (And indeed, there's already one such change https://lists.archlinux.org/pipermail/arch-projects/2018-January/004704.html ) -- Happy hacking, ~ Luke Shumaker

[arch-projects] [devtools] [PATCH 5/7] lib/common.sh: Adjust to work properly with `set -u`

2018-01-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> Support for working with `set -u` was broken by 94160d6. Egg on my face; I'm the one who wants `set -u` support, and I'm the author of that commit! libmakepkg does not work with `set -u`; but mostly because of the include guards! So we jus

[arch-projects] [devtools] [PATCH 7/7] makechrootpkg: Put "keyserver-options auto-key-retrieve" in gpg.conf

2018-01-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This allows signature verification by `makepkg --verifysource`, `git verify-tag`, and such without requiring the user to manually retrieve the keys first. This is based off of devtools32 commit 009695b (2017-06-27) by Erich Eckner <g...@e

[arch-projects] [devtools] [PATCH 2/7] makechrootpkg: Fix anti-pattern when checking for enabled features

2018-01-15 Thread Luke Shumaker
t;true" in such cases, it is better to fail to enable explicitly requested behavior (which will be noticed by the user) than to simply upgrade to this behavior for free (which may not seem to have any obvious cause). Signed-off-by: Eli Schwartz <eschwa...@archlinux.org> Reviewed-by: Lu

[arch-projects] [devtools] [PATCH 1/7] makechrootpkg: Fix unconditionally running namcap

2018-01-15 Thread Luke Shumaker
at I have still not thorougly tested makechrootpkg. Signed-off-by: Eli Schwartz <eschwa...@archlinux.org> Reviewed-by: Luke Shumaker <luke...@parabola.nu> --- makechrootpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index 511e

[arch-projects] [devtools] [PATCH 4/7] arch-nspawn: Remove pointless $(echo ...) subshell

2018-01-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> --- arch-nspawn.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-nspawn.in b/arch-nspawn.in index 3949ee1..7a7a274 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -91,7 +91,7 @@ copy_hostconf () {

[arch-projects] [devtools] [PATCH 0/7] Backports from Parabola v20180103

2018-01-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> These are the commits in Parabola's developer tools v20180103 that are not in upstream devtools that I think are upstreamable. There's no real theme to them. Some of theme have been seen on this mailing list before. (I appologize that I waited 2

[arch-projects] [devtools] [PATCH 3/7] arch-nspawn: make sure that makepkg.conf is always parsed as text

2018-01-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> https://lists.parabola.nu/pipermail/dev/2017-June/005576.html --- arch-nspawn.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-nspawn.in b/arch-nspawn.in index c55f498..3949ee1 100644 --- a/arch-nspawn.in +++ b/arch-nsp

[arch-projects] [devtools] [PATCH 6/7] makechrootpkg: Adjust to work properly with `set -e`

2018-01-15 Thread Luke Shumaker
From: Luke Shumaker <luke...@parabola.nu> This worked properly until eab5aba. --- makechrootpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index c7fe076..a6c54cc 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -205,7

Re: [arch-projects] [archweb] Licensing issues with JS code

2018-01-14 Thread Luke Shumaker
On Sun, 14 Jan 2018 21:51:07 -0500, Eli Schwartz wrote: > > On 01/14/2018 08:34 PM, Luke Shumaker wrote: > > Note that without even being concerned with license compatibility, > > archweb is currently in violation of konami.js, as it does not > > include, link t

Re: [arch-projects] [archweb] Licensing issues with JS code

2018-01-14 Thread Luke Shumaker
On Sun, 14 Jan 2018 18:04:01 -0500, Luke Shumaker wrote: > - take konami.js from commit >ec0f686e647765860ff4d2fcb7b48122785432b75 I'm sorry, I made a typo when pasting that. It should be: c0f686e647765860ff4d2fcb7b48122785432b75 -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [archweb] Licensing issues with JS code

2018-01-14 Thread Luke Shumaker
strap-typeahead.js and confirm that they agree to license it | under the MIT license. I believe all 7 of them agreed to this for | other Bootstrap code that they were authors of; so presumably this | is something they are agreeable to. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [archweb] Licensing issues with JS code

2018-01-14 Thread Luke Shumaker
behavior). Beside that patch, George Mandis is the only author of the pre-minified file. I don't know who is the author of the modifications in the patch. It doesn't correspond to any commit in the linked GitHub or the Google Code SVN, nor any git fork of it that I found. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [GIT] The official devtools repository branch master updated. 20170813-10-gddd508e

2017-11-04 Thread Luke Shumaker
On Sat, 16 Sep 2017 19:35:21 -0400, Jan Alexander Steffens wrote: > On Sat, Sep 16, 2017 at 11:23 PM Luke Shumaker <luke...@lukeshu.com> wrote: > > On Thu, 14 Sep 2017 17:34:11 -0400, > Jan Steffens wrote: > > makechrootpkg: Reopen console to assign the CTTY > >

Re: [arch-projects] [devtools] A better sogrep

2017-09-30 Thread Luke Shumaker
creating the .links.tar.gz files? -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools][PATCH 1/1] use makepkg library instead of local function copies

2017-09-24 Thread Luke Shumaker
On Sun, 24 Sep 2017 20:08:51 -0400, Eli Schwartz wrote: > On 09/24/2017 06:56 PM, Luke Shumaker wrote: > > This mirrors dbscripts commit > > 625fa02 by Pierre Schmitz <pie...@archlinux.de> at 2017-04-18 14:20:49 > > --- > > +. /usr/share/makepkg/util.sh > >

[arch-projects] [devtools][PATCH 1/1] makechrootpkg: Fix function usage comments

2017-09-16 Thread Luke Shumaker
A couple of the comments noting which globals are used by functions are outdated/wrong. - download_sources() : Remove USER from the list. It was always wrong. Originally, it should have been SUDO_USER (not USER), but I should have removed it entirely in 4f23609. - move_products() : Add

[arch-projects] [devtools][PATCH 1/1] makechrootpkg: move init_variables() to be part of main()

2017-09-16 Thread Luke Shumaker
The reason it wasn't moved before was just to keep the diffs (with --ignore-all-space) smaller, to make merging and rebasing work easier. Moving code around in a file tends to make that difficult. But, readability wise, it belongs in main(). --- makechrootpkg.in | 44

[arch-projects] [devtools][PATCH 0/1] Make Eli happy

2017-09-16 Thread Luke Shumaker
Eli seems miffed that init_variables() is a separate function from main(), so fix that. Luke Shumaker (1): makechrootpkg: move init_variables() to be part of main() makechrootpkg.in | 44 1 file changed, 20 insertions(+), 24 deletions

Re: [arch-projects] [devtools] [PATCH 1/2] makechrootpkg: Fix unconditionally running namcap

2017-09-16 Thread Luke Shumaker
As are functions whose > only purpose is to set a bunch of global (!!!) variables immediately > after the function definition. Eh, I'd have moved it to be at the top of main(), but I was trying to avoid moving code around in the file. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [GIT] The official devtools repository branch master updated. 20170813-10-gddd508e

2017-09-16 Thread Luke Shumaker
convenience: https://archive.archlinux.org/repos/2017/09/08/core/os/x86_64/glibc-2.25-7-x86_64.pkg.tar.xz https://archive.archlinux.org/repos/2017/09/08/core/os/x86_64/binutils-2.28.0-4-x86_64.pkg.tar.xz ) -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 2/2] makechrootpkg: Fix anti-pattern when checking for enabled features

2017-09-01 Thread Luke Shumaker
I got bored and killed it) > in the process of completely failing to act as expected when the > variable is unset because of unrelated bugs. And that's the real reason that this change should be applied. :-) -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 1/2] makechrootpkg: Fix unconditionally running namcap

2017-09-01 Thread Luke Shumaker
re_chroot "$copydir" "$USER_HOME" "$keepbuilddir" > + prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" "$run_namcap" > > if arch-nspawn "$copydir" \ > --bind="$PWD:/startdir" \ > -- > 2.14.1 Not that I'm in a position within Arch for it to carry too much weight, but: LGTM. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 1/1] arch-nspawn: get mirror url from chroot's pacman.conf

2017-07-14 Thread Luke Shumaker
ch#\1#g') While we're at it: what is the point of setting host_mirror anyway? I've had users complain about it causing problems like this and others. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools][PATCH] makechrootpkg: Fix broken symlinks because of chroot SRCPKGDEST /srcpkgdest

2017-05-13 Thread Luke Shumaker
On Sat, 13 May 2017 04:39:06 -0400, NicoHood wrote: > > On 05/13/2017 01:57 AM, Luke Shumaker wrote: > > Commit 58968cf fixed symlinks for package products in $startdir in > > light of the simplified chroot setup. However, a similar change needs > > to be made for

[arch-projects] [devtools][PATCH] makechrootpkg: Fix broken symlinks because of chroot SRCPKGDEST /srcpkgdest

2017-05-12 Thread Luke Shumaker
Commit 58968cf fixed symlinks for package products in $startdir in light of the simplified chroot setup. However, a similar change needs to be made for source-package products. This was an easy omission to make because makechrootpkg does not produce source-pakcages by default. ---

  1   2   >