Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora RPM package #4

Open
boredsquirrel opened this issue Oct 7, 2024 · 6 comments
Open

Fedora RPM package #4

boredsquirrel opened this issue Oct 7, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@boredsquirrel
Copy link

boredsquirrel commented Oct 7, 2024

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
Copy link
Collaborator

pepawel commented Oct 10, 2024

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
Copy link
Collaborator

pepawel commented Oct 10, 2024

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.

@pepawel pepawel changed the title Help package for Fedora? Fedora RPM package Oct 12, 2024
@pepawel
Copy link
Collaborator

pepawel commented Oct 12, 2024

Depends on #5

@pepawel
Copy link
Collaborator

pepawel commented Oct 12, 2024

@boredsquirrel after some research I found it should be possible to make cryptreboot work on Fedora Workstation. The feasibility of Fedora Atomic Desktop support is unknown at the moment. I created 2 new issues:

@pepawel pepawel added the enhancement New feature or request label Oct 12, 2024
@boredsquirrel
Copy link
Author

thanks for your tests!

I use Coreboot so I am not concerned about this for my workstation, but for servers, it would be really relevant. There are Fedora IoT, CoreOS, and various other images built off the Fedora Atomic OCI base.

uBlue uCore, secureblue uCore.

There is also Almalinux bootc, which uses a different tool but the same OCI containers.

I would love to use those only, but having cryptreboot is a must for a remote server which I cannot reboot manually every day.

I will try to build the package again and make an RPM.

@pepawel
Copy link
Collaborator

pepawel commented Oct 26, 2024

Oh, I see. Currently, I don't have enough time to test those distributions. However, I would expect them to use a similar initramfs mechanism as used in Fedora Silverblue, because they are all part of the same family if I understand things correctly.
I will update the description of #6 to also cover other Atomic Desktop distributions.

Btw, please let me know if you succeed with RPM package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants