Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
We can't rely on PKGEXT since it's not sourced from a controlled
location. Case in point, if a user sets PKGEXT=.pkg.tar.gz, checkpkg
fails and offers no easy workaround.
Instead, use glob expansion to resolve the name of the tarball, bailing
if it can't be found definitively. This involves some refactoring to
avoid modifying PWD (which is advisable regardless).
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Fixes FS#36378.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
For example...
$ make
GEN checkpkg
GEN commitpkg
GEN archco
archco: line 179: unexpected EOF while looking for matching `"'
archco: line 181: syntax error: unexpected end of file
make: *** [archco] Error 2
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>
|
|
Also allow this function to be called without arguments, in which case,
don't call error at all. Some uses of this function wrongly assumed
that this was already allowed.
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>
|
|
|
|
|
|
- handle it as an array
- have the usage text print out the actual default args, instead of the
defaults plus whatever has been parsed before `-h`
- getopts turns any unknown flag into `-?`; don't add `*)` to makepkg_args
- use in_array to see if it contains -R instead of looping ourselfs
- pass it as a series of flags to /chrootbuild; preserving whitespace.
|
|
|
|
Conflicts:
makechrootpkg.in
|
|
Conflicts:
makechrootpkg.in
|
|
Arch's have shorter names, and properly escape the filename.
Ours create the directories, and check if the locks are already open.
The best of both worlds.
When merging the usages of them, I used arch's messages. Ours are too long,
even if they are more informative.
|
|
|
|
mkarchroot.in didn't need modified because it already (incorrectly) had
.lock in the filename
|
|
Conflicts:
makechrootpkg.in
mkarchroot.in
|
|
If somewhere in the path to ${path}.lock there was a symlink, then it would
fail to inherit the lock from the parent program, and stall.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Nymeria's HTTP mirror is now password-protected and crossrepomove broke.
|
|
|
|
|
|
when adding it to the local repo
|
|
|
|
The user-passed makechrootpkg_args may contain a "--" to pass
arguments to makepkg. In this case, the order is wrong.
|
|
systemd-nspawn always outputs some debug messages over stderr.
Both stdout and stderr from inside the chroot are sent through
a pty to stdout.
|
|
Now syntax highlighting works properly! :D
|
|
For pkgver updates.
|
|
Allows calling makechrootpkg without worrying about the architecture
|
|
- Ensure sources are available before entering chroot
- Bind STARTDIR and SRCDEST into the chroot read-only
- Refactor makechrootpkg and introduce meaningful functions
Avoids copying stuff from/to the chroot as much as possible. With
VCS sources these copies can get quite expensive.
|
|
I don't think this is much use in our common workflow. Our pacman
configs don't even make a reference to /repo.
|
|
Reduces code duplication.
With makechrootpkg not calling mkarchroot anymore,
the lock handover protocol is unneeded.
arch-nspawn does not do any locking, so add protection to archbuild.
|
|
Recent changes to systemd-nspawn have it take the machine name from
the chroot dir name, which isn't unique enough for our setup.
|
|
|
|
|