Commit Graph

110 Commits

Author SHA1 Message Date
Dave Reisner
756e831bd5 genfstab: mangle tag values when needed 2013-12-08 22:42:49 -05:00
Dave Reisner
5e5c979126 common: avoid need for fallthrough 2013-12-08 22:42:49 -05:00
Dave Reisner
a93aab3f43 genfstab: fix deleted file parsing
backslashes in single quotes don't need escaping. We need to match the
literal string \040deleted.
2013-12-08 22:42:49 -05:00
Dave Reisner
e6f844e367 common: fix errors in valid_number_of_base
Instead of trying to do bit twiddling on what might not even be a
number, just try to cast the subject to the target base.
2013-12-07 20:39:15 -05:00
Dave Reisner
1823820546 prepare v12 2013-11-29 14:09:06 -05:00
Dave Reisner
7c53cd416b common: ignore errors from efivarfs mount failures
The existence of /sys/firmware/efi/efivars only indicates that we've
booted the kernel in EFI mode. It does not guarantee that the same
kernel has support for efivarfs. Since this isn't critical, don't fail
the whole api mount.
2013-11-29 14:08:37 -05:00
Dave Reisner
0270a2d3b9 common: quote conditional for efivar mount
Prevents failures when the chroot base contains whitespace.
2013-11-15 14:53:58 -05:00
Dave Reisner
c746f87fc3 common: mount /sys/firmware/efi/efivars if available 2013-11-14 14:45:37 -05:00
Dave Reisner
8f2bd395ec common: introduce mount_conditionally
This is potentially evil, but we're using hand crafted input to eval
which should be safe. Use this to bind mount the chroot dir if it isn't
already a mount point.
2013-11-14 14:45:33 -05:00
Dave Reisner
463027b919 api_fs_mount: mount sysfs read-only 2013-10-02 21:08:05 -04:00
Dave Reisner
be7dcaa799 track_mount: lazily initialize track_mount trap/storage 2013-10-02 19:53:37 -04:00
Dave Reisner
1f2a6b9b71 genfstab: check sooner for pseudofs types 2013-07-14 12:24:34 -04:00
Dave Reisner
026f54428d genfstab: remove obsolete check for overlapping modes
1f03775f4f introduced arbitrary tag identification which removed the
variables this conditional checks.
2013-07-14 12:21:41 -04:00
Dave Reisner
15513c4a06 prepare v11 release 2013-05-26 15:51:41 -04:00
Dave Reisner
d0fbf5548d Makefile: add check target for syntax check 2013-05-26 15:47:56 -04:00
Dave Reisner
c6af176666 genfstab: be more careful about assigning passno 2013-05-26 11:41:53 -04:00
Dave Reisner
56e438869c genfstab: prefer lsblk over blkid
lsblk has a far nicer interface and is capable of doing its work
without the need for extra privileges to read superblocks (assuming
udev is behaving properly).
2013-05-23 13:23:48 -04:00
Dave Reisner
1d35997222 common: auto-register api_fs_umount EXIT trap
This corrects some weird/wrong EXIT trap decls in arch-chroot and
pacstrap that should have been touched as part of the cleanup in
517fcff074.
2013-05-23 12:06:29 -04:00
Dave Reisner
99e6b07ab3 genfstab: derive the real type of fuseblk filesystems 2013-05-02 14:09:52 -04:00
Dave Reisner
cbc1ece119 prepare for release v10 2013-01-04 13:34:00 -05:00
Dave Reisner
f37396d153 add a skeleton README file 2012-12-28 23:37:02 -05:00
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