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 wrote: > > On Thu, 14 Sep 2017 17:34:11 -0400, > Jan Steffens wrote: > > makechrootpkg: Reopen console to assign the CTTY > > > > nspawn does not

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

2017-09-30 Thread Luke Shumaker
s 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 at 2017-04-18 14:20:49 > > --- > > +. /usr/share/makepkg/util.sh > > Please just source the a

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

2017-09-24 Thread Luke Shumaker
This mirrors dbscripts commit 625fa02 by Pierre Schmitz at 2017-04-18 14:20:49 --- lib/common.sh | 100 -- 1 file changed, 7 insertions(+), 93 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 0fb93d9..a3c2ec2 100644 --- a/lib/c

[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 S

[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
pgrade) while the program is running, then it probably hasn't had the entire thing read yet, and that can lead to real weirdness. > 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
6 For 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
| > 5 minutes (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
er" > > - prepare_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
le://(/.*)/\$repo/os/\$arch#\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 source

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

[arch-projects] [devtools][PATCH 13/13] Add `# shellcheck` directives to quiet shellcheck, add PKGBUILD.proto

2017-05-05 Thread Luke Shumaker
The added PKGBUILD.proto file is so that shellcheck can know know what to expect that a PKGBUILD sets. --- Makefile| 2 +- PKGBUILD.proto | 48 arch-nspawn.in | 2 ++ checkpkg.in | 4 commitpkg.in| 5 ++

[arch-projects] [devtools][PATCH 11/13] Quote strings that shellcheck warns about.

2017-05-05 Thread Luke Shumaker
These changes are all strictly "slap some double-quotes in there". Anything more than that is not included in this commit. --- arch-nspawn.in | 12 ++-- archrelease.in | 2 +- archrm.in | 2 +- bash_completion.in | 4 ++-- checkpkg.in| 2 +- commitpkg.in

[arch-projects] [devtools][PATCH 06/13] Makefile: add .DELETE_ON_ERROR:

2017-05-05 Thread Luke Shumaker
The absence of it was allowing an (m4-produced) syntax error in in a change I had made to be masked. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3b30097..f4a00ba 100644 --- a/Makefile +++ b/Makefile @@ -115,4 +115,4 @@ upload:

[arch-projects] [devtools][PATCH 04/13] lib/archroot.sh: subvolume_delete_recursive: support arbitrary recursion

2017-05-05 Thread Luke Shumaker
The `-xdev` flag to `find` makes it not recurse over subvolumes; so it only supports recursion with depth=1. Fix this by having the function recursively call itself. --- lib/archroot.sh | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/archroot.sh b/lib/archroot.sh

[arch-projects] [devtools][PATCH 10/13] Make purely stylistic changes to make shellcheck happier.

2017-05-05 Thread Luke Shumaker
These are purely stylistic changes that make shellcheck complain less. This does NOT include things like quoting currently unquoted variables. --- arch-nspawn.in | 8 bash_completion.in | 2 +- checkpkg.in| 7 ++- commitpkg.in | 2 +- find-libdeps.in| 2 +-

[arch-projects] [devtools][PATCH 12/13] Make slightly more involved changes to make shellcheck happy.

2017-05-05 Thread Luke Shumaker
- Use `read -r` instead of other forms of read or looping - Use arrays instead of strings with whitespaces. - In one instance, use ${var%%.*} instead of $(echo $var|cut -f. -d1) --- archrelease.in | 4 ++-- commitpkg.in| 4 ++-- find-libdeps.in | 2 +- finddeps.in | 2 +- lddd.in

[arch-projects] [devtools][PATCH 07/13] Makefile: m4_changequote([[[, ]]]) to avoid accidental quoting.

2017-05-05 Thread Luke Shumaker
The default m4 quote characters: `QUOTE' are troublesome, because ` is fairly likely to pop up in a shell script (if not for a subshell, because it is a useful character in comments and user-facing messages). So, this changes it to [[[QUOTE]]], as it is unlikely to see three braces together like t

[arch-projects] [devtools][PATCH 02/13] makechrootpkg: sync_chroot: make usage easier to understand.

2017-05-05 Thread Luke Shumaker
Also, shorten the "Synchronizing" message to only include the full path to the copy if it was specified. The capslocked variable names in the Usage comment were references to things in Parabola's tools, that didn't make much sense here out of context. --- makechrootpkg.in | 15 +-- 1

[arch-projects] [devtools][PATCH 09/13] Makefile: Add a simple 'check' target that runs shellcheck

2017-05-05 Thread Luke Shumaker
--- Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d5f6ad7..39614a4 100644 --- a/Makefile +++ b/Makefile @@ -114,5 +114,8 @@ dist: upload: scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devt

[arch-projects] [devtools][PATCH 00/13] More patches from Parabola's new version

2017-05-05 Thread Luke Shumaker
issues. Happy hacking, ~ Luke Shumaker Luke Shumaker (13): makechrootpkg: delete_chroot: Fix the is-btrfs-subvolume check. makechrootpkg: sync_chroot: make usage easier to understand. makechrootpkg: sync_chroot: Make more general. lib/archroot.sh: subvolume_delete_recursive: su

[arch-projects] [devtools][PATCH 01/13] makechrootpkg: delete_chroot: Fix the is-btrfs-subvolume check.

2017-05-05 Thread Luke Shumaker
First of all, it ran `is_btrfs "$chrootdir"` to decide if it was on btrfs, but $chrootdir wasn't defined locally; it just happens to work because $chrootdir was defined in main(). (I noticed this because in Parabola, it is called differently, so $chrootdir was empty). So I was tempted to just cha

[arch-projects] [devtools][PATCH 05/13] makechroot: download_sources: Accept makepkg_owner as an argument

2017-05-05 Thread Luke Shumaker
What this is really doing is fixing a conflict that I had incorrectly resolved when rebasing what became 2fd5931 onto cda9cf4. Of course, because of dynamic scoping, everything worked out, and everything worked as intended. Before cda9cf4, it was appropriate for download_sources to take src_owner

[arch-projects] [devtools][PATCH 03/13] makechrootpkg: sync_chroot: Make more general.

2017-05-05 Thread Luke Shumaker
This is inspired by the thought that went in to the delete_chroot is_subvolume commit. sync_chroot($chrootdir, $copydir) copies `$chrootdir/root` to `$copydir`. That seems a little silly; why do we care about "$chrootdir"? Have it just be sync_chroot(source, destination) like every other sync/cop

[arch-projects] [devtools][PATCH 08/13] makechrootpkg: Add a comment warning about a bug in "sudo -i"

2017-05-05 Thread Luke Shumaker
The bug isn't currently triggered, but I accidentally did trigger when I was trying to modify the command a bit. I figure a "caution" sign would be helpful to any future developers. --- makechrootpkg.in | 4 1 file changed, 4 insertions(+) diff --git a/makechrootpkg.in b/makechrootpkg.in in

Re: [arch-projects] [devtools] [PATCH 3/8] arch-nspawn: usage(): Style improvement: two spaces after a period.

2017-04-05 Thread Luke Shumaker
On Sun, 02 Apr 2017 09:11:03 -0400, Jan Alexander Steffens via arch-projects wrote: > > On Sun, Apr 2, 2017 at 2:08 PM Dave Reisner wrote: > > On Sun, Apr 02, 2017 at 04:09:57AM -0400, luke...@lukeshu.com wrote: > > From: Luke Shumaker > > > > --- > >

[arch-projects] [devtools] [PATCH] Add a "License:" tag to all code files.

2017-03-28 Thread Luke Shumaker
In cases where there is no license specified, the file is tagged as "License: Unspecified". Obviously, that is not ideal, but it highlights the fact, and I hope that it encourages whoever has the authority to specify the license to do so. On that note, to anyone who may have the authority to spec

[arch-projects] [devtools] [PATCH 2/2] commitpkg: Adjust fancy quoting/escaping to not confuse Emacs.

2017-03-28 Thread Luke Shumaker
It was confusing Emacs and screwing up the syntax highlighting and auto-indentation for the rest of the file. --- commitpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commitpkg.in b/commitpkg.in index 3b3246b..707a81c 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -47,

[arch-projects] [devtools] [PATCH 1/2] Add '#!/hint/bash' headers to non-executable bash files.

2017-03-28 Thread Luke Shumaker
From: Luke Shumaker This provides a cross-editor hint that the syntax of the file is Bash. --- bash_completion.in | 2 ++ lib/archroot.sh| 2 ++ lib/common.sh | 2 ++ lib/valid-tags.sh | 2 ++ 4 files changed, 8 insertions(+) diff --git a/bash_completion.in b/bash_completion.in index

[arch-projects] [devtools] Help text editors out a bit

2017-03-28 Thread Luke Shumaker
ax highlighting, but more importantly, auto-indentation. -- Happy hacking, ~ Luke Shumaker

[arch-projects] [devtools] [PATCH 3/4] lib/common.sh: lock, slock: Create directories for locks if necessary.

2017-03-25 Thread Luke Shumaker
--- lib/common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/common.sh b/lib/common.sh index 63b7795..6d873ed 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -140,6 +140,7 @@ get_full_version() { lock() { # Only reopen the FD if it wasn't handed to us if ! [[ "/de

[arch-projects] [devtools] [PATCH 4/4] lib/common.sh: Make setup_workdir()/cleanup() safe for programs to not use

2017-03-25 Thread Luke Shumaker
--- lib/common.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/common.sh b/lib/common.sh index 6d873ed..5ef9f97 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -59,12 +59,18 @@ stat_done() { printf "${BOLD}done${ALL_OFF}\n" >&2 } +_setup_workdir=

[arch-projects] [devtools] [PATCH 2/4] lib/common.sh: lock, slock: Allow locks to be inherited.

2017-03-25 Thread Luke Shumaker
Allow for locks to be inherited. Inheriting the lock is something that mkarchroot could do previously, but has since lost the ability to do. This allows for the programs to be more compos-able. Do this by instead of unconditionally opening $file on $fd, first check if $file is already open on $f

[arch-projects] [devtools] Minor cleanups of common.sh

2017-03-25 Thread Luke Shumaker
directly taken advantage of right now in devtools. In the coming days, I will be sending more patches as I isolate out many years of `git merge`s into sets of atomic commits that I think you might welcome. -- Happy hacking, ~ Luke Shumaker

[arch-projects] [devtools] [PATCH 1/4] lib/common.sh: add 'lock_close'; use it as appropriate.

2017-03-25 Thread Luke Shumaker
`lock_close FD` is easier to remember than 'exec FD>&-`; and is especially easier if FD is a variable (though that isn't actually taken advantage of here). This uses Bash 4.1+ `exec {var}>&-`, rather than the clunkier `eval exec "$var>&-"` that was necessary in older versions of Bash. Thanks to Da

[arch-projects] [devtools] [PATCH 1/4] lib/common.sh: add 'lock_close'; use it as appropriate.

2017-03-25 Thread Luke Shumaker
`lock_close FD` is easier to remember than 'exec FD>&-`; and is especially easier if FD is a variable (though that isn't actually taken advantage of here). This uses Bash 4.1+ `exec {var}>&-`, rather than the clunkier `eval exec "$var>&-"` that was necessary in older versions of Bash. Thanks to Da

[arch-projects] [devtools] [PATCH v3] makechrootpkg: Be recursive when deleting btrfs subvolumes.

2017-02-17 Thread Luke Shumaker
From: Luke Shumaker Motivation: tmpfiles.d(5) has directives to create btrfs subvolumes. This means that systemd-tmpfiles (which may be called by an ALPM hook) might create subvolumes. For instance, systemd's systemd-nspawn.conf creates a subvolume at `/var/lib/machines/`.

Re: [arch-projects] [devtools] [PATCH] makechrootpkg: Be recursive when deleting btrfs subvolumes.

2017-02-17 Thread Luke Shumaker
btrfs subvolume delete "$dir" } -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH v2] makechrootpkg: Be recursive when deleting btrfs subvolumes.

