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

Debianize #903

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Debianize #903

wants to merge 1 commit into from

Conversation

Elbandi
Copy link

@Elbandi Elbandi commented Sep 10, 2021

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

@extrawurst extrawurst left a comment

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 :)

debian/changelog Outdated Show resolved Hide resolved
debian/compat Show resolved Hide resolved
debian/control Show resolved Hide resolved
debian/gbp.conf Show resolved Hide resolved
debian/install Show resolved Hide resolved
Copy link
Owner

@extrawurst extrawurst left a comment

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?

debian/control Show resolved Hide resolved
@boydjohnson
Copy link

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
Owner

@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

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

Elbandi commented Dec 1, 2021

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

boydjohnson commented Dec 1, 2021

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.

cargo test --release

override_dh_auto_build:
# cargo build --release

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
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

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

Elbandi commented Dec 1, 2021

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

@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
Owner

@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

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

@extrawurst
Copy link
Owner

@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

@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
Owner

@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
Owner

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

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

Elbandi commented Dec 7, 2021

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

tmpgnh commented Feb 9, 2022

@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
Owner

setting to draft for the time being

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

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),

@@ -0,0 +1 @@
11

Choose a reason for hiding this comment

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

@@ -0,0 +1,4 @@
[DEFAULT]
debian-branch = debian/master

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/

Copy link

@williamdes williamdes left a comment

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
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

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

Elbandi commented Feb 17, 2023

@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

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

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

Copy link

stale bot commented Mar 17, 2024

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
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.

None yet

7 participants