Hacker News new | ask | show | jobs
by CJefferson 3222 days ago
I've wasted several days trying to get programs I write turned into debs and rpms, I gave up. It's a single executable you can download and put wherever you like, or download the source and './configure.py; make'.

Also, I release new versions regularly, so now being in the official repositories is no good as they will get out of date, I have to run my own repositories, for several versions of ubuntu and redhat. No chance.

4 comments

I have succeeded in turning my programs into DEBs and RPMs that also properly comply with all the distribution packaging guidelines, but it took me two months. I am now onboarding two other developers but they are struggling with making changes to DEBs and RPMs. All because of the complexity, archaic toolchain and poor documentation.

The only reason why we made DEBs and RPMs was to please users, but it's not an experience I want to recommend anyone.

> I've wasted several days trying to get programs I write turned into debs and rpms, I gave up.

The formats themselves are pretty easy to create; for a .deb you just:

- Make the folder hierarchy you want to include, e.g. things like `myBuildFolder/usr/bin/myProgram`

- Make a `myBuildFolder/DEBIAN/debian-binary` file containing `2.0`

- Make a `myBuildFolder/DEBIAN/control` file which contains e.g. the name of the package and its dependencies

- Run `dpkg-deb --build myBuildFolder`

This gives a .deb package which will be tracked by dpkg/apt, allowing clean removals/upgrades/etc. unlike `sudo make install` which will spray cruft all over the system. When I used Debian, I would install all software like this.

I've never made a .deb that's compliant with Debian's packaging policies though, since that does take a lot of effort.

Is checkinstall still available? I had great success with it.
did fpm not work for you?