Commit Graph

31 Commits

Author SHA1 Message Date
Pierre Schmitz 9e14e8691d Fall back to default if CacheDir is not set 2010-02-12 10:14:04 +01:00
Pierre Schmitz c39e59892d make sure pacman cache dir exists 2010-02-11 23:28:02 +01:00
Pierre Schmitz 30cfcdc501 Add missing -n option to getopt list for mkarchroot
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2010-02-11 14:41:45 +01:00
Pierre Schmitz 3e3b32641d Reduce verbosity to a sane minimum 2010-02-11 12:49:28 +01:00
Pierre Schmitz 16dd1fe6e0 Read pacman cache dir from pacman.conf or cli 2010-02-11 11:23:41 +01:00
Byron Clark 7ce9cd6965 Reset umask before touching the chroot.
This prevents problems when running with a umask that masks permissions
for others.

Signed-off-by: Byron Clark <byron@theclarkfamily.name>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2010-01-11 10:25:43 -08:00
Aaron Griffin 9dd60741bd Add a param to NOT copy config files to the chroot
This is primarilly needed for archiso creation, but
could be useful elsewhere.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2009-01-24 16:52:54 -06:00
Aaron Griffin a80fe69f4b Only run locale-gen if the target root has /etc/locale.gen
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-10-20 01:09:43 -05:00
Simo Leone e0f139ad0e Separate mounting from config copying
Copying the configs before installing stuff
caused conflicts. Running the host's pacman
uses the host's configuration anyway, so
there is no need to copy them in this case.

Signed-off-by: Simo Leone <simo@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-06 10:09:07 -06:00
Aaron Griffin a8a3c856bf Remove DBPath from mkarchroot
No longer needed in pacman 3.1

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-01-23 16:11:38 -06:00
Aaron Griffin bc8a791ad6 Copy resolv.conf each time just like mtab
Resolv.conf changes, like mtab, so we can't just trust it to copy on build only

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-28 22:18:26 -06:00
Aaron Griffin 5472d5ab5a Fixed a typo (mkarchchroot -> mkarchroot)
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-28 21:28:29 -06:00
Dan McGee f05495dfc8 Whitespace fixes/cleanup to all of the scripts
Add the same vim modeline to all the files, as well as cleanup the newly
added scripts a bit. If you look at this diff with the -w option, you'll see
it really isn't all that significant.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-28 21:20:24 -06:00
Dan McGee f7ab112f9a Use user's locale.gen instead of sed-magic
The sed-magic was wrong in many cases, including my default locale:
LANG=en_US.utf8
locale.gen line: en_US.UTF-8

If we copy the user's locale.gen file, we will generate all of their locales
instead of just the current one.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-28 14:44:59 -06:00
Dan McGee e23b176f3e Fix some bashisms (but change #! to /bin/bash)
We need to use bash due to the usage of arrays, but we might as well fix
some bashisms that were used in the scripts anyways.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-28 09:10:41 -06:00
Armin Luntzer e71c9784b5 mkarchroot: create $working_dir/etc (fixes error msg when trying to copy /etc/mtab during chroot creation)
Signed-off-by: Jason Chu <jchu@xentac.net>
2007-11-27 16:45:28 -08:00
Armin Luntzer e16136b8e8 mkarchroot: copy /etc/resolv.conf to chroot
Signed-off-by: Jason Chu <jchu@xentac.net>
2007-11-27 16:45:28 -08:00
Armin Luntzer 9e660ee86e mkarchroot: add -M switch for a custom makepkg.conf
Signed-off-by: Jason Chu <jchu@xentac.net>
2007-11-27 16:45:28 -08:00
Jason Chu e782cbd00b Copy mtab over to chroot so that pacman can detect disk space 2007-11-04 14:55:42 -08:00
Jason Chu 3ce2983ad6 Pass $RUN to chroot so that all the params are expanded properly 2007-11-04 14:55:02 -08:00
Jason Chu b528eba028 Install the custom pacman.conf in the chroot so that it can be used for later updates 2007-11-03 09:57:26 -07:00
Daniel Isenmann 7bb2c48c8f add -C option to mkarchroot
Signed-off-by: Jason Chu <jchu@xentac.net>
2007-11-03 09:40:18 -07:00
Dan McGee a6863ff7cb mkarchroot: move check for root below option parsing
This way people can at least see the usage instructions.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 21:31:16 -05:00
Dan McGee 67dc59299a mkarchroot: clean up/unify output messages
Also remove an extra EUID check, we do this at the beginning.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 21:31:16 -05:00
Jason Chu 26fc26adf8 Make sure that var/lib/pacman is created
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-23 23:51:15 -05:00
Aaron Griffin a26b93d779 Added 'update' to mkarchroot
Allows automated updating of a chroot

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-23 23:50:39 -05:00
Aaron Griffin 0b7d43615b Added GPL headers
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-21 21:08:55 -05:00
Aaron Griffin a336e5a91c Generate current locale in new chroots by default
This is a slightly hackish way of auto-filling locale information based on the
locale at the time of chroot building.

Further locale changes must be done manually.

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-07 12:30:30 -05:00
Simo Leone 192b24f829 Trap EXIT and use relative cache and db paths
Trapping exit ensures that unmounting occurs in the event of an exit 1
or a normal exit. Pacman 3.0.6 takes cachedir and dbpath to be relative
to it's given root, not absolute.

Signed-off-by: Simo Leone <simo@archlinux.org>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-06 21:58:16 -05:00
Aaron Griffin 656a54014b Initial checking of makechrootpkg
Mostly functional, missing true su capability....

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-03 23:24:29 -05:00
Aaron Griffin 5c11e9bb7c Initial mkarchroot commit
A simple utility for build and running within archlinux
specific chroot environments

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-10-03 22:19:03 -05:00