Age | Commit message (Collapse) | Author |
|
This means wrapping variable initialization in init_variables(), and the
main program routine in main().
I did NOT put `shopt -s nullglob` in to a function.
|
|
Even though main() doesn't call `set -u`; this way the functions will
continue to work if copied into an environment with `set -u`, or so
that we are ready if we ever want to start using `set -u`.
|
|
The change in arch-nspawn is subtle:
This was the source of "infamous" "it fails every other time" bug that
took me over a year to solve. <https://labs.parabola.nu/issues/435>
By having a repository of local packages (rather than simply running
`pacman -U`), we are inviting pacman to cache them in
`/var/cache/pacman/pkg`. Besides being needless disk writes, this
actually causes a real issue. If the package gets rebuilt, pacman
will balk, as the file no longer matches the cached signature.
So, how do we prevent pacman from caching these local packages?
Simple: include the directory they are already in in the
pacman.conf:CacheDir list. This will prevent pacman from copying
the files to one of the other cache directories.
|
|
|
|
|
|
|
|
|
|
Rather than them simply being named blocks of code with braces around
them.
That is: have them take things via arguments rather than global
variables.
Specific notes:
- download_sources:
Observation: if $SUDO_USER is set, then src_owner=$SUDO_USER.
So (for clarity), rather than checking if $SUDO_USER is set, check
if $src_owner is different than $USER.
This reduces how much we have to worry about global state.
- install_packages:
1. Receive the list of packages as arguments, rather than a global
variable.
2. Make the caller responsible for looking at PKGBUILD. From the
name and arguments, one would never expect it to look at PKGBUILD.
- create_chroot->sync_chroot:
I pulled the `if [[ ! -d $copydir ]] || $clean_first;` check out; it is
now the caller's responsibility to use that check when deciding if to
call sync_chroot.
|
|
|
|
|
|
|
|
This fixes https://labs.parabola.nu/issues/1201
|
|
|
|
Having it set to nologin breaks a couple of tests in Git and Python.
|
|
This way the HOME dir is writable and no ugly hacks are required
in the PKGBUILD if $HOME is accessed (f.e. maven, gradle and also
some python tests etc.)
|
|
|
|
They have been part of the file itself via %q for a while.
|
|
|
|
This is needed in order to use GPG's auto-key-retrieve keyserver option,
otherwise the keyring will get copied to the chroot before the required
keys are retrieved during 'makepkg --verifysource'.
|
|
|
|
Chances are that pubring.kbx has been created by gpgsm but pubring.gpg
is still around with valid data. We do not know what file contains what
we need, so just copy both.
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
|
|
|
|
|
|
Conflicts:
arch-nspawn.in
archbuild.in
makechrootpkg.in
|
|
|
|
Fixes a regression introduced by 285a4e94cd, which made namcap a
"compile time" option.
|
|
|
|
Fixes FS#42277.
|
|
We don't need to pass _chrootbuild this information at runtime -- we
can just generate the build script to do exactly what we want.
|
|
Changing UID to that of 'nobody' is arbitrary at best, and an
information leak at worst. Let's just drop back to the same UID of the
invoker.
|
|
Commit 59e348fc3c5dd086331d884a6dd76fb43a92b7eb added a btrfs subvolume
check, but only used it in create_chroot(); it missed clean_temporary().
|
|
|
|
|
|
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>
|
|
Makes the chroot mtime a useful indicator of last usage.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
If getopts comes across an unknown argument, $arg it set to '?' and
$OPTARG is unset. Therefore the getopts line detecting unknown arguments
doesn't work. Arguments to pass to makepkg are already handled by
passing all the aguments after the end-of-options marker (--), but this
wasn't documented in the usage text.
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Upstream only fiex it in one place.
|
|
Conflicts:
checkpkg.in
lib/common.sh
makechrootpkg.in
|
|
Signed-off-by: Markus M. May <mmay@javafreedom.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Fixes FS#36654: https://bugs.archlinux.org/task/36654.
Signed-off-by: Maxime Gauduin <alucryd@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
We shouldn't be in the business of reparsing makepkg's arguments, but
since we have to treat the case of repackaging separately, do a better
job of trying to find signs of it happening. This change lets you pass
the longopt, --repackage, or multiple shortopts such as -RA, and still
get the intended effect.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
|
|
Piggyback on systemd-nspawn's --bind and --bind-ro flags to allow
arbitrary mount points to be added to the build container.
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>
|