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 package #317

Closed
dcabrejas opened this issue Sep 19, 2018 · 13 comments · Fixed by #436
Closed

Fedora package #317

dcabrejas opened this issue Sep 19, 2018 · 13 comments · Fixed by #436
Labels
duplicate This issue or pull request already exists packaging/tooling

Comments

@dcabrejas
Copy link

Hey, thanks for the tool.

Are there any plans to provide a binary for Fedora?
I noticed downloads for most other distributions are available but Fedora/Red Hat was missing.

@sharkdp
Copy link
Owner

sharkdp commented Sep 19, 2018

Thank you for the feedback!

Please see #287 and/or #189.

@sharkdp sharkdp added duplicate This issue or pull request already exists packaging/tooling labels Sep 19, 2018
@swsnr
Copy link

swsnr commented Oct 2, 2018

Hey, I just made a copr for bat. I'd appreciate feedback :)

@sharkdp
Copy link
Owner

sharkdp commented Oct 3, 2018

I'm not an expert, but your spec file looks good to me.

Two remarks:

  • Starting with the next version of bat, we will also ship shell-completion files (see Generate shell completions with clap during build #327)
  • cargo build will include debug symbols even if you use --release. If you want to reduce the size of the binary, you can call strip. We do the same for Debian packages:
    # copying the main binary
    cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
    "${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"

@swsnr
Copy link

swsnr commented Oct 3, 2018

@sharkdp I am not too familiar with rust but I thought --release only compiled with debug info if Cargo.toml explicitly enables it with debug = true in the release profile section, and we used strip not to remove debug info (which isn't there) but to remove symbols names which a binary doesn't need. At least the rpm build didn't find any debug info in the binary apparently; I disabled the debug package in the spec file to fix the corresponding build error.

@sharkdp
Copy link
Owner

sharkdp commented Oct 4, 2018

@lunaryorn Would you like to open a PR to add Install instructions to the README?

@swsnr
Copy link

swsnr commented Oct 4, 2018

@sharkdp To be honest I would rather not 😔

I made this copr for my own use. I'm happy if others use it as well, but I would rather not like it becoming an “official” installation method—I'd not like to make any promises about maintaining this copr in the future 😔 copr's not the easiest thing to use, and I'd not like to be pressured into keeping it up to date.

@sharkdp
Copy link
Owner

sharkdp commented Oct 5, 2018

@lunaryorn Good point. I definitely wouldn't want to pressure anyone into a maintenance task.

@swsnr
Copy link

swsnr commented Oct 5, 2018

@sharkdp Thanks for understanding ❤️ Cheers!

@drahnr
Copy link

drahnr commented Nov 30, 2018

As of Fedora 29 bat is available in the repos.

@sharkdp
Copy link
Owner

sharkdp commented Dec 2, 2018

@drahnr Awesome! Thank you for posting here. How is the package called? I can't seem to find it.

@drahnr
Copy link

drahnr commented Dec 2, 2018

@sharkdp I might have been wrong, but it weirdly enough shows as system installed, but IIRC all I did was a dnf search bat and dnf install bat

# dnf info bat
Name         : bat
Version      : 0.8.0
Release      : 1.module_2418+43cef932
Arch         : x86_64
Größe        : 3.8 M
Quelle       : rust-bat-0.8.0-1.module_2418+43cef932.src.rpm
Paketquelle  : @System
Aus Paketque : updates-modular
Zusammenfass : cat(1) clone with wings
URL          : https://crates.io/crates/bat
Lizenz       : MIT or ASL 2.0
Beschreibung : cat(1) clone with wings.
# cat /etc/os-release
NAME=Fedora
VERSION="29 (Workstation Edition)"
ID=fedora
VERSION_ID=29
PLATFORM_ID="platform:f29"
PRETTY_NAME="Fedora 29 (Workstation Edition)"
... // snip

@sharkdp
Copy link
Owner

sharkdp commented Dec 2, 2018

Does this mean that Fedora 29 users can just type

dnf install bat

to install bat? (sorry, not a Fedora users myself)

@drahnr
Copy link

drahnr commented Dec 2, 2018

So after removing bat again:

# dnf info bat
Name         : bat
Version      : 0.8.0
Release      : 1.module_2418+43cef932
Arch         : x86_64
Größe        : 1.4 M
Quelle       : rust-bat-0.8.0-1.module_2418+43cef932.src.rpm
Paketquelle  : updates-modular
Zusammenfass : cat(1) clone with wings
URL          : https://crates.io/crates/bat
Lizenz       : MIT or ASL 2.0
Beschreibung : cat(1) clone with wings.

and

dnf install bat

works just fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists packaging/tooling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants