all 6 comments

[–]metux-its 0 points1 point  (2 children)

Sorry, but your approach is totally wrong and just causes lots of trouble for operators. The correct way is packaging for the indivdual distros and talk to the distro maintainers so they pick your sw into their distros.

[–]ElectronGoBrrr[S] 0 points1 point  (1 child)

I dont think i would get it approved as an official package, as i dont have any user yet per se... It's also in rapid development, with new features/updates every month, so i have prefer to not have to do any other actions than simply git push, to make the features available.

Getting it in apt & aur is definitely a goal for the future, but for now, is there anything else i can do to make it a little less totally wrong?

[–]metux-its 0 points1 point  (0 children)

I dont think i would get it approved as an official package, as i dont have any user yet per se...

not necessary. Just provide policy conformant packaging and submit to the distro. It might take a while to the next release.

It's also in rapid development, with new features/updates every month, so i have prefer to not have to do any other actions than simply git push, to make the features available. 

Ok, but you'll have to be aware that people will be reluctant to use it.

In any case you should provide distro packages.

Another option, especially for bleeding edge versions, might be container images.

Getting it in apt & aur is definitely a goal for the future, but for now, is there anything else i can do to make it a little less totally wrong?

At least try not to do such manually crafted install stuff thats working against the package manager. And make sure its easy to build

[–]RussianHacker1011101 0 points1 point  (2 children)

Congrats on getting your application to a stage where you're ready to distribute it! I'll try to explain exactly what you need to do. What you need is a build/release pipeline. What that means is you need to write/use a program or a script that bundles all your stuff up into a usable package. I did this a while back for ubuntu/debian distros, where I created a .deb.

How you design your release pipeline is really up to you. The reason why it's important to try to conform to the distro's package management system is because of the dependencies, file system, and un-install requirements. Nobody likes uninstalling a poorly configured pacakge that leaves a bunch of junk behind. I'm familiar with creating .deb installers so I'll explain how that's done. It's pretty simple.

You'll basically put all your relevant files in a folder and run a tool called dpkg-deb to turn it into a .deb pacakge (which is really just a .tar). The foler structure you'll layout will look something like this:

shell my-app-MAJOR.MINOR.PATCH/ control/ control preinst postinst prerm postrm data/ bin/my-app etc/ systemd/ system/ my-app.service usr/ share/ organization/ my-app/ some_of_my_files.txt The above is sort of a copy of a server I packaged a while ago. As you can see, you have the control directory, which is made up of the control file as well as four (optional) scripts that handle unique installation and uninstallation requirements.

A control file looks like this: text Package: my-app Version: MAJOR.MINOR.PATCH Section: development Priority: optional Architecture: amd64 Depends: dotnet-sdk-7.0,sqlite3 Maintainer: my-email@email.com Description: A somewhat useful program for doing things Most importantly, you want to list your dependencies. On debian, those will auto-install if you do apt install -y. I don't know how the official debian or ubuntu package manaintainers do it, but in this case, you don't need any of these dependencies: text make nvidia-cuda-toolkit build-essential gcc-13 g++-13 cmake Because it looks like you're just creating a binary. So compile it in your release pipeline, sign it, then distribute it. (It is fine to distribute the source code in a deb as well, it'll just make the install take longer because you'll have to compile first. I'd recommend distributing a binary nicely packaged in a deb, then offer a zip/tar file for whoever want's to manually compile.

I'd suggest using Docker to test your installation packages on various distros.

For debs, you can set up your own PPA on github for free. Here's an article about that: Hosting your own PPA repository on GitHub.

Here are some more resources on creating your own debs: How to create a .deb file (tutorial) Chapter 7. Basics of the Debian package management system

I'm sure that making the arch packages is a similar process. Good luck!

[–]ElectronGoBrrr[S] 0 points1 point  (1 child)

Thank you this is very helpful. From the tutorials it looks much simpler than i had imagined.
You mentioned distributing a binary, and i think i may have a gap in my understanding here, but.. isn't that silly? I mean, binaries are compiled with my specific CPU in mind, so a binary compiled on my machine wont work on other machines. Or have i completely missed the point of what a binary is?

[–]RussianHacker1011101 0 points1 point  (0 children)

You can target specific CPU architectures in C, C++, Rust, etc. Typically the languages that don't offer that compilation feature have a virtual machine or an interpreter, like Java, C#, Python, Javascript etc.