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

Push RPM to Copr? #1800

Open
dngray opened this issue Jan 2, 2022 · 8 comments
Open

Push RPM to Copr? #1800

dngray opened this issue Jan 2, 2022 · 8 comments
Labels
enhancement New feature or request help wanted Extra attention is needed in dependency In a dependency, not in chezmoi patience Patience required, there is no date for this being fixed

Comments

@dngray
Copy link

dngray commented Jan 2, 2022

Is your feature request related to a problem? Please describe.

Redhat has a service called Copr https://copr.fedorainfracloud.org/coprs/ (they are like Ubuntu PPAs).

Describe the solution you'd like

It would be nice if there was an official repository. The Neomutt project has one for example.

This would mean Redhat users would automatically have the latest Chezmoi instead of manually having to download the RPM or make their own repository.

@dngray dngray added the enhancement New feature or request label Jan 2, 2022
@twpayne
Copy link
Owner

twpayne commented Jan 3, 2022

This is a great idea, but I would prefer to add support for this to the build tool that chezmoi uses so that other projects can benefit. See https://github.com/goreleaser/goreleaser/issues/2804 for details.

@twpayne twpayne added in dependency In a dependency, not in chezmoi patience Patience required, there is no date for this being fixed labels Jan 3, 2022
@dngray
Copy link
Author

dngray commented Jan 8, 2022

Another solution to this might be to create a flatpak, that way it could be installed on any distribution, that has flatpak.

It's not uncommon for commandline tools to have flatpaks, two examples being NeoVim and MPV.

One of the things I like about flatpaks is they can be installed "per user". ie flatpak install flathub --user io.chezmoi.Chezmoi for example.

@twpayne
Copy link
Owner

twpayne commented Jan 8, 2022

This would mean Redhat users would automatically have the latest Chezmoi instead of manually having to download the RPM or make their own repository.

Note that if you have installed chezmoi using an rpm package then the chezmoi upgrade command will download and install the latest version also using an rpm:

$ sudo rpm -i https://github.com/twpayne/chezmoi/releases/download/v2.9.4/chezmoi-2.9.4-x86_64.rpm
$ rpm -q chezmoi
chezmoi-2.9.4-1.x86_64
$ chezmoi upgrade
chezmoi version v2.9.5, commit af9290311e64e9f34b090c350be84070d1845863, built at 2022-01-05T22:11:53Z, built by goreleaser
$ rpm -q chezmoi
chezmoi-2.9.5-1.x86_64

Another solution to this might be to create a flatpak, that way it could be installed on any distribution, that has flatpak.

I had a look at build at flatpak of chezmoi, but:

  • The flatpak documentation states that flatpak is targeted at GUI applications, not CLIs.
  • To run chezmoi with flatpak you'd have to use the verbose command flatpak run io.chezmoi.Chezmoi.
  • Just building a simple flatpak requires downloading over half a gigabyte of runtime, which is a little heavy.

I'll add support for flatpak if/when it gets added to goreleaser/nfpm.

@dngray
Copy link
Author

dngray commented Jan 9, 2022

Note that if you have installed chezmoi using an rpm package then the chezmoi upgrade command will download and install the latest version also using an rpm:

That generally won't work though for immutable operating systems like Silverblue, microos. For Silverblue you want to do rpm-ostree install chezmoi-x.x.x.rpm which will layer the package as a local package.

In this case I thought about using Toolbox, but the issue seems to be changing the hostname from "toolbox" to that of the host containers/toolbox#98. I thought about using a podman container, but had other issues doing that containers/podman-compose#395

I suppose an alternative solution might be to not use .chezmoi.hostname and instead use a variable set to the hostname - a bit like what you did with your MacOS definition https://github.com/twpayne/dotfiles/blob/master/home/.chezmoi.toml.tmpl#L16

To run chezmoi with flatpak you'd have to use the verbose command flatpak run io.chezmoi.Chezmoi.

People generally have aliases so they don't need to write flatpak run all the time.

Just building a simple flatpak requires downloading over half a gigabyte of runtime, which is a little heavy.
With distributions like Fedora, Silverblue, etc you already have Flatpak for other reasons.

@skyfaller
Copy link

This is slightly off-topic, but I'm on Fedora and I'm using Homebrew to install Chezmoi, so I want to mention that as a workaround. https://docs.brew.sh/Homebrew-on-Linux

It's slightly annoying to bootstrap your Chezmoi setup if you have to install Homebrew first, but I'm not sure how much more annoying it is than adding an additional Copr repo.

@twpayne
Copy link
Owner

twpayne commented Sep 28, 2022

If you know anything about writing source RPMs and .spec files, I'd love to get your input on goreleaser/goreleaser#3412, which is the key step to resolving this issue.

@twpayne twpayne added the help wanted Extra attention is needed label Sep 28, 2022
@anthr76
Copy link

anthr76 commented Oct 4, 2022

FWIW I have recently submitted the package review for Chezmoi into Fedora here: https://bugzilla.redhat.com/show_bug.cgi?id=2130734

This is still at least a few weeks away as there's a couple more deps needed to be packaged.

@mirenradia
Copy link

@anthr76, is there an update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed in dependency In a dependency, not in chezmoi patience Patience required, there is no date for this being fixed
Projects
None yet
Development

No branches or pull requests

5 participants