Commit Graph

242 Commits

Author SHA1 Message Date
Emil Velikov
6c68163d4b pacstrap: move include_m4 after the globals
After the m4 substitution, the globals end up mixed misc functions.
Just keep them at the top for legibility.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 19:03:33 +01:00
Emil Velikov
b07a1578d9 genfstab: reshuffle while read loop
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 19:03:33 +01:00
Emil Velikov
3a8e3de608 arch-chroot: delay selecting chroot/unshare setup
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 19:03:32 +01:00
Emil Velikov
a6765cc5c4 arch-chroot: stop interleaving functions and sequential code
Makes it easier to reason about the code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 18:52:34 +01:00
Emil Velikov
7101c552a0 arch-chroot: move include_m4 after the globals
After the m4 substitution, the globals end up mixed misc functions.
Just keep them at the top for legibility.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 18:52:34 +01:00
Morten Linderud
f5acbb9058
Merge remote-tracking branch 'origin/pull/48'
* origin/pull/48:
  zsh: pacstrap bring it up-to date
  zsh: genfstab bring it up-to date
  zsh: arch-chroot bring it up-to date
  zsh: simplify arch-chroot and genfstab completion
  zsh: split completion into separate files
  make: move bash/zsh completions to separate directories
2023-03-26 19:41:43 +02:00
Morten Linderud
bc2a9a7cae
Merge remote-tracking branch 'origin/pull/47'
* origin/pull/47:
  make: add shellcheck target
  make: add more PHONY targets
  make: remove dummy uninstall target
2023-03-26 19:40:26 +02:00
Morten Linderud
c465332a17
Merge remote-tracking branch 'origin/pull/44'
* origin/pull/44:
  genfstab: remove atgc mount option
2023-03-26 19:40:09 +02:00
Morten Linderud
be937006c8
Merge remote-tracking branch 'origin/pull/45'
* origin/pull/45:
  ci: update differential-shellcheck
2023-03-26 19:39:46 +02:00
Emil Velikov
20a193d5b1 zsh: pacstrap bring it up-to date
Copy/pasta all the new options that have landed over the years.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:13:06 +01:00
Emil Velikov
a9768a0c45 zsh: genfstab bring it up-to date
Add the -f(ilter) and -t(ag) options. The latter being mutually
exclusive with -L/-U.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:13:06 +01:00
Emil Velikov
1ad274a58e zsh: arch-chroot bring it up-to date
Add -N (simple flag) -u (user/group), plus new directory and command
handling. The vast chunk of these are borrowed by the chroot completion,
as the inline comment indicates.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:13:06 +01:00
Emil Velikov
1f8a62bf0b zsh: simplify arch-chroot and genfstab completion
This will allow us to easily update and keep up-to date these two. The
final pacstrap one is fairly hairy and will be dealt with another time.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:13:06 +01:00
Emil Velikov
86088c21b1 zsh: split completion into separate files
The current file is borderline impossible to manage by zsh completion
noobies. Split it up for now, where follow-up commits will simplify
things.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:13:06 +01:00
Emil Velikov
6468bafc5e make: move bash/zsh completions to separate directories
Consequently, simplify the install target.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:13:06 +01:00
Emil Velikov
4b782e25ef make: add shellcheck target
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:08:19 +01:00
Emil Velikov
5520c61fb0 make: add more PHONY targets
The man and check targets were missing from the list

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:05:46 +01:00
Emil Velikov
06f697e3ae make: remove dummy uninstall target
The target does nothing, so we might as well remove it.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-03-26 17:05:46 +01:00
Mike Yuan
f06deaaf26
ci: update differential-shellcheck
See also: https://github.com/redhat-plumbers-in-action/differential-shellcheck/issues/215
2023-03-26 18:19:37 +08:00
Mike Yuan
ad778b6f74
genfstab: remove atgc mount option
This is not changeable during remount,
so let's not include it automatically.
Users who want this feature should turn
to ArchWiki for help[1].

[1] https://wiki.archlinux.org/title/F2FS#Recommended_mount_options

See also: https://github.com/systemd/systemd/issues/26763
2023-03-12 06:42:45 +08:00
Morten Linderud
560c00c9c2
Merge remote-tracking branch 'origin/pull/37'
* origin/pull/37:
  Add shellcheck GitLab CI
  Add Differential ShellCheck GitHub Workflow
2023-03-02 21:03:24 +01:00
Morten Linderud
2d1d4904b9
Merge commit 'refs/pull/42/head' of github.com:archlinux/arch-install-scripts
* github.com:archlinux/arch-install-scripts:
  common: avoid variable name conflict with genfstab
