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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a15cef9d7c838de8e60bb93e4ee6bbe3e0b473c7eb5a8b0e0e003cb7d4edc2d
4
- data.tar.gz: ebe82964c26b1b75ea7b0b446fb593b36aa5d1ffa8382138853b4ba52e06c7a3
3
+ metadata.gz: fd3d032249ccce67db0756a7bfb3d272ed3ddd526eddc87718858f7b946dcfdb
4
+ data.tar.gz: d177972f815b9e3f3881120a311710347539530630e3a5f8de616d7455d6c3c2
5
5
  SHA512:
6
- metadata.gz: cad28b0d1459f912f6c587ee2d42c384b1a720e82f6cb96079fc16396d2a4522e0ca5f2099c75e52dbd4159837481b82828df6ff98bca56b9ee8e3fa3a51aa84
7
- data.tar.gz: 0eefb3ddfee3658e882a75ac18caef7d25f86442a32511e74ab1167aac6f631b507839d024087f7488615f2f5272bc6fba0adb06562ed3ac8633af4822a42cec
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? or Helpers.systemd?
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 #{@esp} install")
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 #{@esp} install")
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
@@ -1,3 +1,3 @@
1
1
  module Getch
2
- VERSION = '0.3.5'.freeze
2
+ VERSION = '0.3.6'.freeze
3
3
  end
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
- sh 'mkfs.ext4', '-F', '-b', @bs, "/dev/mapper/#{@luks_name}"
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 mkfs_ext4 path
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.5
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-11-23 00:00:00.000000000 Z
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