getch 0.3.3 → 0.3.5
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 +9 -1
- data/README.md +5 -1
- data/lib/dracut/root.rb +1 -0
- data/lib/getch/helpers.rb +1 -1
- data/lib/getch/options.rb +5 -0
- data/lib/getch/version.rb +1 -1
- data/lib/getch/void/tarball.rb +13 -10
- data/lib/getch/void/update.rb +1 -1
- 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: 6a15cef9d7c838de8e60bb93e4ee6bbe3e0b473c7eb5a8b0e0e003cb7d4edc2d
|
|
4
|
+
data.tar.gz: ebe82964c26b1b75ea7b0b446fb593b36aa5d1ffa8382138853b4ba52e06c7a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cad28b0d1459f912f6c587ee2d42c384b1a720e82f6cb96079fc16396d2a4522e0ca5f2099c75e52dbd4159837481b82828df6ff98bca56b9ee8e3fa3a51aa84
|
|
7
|
+
data.tar.gz: 0eefb3ddfee3658e882a75ac18caef7d25f86442a32511e74ab1167aac6f631b507839d024087f7488615f2f5272bc6fba0adb06562ed3ac8633af4822a42cec
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
## 0.3.
|
|
1
|
+
## 0.3.5, release 2022-11-21
|
|
2
|
+
* Tested on a live Ubuntu 22.10.
|
|
3
|
+
* Ensure `dracut.conf.d` exist before writing to it.
|
|
4
|
+
* Display the version with `-v`, `--version`.
|
|
5
|
+
|
|
6
|
+
## 0.3.4, release 2022-10-10
|
|
7
|
+
* Can work on a Live image of Voidlinux
|
|
8
|
+
|
|
9
|
+
## 0.3.3, release 2022-10-01
|
|
2
10
|
* Support disk with a sector size of 512.
|
|
3
11
|
* Support vdx disk.
|
|
4
12
|
|
data/README.md
CHANGED
|
@@ -40,13 +40,17 @@ Boot Manager:
|
|
|
40
40
|
|
|
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/)
|
|
45
|
+
* [Voidlinux](https://voidlinux.org/download/)
|
|
44
46
|
|
|
45
47
|
You can also use your current `linux` host, just pay attention to the disk that will be used.
|
|
46
48
|
|
|
47
49
|
## Dependencies
|
|
48
50
|
Getch is build without external libs, so it only require `ruby >= 2.5`.
|
|
49
51
|
|
|
52
|
+
On a live image of Void, you need to install `xbps-install -S ruby xz gptfdisk`.
|
|
53
|
+
|
|
50
54
|
## Install
|
|
51
55
|
Getch is cryptographically signed, so add my public key (if you haven’t already) as a trusted certificate.
|
|
52
56
|
With `gem` installed:
|
data/lib/dracut/root.rb
CHANGED
data/lib/getch/helpers.rb
CHANGED
data/lib/getch/options.rb
CHANGED
data/lib/getch/version.rb
CHANGED
data/lib/getch/void/tarball.rb
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'open-uri'
|
|
4
3
|
require 'open3'
|
|
5
4
|
|
|
6
5
|
module Getch
|
|
@@ -15,7 +14,7 @@ module Getch
|
|
|
15
14
|
end
|
|
16
15
|
|
|
17
16
|
def x
|
|
18
|
-
search_archive
|
|
17
|
+
@xbps = search_archive
|
|
19
18
|
download
|
|
20
19
|
checksum
|
|
21
20
|
install
|
|
@@ -29,14 +28,19 @@ module Getch
|
|
|
29
28
|
/void-x86_64-ROOTFS-[\d._]+.tar.xz/
|
|
30
29
|
end
|
|
31
30
|
|
|
32
|
-
# Search
|
|
31
|
+
# Search the name of the last release in @file 'sha256sum.txt'
|
|
32
|
+
# Should find a line like this:
|
|
33
|
+
# SHA256 (void-x86_64-ROOTFS-20210930.tar.xz) = 8681b060e39e173682e1721a6088280c2b6eade628f5e5e3e8e4b74163d187f6
|
|
33
34
|
def search_archive
|
|
34
35
|
yurl = "#{@url}/#{@file}"
|
|
35
36
|
@log.info "Opening #{yurl}...\n"
|
|
36
37
|
Helpers.get_file_online(yurl, @file)
|
|
37
38
|
File.open(@file).each do |l|
|
|
38
|
-
|
|
39
|
+
matchrule = l.tr('()', '').split(' ') if l.match(tarball)
|
|
40
|
+
return matchrule if matchrule && matchrule[1] =~ /^void/
|
|
39
41
|
end
|
|
42
|
+
|
|
43
|
+
raise "No valid archive found on #{@file}."
|
|
40
44
|
end
|
|
41
45
|
|
|
42
46
|
def download
|
|
@@ -55,10 +59,10 @@ module Getch
|
|
|
55
59
|
_, stderr, status = Open3.capture3(command)
|
|
56
60
|
if status.success? then
|
|
57
61
|
@log.result_ok
|
|
58
|
-
|
|
62
|
+
else
|
|
63
|
+
cleaning
|
|
64
|
+
@log.fatal "Problem with the checksum, relaunch getch.\n#{stderr}"
|
|
59
65
|
end
|
|
60
|
-
cleaning
|
|
61
|
-
@log.fatal "Problem with the checksum, stderr\n#{stderr}"
|
|
62
66
|
end
|
|
63
67
|
|
|
64
68
|
def install
|
|
@@ -74,10 +78,9 @@ module Getch
|
|
|
74
78
|
_, stderr, status = Open3.capture3(cmd)
|
|
75
79
|
if status.success? then
|
|
76
80
|
@log.result_ok
|
|
77
|
-
|
|
81
|
+
else
|
|
82
|
+
@log.fatal "Fail to decompressing #{@xbps[1]} - #{stderr}."
|
|
78
83
|
end
|
|
79
|
-
cleaning
|
|
80
|
-
@log.fatal "Fail to decompressing #{@xbps[1]} - #{stderr}."
|
|
81
84
|
end
|
|
82
85
|
|
|
83
86
|
def cleaning
|
data/lib/getch/void/update.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Getch
|
|
|
25
25
|
|
|
26
26
|
def update
|
|
27
27
|
ChrootOutput.new '/usr/bin/xbps-install -uy'
|
|
28
|
-
ChrootOutput.new '/usr/bin/xbps-install -
|
|
28
|
+
ChrootOutput.new '/usr/bin/xbps-install', '-Sy', 'base-system'
|
|
29
29
|
ChrootOutput.new '/usr/bin/xbps-remove -y base-voidstrap'
|
|
30
30
|
end
|
|
31
31
|
end
|
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.5
|
|
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-11-23 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
|