2017-02-17 Thread Luke Shumaker
be `while` instead of `for`. 2. I used a subshell and a variable rather than a pipe to make sure that if `btrfs_subvolume_list`, we find out about it before deleting anything. But, because `$(...)` trims trailing whitespace, and `<<<` adds a trailing newline, this doesn't work for the common case of there being no subvolumes to delete. -- Happy hacking, ~ Luke Shumaker

[arch-projects] [devtools] [PATCH v2] makechrootpkg: Be recursive when deleting btrfs subvolumes.

2017-02-10 Thread Luke Shumaker
From: Luke Shumaker Motivation: tmpfiles.d(5) has directives to create btrfs subvolumes. This means that systemd-tmpfiles (which may be called by an ALPM hook) might create subvolumes. For instance, systemd's systemd-nspawn.conf creates a subvolume at `/var/lib/machines/`.

Re: [arch-projects] [devtools] [PATCH] makechrootpkg: Be recursive when deleting btrfs subvolumes.

2017-02-10 Thread Luke Shumaker
-- you're reading words. > > > + for subvolume in "${subvolumes[@]}"; do > > + btrfs subvolume delete "$dir/$subvolume" || return $? > > + done Yeah, but the lines are guaranteed to be words because of the `(\S*)` in the regexp in `btrfs_subvolume_list_all`. But I should have written it as subvolumes="$(btrfs_subvolume_list "$dir")" || return for read -r subvolume; do btrfs subvolume delete "$dir/$subvolume" || return done <<<"$subvolumes" -- Happy hacking, ~ Luke Shumaker

