Commit Graph

16 Commits

Author SHA1 Message Date
techryda
367e1fe12b Create /var/log in $newroot
Allows pacman.log to be created
2012-09-17 06:56:40 -06:00
Dave Reisner
3f4a9149a1 pacstrap: add options to inhibit copying settings
Add -G and -M which tells pacstrap to avoid copying pacman's gnupg.d
directory and mirrorlist, respectively, to the new root.
2012-09-15 11:46:48 -04:00
Dave Reisner
cc53a33bfd pacstrap: enforce permissions on root directories 2012-09-15 11:37:04 -04:00
Daniel Wallace
d195e48981 allow turning off --noconfirm
use -i (interactive) to allow for choosing packages from groups

[dave: alter option description]
2012-08-03 08:43:01 -04:00
Dave Reisner
ced04ef0f9 pacstrap: create package cache along with DBPath
pacman creates this for us, but seems to have problems writing to it.

Hackily addresses FS#30807
2012-07-22 20:10:47 -04:00
Dave Reisner
1d9c98c5ee enforce user-specified root directory
Remove the -r option, forcing the user to explicitly pass a root
directory. This removes some confusion wherein we set defaults, but
wouldn't allow all the defaults to be accepted.

This also adds some mild documentation to the help output for genfstab
and pacstrap.
2012-07-15 10:07:11 -04:00
Dave Reisner
de68d4cc02 reverse default and set values for hostcache option 2012-07-14 09:33:46 -04:00
Tom Gundersen
7d8ef4c747 pacstrap: store cache on target system by default
However, add a '-c' switch to use the host cache instead. The default is
useful for when installing a system from an install media (which has
possibly constrained storage), but the '-c' switch is useful when
e.g. creating build-chroots.

I considered doing this the other way around ('-c' being the default).
However, I think it makes sense to default to the expected behavior for
install both because a new user is less likely to know that they need to
add a switch, and because the errormessage they'd get when they run out
of space/memory is nonsensical and would cause lots of annoying
questions.

[dave: use proper array addition, nuke readlink, use arithmetic flag]

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-06-22 18:55:04 -04:00
Tom Gundersen
e032c0305e pacstrap: copy the mirrorlist from the host to the new root
This would overwrite an existing mirrorlist, but the one at the host
is known to be good at this point, so the loss is minimal.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-06-22 18:55:04 -04:00
Tom Gundersen
c5c20fd966 pacstrap: don't copy over keyring if it exist already
We want to be able to call pacstrap with the target being an existing
install (in case it has been severely broken), and hence we might want
to preserve the existing keyring.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2012-06-22 18:55:04 -04:00
Pierre Schmitz
b0af617480 pacstrap: Fix creation of default directories
$newroot might be a relative path, so remove the leading slash.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-22 15:33:11 +02:00
Dave Reisner
542e888b48 pacstrap/arch-chroot: require root privileges to run
Suggested by Pierre. This makes sense since somewhere along the line,
pacman or mount are going to complain.
2012-06-19 08:13:52 -04:00
Dave Reisner
b60114252c pacstrap: copy the keyring into the new root 2012-06-19 08:13:06 -04:00
Dave Reisner
252a7306c1 pacstrap: set umount trap prior to calling api_mount
the api_mount function could, for some bizzare reason, fail midway
through, leaving the user with a half mounted chroot. set the trap
before the function instead, but mask errors since we might see "foo
not mounted" errors.
2012-06-18 16:51:38 -04:00
Dave Reisner
120d233639 properly error on options missing an optarg 2012-06-18 11:02:40 -04:00
Pierre Schmitz
6fcfe3b268 Create a project Makefile
* the Makefile uses m4 to build the common lib into the scripts
* it includes install, uninstall and clean targets
* the dist target creates a source tar from a tag

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-18 11:17:42 +02:00