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
s creating the .links.tar.gz files?
--
Happy hacking,
~ 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
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
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
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
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
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
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
| > 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
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
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
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
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.
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 ++
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
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:
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
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 +-
- 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
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
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
---
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
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
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
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
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
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
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
> >
> > ---
>
>
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
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,
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
ax highlighting, but more importantly,
auto-indentation.
--
Happy hacking,
~ 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
---
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=
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
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
`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
`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
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/`.
btrfs subvolume delete "$dir"
}
--
Happy hacking,
~ 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
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/`.
-- 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
xiting on error
easier; xargs only terminates early if the process fails with 255.
--
Happy hacking,
~ 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
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
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
---
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
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
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,
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 |
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..
`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
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
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
... 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
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
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>&-"
> > >
> >
syntax. I suppose neither of us is
concerned about supporting Bash 4.0 or earlier?
Happy hacking,
~ 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
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
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 +
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-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
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
---
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
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
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/
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
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
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
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
101 - 173 of 173 matches
Mail list logo