Skip to content

Debianize - #903

Draft
elbandi wants to merge 1 commit into
gitui-org:masterfrom
elbandi:debianize
Draft

elbandi wants to merge 1 commit into
gitui-org:masterfrom
elbandi:debianize

Conversation

@elbandi

@elbandi elbandi commented Sep 10, 2021 •

Copy link
Copy Markdown

This commit adds the required files to build for ubuntu/debian. Tested(=builded) on ubuntu bionic LTS and focal LTS, they already have new rust. Unfortunately debian havent new rust, it cannot build with main packages. (but you can install rust packages from focal)

@elbandi
elbandi force-pushed the debianize branch 2 times, most recently from 109b735 to 01fe50d Compare September 12, 2021 18:34

@extrawurst extrawurst left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @elbandi thanks for tackling this. but in order for me to merge this I had to ask a bunch of noob question, please bear with me. also: do you have a good source I can read up on this procedure for future reference? I am no Debian guy so I this might seem stupid :)

Comment thread debian/changelog Resolved
Comment thread debian/compat Resolved
Comment thread debian/control Resolved
Comment thread debian/gbp.conf Resolved
Comment thread debian/install Resolved

@extrawurst extrawurst left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just the rustc version needs changing I think. but in terms of publishing how does it work once we have this in master? can you point me at a similar GitHub repo of a project that contains these files? do they have some sort of CD pipeline publishing things based on these files? I thought these files are usually stored and maintained in some other place external to the project and owned by the person owning the Debian package?

or is this intended to be used by Debian/ubuntu users locally as a means to install gitui? if so, can you add documentation into the readme?

Comment thread debian/control Resolved
@boydjohnson

Copy link
Copy Markdown

I'm just an onlooker with an opinion, but I don't think this PR is the best approach. It would require users to build the binary each time they install the package. A better approach is using cargo deb to build a deb binary package. Then there would be no dependency on cargo and rustc.

@extrawurst

Copy link
Copy Markdown
Collaborator

@boydjohnson this PR seems abandoned anyway. Would you be up to work on a PR to add deb creation to the pipeline?

@boydjohnson

Copy link
Copy Markdown

Yeah, I will create a PR this week that modifies the .github/workflows/cd.yml file, Cargo.toml, and possibly Makefile to create a binary deb on github actions.

@elbandi

elbandi commented Dec 1, 2021

Copy link
Copy Markdown
Author

This is the debian package build guide: https://wiki.debian.org/HowToPackageForDebian
My PR follows this standard.

Debian/ubuntu releases isnt a bleeding edge distro. They pick up a stable release from github, and build the source and puts the package to repo.

If you want build a package for every commit, there is solution for do that in "debian way" (eg: create a new changelog entry from commit messages at build step).

@boydjohnson

boydjohnson commented Dec 1, 2021 •

Copy link
Copy Markdown

I think you are right, @elbandi. I will test building a deb source and binary from this PR.

I had only had use with cargo-deb.

Comment thread debian/rules
cargo test --release

override_dh_auto_build:
# cargo build --release

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this commented out?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yepp, cargo install do again the build process internally. so this "cargo build" is useless. the empty override_dh_auto_build is needed, to "drop" the default build command.
Maybe i sould write the reason here. :/

@boydjohnson

Copy link
Copy Markdown

Hi @elbandi I was able to build a deb binary using dpkg-buildpackage -b --no-sign -r=fakeroot. I did this on Ubuntu. I successfully installed the deb on Debian (Bullseye) and Ubuntu (Bionic) (host machine).

This looks good to me. Let me know what I can do to help.

@elbandi

elbandi commented Dec 1, 2021

Copy link
Copy Markdown
Author

here is a sample: https://github.com/dmx-systems/dmx-build-deb/blob/cf0e0292c67d601b9a1404763c5a4756fd9d6b6c/.gitlab-ci.yml#L162-L164
this creates a new changelog entry, and build the debian package. but you can tweak with git describe --tags the build version. etc.etc

@boydjohnson

Copy link
Copy Markdown

@extrawurst I gave bad information in

I'm just an onlooker with an opinion, but I don't think this PR is the best approach. It would require users to build the binary each time they install the package. A better approach is using cargo deb to build a deb binary package. Then there would be no dependency on cargo and rustc.

Specifically that cargo deb is the better approach. This PR makes it possible to build debian source and debian binary packages. From reading at the debian wiki link up above, this is the only way that we could get it included in an official apt repository.

@extrawurst

Copy link
Copy Markdown
Collaborator

@boydjohnson I am not sure I can follow. does this mean your PR is obsolete? i can't merge this one either so we are back to square one.

@boydjohnson

Copy link
Copy Markdown

@extrawurst If this PR built deb packages in github actions would you be willing to merge it?

@extrawurst

Copy link
Copy Markdown
Collaborator

