summaryrefslogtreecommitdiffstats
path: root/makechrootpkg.in
AgeCommit message (Collapse)AuthorFilesLines
2016-01-09makechrootpkg: set builduser's shell to /bin/bashEvangelos Foutras1-1/+1
Having it set to nologin breaks a couple of tests in Git and Python.
2016-01-09makechrootpkg: use /build as HOME for the builduserLevente Polyak1-1/+1
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-06makechrootpkg: verify sources before preparing chrootEvangelos Foutras1-2/+2
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-14fix handling of public keyringChristian Hesse1-1/+2
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-02-28handle gnupg 2.1.x public keyringChristian Hesse1-4/+5
2015-02-15makechrootpkg: keep all function defs togetherDave Reisner1-54/+54
2014-10-21makechrootpkg: treat makepkg_args as arrayDave Reisner1-8/+11
2014-10-21makechrootpkg: don't run namcap if makepkg failsDave Reisner1-1/+1
Fixes a regression introduced by 285a4e94cd, which made namcap a "compile time" option.
2014-10-20makechroot: die if we encounter an unexpected optionDave Reisner1-1/+1
2014-10-19save and reuse original argv when auto-elevatingDave Reisner1-2/+4
Fixes FS#42277.
2014-10-01makechrootpkg: make running namcap a "compile time" choiceDave Reisner1-14/+14
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-10-01makechrootpkg: build as same UID as invokerDave Reisner1-9/+15
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 Shumaker1-1/+1
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 Reisner1-1/+1
2014-05-10Switch to root when started as regular userSébastien Luttringer1-1/+1
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)1-0/+3
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 Teichroeb1-3/+2
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>
2013-11-07FS#37656 - [devtools] add SRCPKGDEST to makechrootpkgMarkus M. May1-5/+16
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)1-0/+1
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01Add support for building bzr packagesMaxime Gauduin1-6/+8
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 Tykashi1-1/+1
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-01makechrootpkg: Look harder for -R argumentDave Reisner1-5/+7
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-08-19makechrootpkg: add generic support for additional bind mountsDave Reisner1-3/+15
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-08avoid injecting code into the format stringDave Reisner1-7/+7
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-05-25makechrootpkg: Add hack for svn sources and makepkg 4.1.1Jan Alexander Steffens (heftig)1-0/+11
2013-05-11makechrootpkg: Update comments to point out the bad hacksJan Alexander Steffens (heftig)1-3/+4
2013-05-11makechrootpkg: Split out chrootbuild into a functionJan Alexander Steffens (heftig)1-28/+42
Now syntax highlighting works properly! :D
2013-05-06makechrootpkg: Ensure we have a writable PKGBUILDJan Alexander Steffens (heftig)1-0/+5
For pkgver updates.
2013-05-03makechrootpkg: Avoid parsing PKGBUILD and support VCS sourcesJan Alexander Steffens (heftig)1-148/+173
- 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.
2013-05-03makechrootpkg: Remove add_to_db featureJan Alexander Steffens (heftig)1-12/+1
I don't think this is much use in our common workflow. Our pacman configs don't even make a reference to /repo.
2013-05-03lib/common.sh: Introduce locking helper functionsJan Alexander Steffens (heftig)1-14/+2
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.
2013-05-02mkarchroot: Refactor chroot running into a new scriptJan Alexander Steffens (heftig)1-3/+3
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.
2013-04-08makechrootpkg: Add option to build in temp chrootSébastien Luttringer1-8/+25
Add option -T to build in a temporary chroot. This apply to any kind of filesytem and allow to easily parrallelize builds. This patch also simplify how $default_copy and $copy are defined. Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-17makechrootpkg: Stat chrootdir type after existancySébastien Luttringer1-3/+3
Move detection of chrootdir type after have check if the directory exists. This avoid the following messages when -r is not given stat: cannot read file system information for '': No such file or directory Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-17archbuild: only use base-devel to new chrootSébastien Luttringer1-2/+2
Since TODO [1] which state: It would be good for base-devel to install everything needed for a build chroot we can remove base and sudo [1] https://www.archlinux.org/todo/add-more-to-base-devel/ Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-10makechrootpkg: use var instead of file in $copydirSébastien Luttringer1-7/+4
Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-10makechrootpkg: Properly detect filesystem typeSébastien Luttringer1-9/+10
Enable btrfs features only if the underlying filesystem is btrfs and not rely on the presence of the btrfs tools. Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-10makechrootpkg: Display uniform $copy in messagesSébastien Luttringer1-2/+2
Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-03-10makechrootpkg: -I to handle multiple packagesSébastien Luttringer1-8/+12
Since commit cb3a6ce, running makechroot 2 times to insert a package in a build directory require to find a directory without PKGBUILD cd /var/empty makechrootpkg -cu -I virtualbox-host-dkms-*-i686.pkg.tar.xz -r <dir> makechrootpkg -I virtualbox-host-dkms-*-i686.pkg.tar.xz -r <dir> cd - makechrootpkg -n -r <dir> This patch allow makechrootpkg to handle more than one package to be installed before the build is run and simplify the previous case in makechrootpkg -ncu -I virtualbox-host-dkms-*-i686.pkg.tar.xz -I virtualbox-guest-dkms-*-i686.pkg.tar.xz -r <dir> Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-01-20-I ends early if there is nothing to buildSébastien Luttringer1-2/+2
This allow to build in one shot a package depending of a missing package Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-15Make sure the usage functions are consistentEric Bélanger1-1/+1
The usage messages now begins with a "Usage:", i.e. capitalized and with a colon. Fixes FS#26956. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-10-27Fix return code handlingJan Alexander Steffens (heftig)1-2/+2
Stop trap_exit from forcing a 0 exit code. This fixes makechrootpkg, which used to always return success, even if the build failed. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-10-03makechrootpkg: do not run namcap as rootPierre Schmitz1-1/+1
2012-09-14Fix ownership when copying files from chroot to systemFlorian Pritz1-0/+4
Previously files were always owned by nobody which means trying to write to them directly would fail because only the owner has +w. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-11Enable signature checking within build environmentPierre Schmitz1-4/+0
* bind /sys and /dev/pts from host * drop support for devtmpfs as it is no longer needed * add /run and /dev/rtc0 * clone own ipc, uts and mount namespaces for chroot * set localtime, timezone and locale within chroot environment * copy /etc/pacman.d/gnupg from host
2012-03-05makechrootpkg: Install the built packages before running namcap to reduce ↵Pierre Schmitz1-1/+1
false positives and check inter split package dependencies.
2012-01-18makechrootpkg: fix error messageAllan McRae1-3/+4
Passing a directory that does not exist to makechrootpkg results in an error message: ==> ERROR: No chroot dir defined, or invalid path '' The path is not being printed as the readlink command blanks it if the directory does not exist. Fix this. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-01-18Fix up usage help, the Default line belongs to -lJan Alexander Steffens (heftig)1-1/+1
Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-04makearchroot: source /etc/profile before buildingAllan McRae1-0/+1
This ensures the PATH used when building is the default path and not the value set by the user calling makechrootpkg. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-09makechrootpkg: fix repackIonut Biru1-1/+1
repack is defined as a boolean. set it true when -R is passed /usr/sbin/makechrootpkg: line 295: 1: command not found Signed-off-by: Ionut Biru <ibiru@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>