-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add Debian-based system builds #898
Conversation
If you are willing to help, you can write your email there, I am currently not a Debian user, so if there is anything related to the distro, I cannot help😢.
Seems like a bug, thanks for catching it, I will give it a fix! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on it, mostly nits:)
Fixed in #899 |
I can help, sure. I'm not familiar with Rust (picking it up is on my to-do list, but I'm also not sure when I'll have time to really devote to it), but I am familiar with Debian. So, yeah, if you want, I can do that and check out any packaging-related issues that come up. I don't expect there to be too many.
Ah, thank you! |
OK, I addressed most of the feedback there. Would you like me to remove the Also, while I was going through this, I remembered one other question I wanted to ask. There was already a |
Thanks!
We should remove it, please go ahead, thanks for catching it! BTW, can we upload the built binaries to the official Debian repo, is it feasible? There is a tracking issue for this |
Done. I just pushed another commit with that removed as a dependency.
I'll need to look into whether they accept packages that can't be built with available Debian packages. If they do, then there's actually one more change (that I know of, anyway) which would need to happen for it to be submitted and isn't currently addressed here. I didn't do this bit because I'm not quite sure what the best way would be to set it up (and, unless the package is being submitted to the Debian repo, probably doesn't matter to much). What would need to be added is the changelog. Essentially, it's an ever-growing text file in a specific format detailing the changes for each release. The specific format is located at https://manpages.debian.org/testing/dpkg-dev/deb-changelog.5.en.html and an example of this is from the
That goes on for quite a few pages, listing all the changes back to when the package was first included in Debian with version 1.2 in 1999. Maintaining that manually would be a pain, so if there's a way to do that via GitHub actions, that would really be ideal. I'm just not sure what the options are for generating/appending text to the beginning of a file that way. But, if that can be generated, then the relative path to it can be included in |
Thanks for showing me this! Topgrade indeed does not keep changelogs, we currently only keep breaking changes. At Nix, we do leave a changelog for the PRs that deserve it, we use Anyway, having |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hi @Kreeblah: Having said that: it would probably not be the wisest approach. I know some Debian contributors. I'll see if they can help us cross the gap. |
Hey @gmkey! I'd honestly be hesitant to use Github as a package repo. Especially since it'd mean probably adding another dependency to the CI tools. @SteveLauC would obviously have final say, but . . . well, it feels kind of fragile and that it would add a fair bit of complexity (especially since it would add signing key management into the mix). If it could be added to the Debian repo, that would be ideal, but I've been assuming at least the changelog situation would be a showstopper there (plus possibly the rust version issue). But, maybe it wouldn't be? I'd be curious to find out what the contributors you know say. In the meantime, I have an Ansible role for installing Topgrade on macOS, FreeBSD, and Debian-based Linux systems that, for Debian-based systems, compares the installed version to whatever the latest version is and updates if required. It's also not ideal, but at least works for me for the time being. |
On Topgrade's repo side, I am ok with any solutions that won't make the maintenance harder. Out of Topgrade's repo, I have no control there, feel free to do whatever helps the most:) |
What does this PR do
This adds builds for Debian-based systems (both x86_64 and ARM64).
It ended up being easier than I expected. Just adding some bits to
Cargo.toml
and then modified the GitHub release actions to use them. I don't know whether this is necessarily the best way to do it (I'm not 100% familiar with GitHub actions), but this at least does generate appropriate packages. There are a couple of caveats here, though.First, I wasn't sure what to put down for the maintainer or copyright, so those are dummy values. They probably should be updated.
Second, it seems that the binaries I'm generating for x86_64 are panicking, but only when generated from GitHub actions when I was testing (running the same things locally generates binaries that work fine, and the binaries already released from v15.0.0 in this project work fine as well). This doesn't seem to be related to the packaging process, since it's happening even with the binary in the gzipped tarball that gets generated. Specifically, the error I'm getting is:
But, as mentioned, it seems to work fine when I build on my own machines manually or with the pre-built binaries here in GitHub or when creating ARM64 builds from GitHub actions. Those all work. So, if it's something that's replicable, it might be worth looking into.
Standards checklist
CONTRIBUTING.md
For new steps
--dry-run
option works with this step--yes
option works with this step if it is supported bythe underlying command
If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.