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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e6d53101249982f83b05a372decd08d8967c52fc952b930dff7bf4d6c31634f
4
- data.tar.gz: 3410eab0dff20d434691e6ddb7e5f8279c6a2eb70e4d675ac5791932638cb614
3
+ metadata.gz: 880096b36b35951139edcd47f4e5668543030fe47b12eeb7057b7b968277dae4
4
+ data.tar.gz: 589f41662372b0539468498154ae9c62652dda8e3ef98acdf9f3846ed4a24b74
5
5
  SHA512:
6
- metadata.gz: d96be1666a606ef3eacd482bc539e75612844cf83406095113566901c42834e3e604d23908bbd87ab41b830c6fd1d6381a3ae36f04122c0b184dbebba192f0f8
7
- data.tar.gz: 9ff7cb0caa78084a6bc04a6e72acec5c582e17191473583ffd0fcf9401e9275b9ae8ed9e59f68e49be0a4477f78b941348bba550c7b3d6e99b7181725b08bad9
6
+ metadata.gz: 0dc24a2f84c83cabe29307bd22d039ee409f77ceb02ed72f486b8499b91ebd6e534a163b315e6b9c5c0f3b27f259240fa1108a1a5b7b3faaba435632f1274731
7
+ data.tar.gz: 74569f9b52ff8cec49df4a9f77c70a2cc90b1b3c2a7a8f11dbc411ebdd8ff1ee927a5a0cb35b247e49ac7cd39ec8c0e3d57b78fc7dc22b97108fc326a146e71a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,4 +1,7 @@
1
- ## 0.3.2, release 2022-10-01
1
+ ## 0.3.4, release 2022-10-10
2
+ * Can work on a Live image of Voidlinux
3
+
4
+ ## 0.3.3, release 2022-10-01
2
5
  * Support disk with a sector size of 512.
3
6
  * Support vdx disk.
4
7
 
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
- + [Archaeidae](https://github.com/szorfein/archaeidae): Custom Archiso that includes ZFS support.
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
@@ -29,7 +29,7 @@ module Getch
29
29
 
30
30
  def self.get_file_online(url, dest)
31
31
  URI.open(url) do |l|
32
- File.open(dest, "wb") { |f| f.write(l.read) }
32
+ File.open(dest, 'wb') { |f| f.write(l.read) }
33
33
  end
34
34
  rescue Net::OpenTimeout => e
35
35
  abort "DNS error #{e}"
data/lib/getch/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Getch
2
- VERSION = '0.3.3'.freeze
2
+ VERSION = '0.3.4'.freeze
3
3
  end
@@ -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 only the glibc x86_64 for now
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
- @xbps = l.tr('()', '').split(' ') if l.match(tarball)
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
- return
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
- return
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
@@ -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 -y base-system'
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.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-01 00:00:00.000000000 Z
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.19
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