I hate packaging my software for Linux(getfresh.dev) |
I hate packaging my software for Linux(getfresh.dev) |
For the Debian situation specifically:
> It would've been nice if there was a quick serverless solution where you could just say a URL to look for newer versions of a single package, and both apt and dnf would remember that and update a package.
Have you considered just hosting your own Debian repo? It's basically what you're looking for here. You don't need more infrastructure, either, you can host them straight in github pages with aptly or reprepro or something, and drop new releases in there from CI.
There are Canonical PPAs for that, which make distribution much simpler (it's still not as simple as it could, but with AI's help it's simple).
But from your comments, the message I get is that you want to apply to become a maintainer in each and every Linux distribution's package repositories, both mainstream and niche? And apparently also create packages for some alternative package managers too? (e.g. mise, npm, Terra)
I use fedora on my work machine. It is a pain. But hey, freedom of choice has its drawbacks too.
Packaging it for a distro is someone else's job, and they'll take care of concerns like Debian's dependency policy. If they want to package it in the first place of course.
What you should do is make software good enough so your users will use it, and publish the source code under a free license. The first Debian developer that uses and likes your software will package it, and the virtous cycle can start. It can be tempting to "own" the user experience (after all, everone wants to own their customer) but one has to let go of that thought. Updates can not be expected to get pushed out the same day when you don't own the customer, but that's overall a good thing.
Ask the distro people what you can do to make their work easier, listen to them, but do not try to do their work for them. Unless you live in that distro you are unlikely to understand how they expect your software to behave and the nuances of how it should be packaged.
One of the good ideas about Linux packaging is that it is not the same people that make the software that package it. Code can be reviewed. Bad ideas can be caught. This principle is sometimes violated, but that violations happen doesn't make them a good idea. We live in a world where no one should execute random software from the Internet without any form of reputation or review, and distribution packaging suggests one way we can accomplish that. A way that has survived three decades, after all, so maybe it's worth listening to.
I know, speaking for GNU Autotools will get me downvotes and nasty comments, but there are many things the GNU Operating System got right and stable, mature distributions like Debian show still its heritage.
Packaging for Windows is truly horrible. Even getting the dependencies to build your app on Windows is a nightmare (the author mentions winget which is no good for libraries)?
I maintain an app that uses libsfml, libfluidsynth and a bunch of other dependencies. Packaging on windows was only made possible by MSYS2 and pacman which is literally a linux package manager.
Apple, Microsoft, Google - none is easy meaning you need to have Play store, certs, codesign, submit... But there are steps with few results making it easy for those platform to get the software.
I have tried my best getting also Linux but as the author said, there's nothing trivial (as my metronome GitHub issues can show https://github.com/talaviram/TICK/issues)
The name is exactly the tricky part... Linux has so many flavors. Even without installer, you have X server and Wayland and snap, AppImage, .deb each differ. add to that audio plug-in formats (CLAP, LV2, VST3) and the fact that some formats has no specific path for putting files.
For simple apps (not cli tools or ones aimed for package managers I start to think best is just providing an archive file (zip/tarball/etc)
While Linux is growing and is my goto for non-macOS, with so many releases, it still feels most users are more technical than other platforms. Add the LLM age where you can ask it to install it for you. a zip with binaries might be simplest for simple software.
Of course, people nowadays try to make it easier for the distributions and provide packaging for them. But I don't think this is requirement, you can just ship a binary and most Linux users will be able to run them, and it'll basically "package itself over time" if it's interesting enough for people to want that sort of integration.
There is no right/wrong or correct/incorrect approaches here, just giving ideas :)
If I’m going to take on maintenance burden then I might as well make it how I want with a fork and take the notoriety.
Windows? We have 1 in 100 users whose antivirus nukes a random config file. Or part of the installer. MacOS? I hope you bought a Macbook, and don't mind updating your app indefinitely.
Quick feature set of interest to your project:
• It's free for open source projects.
• It's a tool not a service so you can just download+go without even needing to sign up for an account.
• It can create signed, self updating Windows, Mac and Debian packages in one go, with a single run on any chosen host platform. So you can ship from Linux to Win/Mac without having those systems.
• Fully supports code signing, delta updates, other advanced stuff.
• Creates a nice download HTML page that detects the user's OS and CPU etc.
• Simple config file syntax.
Check it out, see if you like it.
I package software for void Linux... I don't think there's an expectation from devs to know all the intricacies and particulars of each distro and contribution guidelines in order to package software for it... A tar or GitHub repo and clear instructions is all we need to package it.
It becomes a pain when the software has hard dependencies on either bleeding edge unreleased software (I'm thinking hyprland) or very old versions of libs that are no longer shipped with the distro.
Another pain point is when the software makes assumptions about Linux like all linunx use glibc or have systemd. In cases like that packaging software might entail patching it, or just giving up (void doesn't use systemd for example)
Hope this gives you a bit of insight into what packages might be looking for
This is what Mozilla is doing with Firefox. I downloaded the binary from their site and it autoupdates. Debian 11 and then 13, all is good.
Mozilla can, because they are so large they can have people spend their days working on it. No one else should.
I've seen few times that people abuse npm to do install of software that is not js, but why force me to install npm?
The "npm distribution method" is for people who already have npm installed, just like apt-get instructions are for people on Debian/Ubuntu, you're not meant to install apt if you happen to be on CentOS, just like you're not supposed to install npm if there is a better installation method for you. Sucks when it's the only installation method, same with curl|bash, I tend to just close the page when that's apparent, haven't missed anything so far.
And now today, we have a lot of new packages mangers on top of that, which has increased complexity a lot.
If I wanted to publish tools/programs, I would distribute the source code and let each distro decide how/if they want to package it. I would not try to do this myself. It's not a reasonable thing to do.
./configure
make
sudo make install(and compiling and installing those dependencies)
If your package is FOSS, having the distros ship it is arguably the easiest approach.
- very slow
- need to install prerequisites
- not possible on many machines (to weak, not enough disk for running builds)
Many users don't want to deal with this
right now its a total mess both for users and developers. IIRC apps cant register a command line alias that gets added to your PATH and theres no way to request permissions for a file by name (you have to open a file select dialog scoped to a directory). i dont know if you can even tell the runtime to open your app in a terminal without hacks.
its all pushing devs to opt out of sandboxing as much as possible which defeats the whole purpose of containers.
Just ship a statically compiled binary for each kernel/cpu (eg: linux/and64, linux/arm64).
That’s what terraform and kubectl do, for example.
We could call it a .exe
But the discussion here is more about how to package properly an application (for updates, app centralized management etc,) than how to deliver an executable on linux.
The idea that your OS distro needs to explicitly support and package every software you could ever want to use seems crazy to me.
Both users and authors want the same thing: low-effort, high-quality distribution of software.
Personally I put my support behind flatpak for GUI, mise for CLI/TUI, but it's not a perfect solution and I occasionally bail out to homebrew/linuxbrew.
Somebody has to do the work. Apparently you won't accept it for that to be the developer, the user, or a "professional third party" (whatever "professional" means here). What exactly do you want?
> Personally I put my support behind flatpak for GUI, mise for CLI/TUI, but it's not a perfect solution and I occasionally bail out to homebrew/linuxbrew.
So third parties. Things that have reinvented "distributions", arguably badly. Are you saying they're not "professional"?
Yup, this is why I think so many people feel so much friction about it. On Windows and macOS, the developer is usually responsible for the entire thing, even shipping installers for users. Linux distributions tend to split the roles, and as mentioned, once you provide sources and how to build it, you're basically done and it's up to others now.
I need a solution that works for my users regardless.
Have you ever interacted with actual users? This is absolute no-go which will only bring world of pain on you and your issues list and your email and your Discord and whatever other way you decide to talk to users....
Being responsive to maintainers doesn't help if maintainers never reach out or even actively refuse to package your software.
It's a reasonable antidote against DLL hell, so I would say yes, that's as close to an ideal solution as we can get.
Our solution is shipping it with its own glibc and running the executable with the LD inside this separate glibc. Basically the entire userspace. It is almost like a container but the containerization is provided by systemd and there is scoped access to limited system services via mount and network namespaces.
We cannot use static programs. Our systems have limited memory so the GUI load relevant parts of the program as shared library plugins.
This is the only reliable way to distribute closed source / independently packaged Linux software. You ship it with an entire userspace. Docker and Flatpak are just that; an admittance that distributing independent software reliably on Linux is practically impossible.
As a user that surprised me at first, but I’ve grown to really like it!
Sure, you won't get into the official repos that way, but do your users really care? Fedora users are pretty used to enabling Copr and RPMFusion, Ubuntu has its PPAs. It's not ideal, but it's good enough. Even an RPM/DEB via Github release would already be a good start.
I also echo some of the comments here saying it's entirely reasonable for a single maintainer not to support absolutely every single distro unless it's straightforward or enjoyable.
I made a different post, but fits here as well: https://news.ycombinator.com/item?id=49271276
TLDR is basically that you don't have to package it for others, the expectation is that people using the distributions will package it for themselves and others if the software ends up useful enough and they want it in the distribution. Until then, just ship a zipped up binary or whatever and call it a day.
Don't get me wrong, I love Steam, but for video games. You can't stop auto-updating for example, and still be able to launch the "game" (program in this case) if it's out of date, which obviously breaks pretty much every professional computer user's workflow.
Getting dependencies to build your app is definitely harder on Windows but the fact that you can just throw things in a folder for a binary distribution is unbeat!
The only sane way I've found to do this, is ensuring I never package it on a personal computer/computer with state, always a CI worker with fresh everything, isolated from everything else, with nothing assumed. Then for the packaging, define all required dependencies up front, and you won't end up with the typical "oh, I forgot to ship/package lib X and I didn't get any errors because I have it installed". Helps to set all this up with Nix too, can help you manage the VM lifecycle, and makes reproducible cross-platform a lot easier :)
Of course this assumes your main product is an executable - if you're intentionally shipping a COM object or something, which is a DLL, different guidelines may apply. In that case you should still ship a "heavy" single-DLL COM object.
I don't think this is entirely accurate and in fact, I think you'll encounter limitations in how big the .exe could actually be, before the OS says no, compared to Linux or macOS where you can pack more into it. But still, on all platforms, you won't have multi-GB binaries, you have external resources which among them are DLLs and whatever, and the binary ("executable") itself ends up some MBs. At least most (if not all) of the large professional software I use on Windows is packaged like that.
If you need somewhat Linux-like build infrastructure, conan is very helpful to install all your dependencies and to create deployment packages.
Only thing you ship with your application are the libraries specific to your app. If you use Qt, you ship Qt libraries as bundled DLLs. If you use Havok physics engine, you ship that as a bundled DLL.
MSI can trigger things like installing optional Windows components but it is not a package ecosystem like apt or dnf. It is more like dpkg or rpm.
What I was talking about was the setup required on your machine/CI to get the dependencies to build those DLLs.
Nothing at all. This is not stealing. The term is "forking." It's how GCC got un-stagnated (see egcs), and how we got the ecosystem of alternate wifi firmware (two examples that come readily to mind.)
This is also where Free and Open source diverge: Open Source lets someone block others from forking their fork, whereas Free Software requires that forks remain free to be forked themselves.
What are you making?
You can easily setup a copr repo for this to solve the auto update qualms for almost all the RPM repos. Needs a spec file and that's about it.
AUR should do.
Debian. Eeshk.
Additionally, the Windows dynamic loader doesn't squish all DLLs into one global namespace like the Linux one does. Every time you call a function from a DLL there is extra friction, even for the programmer.
There's also the libc linking problem. Each DLL may get its own copy for libc, either because they are statically linked or because they are compiled with different versions. If you try to fopen in one DLL and fclose in another, or malloc in one and free in another, it's liable to crash. This might've been solved in the 20 years since I learned about it, though.
It could be useful if updating is a pain point.
In this case, they may also consider Podman, as it has excellent systemd integration[1] including rudimentary container orchestration and the ability to auto-update containers and Kubernetes-style pods installed as systemd units. I've run Pihole under Fedora CoreOS this way for several years without touching a single thing to update the OS or Pihole.
[1] https://docs.podman.io/en/latest/markdown/podman-systemd.uni...
But not for most people.
However, Steam Runtime for Linux was still in beta, last I checked. Plus, it doesn't solve the cross-platform part. But for Linux-native development, Steam Runtime might be what's needed to have long-term compatibility for apps (finally).
It works. It works great. It's actually the only sensible solution if you want something compiled today to work without changes on both Windows and Linux in 10 years.
I did an experiment, implementing a GUI calculator, and Rust + Slint + cross-compiling to Windows (I develop on Linux) + Proton runtime was the clear winner:
- compiled bundle: 20 MB (F#/dotNet + Avalonia: 207 MB)
- loc: ~1000 (dotNet: ~700)
- dlls: none other than what Wine provides (dotNet: 67 .dll files)
You have an option to build for Linux for dev/testing, then you cross-compile to Windows and provide a short (4 points) instruction for adding the Windows build to Steam on Linux. It works, and it will most likely continue to work in the future, unless Valve folds and both Wine and Proton die. The only thing worth looking out for is crates that depend on external shared libraries: you need to bundle them manually. Other than that, it works.Another option I considered was Zig with the Win32 API, but the LOC count was unacceptably high.
I'm working on a write-up for the experiment. The premise was: "I'm working on Linux and want to create a GUI app that will, with the build done today, continue working on Windows and Linux for the next 10 years". Steam/Proton + mostly static compilation + bundled libraries is the only solution that makes this mostly painless.
Better yet, build it for Windows 95, and it'll not only run under Windows, Linux, and macOS, but you can even package it to run in a browser[1].
For command-line programs, you might try something like Cosmopoliton[2] instead.
[1] https://www.pcjs.org/software/pcx86/sys/windows/win95/4.00.9...
Publishing on Steam costs money: https://partner.steamgames.com/doc/gettingstarted/appfee
The full discussion about this I had with ChatGPT is here: https://klibert.pl/statics/Steam-Linux-Runtime-Stack-2026-08...
But you're "at the distro", and you want to use it, so you package it :) You might want to be nice to others too, so you make that public. Eventually, the community might end up relying on it, and the package gets an official maintainer from the distribution itself.
And if you want a system whereby software only gets made available if distro-providers care enough, then that's fine. But you're putting a filter between the software producer and non-technical users, and you should be aware that this is a choice you're making.
If nobody cares enough to make the application available, perhaps it just shouldn't be there.
Yeah, but that's also not exactly a better user-experience for the end-user than "Download .exe, double-click to launch" or "Download .msi, finish install, run program".
Distribute your software however you want, I tend to try to make the download and install as familiar as possible to the users of the specific platforms.
Btw, even your starting prompt is guiding the model to just agree with your opening statement. You can't just roll with whatever the model says and assume the conclusion of "definitely can run in 10 years unchanged" is true.
To your point on installation: sure, but if you value it that much, just pay Valve to add you to the Steam store? And that would be the only possible solution given my constraints, all explicitly mentioned at least once in the linked conversation:
- binary produced today works
- without changes
- on both Linux and Windows
- is a GUI app
- has some dependencies
- is developed on Linux (no Windows needed)
For this set of constrains, Proton/Wine with a cross-compiled Win32 binary/bundle is literally the only solution (care to name another?)For other constraints, it's a solution. Worth considering. That's all.
Yeah sorry, hurling huge LLM conversations at me tends to make me skim them, hope you don't mind I didn't study the conversation you had with ChatGPT in detail.
That you considered someone skimming a chat log offensive yet the act of sharing those chat logs and expecting others to dredge through them, is almost offensive to me. So I guess we can call it even now.
> For this set of constrains, Proton/Wine with a cross-compiled Win32 binary/bundle is literally the only solution (care to name another?)
Cross-compiling the good old way, with a Linux VM, Windows VM and a macOS host (maybe Mac Mini?). I basically have the very same requirements (+ macOS), except zero third party dependencies, and end up doing it this way, all managed with Nix so basically all the installation-bloatyness is something I deal with so users get the exact same experience they expect on their OS.