getch 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/fstab/hybrid.rb +1 -1
- data/lib/getch/gentoo/bootloader.rb +2 -2
- data/lib/getch/version.rb +1 -1
- data/lib/luks.rb +1 -1
- data/lib/mkfs.rb +14 -10
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd3d032249ccce67db0756a7bfb3d272ed3ddd526eddc87718858f7b946dcfdb
|
4
|
+
data.tar.gz: d177972f815b9e3f3881120a311710347539530630e3a5f8de616d7455d6c3c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b795b119532c054f28105273141cd747b7dc573c657804134233832fa824314c93b119bd9965970695b073f2ff67009f192310ef0089304e8754fede7cb38075
|
7
|
+
data.tar.gz: 1755beabb76c3a8bbaa9fc574c412593ab64ab726eff58f49caba5ca8e96de1cfec8337fc3e1be327f7d6da3d20c49a37a6ee771d6b45c5c3f7a0d23a704d81d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/fstab/hybrid.rb
CHANGED
@@ -11,7 +11,7 @@ module Fstab
|
|
11
11
|
# The swap UUID based on the lvm volume /dev/vg/swap
|
12
12
|
def write_swap
|
13
13
|
# The both use /etc/crypttab
|
14
|
-
if Helpers.runit?
|
14
|
+
if Getch::Helpers.runit? || Getch::Helpers.systemd?
|
15
15
|
echo_a @conf, "/dev/mapper/swap-#{@luks} none swap sw 0 0"
|
16
16
|
else
|
17
17
|
dm = Getch::Helpers.get_dm "#{@vg}-swap"
|
@@ -31,7 +31,7 @@ module Getch
|
|
31
31
|
def bootctl
|
32
32
|
@boot ?
|
33
33
|
with_boot :
|
34
|
-
Chroot.new("bootctl --path
|
34
|
+
Chroot.new("bootctl --esp-path=#{@esp} install")
|
35
35
|
end
|
36
36
|
|
37
37
|
# We need to umount the encrypted /boot first
|
@@ -39,7 +39,7 @@ module Getch
|
|
39
39
|
def with_boot
|
40
40
|
boot = @encrypt ? '/dev/mapper/boot-luks' : "/dev/#{DEVS[:boot]}"
|
41
41
|
NiTo.umount "#{OPTIONS[:mountpoint]}/boot"
|
42
|
-
Chroot.new("bootctl --path
|
42
|
+
Chroot.new("bootctl --esp-path=#{@esp} install")
|
43
43
|
NiTo.mount boot, "#{OPTIONS[:mountpoint]}/boot"
|
44
44
|
end
|
45
45
|
end
|
data/lib/getch/version.rb
CHANGED
data/lib/luks.rb
CHANGED
@@ -110,7 +110,7 @@ module Luks
|
|
110
110
|
# https://wiki.archlinux.org/title/Advanced_Format#File_systems
|
111
111
|
def format_ext4
|
112
112
|
@log.info "Formating disk with #{@format}...\n"
|
113
|
-
|
113
|
+
Mkfs.ext4 "/dev/mapper/#{@luks_name}"
|
114
114
|
end
|
115
115
|
|
116
116
|
# https://wiki.archlinux.org/title/Advanced_Format#File_systems
|
data/lib/mkfs.rb
CHANGED
@@ -4,6 +4,19 @@ require 'getch/command'
|
|
4
4
|
require 'getch/helpers'
|
5
5
|
|
6
6
|
module Mkfs
|
7
|
+
|
8
|
+
# Format a path using mkfs.ext4.
|
9
|
+
# @param [string] path, full path e.g /dev/sda1
|
10
|
+
#
|
11
|
+
def self.ext4(path)
|
12
|
+
bs = Getch::Helpers.get_bs(path)
|
13
|
+
if bs == '512'
|
14
|
+
Getch::Command.new('mkfs.ext4', '-F', path)
|
15
|
+
else
|
16
|
+
Getch::Command.new('mkfs.ext4', '-F', '-b', bs, path)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
7
20
|
class Root
|
8
21
|
def initialize(devs, options)
|
9
22
|
@efi = devs[:efi] ||= nil
|
@@ -59,7 +72,7 @@ module Mkfs
|
|
59
72
|
|
60
73
|
def mkfs(path)
|
61
74
|
case @fs
|
62
|
-
when 'ext4' then
|
75
|
+
when 'ext4' then Mkfs.ext4 path
|
63
76
|
when 'xfs' then mkfs_xfs path
|
64
77
|
end
|
65
78
|
end
|
@@ -72,15 +85,6 @@ module Mkfs
|
|
72
85
|
Getch::Command.new('mkswap', '-f', path)
|
73
86
|
end
|
74
87
|
|
75
|
-
def mkfs_ext4(path)
|
76
|
-
bs = Getch::Helpers.get_bs(path)
|
77
|
-
if bs == '512'
|
78
|
-
Getch::Command.new('mkfs.ext4', '-F', path)
|
79
|
-
else
|
80
|
-
Getch::Command.new('mkfs.ext4', '-F', '-b', bs, path)
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
88
|
def mkfs_xfs(path)
|
85
89
|
bs = Getch::Helpers.get_bs(path)
|
86
90
|
Getch::Command.new('mkfs.xfs', '-f', '-s', "size=#{bs}", path)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: getch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- szorfein
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
aEJeKq4/BlIwMlXPe+W5C8zp2i8hgG1/OYbwbGE1p2iRi1NIK7G/HyRqQjOqJxzE
|
37
37
|
LLknX69FN7/G
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2022-
|
39
|
+
date: 2022-12-25 00:00:00.000000000 Z
|
40
40
|
dependencies: []
|
41
41
|
description:
|
42
42
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|