Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
AgeCommit message (Collapse)Author
2017-02-15makechrootpkg, arch-nspawn: Force-enable local '/repo/' repository.Luke Shumaker
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.
2017-02-15makechrootpkg: move_products: Mimic `makepkg` and symlink products into PWD.Luke Shumaker
2017-02-15makechrootpkg: _chrootprepare: Clean srcdest and startdir.Luke Shumaker
2017-02-15makechrootpkg: _chrootbuild: Split into _chroot{prepare,build}.Luke Shumaker
2017-02-15makechrootpkg: Detect the chroottype in individual functions, not globally.Luke Shumaker
2017-02-15makechrootpkg: Have functions be more function-y.Luke Shumaker
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.
2017-02-15makechrootpkg: Improve status messages.Luke Shumaker
2017-02-15makechrootpkg: Quote directory passed to `rm -rf`.Luke Shumaker
2017-02-15Add a "License:" tag to all code files.Luke Shumaker
2017-01-29makechrootpkg: Be recursive when deleting subvolumes.Luke Shumaker
This fixes https://labs.parabola.nu/issues/1201
2016-06-09Merge tag '20160527.1'libretools-20160609Luke Shumaker
2016-01-09makechrootpkg: set builduser's shell to /bin/bashEvangelos Foutras
Having it set to nologin breaks a couple of tests in Git and Python.
2016-01-09makechrootpkg: use /build as HOME for the builduserLevente Polyak
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.)
2015-06-06Reverse the previous commit--passing in makepkg_args as args is better.libretools-20150607Luke Shumaker
2015-06-06makechrootpkg: remove extra arguments to /chrootbuildLuke Shumaker
They have been part of the file itself via %q for a while.
2015-06-06Merge branch 'archlinux'Luke Shumaker
2015-06-06makechrootpkg: verify sources before preparing chrootEvangelos Foutras
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'.
2015-05-17Merge branch 'archlinux'libretools-20150526Luke Shumaker
2015-05-14fix handling of public keyringChristian Hesse
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>
2015-04-13Merge branch 'archlinux'Luke Shumaker
2015-02-28handle gnupg 2.1.x public keyringChristian Hesse
2015-02-15makechrootpkg: keep all function defs togetherDave Reisner
2014-11-05Merge branch 'archlinux'libretools-20141128Luke Shumaker
Conflicts: arch-nspawn.in archbuild.in makechrootpkg.in
2014-10-20makechrootpkg: treat makepkg_args as arrayDave Reisner
2014-10-20makechrootpkg: don't run namcap if makepkg failsDave Reisner
Fixes a regression introduced by 285a4e94cd, which made namcap a "compile time" option.
2014-10-19makechroot: die if we encounter an unexpected optionDave Reisner
2014-10-19save and reuse original argv when auto-elevatingDave Reisner
Fixes FS#42277.
2014-09-30makechrootpkg: make running namcap a "compile time" choiceDave Reisner
We don't need to pass _chrootbuild this information at runtime -- we can just generate the build script to do exactly what we want.
2014-09-30makechrootpkg: build as same UID as invokerDave Reisner
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.
2014-09-22makechrootpkg: Use the btrfs mountpoint/subvolume check consistently.Luke Shumaker
Commit 59e348fc3c5dd086331d884a6dd76fb43a92b7eb added a btrfs subvolume check, but only used it in create_chroot(); it missed clean_temporary().
2014-09-22makechrootpkg: use a simpler/safer expression with evalDave Reisner
2014-05-10Tidy up.Luke Shumaker
2014-05-10Merge remote-tracking branch 'arch/master'Luke Shumaker
Conflicts: lib/common.sh makechrootpkg.in
2014-05-10Switch to root when started as regular userSébastien Luttringer
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>
2014-05-10Update mtime of chroot when buildingJan Alexander Steffens (heftig)
Makes the chroot mtime a useful indicator of last usage. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2014-05-10Remove broken unknown arguments check and fix usageJoel Teichroeb
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>
2014-01-05makechrootpkg: fix the btrfs check in both placeslibretools-20140106Luke Shumaker
Upstream only fiex it in one place.
2014-01-04Merge branch 'devtools'Luke Shumaker
Conflicts: checkpkg.in lib/common.sh makechrootpkg.in
2013-11-07FS#37656 - [devtools] add SRCPKGDEST to makechrootpkgMarkus M. May
Signed-off-by: Markus M. May <mmay@javafreedom.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-07makechrootpkg: Don't copy the logpipeJan Alexander Steffens (heftig)
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01Add support for building bzr packagesMaxime Gauduin
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>
2013-11-01Add mountpoint check to btrfs subvol logicWorMzy Tykashi
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01makechrootpkg: Look harder for -R argumentDave Reisner
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>
2013-09-26Merge branch 'devtools'libretools-20130930Luke Shumaker
2013-08-19makechrootpkg: add generic support for additional bind mountsDave Reisner
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>
2013-08-16Avoid having code/variables in format strings.Luke Shumaker
2013-08-16Merge remote-tracking branch 'remotes/devtools/master'Luke Shumaker
2013-08-08avoid injecting code into the format stringDave Reisner
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>
2013-06-15makechrootpkg: ~/.makepkg.conf should take precedence over /etc/Luke Shumaker
2013-06-15makechrootpkg: handle makepkg_args betterLuke Shumaker
- 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.