[arch-projects] [devtools] [PATCH] makechrootpkg: Delete subvolumes recursively

2017-02-10 Thread Luke Shumaker
xiting on error easier; xargs only terminates early if the process fails with 255. -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [dbscripts] [PATCH 07/11] test/lib/common.inc: use `grep &>/dev/null` instead of `grep -q`.

2015-05-21 Thread Luke Shumaker
On Sun, 17 May 2015 20:38:33 -0400, Dave Reisner wrote: > > On Sun, May 17, 2015 at 07:44:15PM -0400, Luke Shumaker wrote: > > `grep -q` may exit as soon as it finds a match; the program piped in to it > > might not be finished writing, and consequently print a message about

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

2015-05-17 Thread Luke Shumaker
From: Luke Shumaker --- cron-jobs/ftpdir-cleanup | 12 +- cron-jobs/integrity-check | 2 +- cron-jobs/sourceballs | 12 +- cron-jobs/update-web-db | 2 +- db-functions | 57 +++ db-move | 10

[arch-projects] [dbscripts] [PATCH 11/11] Normalize to tab indent.

2015-05-17 Thread Luke Shumaker
From: Luke Shumaker --- cron-jobs/check_archlinux/parse_pkgbuilds.sh | 10 +- cron-jobs/devlist-mailer | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux

