Commit Graph

89 Commits

Author SHA1 Message Date
Dave Reisner
b240f6ea90 common: declare pseudofs types as hash 2012-12-16 12:35:38 -05:00
Dave Reisner
517fcff074 chroot: do better bookkeeping of mounted devices
This was brought up when a user tried to arch-chroot into the same
root twice from different terminals. The second chroot should fail, but
not tear down the tree that it doesn't own.
2012-12-16 12:07:20 -05:00
Dave Reisner
92fdaa397b add GPL2 license file 2012-12-12 21:00:41 -05:00
Dave Reisner
0bde888ba4 makefile: scripts depend on common 2012-12-12 09:04:45 -05:00
Dave Reisner
e4b4e30213 genfstab: correctly specify bind as option
'bind' is an option, not an fstype. In the case of a bind mount, the
fstype is ignored.
2012-12-09 14:05:41 -05:00
Dave Reisner
2179b43b0f genfstab: skip deleted swap files 2012-12-09 13:59:27 -05:00
Dave Reisner
bfb2b966f9 avoid limiting size of /tmp in chroot
There's no particularly good reason for this limitation.
2012-12-08 14:43:24 -05:00
Dave Reisner
d7624977d3 genfstab: fix typo in comment 2012-11-24 12:38:18 -05:00
Dave Reisner
be6afd2b30 prepare v9 2012-11-17 10:54:59 -05:00
Dave Reisner
326e62284c genfstab: trim leading slash from btrfs subvol 2012-11-14 19:38:27 -05:00
Dave Reisner
04c137cfae genfstab: fix root passno assignment
leverage findmnt to match the source device to the root partition. I
wonder how long until btrfs invalidates this approach.
2012-11-14 19:36:13 -05:00
Dave Reisner
cf84170321 add the -h option to the usage 2012-11-12 21:00:09 -05:00
Dave Reisner
5897694194 genfstab: always upcase the requested tag
lowercase tags do not exist, so case shouldn't be a user-facing concern.
2012-11-11 23:45:49 -05:00
Dave Reisner
73016da72f genfstab: avoid re-printing kernel name
Without a specified tag, the devnode should not be printed.
2012-11-11 23:43:51 -05:00
Dave Reisner
e62b6bb560 genfstab: remove dead code
This shouldn't have been added with the previous patch.
2012-11-11 17:31:26 -05:00
Dave Reisner
1f03775f4f genfstab: allow identification by arbitrary tag
Add a -t option which accepts an arbitrary tag to lookup for source
device identification. If the lookup fails, fallback on the kernel
naming. With this change, -L and -U become synonyms for -t LABEL and
-t UUID, respectively.
2012-11-11 17:27:41 -05:00
Dave Reisner
3a7eb157d1 genfstab: provide DM names for swap
We're kind enough to provide DM names for non-swap devices, but simply
use the /dev/dm-X nodes for swap, since that's what /proc/swaps provides
us with. Resolve the DM name out of sysfs and use this instead.

Fixes FS#32609.
2012-11-11 17:04:14 -05:00
Dave Reisner
65b689bda9 genfstab: specify proper grammar in usage
bash getopts stops parsing options at the first non-option argument.
Rather than import some overblown option parser such as the one used in
makepkg or mkinitcpio, just correct the usage.

FS#31862.
2012-10-09 12:06:48 -04:00
Dave Reisner
298e04aabc prepare v8 2012-10-04 10:32:01 -04:00
Dave Reisner
ea41f437d2 pacstrap: add -C option for using an alternate config
I grappled with the inability of pacstrap to do this while trying to
setup an i686 chroot for myself based on a pacman config from devtools,
rather than my own config which bombs on a "missing" multilib repo.
2012-10-03 22:55:49 -04:00
Dave Reisner
4f3ef5bfa7 genfstab: ignore suspected bind mounts from the host 2012-10-03 22:46:39 -04:00
Dave Reisner
108735a148 genfstab: use findmnt FSROOT column
I added this for util-linux 2.22 so I could avoid parsing out the
subvolume from the target. Might as well make use of it.
2012-10-02 22:17:16 -04:00
Dave Reisner
e5790dd5e9 genfstab: fix invalid paths when run against / 2012-10-02 22:17:16 -04:00
Dave Reisner
dc2c7623e4 pacstrap: ignore ENOENT on already existing API dirs 2012-09-24 09:50:30 -04:00
Dave Reisner
7420e07285 prepare v7 release 2012-09-18 08:44:08 -04:00
Dave Reisner
b5880a3c72 Merge pull request #12 from techryda/patch-1
Create /var/log in $newroot
2012-09-17 18:30:43 -07:00
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
Dave Reisner
debff1be89 arch-chroot: explain default behavior in usage 2012-09-08 15:29:38 -04:00
Dave Reisner
890ab2d2a3 use automake style AM_V_GEN rule for building 2012-09-07 16:32:39 -04:00
Dave Reisner
9888ce06e1 prepare v6 release 2012-09-06 09:56:51 -04:00
Dave Reisner
e16d57b2c2 arch-chroot: shift off first arg as chrootdir 2012-09-06 09:40:34 -04:00
Dave Reisner
09772d0f38 genfstab: use a more innocuous name than 'source' 2012-08-08 23:15:57 -04:00
Dave Reisner
c8b3d5e8d8 genfstab: handle btrfs subvolumes correctly 2012-08-08 23:12:27 -04:00
Dave Reisner
4c6dd31924 prepare v5 2012-08-03 19:59:27 -04:00
Pierre Schmitz
d571cb4ec4 arch-chroot: Default to /bin/bash as shell
By default chroot uses SHELL as default shell on the target if not specified otherwise.
As our install iso uses zsh this might fail if zsh is not installed on the target.

[dave: changed shell to /bin/sh]
2012-08-03 19:48:08 -04:00
Dave Reisner
71a4471d25 Revert "arch-chroot: default to /bin/sh when no command given"
This doesn't actually work since we don't shift off the chroot
directory.

This reverts commit 67c4b0fd24.
2012-08-03 19:47:26 -04:00
Dave Reisner
40fcfbf1a9 prepare v4 2012-08-03 19:11:31 -04:00
Dave Reisner
67c4b0fd24 arch-chroot: default to /bin/sh when no command given
chroot(1) will default to ${SHELL:-/bin/sh} which might not work, given
SHELL being /bin/zsh instead. Immediately default to /bin/sh, which will
exist in any sane chroot.
2012-08-03 19:07:03 -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
93b3298147 prepare v3
What happened to v2? I HAVE NO IDEA.
2012-07-24 20:43:48 -04:00
Daniel Wallace
38e446d995 Add zsh completion for all scripts 2012-07-22 23:28:59 -04:00
Dave Reisner
2dda000a86 genfstab: avoid mangling root parameter 2012-07-22 20:16:09 -04:00
Dave Reisner
b7c75786b0 genfstab: avoid reference to uninitialized var
Rename this, too, so it doesn't share a name with a reserved word.

Fixes FS#30808
2012-07-22 20:11:54 -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
05b36e029c arch-chroot: umount /etc/resolv.conf as part of trap 2012-07-15 10:09:49 -04:00
Dave Reisner
f83a267672 make the 'all' target a dependency of 'install' 2012-07-15 10:07:39 -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