getch 0.1.5 → 0.1.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.tar.gz.sig +0 -0
- data/README.md +64 -24
- data/assets/network-stack.conf +63 -0
- data/bin/getch +12 -4
- data/lib/getch.rb +113 -78
- data/lib/getch/command.rb +1 -1
- data/lib/getch/config.rb +33 -49
- data/lib/getch/config/gentoo.rb +59 -0
- data/lib/getch/config/void.rb +49 -0
- data/lib/getch/filesystem/.mount.rb.swp +0 -0
- data/lib/getch/filesystem/device.rb +5 -5
- data/lib/getch/filesystem/ext4.rb +1 -0
- data/lib/getch/filesystem/ext4/encrypt.rb +1 -0
- data/lib/getch/filesystem/ext4/encrypt/config.rb +2 -2
- data/lib/getch/filesystem/ext4/encrypt/format.rb +0 -1
- data/lib/getch/filesystem/ext4/encrypt/mount.rb +0 -1
- data/lib/getch/filesystem/ext4/encrypt/partition.rb +10 -16
- data/lib/getch/filesystem/ext4/encrypt/void.rb +100 -0
- data/lib/getch/filesystem/ext4/format.rb +1 -1
- data/lib/getch/filesystem/ext4/void.rb +43 -0
- data/lib/getch/filesystem/lvm.rb +1 -0
- data/lib/getch/filesystem/lvm/encrypt.rb +1 -0
- data/lib/getch/filesystem/lvm/encrypt/config.rb +2 -2
- data/lib/getch/filesystem/lvm/encrypt/format.rb +1 -2
- data/lib/getch/filesystem/lvm/encrypt/mount.rb +1 -2
- data/lib/getch/filesystem/lvm/encrypt/partition.rb +10 -7
- data/lib/getch/filesystem/lvm/encrypt/void.rb +100 -0
- data/lib/getch/filesystem/lvm/format.rb +1 -1
- data/lib/getch/filesystem/lvm/void.rb +45 -0
- data/lib/getch/filesystem/partition.rb +4 -4
- data/lib/getch/filesystem/zfs.rb +1 -0
- data/lib/getch/filesystem/zfs/config.rb +3 -3
- data/lib/getch/filesystem/zfs/deps.rb +11 -4
- data/lib/getch/filesystem/zfs/device.rb +6 -0
- data/lib/getch/filesystem/zfs/encrypt.rb +1 -0
- data/lib/getch/filesystem/zfs/encrypt/.mount.rb.swp +0 -0
- data/lib/getch/filesystem/zfs/encrypt/config.rb +5 -5
- data/lib/getch/filesystem/zfs/encrypt/deps.rb +11 -4
- data/lib/getch/filesystem/zfs/encrypt/device.rb +6 -0
- data/lib/getch/filesystem/zfs/encrypt/format.rb +9 -10
- data/lib/getch/filesystem/zfs/encrypt/mount.rb +5 -9
- data/lib/getch/filesystem/zfs/encrypt/partition.rb +3 -1
- data/lib/getch/filesystem/zfs/encrypt/void.rb +96 -0
- data/lib/getch/filesystem/zfs/format.rb +9 -9
- data/lib/getch/filesystem/zfs/mount.rb +5 -8
- data/lib/getch/filesystem/zfs/partition.rb +2 -1
- data/lib/getch/filesystem/zfs/void.rb +81 -0
- data/lib/getch/gentoo.rb +12 -15
- data/lib/getch/gentoo/boot.rb +7 -4
- data/lib/getch/gentoo/config.rb +8 -8
- data/lib/getch/gentoo/sources.rb +6 -3
- data/lib/getch/gentoo/stage.rb +0 -1
- data/lib/getch/gentoo/use_flag.rb +6 -7
- data/lib/getch/guard.rb +3 -1
- data/lib/getch/helpers.rb +107 -1
- data/lib/getch/log.rb +3 -2
- data/lib/getch/options.rb +41 -34
- data/lib/getch/version.rb +1 -1
- data/lib/getch/void.rb +59 -0
- data/lib/getch/void/boot.rb +80 -0
- data/lib/getch/void/chroot.rb +55 -0
- data/lib/getch/void/config.rb +87 -0
- data/lib/getch/void/stage.rb +70 -0
- metadata +22 -9
- metadata.gz.sig +0 -0
- data/.gitignore +0 -2
- data/CHANGELOG.md +0 -99
- data/Rakefile +0 -21
- data/bin/setup.sh +0 -90
- data/getch.gemspec +0 -25
metadata.gz.sig
CHANGED
Binary file
|
data/.gitignore
DELETED
data/CHANGELOG.md
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
## 0.1.4, release 2021-06-20
|
2
|
-
* Install `iptables` by default.
|
3
|
-
* Control input for options `--disk`, `--format`, `--zoneinfo`, `--keymap`.
|
4
|
-
* Add a `/etc/portage/bashrc` to automatically signing kernel modules with `emerge`.
|
5
|
-
* Now clean properly another disk used with option `--separate-x DISK`.
|
6
|
-
* For ZFS, use `blockdev --getpbsz` to find correct bloc (sector) size.
|
7
|
-
* Populate `/etc/modules-load.d/` with modules found with `lsmod` (only few wifi's, flash usb related (ehci, ohci, xhci, etc)).
|
8
|
-
* Remove the package `dev-util/dwarves`.
|
9
|
-
|
10
|
-
## 0.1.3, release 2021-05-17
|
11
|
-
* LVM use the format /dev/vg_name/lv_name for mount/format/fstab.
|
12
|
-
* Stop using `euse` from `gentoolkit`, use native Ruby code here.
|
13
|
-
* Optimization on package installation, they shouln't be installed more than once.
|
14
|
-
* Regroup use flags under Getch::Gentoo::UseFlag.
|
15
|
-
* Upd Bask v0.5 (zstd compression, better support for wifi...)
|
16
|
-
* Config for systemd-resolved, enable DNS over TLS with Quad9 (9.9.9.9)
|
17
|
-
* Add configs for systemd-network with DHCP for wifi and ethernet.
|
18
|
-
* Correct permissions (/home/[user] and /etc/portage)
|
19
|
-
|
20
|
-
## 0.1.2, release 2021-05-12
|
21
|
-
* DOCS update.
|
22
|
-
* Keep Nano for those who need :)
|
23
|
-
* ZFS use the last version >=2.0 with kernel stable =5.10
|
24
|
-
* ZFS create a Log device and Cache device if getch is used with `--separate-cache`.
|
25
|
-
* GRUB or Systemd-boot can now be installed on separate disk with `--separate-boot`.
|
26
|
-
* Adding flag for ZFS `-o autotrim=on` (used with `zpool create`).
|
27
|
-
* Encrypted swap use: `cipher=aes-xts-plain64:sha256,size=512` by default.
|
28
|
-
* In the make.conf: add `-fomit-frame-pointer`, designed to reduce generated code size.
|
29
|
-
|
30
|
-
## 0.1.1, release 2020-11-01
|
31
|
-
* Change mountpoint for the esp at /efi rather than /boot/efi
|
32
|
-
* Replace Garden by Bask https://github.com/szorfein/bask
|
33
|
-
* Correct option --username USERNAME, do not create a new partition.
|
34
|
-
* New set of options --separate-{boot,cache,home} to install them on another disk
|
35
|
-
* Refactor codes
|
36
|
-
* Add cpu name to COMMON_FLAGS
|
37
|
-
* Add cpuflags with app-portage/cpuid2cpuflags
|
38
|
-
+ Use the whole disk space available for / when option --username is unset
|
39
|
-
|
40
|
-
## 0.1.0, release 2020-10-15
|
41
|
-
* Add the (Zeta) filesystem ZFS
|
42
|
-
* `emerge --depclean` to save space.
|
43
|
-
* Add a message when getch have finish, keep /mnt/gentoo if you need to add something.
|
44
|
-
* Use systemd-detect-virt to detect a Virtual Guest.
|
45
|
-
|
46
|
-
## 0.0.9, release 2020-10-03
|
47
|
-
* Add encryption on ext4 and lvm (BIOS,UEFI)
|
48
|
-
* Correct KEYMAP="yes" with genkernel
|
49
|
-
* Renaming option keyboard with keymap
|
50
|
-
* GPG verification for ebuild
|
51
|
-
|
52
|
-
## 0.0.8, release 2020-09-30
|
53
|
-
* Adding LVM via the option fs, `--fs lvm`.
|
54
|
-
* Systemd-boot use the value of PARTUUID without initramfs.
|
55
|
-
* Include lib logger.
|
56
|
-
* Enhance functions to call program system Emerge, Make, ...
|
57
|
-
|
58
|
-
## 0.0.7, release 2020-09-22
|
59
|
-
* Correct fstab.
|
60
|
-
* Repair GRUB/fstab for BIOS system, add secure cmdline.
|
61
|
-
* Create a swap volume equal to the memory installed.
|
62
|
-
* Add vim and sudo
|
63
|
-
|
64
|
-
## 0.0.6, release 2020-09-19
|
65
|
-
* Add support for QEMU guest with KVM and Virtio driver
|
66
|
-
* Kernel compilation, initialize a config file with `make localyesconfig`.
|
67
|
-
* More modular codes to start with encryption and other filesystems.
|
68
|
-
* Add the new option --verbose to display output of compilation, etc...
|
69
|
-
|
70
|
-
## 0.0.5, release 2020-09-17
|
71
|
-
* Generate a hostname
|
72
|
-
* Configure systemd-boot for UEFI system
|
73
|
-
|
74
|
-
## 0.0.4, release 2020-09-16
|
75
|
-
* Boot on a BIOS system with VirtualBox
|
76
|
-
* Install Grub
|
77
|
-
* Create user
|
78
|
-
* Create passwd for root and user
|
79
|
-
* Check lsmod to install deps (like wpa_supplicant) and patch the kernel
|
80
|
-
|
81
|
-
## 0.0.3, release 2020-09-14
|
82
|
-
* Add dhcpcd, gentoo-sources, linux-firmware
|
83
|
-
* Kernel build by using https://github.com/szorfein/garden
|
84
|
-
* Populate /etc/portage (/etc/portage/package.{use,unmask,accept_keywords}/zzz_via_autounmask)
|
85
|
-
* Download all the lastest ebuild via emerge-webrsync
|
86
|
-
* Update gentoo via emerge -uDN @world
|
87
|
-
|
88
|
-
## 0.0.2, release 2020-09-12
|
89
|
-
* Getch genere a file /tmp/install_gentoo to avoid to remake same task over and over
|
90
|
-
* Support for ext4
|
91
|
-
* Mount partition on /mnt/gentoo during the install
|
92
|
-
* Download, verify the checksum and decompress the last stage3-amd64-systemd
|
93
|
-
|
94
|
-
## 0.0.1, release 2020-09-10
|
95
|
-
* Partition disk (at least 15G required) with sgdisk (create /boot, /, /home, and swap)
|
96
|
-
* Support for one disk with -d|--disk
|
97
|
-
* Add few options for the CLI
|
98
|
-
* Add bin/setup.sh to install ruby when boot on a ISO file
|
99
|
-
* Init project
|
data/Rakefile
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# https://github.com/seattlerb/minitest#running-your-tests-
|
2
|
-
require "rake/testtask"
|
3
|
-
require File.dirname(__FILE__) + "/lib/getch/version"
|
4
|
-
|
5
|
-
Rake::TestTask.new(:test) do |t|
|
6
|
-
t.libs << "test"
|
7
|
-
t.libs << "lib"
|
8
|
-
t.test_files = FileList["test/test_*.rb"]
|
9
|
-
end
|
10
|
-
|
11
|
-
# Usage: rake gem:build
|
12
|
-
namespace :gem do
|
13
|
-
desc "build the gem"
|
14
|
-
task :build do
|
15
|
-
Dir["getch*.gem"].each {|f| File.unlink(f) }
|
16
|
-
system("gem build getch.gemspec")
|
17
|
-
system("gem install getch-#{Getch::VERSION}.gem -P HighSecurity")
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
task :default => :test
|
data/bin/setup.sh
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
#!/usr/bin/env sh
|
2
|
-
|
3
|
-
set -o errexit -o nounset
|
4
|
-
|
5
|
-
DIR=/tmp/getch-master
|
6
|
-
PATH=${PATH}:/tmp/ruby/bin
|
7
|
-
|
8
|
-
# last snapshot https://www.ruby-lang.org/en/downloads/
|
9
|
-
compile_ruby() {
|
10
|
-
PN=ruby
|
11
|
-
PV=2.7
|
12
|
-
[ -f /tmp/$PN_$PV.tar.gz ] || curl -s -L -o /tmp/$PN_$PV.tar.gz https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-$PN_$PV.tar.gz
|
13
|
-
[ -d /tmp/snapshot-$PN_$PV ] || {
|
14
|
-
cd /tmp
|
15
|
-
tar xvf $PN_$PV.tar.gz
|
16
|
-
}
|
17
|
-
cd snapshot-$PN_$PV
|
18
|
-
./configure --prefix=/tmp/$PN
|
19
|
-
make
|
20
|
-
make install
|
21
|
-
}
|
22
|
-
|
23
|
-
search_ruby() {
|
24
|
-
if hash ruby 2>/dev/null ; then
|
25
|
-
echo "Ruby $(ruby -v | awk '{print $2}') found"
|
26
|
-
else
|
27
|
-
echo "Install ruby"
|
28
|
-
if hash pacman 2>/dev/null ; then
|
29
|
-
pacman -Syy --noconfirm libyaml ruby ruby-irb ruby-reline rubygems
|
30
|
-
elif hash emerge 2>/dev/null ; then
|
31
|
-
emerge -av dev-lang/ruby
|
32
|
-
elif hash apt-get 2>/dev/null ; then
|
33
|
-
apt-get install ruby
|
34
|
-
else
|
35
|
-
compile_ruby
|
36
|
-
fi
|
37
|
-
fi
|
38
|
-
}
|
39
|
-
|
40
|
-
install_with_gem() {
|
41
|
-
gem install getch
|
42
|
-
getch -h
|
43
|
-
}
|
44
|
-
|
45
|
-
dll_test_version() {
|
46
|
-
echo "Downloading the test version..."
|
47
|
-
cd /tmp
|
48
|
-
[ -f ./getch.tar.gz ] && rm ./getch.tar.gz
|
49
|
-
[ -d ./getch-master ] && rm -rf ./getch-master
|
50
|
-
|
51
|
-
curl -s -L -o getch.tar.gz https://github.com/szorfein/getch/archive/master.tar.gz
|
52
|
-
tar xzf getch.tar.gz \
|
53
|
-
&& cd $DIR \
|
54
|
-
&& ruby -I lib bin/getch -h
|
55
|
-
}
|
56
|
-
|
57
|
-
get_getch() {
|
58
|
-
if hash gem 2>/dev/null ; then
|
59
|
-
printf "Which version? [1] stable , [2] test (no recommended) " ; read -r
|
60
|
-
if echo "$REPLY" | grep -qP "2" ; then
|
61
|
-
dll_test_version
|
62
|
-
else
|
63
|
-
install_with_gem
|
64
|
-
fi
|
65
|
-
else
|
66
|
-
dll_test_version
|
67
|
-
fi
|
68
|
-
}
|
69
|
-
|
70
|
-
set_shell() {
|
71
|
-
your_shell=~/.bashrc
|
72
|
-
[ -f ~/.zshrc ] && your_shell=~/.zshrc
|
73
|
-
|
74
|
-
[ -f "$your_shell" ] && {
|
75
|
-
if ! grep -q "ruby" "$your_shell" ; then
|
76
|
-
echo "export PATH=\$PATH:$(ruby -e 'puts Gem.user_dir')/bin" >> "$your_shell"
|
77
|
-
fi
|
78
|
-
if $(. "$your_shell") ; then
|
79
|
-
echo "Shell loaded"
|
80
|
-
fi
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
main() {
|
85
|
-
search_ruby
|
86
|
-
set_shell
|
87
|
-
get_getch
|
88
|
-
}
|
89
|
-
|
90
|
-
main "$@"
|
data/getch.gemspec
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + "/lib/getch/version"
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = "getch"
|
5
|
-
s.version = Getch::VERSION
|
6
|
-
s.summary = "A CLI tool to install Gentoo"
|
7
|
-
s.authors = ["szorfein"]
|
8
|
-
s.email = ["szorfein@protonmail.com"]
|
9
|
-
s.homepage = 'https://github.com/szorfein/getch'
|
10
|
-
s.metadata = {
|
11
|
-
"changelog_uri" => "https://github.com/szorfein/getch/blob/master/CHANGELOG.md",
|
12
|
-
"bug_tracker_uri" => "https://github.com/szorfein/getch/issues",
|
13
|
-
"wiki_uri" => "https://github.com/szorfein/getch"
|
14
|
-
}
|
15
|
-
s.license = "MIT"
|
16
|
-
s.required_ruby_version = '>=2.5'
|
17
|
-
|
18
|
-
s.files = `git ls-files`.split(" ")
|
19
|
-
s.files.reject! { |fn| fn.include? "certs" }
|
20
|
-
|
21
|
-
s.executables = [ 'getch' ]
|
22
|
-
|
23
|
-
s.cert_chain = ['certs/szorfein.pem']
|
24
|
-
s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
|
25
|
-
end
|