summaryrefslogtreecommitdiffstats
path: root/mkarchroot.in
AgeCommit message (Collapse)AuthorFilesLines
2017-02-17mkarchroot: Set LANG=en_US.UTF-8Jan Alexander Steffens (heftig)1-2/+2
In order to have an UTF-8 locale in the build root. This is something normally set on real machines but is not set from our chroots. Meson, for example, loudly complains when the locale charset is not UTF-8. I'd like to have C.UTF-8, as most other distributions do. Unfortunately, it's not part of vanilla glibc; en_US.UTF-8 will have to do. mkarchroot already creates roots with both en_US.UTF-8 and de_DE.UTF-8, the latter because builds of gcc (perhaps used to) require it. Bump the CHROOT_VERSION due to the setting change.
2016-05-27mkarchroot: Manually generate machine-id because nspawn expects itSven-Hendrik Haase1-0/+2
2014-10-19save and reuse original argv when auto-elevatingDave Reisner1-1/+3
Fixes FS#42277.
2014-09-22mkarchroot: Correct "Usage:" text.Luke Shumaker1-1/+1
The "app" hasn't been an option since arch-nspawn was created.
2014-05-10Switch to root when started as regular userSébastien Luttringer1-1/+2
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>
2013-08-08avoid injecting code into the format stringDave Reisner1-2/+2
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-03lib/common.sh: Introduce locking helper functionsJan Alexander Steffens (heftig)1-17/+1
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-116/+26
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-07mkarchroot: Fix creation of btrfs snapshot and remove force optionPierre Schmitz1-13/+7
2013-04-06Bump the chroot version as we changed the default package setPierre Schmitz1-1/+1
2013-04-06Only try to use btrfs snapshots if chroots are on a btrfs partitionPierre Schmitz1-2/+4
2013-04-06Simplify update call as pacman does no longer support SyncFirstPierre Schmitz1-2/+2
2013-04-06mkarchroot: code cleanupPierre Schmitz1-14/+6
2013-04-06mkarchroot: Create working directory if neededPierre Schmitz1-0/+4
2013-04-06use nspawn to bind mount needed directoriesDave Reisner1-38/+17
systemd-nspawn is capable of doing this as of systemd-198. Doing this means we can remove all of our home grown chroot mount/umount logic, as it's all performed by pacstrap or systemd-nspawn. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-01-20Drop initscripts supportPierre Schmitz1-61/+1
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-11-15mkarchroot: Remove unnecessary parameter for usage functionEric Bélanger1-1/+1
Fixes FS#28973 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-1/+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-13mkarchroot: do not try to bind /etc/timezone from hostPierre Schmitz1-2/+2
/etc/timezone is no longer used. We only need /etc/localtime. This fixes FS#31929
2012-10-04mkarchroot: use a helper function to simplify bind mountsPierre Schmitz1-25/+25
2012-10-03mkarchroot: Use systemd's nspawn if availablePierre Schmitz1-59/+83
* If we are running systemd use nspawn instead of our own chroot setup * Use pacstrap to setup our chroot environment * Make sure the common trap is still called * Bind resolve.conf, timezone and lcoaltime from the host if nspawn is not used * Run ldconfig within the chroot
2012-06-16mkarchroot: reset trap so it wont be called twicePierre Schmitz1-0/+1
2012-06-15Fix /run permissions in chrootAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-12Support multiple package cache directoriesPierre Schmitz1-18/+24
* We use the host package cache configuration * As only the first cache will be written to, we mount the others readonly
2012-06-11Remove no longer used optionPierre Schmitz1-3/+1
2012-06-11Add a version number to each chroot so we can tell the user when a rebuild ↵Pierre Schmitz1-3/+5
is needed
2012-06-11Enable signature checking within build environmentPierre Schmitz1-26/+32
* 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-06-10mkarchroot: use bind mount instead of symlink for /dev/ptmxGerardo Exequiel Pozzi1-1/+3
We need /dev/ptmx -> /dev/pts/ptmx (for devpts -o newinstance) Other way to do this thing is via bind mount (as said kernel doc[devpts.txt]). This should be done in this way at least for /dev as devtmpfs in the chroot. Since we can not touch /dev (devtmpfs), because devtmpfs is "singleton", just use bind method and avoid interference. Do it the same for both modes of /dev (tmpfs) and (devtmpfs) to keep it simple. Currently devpts in chroot is not working without this when using /dev as devtmpfs, this fixes this issue (opening /dev/ptmx, creates devices nodes on outside /dev/pts) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-03-05Add -d param to optionally support devtmpfsGerardo Exequiel Pozzi1-15/+22
The main intention of this patch is to take advantage of /dev/loop-control and loop devices. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-20mkarchroot: do not create /etc/mtabTom Gundersen1-1/+0
As of filesystem-2011.12 this is not needed anylonger, and indeed blocks the chroot from being upgraded. As a workaround, recreating the chroot fixes the problem. Fixes FS#27640. Reported-by: Andrea Scarpino <andrea@archlinux.org> Signed-off-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2011-12-04Use double brackets everywhereLukas Fleischer1-30/+30
We already fixed a couple of these in previous patches - this one should replace all remaining uses of single brackets ("[") by double brackets. Also, use arithmetic evaluation instead of conditional expressions where appropriate and make use of "-z" and "-n" instead of comparing variables to empty strings. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-11-06mkarchroot: Respect makepkg.conf and pacman.conf when running a commandPierre Schmitz1-8/+10
2011-11-04Capitalize output messagesEric Bélanger1-8/+8
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 Schmitz1-18/+13
* common.sh is included on build time * most functions are copied from makepkg
2011-10-14Call locale-gen with full path in chroot environmentPierre Schmitz1-1/+1
Thanks to Peter Schuller for this hint
2011-10-07Support non-standard install locationsLukas Fleischer1-0/+231
This build system overhaul allows for adding (define-style) macros to our scripts. All source files are now suffixed with ".in" to clarify that they might contain unprocessed defines. The Makefile provides a new rule to preprocess source files and generate proper output scripts. Also, add a "@pkgdatadir@" define (as used in GNU Autotools) and use it instead of hardcoded paths to "/usr/share/devtools" everywhere. We missed this when adding PREFIX support to the build system in commit 35fc83ce7d8dc26cd424321f2e8638d05da0a6d4. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>