[arch-projects] [dbscripts] [PATCH 06/11] test/: Make which architectures to build for configurable.

2015-05-17 Thread Luke Shumaker
--- config.testing | 5 + test/lib/common.inc | 16 ++-- test/test.d/create-filelists.sh | 20 test/test.d/db-move.sh | 22 +- test/test.d/db-remove.sh| 14 ++ test/test.d/db-repo-ad

[arch-projects] [dbscripts] [PATCH 08/11] Add "#!/hint/bash" to the beginning of several files.

2015-05-17 Thread Luke Shumaker
It is a method of notifying text-editors that a file is in Bash syntax without giving it a propper shebang (which would be confusing, as it would suggest that the file should be executable), as well as working across virtually all text-editors (unlike "-*- Mode: Bash -*-" or whatever). --- config

[arch-projects] [dbscripts] [PATCH 05/11] test/: make TMPDIR configurable via config.testing

2015-05-17 Thread Luke Shumaker
Because common.inc is included in nested calls, to prevent later calls from overriding earlier calls, we export MASTER_TMPDIR to signal the top-level value. Calls to mktemp have also bee adjusted to obey TMPDIR. --- config.testing | 5 + test/lib/common.inc | 7 +++ 2 files changed,

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

2015-05-17 Thread Luke Shumaker
From: Luke Shumaker 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-check |

[arch-projects] [dbscripts] [PATCH 10/11] db-functions: Fix check_repo_permission checking all architectures

2015-05-17 Thread Luke Shumaker
It mistakenly looped over just the first element of the ARCHES array, instead of the entire array. This meant that it only checked the permissions for one architecture. --- db-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db-functions b/db-functions index eb61f51..

[arch-projects] [dbscripts] [PATCH 07/11] test/lib/common.inc: use `grep &>/dev/null` instead of `grep -q`.

