getch 0.3.3 → 0.3.4
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 +4 -1
- data/README.md +4 -1
- data/lib/getch/helpers.rb +1 -1
- data/lib/getch/version.rb +1 -1
- data/lib/getch/void/tarball.rb +13 -10
- data/lib/getch/void/update.rb +1 -1
- 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: 880096b36b35951139edcd47f4e5668543030fe47b12eeb7057b7b968277dae4
|
4
|
+
data.tar.gz: 589f41662372b0539468498154ae9c62652dda8e3ef98acdf9f3846ed4a24b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc24a2f84c83cabe29307bd22d039ee409f77ceb02ed72f486b8499b91ebd6e534a163b315e6b9c5c0f3b27f259240fa1108a1a5b7b3faaba435632f1274731
|
7
|
+
data.tar.gz: 74569f9b52ff8cec49df4a9f77c70a2cc90b1b3c2a7a8f11dbc411ebdd8ff1ee927a5a0cb35b247e49ac7cd39ec8c0e3d57b78fc7dc22b97108fc326a146e71a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -40,13 +40,16 @@ 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
|
+
* [Voidlinux](https://voidlinux.org/download/)
|
44
45
|
|
45
46
|
You can also use your current `linux` host, just pay attention to the disk that will be used.
|
46
47
|
|
47
48
|
## Dependencies
|
48
49
|
Getch is build without external libs, so it only require `ruby >= 2.5`.
|
49
50
|
|
51
|
+
On a live image of Void, you need to install `xbps-install -S ruby xz gptfdisk`.
|
52
|
+
|
50
53
|
## Install
|
51
54
|
Getch is cryptographically signed, so add my public key (if you haven’t already) as a trusted certificate.
|
52
55
|
With `gem` installed:
|
data/lib/getch/helpers.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.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.4
|
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-10-
|
39
|
+
date: 2022-10-10 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.21
|
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
|