phantom-node / cryptreboot

Convenient reboot for Linux systems with encrypted root partition.
https://phantomno.de/cryptreboot
MIT License
29 stars 2 forks source link

Help package for Fedora? #4

Open boredsquirrel opened 4 days ago

boredsquirrel commented 4 days ago

Hi, I am a user of Fedora Atomic Desktops and am really convinced by the model.

The big disadvantage is that everything you install needs to be in an .rpm file.

Possibly systemd sysextensions too, but I had no luck with those, yet.

I use distrobox with a Fedora container to build things, in there I came so far:

$ git clone https://github.com/phantom-node/cryptreboot
$ cd cryptreboot

I added this tool that should automate the building process

$ sudo dnf install -y rubygem-gem2rpm
$ gem build crypt_reboot.gemspec 
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    ["lib/basic_loader.rb"] are not files
        /usr/share/rubygems/rubygems/specification_policy.rb:550:in `error'
        /usr/share/rubygems/rubygems/specification_policy.rb:326:in `validate_non_files'
        /usr/share/rubygems/rubygems/specification_policy.rb:77:in `validate_required!'
        /usr/share/rubygems/rubygems/specification_policy.rb:47:in `validate'
        /usr/share/rubygems/rubygems/specification.rb:2577:in `validate'
        /usr/share/rubygems/rubygems/package.rb:297:in `build'
        /usr/share/rubygems/rubygems/package.rb:136:in `build'
        /usr/share/rubygems/rubygems/commands/build_command.rb:94:in `build_package'
        /usr/share/rubygems/rubygems/commands/build_command.rb:84:in `build_gem'
        /usr/share/rubygems/rubygems/commands/build_command.rb:75:in `execute'
        /usr/share/rubygems/rubygems/command.rb:326:in `invoke_with_build_args'
        /usr/share/rubygems/rubygems/command_manager.rb:255:in `invoke_command'
        /usr/share/rubygems/rubygems/command_manager.rb:194:in `process_args'
        /usr/share/rubygems/rubygems/command_manager.rb:152:in `run'
        /usr/share/rubygems/rubygems/gem_runner.rb:56:in `run'
        /usr/bin/gem:12:in `<main>'

same when running with sudo

Any idea why building doesnt work? I dont want to install, as I want a .gem file that I can then bundle into an rpm file.

Installing gave me that the Fedora rubygems version is outdated

$ sudo gem install crypt_reboot
Fetching crypt_reboot-0.3.1.gem
Fetching tty-option-0.3.0.gem
Fetching tty-color-0.6.0.gem
Fetching pastel-0.8.0.gem
Fetching tty-command-0.10.1.gem
Fetching memory_locker-1.0.3.gem
Successfully installed tty-option-0.3.0
Successfully installed tty-color-0.6.0
Successfully installed pastel-0.8.0
Successfully installed tty-command-0.10.1
Successfully installed memory_locker-1.0.3
Successfully installed crypt_reboot-0.3.1
6 gems installed

A new release of RubyGems is available: 3.5.16 → 3.5.21!
Run `gem update --system 3.5.21` to update your installation.

I was able to update it, again requiring sudo and installation to the system.

Trying to build again:

$ gem build crypt_reboot.gemspec 

same as above

I am hanging at this step. Once packaged, at least building locally should be no problem, on COPR too I suppose.

pepawel commented 1 day ago

The officially supported way to build the gem is to run:

rake build

This will produce a .gem file inside pkg/ directory. If you insist on using gem build, then generate lib/basic_loader.rb file by executing:

bin/update_loader

This should allow you to build the gem.

Just to let you know, cryptreboot was not tested on Fedora, especially on Atomic Desktops. I doubt it will work. But please let me know about your results.

pepawel commented 1 day ago

By the way, hi @boredsquirrel :) Thank you for your interest in cryptreboot. I will install Fedora Silverblue 40 in Virtualbox to see how it works.