summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
AgeCommit message (Collapse)Author
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-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>
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-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-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-05-25makechrootpkg: Add hack for svn sources and makepkg 4.1.1Jan Alexander Steffens (heftig)
2013-05-11makechrootpkg: Update comments to point out the bad hacksJan Alexander Steffens (heftig)
2013-05-11makechrootpkg: Split out chrootbuild into a functionJan Alexander Steffens (heftig)
Now syntax highlighting works properly! :D
2013-05-06makechrootpkg: Ensure we have a writable PKGBUILDJan Alexander Steffens (heftig)
For pkgver updates.
2013-05-03makechrootpkg: Avoid parsing PKGBUILD and support VCS sourcesJan Alexander Steffens (heftig)
- 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)
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)
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)
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 Luttringer
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 Luttringer
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 Luttringer
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 Luttringer
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 Luttringer
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 Luttringer
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 Luttringer
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 Luttringer
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élanger
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)
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 Schmitz
2012-09-14Fix ownership when copying files from chroot to systemFlorian Pritz
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 Schmitz
* 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 Schmitz
false positives and check inter split package dependencies.
2012-01-18makechrootpkg: fix error messageAllan McRae
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)
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 McRae
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 Biru
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>
2011-11-06makechrootpkg: Create separate namcap log for every single filePierre Schmitz
2011-11-04Capitalize output messagesEric Bélanger
Some of the output/error messages were capitalized, some were not. This patch capitalize everything for consistency sake. Other minor changes were done to the messages like removing the superfluous "error:" from die messages and adding a final period to messages that were complete sentences as appropriate. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-11-01Move common functions to a shared filePierre Schmitz
* common.sh is included on build time * most functions are copied from makepkg
2011-10-31makechrootpkg: Handle install and changelog file the same way as in commitpkgPierre Schmitz
2011-10-31makechrootpkg: Do not export LANGPierre Schmitz
This is done by /etc/profile.d/locale.sh. By this we also ensure compatibility with systemd.
2011-10-29makechrootpkg: Make host pubring.gpg available to check signed sourcesPierre Schmitz
2011-10-29makechrootpkg: Set the C locale system widePierre Schmitz
makepkg sources /etc/profile before calling build(). This will change the locale from C to en_US.UTF8.
2011-10-14makechrootpkg: Avoid running namcap on non-package file like signaturesPierre Schmitz
We only use .xz or .gz compression for pacakges so we can be more specific and avoid a match of e.g. *.pkg.tar.xz.sig etc.