getch 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/dracut/root.rb +1 -0
- data/lib/fstab/hybrid.rb +1 -1
- data/lib/getch/gentoo/bootloader.rb +2 -2
- data/lib/getch/options.rb +5 -0
- data/lib/getch/version.rb +1 -1
- data/lib/luks.rb +1 -1
- data/lib/mkfs.rb +14 -10
- data/lib/nito.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -41,6 +41,7 @@ Boot Manager:
|
|
41
41
|
The ISO images i was able to test and that works:
|
42
42
|
+ [Archlinux](https://www.archlinux.org/download/)
|
43
43
|
+ [Portia](https://github.com/szorfein/portia/releases): Custom Archiso that includes ZFS support and Ruby.
|
44
|
+
* [Ubuntu 22.10](https://cdimage.ubuntu.com/releases/22.10/release/)
|
44
45
|
* [Voidlinux](https://voidlinux.org/download/)
|
45
46
|
|
46
47
|
You can also use your current `linux` host, just pay attention to the disk that will be used.
|
data/lib/dracut/root.rb
CHANGED
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/options.rb
CHANGED
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/lib/nito.rb
CHANGED
@@ -55,12 +55,12 @@ module NiTo
|
|
55
55
|
|
56
56
|
# Like echo 'content' > to_file
|
57
57
|
def echo(file, content)
|
58
|
-
File.write
|
58
|
+
File.write(file, "#{content}\n")
|
59
59
|
end
|
60
60
|
|
61
61
|
# Like echo 'content' >> to_file
|
62
62
|
def echo_a(file, content)
|
63
|
-
File.write
|
63
|
+
File.write(file, "#{content}\n", mode: 'a') unless grep? file, content
|
64
64
|
end
|
65
65
|
|
66
66
|
def cp(src, dest)
|
@@ -69,7 +69,7 @@ module NiTo
|
|
69
69
|
|
70
70
|
# create a void file
|
71
71
|
def touch(file)
|
72
|
-
File.write
|
72
|
+
File.write(file, '') unless File.exist? file
|
73
73
|
end
|
74
74
|
|
75
75
|
# Like sed -i /old:new/ file
|
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:
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
|
-
rubygems_version: 3.3.
|
194
|
+
rubygems_version: 3.3.23
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: A CLI tool to install Gentoo or VoidLinux.
|
metadata.gz.sig
CHANGED
Binary file
|