2015-05-17 Thread Luke Shumaker
`grep -q` may exit as soon as it finds a match; the program piped in to it might not be finished writing, and consequently print a message about a "write error" to stderr. I'll add that this is not purely hypothetical--it happened to me while testing. --- test/lib/common.inc | 8 1 file

[arch-projects] [dbscripts] [PATCH 04/11] Export TMPDIR, and use mktemp -t instead of making it part of the template

2015-05-17 Thread Luke Shumaker
From: Luke Shumaker --- config | 2 +- db-functions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 6048209..b781555 100644 --- a/config +++ b/config @@ -23,7 +23,7 @@ LOCK_DELAY=10 LOCK_TIMEOUT=300 STAGING="$HOME/staging" -TMPDIR

[arch-projects] [dbscripts] [PATCH 03/11] Use += instead of jumping through hoops.

2015-05-17 Thread Luke Shumaker
From: Luke Shumaker The += operator was introduced in Bash 3.1, and was already used in some places in dbscripts, but not everywhere. For normal strings, this isn't a big deal, but appending to an array without using += is nasty. --- cron-jobs/sourceballs | 6 +++--- db-functions

[arch-projects] [dbscripts] Various improvements

2015-05-17 Thread Luke Shumaker
... I understand that many of these changes may be "unwelcome", and percieved as "change for the sake of change". I believe that each of these has at least some merit, but some less than others (at least grab the bugfix from patch 10!). -- Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 0/9] Changes I've been maintaining in Parabola's fork

2014-05-11 Thread Luke Shumaker
At Sun, 11 May 2014 11:54:55 -0400, Dave Reisner wrote: > Modulo the comments I've made in 2 of the patches, this whole set gets > an ACK from me. Thanks for contributing back upstream! What's the process here? Should I resubmit those two patches, or...? Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 6/9] lib/common.sh: Add a lock_close function.

2014-05-11 Thread Luke Shumaker
At Sun, 11 May 2014 11:49:57 -0400, Dave Reisner wrote: > > On Sun, May 11, 2014 at 12:16:33AM -0400, Luke Shumaker wrote: > > At Sat, 10 May 2014 22:40:02 -0400, > > Dave Reisner wrote: > > > > + eval "exec $fd>&-" > > > > >

Re: [arch-projects] [devtools] [PATCH 6/9] lib/common.sh: Add a lock_close function.

2014-05-10 Thread Luke Shumaker
syntax. I suppose neither of us is concerned about supporting Bash 4.0 or earlier? Happy hacking, ~ Luke Shumaker

Re: [arch-projects] [devtools] [PATCH 5/9] arch-nspawn: Avoid errors where $working_dir is longer than HOST_NAME_MAX.

2014-05-10 Thread Luke Shumaker
At Sat, 10 May 2014 22:36:44 -0400, Dave Reisner wrote: > On Sat, May 10, 2014 at 10:22:07PM -0400, Luke Shumaker wrote: > > +#HOST_NAME_MAX="$(printf '%s\n' '#include ' 'HOST_NAME_MAX'|cpp > > -|sed -n '$p')" > > No need to

[arch-projects] [devtools] [PATCH 2/9] archbuild: Fix a variable name mistake. ($copydir -> $copy)

2014-05-10 Thread Luke Shumaker
It tried to lock `$copydir.lock`, which was the ONLY mention of $copydir in the entire file. Surely it meant `$copy.lock`; the line was probably originally copy/pasted from makechrootpkg or similar, where $copydir is used. --- archbuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[arch-projects] [devtools] [PATCH 9/9] Replace multiple uses of string interpolation with printf-type arguments.

2014-05-10 Thread Luke Shumaker
In some places this wasn't possible until now, brecause `stat_busy`, `lock`, and `slock` didn't accept printf-style arguments. --- arch-nspawn.in | 2 +- archbuild.in | 8 archrelease.in | 2 +- checkpkg.in | 4 ++-- crossrepomove.in | 8 lddd.in | 4 +

[arch-projects] [devtools] [PATCH 0/9] Changes I've been maintaining in Parabola's fork