2023-01-25 13:47:01 +01:00
Mike Yuan
4a83825a9d
common: avoid variable name conflict with genfstab 2023-01-21 22:58:25 +08:00
Mike Yuan
326153e211
Add shellcheck GitLab CI 2022-11-24 03:17:22 +08:00
Mike Yuan
f98c5d8268
Add Differential ShellCheck GitHub Workflow
It would run on pull requests only, so please avoid
pushing to master branch directly.
2022-11-24 02:08:19 +08:00
Morten Linderud
4802e1197e
Merge branch 'pr-36' 2022-11-20 14:59:40 +01:00
Morten Linderud
4457e31ee3
Merge branch 'pr-33' 2022-11-20 14:56:54 +01:00
Morten Linderud
a2ed5bb493
Merge branch 'pr-27' 2022-11-20 14:55:31 +01:00
Mike Yuan
added92801
genfstab: remove subvolid= from btrfs options if subvol= is set
Having only one of subvol= and subvolid= is enough for mounting a btrfs subvolume
And having subvolid= set prevents things like 'snapper rollback' to work, as it
updates the subvolume in-place, leaving subvol= unchanged with a different subvolid.
2022-11-20 18:08:23 +08:00
Mike Yuan
ef83a837fd
pacstrap: add option '-D' to skip pacman dependency checks
Closes #19
2022-10-28 18:28:30 +08:00
Morten Linderud
09952070ea
Merge branch 'pr-32' 2022-10-28 00:14:54 +02:00
Morten Linderud
ebf492335e
Merge branch 'pr-31' 2022-10-28 00:13:26 +02:00
Morten Linderud
ddafd7477e
Merge branch 'pr-30' 2022-10-28 00:12:27 +02:00
Morten Linderud
8f9725afc8
Merge branch 'pr-28' 2022-10-28 00:11:11 +02:00
Mike Yuan
c04c43a6ce
genfstab: fix src of bind mounts
Sources of bind mounts in fstab should be relative to the target's root
instead of the host one.
2022-10-27 13:18:01 +08:00
Mike Yuan
127a23ce73
pacstrap: update bash completion (added missing options) 2022-10-22 21:10:56 +08:00
Mike Yuan
91562aa99c
pacstrap: remove obsolete option '-d' completely
This has been obsolete for 4 years and I can hardly imagine people still using it (only to find that it doesn't actually work).
2022-10-22 21:07:27 +08:00
Mike Yuan
ddf3134077
pacstrap: add option '-P' to copy the host's pacman config to the target 2022-10-22 20:51:54 +08:00
Mike Yuan
58849024de
common: disable btrfs's fsck in fsck_types
btrfs doesn't need nor use a regular fsck utility.
This was wrongly added in b31a5d9f94 and made `genfstab` generate btrfs entries with `fs_passno` not
set to `0`.
2022-10-20 17:16:03 +08:00
Morten Linderud
acb8a7b9a7
prepare v27
Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-09-28 18:48:20 +02:00
Morten Linderud
2aa70691e5
Merge commit 'refs/pull/20/head' of github.com:archlinux/arch-install-scripts 2022-08-28 14:57:52 +02:00
Morten Linderud
e6dd0455db
Merge commit 'refs/pull/23/head' of github.com:archlinux/arch-install-scripts 2022-08-28 14:57:23 +02:00
Mike Yuan
8be9340001
pacstrap: add option '-K' to initialize an empty keyring in the new root 2022-08-25 22:45:07 +08:00
éclairevoyant
405d60b462 update pseudofs list 2022-08-04 07:42:23 -04:00
éclairevoyant
b31a5d9f94 update fsck list 2022-08-04 07:42:23 -04:00
Morten Linderud
5ba7798f81
Merge commit 'refs/pull/22/head' of github.com:archlinux/arch-install-scripts 2022-07-30 00:50:36 +02:00
Sean Anderson
58ff428757 Use separate pid namespace for worker processes
As described in 2be79c6 ("run the chroot in a new PID namespace"), child
processes can hang around and keep various files open. This may prevent
filesystems from being unmounted (as they are still in-use).

When adding unshare mode, I did not quite understand this distinction
(and I wasn't testing with e.g. gnupg) so I didn't catch this. Fix this
by always using unshare to create a second pid namespace for "worker"
processes. This ensures that all children are dead when we start
unmounting things. As the top-level unshare is no longer always
necessary, convert the unshare variable to a binary value.

Fixes: ee9db7d ("Add unshare mode to pacstrap")
Closes: #21
2022-07-28 10:02:31 -04:00
Morten Linderud
8a56133926
common: Make run a tmpfs mount
Reverts aea51ba901
Fixes https://github.com/archlinux/arch-install-scripts/issues/15

Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-07-03 14:01:26 +02:00
Morten Linderud
9ffd8bc6e3
common: include f2fs.fsck
Fixes FS#71760

Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-06-28 10:56:35 +02:00
Pete Anderson
20616bacc5
add_resolve_conf: recursive host + target symlinks 2022-06-28 10:32:19 +02:00