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

Deb Package #144

Merged
merged 6 commits into from
Aug 21, 2023
Merged

Deb Package #144

merged 6 commits into from
Aug 21, 2023

Conversation

gierens
Copy link
Member

@gierens gierens commented Aug 18, 2023

This adds the script devtools/deb-package.sh to build a .deb package from the build release binary and man pages. It adds the deb package to .gitingore and also replace exa with eza there.

It also adds a name section to the eza_colors-explanation man page, as this is according to the Debian linter lintian good practice to have it as first section.

It finally adds a section to the README.md with instructions to install it from a repo I created and adds the corresponding GPG public key with which the package is signed to deb.asc.

Note, in case you test this the instructions assume that deb.asc is already in the main branch of this repo, so adjust the url for the initial wget to https://raw.githubusercontent.com/gierens/eza/deb-package/deb.asc.

Screenshot from 2023-08-18 13-38-55

Resolves #143

@cafkafk
Copy link
Member

cafkafk commented Aug 18, 2023

I'm not on debian, so maybe @sbstn87 would be willing to give this a spin and report back how it went?

@cafkafk cafkafk self-requested a review August 18, 2023 13:06
@PThorpe92
Copy link
Member

PThorpe92 commented Aug 18, 2023

Everything looks good, I cloned your fork/branch onto my work laptop runs Ubuntu.

I did test this out to install with the exact instructions in the README,
I replaced the url in the initial wget with the link to your fork, and copy + pasted the commands from the readme.

E: The repository 'http://deb.gierens.de lunar Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Is there something I am missing? I know the issue mentioned deb-get, which I have installed but I would imagine that is waiting on the release to be hosted in the main repo here.

My apologies if I'm off or missing a step. I'm just thinking of a user just finding the readme and copy-pasting

Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks very high quality and polished, well done!

Consider this an approval, I'll just give something like a day for potential testers to try this out, if no one tries it, I'll approve tomorrow morning.

@@ -103,6 +103,17 @@ For `nix-env` users:
nix-env -i eza
```

### Debian and Ubuntu
Eza is available from [deb.gierens.de](http://deb.gierens.de). The GPG public
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with us using http://deb.gierens.de for the foreseeable future, probably helps debian/ubuntu users get the "bleeding edge" experience.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, wouldn't be a big deal if not, I wanted to know how to set up an apt repo anyway, so wasn't any wasted effort on my side ;) ... Once eza has an own domain and stuff, we could also change it, no problem :)

Comment on lines 47 to 49
Files: debian/*
License: GPL-3+
Copyright: 2023 Christina Sørensen <christina@cafkafk.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is tangential, but since I notice GPLv3 here, is there interest in trying to re-license eza to GPLv3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is just for the debian/ subfolder of the repo ... but interesting, I thought I had changed that to MIT as well ... Hm, I don't have a strong opinion on that.

@gierens
Copy link
Member Author

gierens commented Aug 18, 2023

E: The repository 'http://deb.gierens.de lunar Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Ah, yeah, my bad, no you're not missing anything ... I tried to make the repo superfancy with different subfolders for different distros, and lunar is just not among the list I put in ... Since we just have a static binary and don't need to take care of different dependencies for different distros, we don't need it anyway ... I'll simplify it later or tomorrow. Thanks for the hint.

@gierens
Copy link
Member Author

gierens commented Aug 18, 2023

@cafkafk I'll write, once I'm done with the changes to the repo and so on, then you can approve/merge ;)

@gierens gierens force-pushed the deb-package branch 3 times, most recently from 8494db8 to 2ff422c Compare August 20, 2023 12:51
Lintian the debian package linter complains, that man pages should
always start with a name section.

Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
This script builds and lints a debian package from the build binary and
man pages.

Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
@gierens
Copy link
Member Author

gierens commented Aug 20, 2023

@cafkafk Alright, so I restructured the repo to just a stable subfolder instead of different ones for different distros and updated the README.md accordingly. So I adjusted the commands to ignore the distro and just go to stable, and also to put the repo information into a separate file under /etc/apt/sources.list.d/ instead of appending to /etc/apt/sources.list. This makes it more manageable.

I fixed the left-over GPL license, it's now MIT for the entire deb package. For easy merging I already rebase my branch on the current state of main.

To test this use:

wget -qO- https://raw.githubusercontent.com/gierens/eza/deb-package/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo apt update
sudo apt install -y eza

which is basically the instructions from the readme just with my repo and branch.

In case one already installed it before these changes prepend the following commands:

sudo apt purge eza
sudo sed -i '/gierens/d' /etc/apt/sources.list
sudo apt update

As a side note, we break 2000 commits then 🥳

@gierens gierens requested a review from cafkafk August 20, 2023 13:35
@sbstn87
Copy link

sbstn87 commented Aug 20, 2023

I have installed the .deb package by following the instructions above and it seems to work fine for me.

The only thin I have noticed, is that it took a lot of time to update the repo the first time. So I have uninstalled eza and installed it again - this time it was quick and smooth.

@gierens
Copy link
Member Author

gierens commented Aug 20, 2023

I have installed the .deb package by following the instructions above and it seems to work fine for me.

Great, nice to hear.

The only thin I have noticed, is that it took a lot of time to update the repo the first time. So I have uninstalled eza and installed it again - this time it was quick and smooth.

Ok, that's good to know, I'll keep an eye on it and increase the machines resources or move repo to a different machine if it necessary.

@PThorpe92
Copy link
Member

Ran those commands and it installed just fine on my Ubuntu machine 👍 good stuff!

@cafkafk
Copy link
Member

cafkafk commented Aug 20, 2023

As a side note, we break 2000 commits then 🥳

Let's goooooooooooo!!! 🎉

I'm super tired right now, so I'll look at merging it tomorrow so I don't make any mistakes, seems like it's working for everyone thou so it should be smooth sailing!

Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work for users, and not have any overlap with any critical code, well done, LGTM 👍

@cafkafk cafkafk merged commit 3d45ad6 into eza-community:main Aug 21, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

feat: Publish .deb packages
4 participants