Installer for Linux?

Started by
16 comments, last by Sik_the_hedgehog 9 years, 9 months ago


I would hunt you down and kill you if you did that. The contents of /usr are exclusively the province of my package manager, and if you go mucking around in there, you will break something.
Lets reach a compromise here, /opt ?

Or /usr/local

-Josh

--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet

Advertisement

You also have to keep i mind what the users on a given platform expect from the software installation process.

Windows users are used to GUI installers. Mac users are familiar with standardised installers via Apple's installation tool, but they'd mostly prefer that your software is sold through the App Store, or delivered as a simple zip/diskimage (in that order).

Linux users are used to package managers and raw source code. It drives me up the wall that Eclipse delivers binaries that require a custom shell script to install - if your software isn't delivered by PPA, or in source code form with a working make install, there is a good chance I won't install it.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I agree about using .deb. You should look at the available distributions between at least Debian stable and Ubuntu LTS and build on whichever is the older at the time. Then, generally, you'll have a single package that's compatible with both of those and anythng newer, although occasionally backwards compatibility breaks. Where possible use libraries from the distro instead of including your own copies.

Similarly you should think about building a .rpm on RedHat (I think that's the most conservative RPM distro) which should work on all common RPM-based distros.

There's a program called alien which can convert .rpm to .deb but the resultant packages might not be very high quality in terms of using approved scripts etc to integrate into Debian/Ubuntu the Proper Way.

Finally, continue to make a tarball or zip available for users to install manually on other distros. But do include a .desktop file and/or wrapper script for the mono command, and make it flexible about where it's installed. If you can't avoid hardwired paths use /usr/local for the tarball. Packages should use /usr, but /opt is acceptable for 3rd party packages, and probably preferable if it isn't FHS-compliant.

Installing into /opt currently seems like a rather reasonable approach since we currently need all files in the same directory. nixstaller seems pretty nice, but it bothers me somewhat that it hasn't really been updated since 2009. It also borders on the issue Bregma brought up, seems a bit like the Windows way of doing stuff.

It is the Windows way of doing stuff, but most people won't care. The purists will, but they'll either reject your product because it's not Free or they'll be really vehemently vocal in forums on the internet but can be safely ignored. The rest just want to install and use your software and don't care about such issues.

The real danger/disadvantage to having a complete bundle is (1) you will have to take care of your own security updates -- only really an issue if you have networked functionality or protect user assets in some way, and (b) if you have any external dependencies at all (eg. C or other language runtimes) your product could break on the next system upgrade. Unlike Windows, most Linux distros upgrade on a regular basis.

It really sounds like the single bundle is your best option. It does work well for Steam, although they have their own installer and automated update mechanism to alleviate the problems I outlined above. Have you considered going through Steam?

We rely on Mono and most distributions appear to ship fairly stable packages of it, so I'm not too worried about that. I'm currently looking at the open build service, it appears capable of building packages for most major distributions with a single setup, which is nice. It's not really meant for the things we are doing though..

Going through steam does not seem suitable for this tool. It's a non-game related premium (as in thousands of dollars per user) development tool.

You do that with desktop entries: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html. This will work regardless of the desktop environment.

This! THIS! A million times this. If you want to do it on your own, adhere to the freedesktop standard and the Filesystem Hierarchy Standard (i.e. if you install into /usr/bin you will be haunted down).

Delivering deb and rpm packages provides the most native experience. However on personal experience, maintaining these packages is a lot of work (i.e. you need to check it still works with each new Ubuntu/Debian release; sometimes it breaks or complains of something new; or some dependency that is still there but changed its version numbering system and now can't install, or forces to download 1GB worth of updates to install your software, etc etc etc) which is the reason you always have to provide a zip file just in case the deb/rpm didn't work.

Delivering deb and rpm packages provides the most native experience. However on personal experience, maintaining these packages is a lot of work (i.e. you need to check it still works with each new Ubuntu/Debian release; sometimes it breaks or complains of something new; or some dependency that is still there but changed its version numbering system and now can't install, or forces to download 1GB worth of updates to install your software, etc etc etc) which is the reason you always have to provide a zip file just in case the deb/rpm didn't work.

If your software no longer works on an up-to-date system, it's better to find out and fix it early on. Or, you can not do it and just leave it completely broken for end users. The release of new distro versions is never a surprise and the dates are almost always known 6 months in advance, and the prerelease versions are available for many months in advance just so you can update your stuff. In the case of a commercial tool , you may find you want to update that often anyway.

Generally dependency version break their scheme because they have an ABI break. In that case, you probably want to update your packages to use the new ABI, so it's a good thing. Most important packages will also provide a coinstallable backwards-compatible version to ease the transition.

If you need to download 1 GB worth of dependencies for your software if it's properly packaged using the native package manager, then your ZIP file is going to be at least that big as well. There is no shortcut.

Stephen M. Webb
Professional Free Software Developer

If your software no longer works on an up-to-date system, it's better to find out and fix it early on.

It's not the software that breaks on an up-to-date system, it's the installer package that thinks it does. If the software is manually unpacked and executed, it runs perfectly fine. That's what I'm talking about.

This happens with common popular commercial software like Skype, Opera, CodeXL, AMD Drivers, NVIDIA drivers...

The release of new distro versions is never a surprise and the dates are almost always known 6 months in advance, and the prerelease versions are available for many months in advance just so you can update your stuff. In the case of a commercial tool , you may find you want to update that often anyway.

That is part of the problem. Not everyone migrates immediately from Ubuntu 12 to 13, and from 13 to 14.04
Reasons are varied: Stability (Somewhere in a chance 4 out of 5 something breaks when updating the kernel. Usually it's the gpu driver, but ALSA also breaks ocassionally, or the WiFi card, or the VM kernel driver, and it takes time to get them running again); Bandwidth (it takes time to update, specially when the user doesn't have good bandwidth), Breaking changes to the software he uses, etc.
For Server stations, this makes perfect: they don't use any of what usually breaks, and fixing security vulnerabilities is top priority. But for Desktop it's a lot of nuissance.

We can have the following scenarios:

  • The OP packages his deb for one version of Ubuntu. Miraculously it works on all versions. Everyone's happy. This happens, but is somewhat rare.
  • The OP's packages his deb for one version of Ubuntu. It doesn't install some versions of Ubuntu. However unzipping the SW shows it works fine. This is very common.
  • The OP creates a package for three different Ubuntu versions (14, 13 & 12) for each release he makes. Users must download the deb for his specific version.
  • The OP's has packaged his deb for an older version of Ubuntu, but didn't package a new one yet. The latest users must use ZIP until the OP releases a newer version.
  • The latest software release by OP is a bit buggy. So its users prefer using a previous version. But the deb package is naturally, an old one. Thus likely to be incompatible with the latest version of Ubuntu.

Now multiply this with the number of distros the OP wants to support. This quickly becomes an explosion. Sure, you can hire an expert guy for each OS distro that can do miracles and put you in best case scenario almost every time. If you're very lucky you find an expert in two different distros.
But doesn't change the fact you need to allocate a disproportionate amount of resources to just keep an installer going. Which makes sense when a particular distro is your core market.

If you need to download 1 GB worth of dependencies for your software if it's properly packaged using the native package manager, then your ZIP file is going to be at least that big as well. There is no shortcut.

Because the OP's package depends on XX, which wasn't installed, apt installs the latest version 1.2.1-svn1 (instead of 1.2.1-svn0; the packages were recently updated) it triggers a domino-effect of dependencies to update almost everything to the latest version. If you're unlucky, it triggers the kernel, X11 and/or Mesa to update too. And after reboot you have to fix the side-effects.
You can give me a lecture of how I should keep everything up to date to fix the latest vulnerabilities and other reasons. And you will be right.

But it doesn't change the fact that I just wanted to get work done with the OP's product, and now have to download 1 GB of updates, potentially break my system's boot (or another tool); and all of this would've been avoided if I'd installed the OP's software one week ago before the package 1.2.1-svn1 went live (forcing me to update everything).
From a Desktop user's perspective, this is user hostile.

Unzipping the program shows the software still works. May be I needed to paste the SO files of XX 1.2.1 I got somewhere else (or was just included with the zip). Or may be the program works fine except for the functionality that was provided by XX.

I'm an avid Linux user. But this is what I like from Windows. I can grab an installer written in 2003 for Windows XP and still works in 7.
I can't say the same for most deb packages from just 3 years ago.

Well, in short; I still advise the .deb package because when it works, it rocks. Despite the drawbacks, it will solve your problems for the ~80% of your user base. But this doesn't replace the Zip, which can be useful for that other 20%.
Many of us go for the .deb first. If that doesn't work, retry with the zip.
And if for some reason you go out of business (hope you don't!) your deb packages will break eventually (same can be said on Windows though, I can't expect much from an installer or its software written for Windows 98 to work on Windows 7 x64...). But Zips have a longer lifespan (specially if you bundle them with all necessary SO files).


It's not the software that breaks on an up-to-date system, it's the installer package that thinks it does. If the software is manually unpacked and executed, it runs perfectly fine. That's what I'm talking about.

Don't forget that Ubuntu has the annoying custom of removing anything it thinks is outdated when updating to a newer version, even if there isn't any replacement for it, without giving you the choice to avoid it. That's how I ended up with Wings 3D being uninstalled -_-' If Ubuntu decides that some package you need is outdated, expect old programs to break even if manually unpacking them would have worked normally.

Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

This topic is closed to new replies.

Advertisement