@boydjohnson yes we need this to be part of CI and CD - also its would be great to document how to update for new release (like by now we are already at 0.19 where in the PR it is still 0.17.1

@boydjohnson

Copy link
Copy Markdown

@elbandi Would you be willing to do the work of adding building the deb to both github actions workflows?

Also, since @extrawurst is listed as the maintainer, he would have to provide a gpg key to sign the source. @extrawurst, do you have a gpg key and are you comfortable signing the source?

@extrawurst

Copy link
Copy Markdown
Collaborator

@boydjohnson can you elaborate what exactly needs to be signed? I never signed any commit in here, I guess you are not talking about that, right? what do I need to gpg-sign and why?

@extrawurst

Copy link
Copy Markdown
Collaborator

I am sorry I am such a noob when it comes to deb. feel free to take this conversation to discord (link on readme) to simplify teaching me

@boydjohnson

Copy link
Copy Markdown

No problem, @extrawurst. Yeah, so as maintainer of the debian package, you would sign the source so that people could verify that it is what you say it is. The key would probably be a secret that you added to github and would be used in the github actions to sign. Let's see what @elbandi says.

@elbandi

elbandi commented Dec 7, 2021

Copy link
Copy Markdown
Author

I rebased the branch to the latest release, and started to play with GH build. but there are some mysterious errors and segfaults. only ubuntu amd64 builds work :(
i need to work on it...
https://github.com/Elbandi/gitui/actions/runs/1551533874

@tmpgnh

tmpgnh commented Feb 9, 2022

Copy link
Copy Markdown

@elbandi you need help with this? I'm using a Debian/bookworm and was able to debuild your branch with no problems (well, a single lintian error on the chlog file, maybe false positive).

@extrawurst

Copy link
Copy Markdown
Collaborator

setting to draft for the time being

@extrawurst
extrawurst marked this pull request as draft August 17, 2022 16:45
Comment thread debian/control
Priority: optional
Maintainer: Stephan Dilly <dilly.stephan@gmail.com>
Build-Depends:
debhelper (>= 11),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
debhelper (>= 11),
debhelper-compat (= 13),

Comment thread debian/compat
@@ -0,0 +1 @@
11

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comment thread debian/gbp.conf
@@ -0,0 +1,4 @@
[DEFAULT]
debian-branch = debian/master

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
debian-branch = debian/master
debian-branch = debian/latest

To be compatible with DEP-14: https://dep-team.pages.debian.net/deps/dep14/

@williamdes williamdes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I am a Debian Maintainer (DM) (just a random guy that maintains packages on Debian/Ubuntu)
An willing to help package this one

See:

Let me know if you need help

@semioticrobotic

Copy link
Copy Markdown
Contributor

Just wanted to express my desire to see this implemented! I need to move to Pop!_OS and would love to have gitui in the upstream repositories on Ubuntu Jammy.

@williamdes

Copy link
Copy Markdown

Just wanted to express my desire to see this implemented! I need to move to Pop!_OS and would love to have gitui in the upstream repositories on Ubuntu Jammy.

You should file a RFP: https://wiki.debian.org/RFP
For that you will need to send an email to submit, here is an example: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030845;msg=5

@elbandi

elbandi commented Feb 17, 2023

Copy link
Copy Markdown
Author

@williamdes i checked your suggestions, and you have (almost) right.
My goal was to make a package to everyone can use (and build) on yet supported systems, not only for bandnew bleedingedge versions: strech on debian (in 2021 was supported...), and bionic LTS on ubuntu.

@DartMitai

Copy link
Copy Markdown

I just installed Debian 12 and by the apt install gui command it finds nothing
does it make sense to wait or is it abandoned?

@williamdes

Copy link
Copy Markdown

I just installed Debian 12 and by the apt install gui command it finds nothing does it make sense to wait or is it abandoned?

It makes sense, this package never did enter Debian
You probably need to build the apt from this PR

@stale

stale Bot commented Mar 17, 2024

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the dormant Marked by stale bot on close label Mar 17, 2024

@alerque alerque left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I strongly feel that distro specific packaging should go in a different repo than the project itself. I'm aware Debian packaging details can live in upstream projects, but also aware that it is also setup to use from a different source. Given that the release cadence, need for rebuilds, and other changes often happen at a different pace that upstream releases I would either upstream this into Debian itself, or create a 3rd party packaging repo for these bits.

There are Debian maintainers in this dialogue that can help upstream this, and that's the best home for it.

Recommend closure.

@lonix1

lonix1 commented Mar 20, 2026

Copy link
Copy Markdown

The project already supports many OSs/distros - look at the README. Debian and derivatives (Ubuntu notably) should be included too, given their massive popularity. Leave this open so someone with the requisite knowledge can assist someday.

@alerque

alerque commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

@lonix1 I think you missed my point. Of course this project should get Debian & Ubuntu packaging! I fully support that. I'm also aware of the other distros that package this. I am the package maintainer for the Arch Linux package for example—which also accounts for the Manjaro, Parabola, and other supported distros. I'm also a contributor to Homebrew, Nix, Alpine, OpenSUSE, Void Linux and others on that list. The point is all those distros that have packages have the packaging source material in their own packaging repositories, not in this repository. This is the way it should be with this too.

This is a code PR trying to push the packaging support files into this repository. I believe that particular action should be turned down, hence this PR should be close. A tracking issue for requesting support and discussing who can help where would be fine, but not a PR attempting to land this code here.

@tillea

tillea commented Mar 20, 2026

Copy link
Copy Markdown

Andreas Tille from Debian speaking: We strongly prefer the Debian packaging on salsa.debian.org (and we happily accept MRs there). My 27 years experience of debian/ dirs bundled into upstream source is that it was not helpful for the Debian maintenance and our packaging tools even ignore/throw away the debian/ dir if bundled into the upstream source. Please don't do it and rather talk to the Debian maintainers.
Thank you for supporting Debian anyway.

@lonix1

lonix1 commented Mar 20, 2026

Copy link
Copy Markdown

@alerque If that's how it's done for those other packages, then the same should apply here too - agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dormant Marked by stale bot on close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants