Age | Commit message (Collapse) | Author |
|
This is at the suggestion of Roman Neuhauser, who emailed Dave Reisner and
me.
|
|
- Simplify the commented out call to find HOST_NAME_MAX
- Use `systemd-nspawn -q` instead of 2>/dev/null
- Use Bash 4.1's new {var}>&- syntax in lock_close()
|
|
|
|
Conflicts:
lib/common.sh
makechrootpkg.in
|
|
In collaborative builder machine, these scripts are often allowed to become root
via sudo. This patch avoid to prefix them by sudo each time or call su.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
|
|
The criteria for a valid name are:
- is made of of alphanumerics, "_", ".", and "-"
- is not emtpy
- cannot end with "."
- cannot contain ".."
- the maximum length is HOST_NAME_MAX, as defined in <limits.h>
The existing code takes care of all but the last of these. So, added code
after the existing code to check the length of the string, and grab the
longest possible substring from the end.
I hard-coded our interpretation of HOST_NAME_MAX as 64--on Linux that has
been the value since version 1.0 of the kernel... I don't think it will be
changing any time soon, and since systemd is Linux-only, we don't have to
worry about other kernels.
But, just in case, I included a commented out version that uses cpp to get
the value.
|
|
Conflicts:
arch-nspawn.in
This effectively reverts my machine_name patch; I took a simpler route to
dealing with a working_dir with funny characters in it, using a different
scheme for the machine_name. This fixes the problems devtools' original
scheme had, so I'm going back to that.
|
|
|
|
This fixes various errors one might encounter when trying to use a
build root or cachedir with whitespace in it.
Note that the cachedir fix is not a complete one, as pacman's output is
unreliable (and not meant for parsing here).
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
eval is no longer involved in the execution of systemd-nspawn, so we no
longer need a layer of escaping on the arguments.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
|
|
Now that die() properly forwards arguments to error(), we can expect
that the first arg is a format string and not the entirety of the
output.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
systemd-nspawn always outputs some debug messages over stderr.
Both stdout and stderr from inside the chroot are sent through
a pty to stdout.
|
|
Allows calling makechrootpkg without worrying about the architecture
|
|
Recent changes to systemd-nspawn have it take the machine name from
the chroot dir name, which isn't unique enough for our setup.
|
|
Separates the two features of mkarchroot. Provides users of the new
arch-nspawn with the full feature set of systemd-nspawn.
For example, this can be used to bind custom directories into the chroot.
|