2014-05-10 Thread Luke Shumaker
he changes to lock/slock. Happy hacking, ~ Luke Shumaker Luke Shumaker (9): arch-nspawn: Fix a grammar mistake (a/an) in an error message. archbuild: Fix a variable name mistake. ($copydir -> $copy) mkarchroot: Correct "Usage:" text. makechrootpkg: Use the btrfs mountpoint/subvolume

[arch-projects] [devtools] [PATCH 1/9] arch-nspawn: Fix a grammar mistake (a/an) in an error message.

2014-05-10 Thread Luke Shumaker
--- arch-nspawn.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-nspawn.in b/arch-nspawn.in index 4436a0e..15db2e9 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -84,7 +84,7 @@ umask 0022 # Sanity check if [[ ! -f "$working_dir/.arch-chroot" ]]; then - die

[arch-projects] [devtools] [PATCH 8/9] lib/common.sh: Improve lock() and slock().

2014-05-10 Thread Luke Shumaker
There are 3 things of note here: - Pass extra arguments to stat_busy, to allow it to take printf-type messages. - Check to make sure that process doesn't already own the lock. The code for this is mostly taken from mkarchroot; the logic had been dropped when the functions were pulled i

[arch-projects] [devtools] [PATCH 6/9] lib/common.sh: Add a lock_close function.

2014-05-10 Thread Luke Shumaker
--- archbuild.in | 2 +- lib/common.sh| 8 makechrootpkg.in | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/archbuild.in b/archbuild.in index dc45c7f..618d0f0 100644 --- a/archbuild.in +++ b/archbuild.in @@ -56,7 +56,7 @@ if ${clean_first} || [[ ! -d "${chr

[arch-projects] [devtools] [PATCH 5/9] arch-nspawn: Avoid errors where $working_dir is longer than HOST_NAME_MAX.

2014-05-10 Thread Luke Shumaker
Currently, if absolute path of the chroot directory is more than 65 bytes (HOST_NAME_MAX+1) long, arch-nspawn will fail (mysteriously too, since stderr is directed to /dev/null). This patch makes it so that if $machine_name is more than 64 (HOST_NAME_MAX) bytes long, it is stripped to use just the

[arch-projects] [devtools] [PATCH 7/9] lib/common.sh:stat_busy(): Accept printf-style arguments.

2014-05-10 Thread Luke Shumaker
This seems to be logical to fit in with the other message handling functions, and it only takes a couple more characters. --- lib/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.sh b/lib/common.sh index 38e31a2..d6da1ab 100644 --- a/lib/common.sh +++ b/lib/

[arch-projects] [devtools] [PATCH 3/9] mkarchroot: Correct "Usage:" text.

2014-05-10 Thread Luke Shumaker
The "app" hasn't been an option since arch-nspawn was created. --- mkarchroot.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkarchroot.in b/mkarchroot.in index fb472bc..5f3d6fe 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -15,7 +15,7 @@ CHROOT_VERSION='v3' working_di

[arch-projects] [devtools] [PATCH 4/9] makechrootpkg: Use the btrfs mountpoint/subvolume check consistently.

2014-05-10 Thread Luke Shumaker
Commit 59e348fc3c5dd086331d884a6dd76fb43a92b7eb added a btrfs subvolume check, but only used it in create_chroot(); it missed clean_temporary(). --- makechrootpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index 97c7780..c3edc72 10064

[arch-projects] [devtools] [PATCH 0/9] Changes I've been maintaining in Parabola's fork

2014-05-10 Thread Luke Shumaker
he changes to lock/slock. Happy hacking, ~ Luke Shumaker Luke Shumaker (9): arch-nspawn: Fix a grammar mistake (a/an) in an error message. archbuild: Fix a variable name mistake. ($copydir -> $copy) mkarchroot: Correct "Usage:" text. makechrootpkg: Use the btrfs mountpoint/subvolume

Re: [arch-projects] [devtools] [PATCH 2/3] makechrootpkg: properly handle makepkg args

2014-05-10 Thread Luke Shumaker
sudo -u nobody makepkg $makepkg_args || exit 1 > + sudo -u nobody makepkg "$makepkg_args" || exit 1 However extra_args was escaped, doesn't this basically ignore that, and shove it all into one argument? Interestingly, I was just getting ready to submit a patch also does

<    1   2