How to Make Easy-to-Package Linux Software 52
jmmv writes "The packages in any Linux distribution (or other operating systems) are a master piece to let the user install any program he wishes as painlessly as possible. However, the creation of these packages is not always free of problems. Usually, the packager finds that the program he wants to package suffers from a series of pitfalls - either conceptual or related to portability - that make the packaging task harder than usual. This is why I decided to write an article (published at ONLamp.com) summarizing these problems and proposing several solutions to each of them, aiming to make the life of the packager simpler. I hope it to be of interest to free software developers and also hope that they understand some of the issues and try to fix them in their creations."
Avoid modifying published distfiles. (Score:3, Insightful)
Oh heck yes. The number of times I've been bitten by a few projects (yes mplayer guys, I mean you) doing this and breaking Gentoo's digest system...
Re:Avoid modifying published distfiles. (Score:2)
Oh heck yes. The number of times I've been bitten by a few projects (yes mplayer guys, I mean you) doing this and breaking Gentoo's digest system...
Why would the Mplayer project folks be to blaim? Wouldn't the blaim be properly focused on Gentoo, as they modified (?) the core distribution for use with Gentoo?
Re:Avoid modifying published distfiles. (Score:4, Informative)
I think what OP meant was that Mplayer released a tarball, then found some bug in it and released a second one with the bug fixed but the same filename. Any MD5 hash of the first one will fail on the second one. Gentoo uses a MD5 hash to verify that the file is the right one.
Re:Avoid modifying published distfiles. (Score:2)
How to properly package for linux (Score:5, Informative)
Re:How to properly package for linux (Score:3, Interesting)
Re:How to properly package for linux (Score:2)
Re:How to properly package for linux (Score:2)
Re:How to properly package for linux (Score:5, Insightful)
I use Gentoo and Vidalinux by the way. The portage system is pretty good and dependancy issues are pretty much a thing of the past although annoyingly i still have problems. Im lucky enough to have a fairly beefy SMP computer so most of the time i dont have to wait too long for compiles.
Having said all that Autopackage is the best thing ive seen as an installation method yet. Have you actually tried to use it yet ?
Make sure you read the instructions first. You dont even need to go anywhere near a shell prompt!
4 steps to installing an autopackage... [autopackage.org]
Well, here's an explanation (Score:2, Insightful)
Re:Well, here's an explanation (Score:2)
Criticism: +5. Solutions: -1. (Score:2)
Re:How to properly package for linux (Score:2, Insightful)
Woo! Apt!
Oh, you where talking ab... Oh...
Huh...
Re:How to properly package for linux (Score:2)
Re:How to properly package for linux (Score:1, Interesting)
Oh, wait...
Re:How to properly package for linux (Score:2)
At that point, any sane package management system would work beautifully.
Re:How to properly package for linux (Score:4, Insightful)
Re:How to properly package for linux (Score:3, Interesting)
Re:How to properly package for linux (Score:2)
Re:How to properly package for linux (Score:2)
Re:How to properly package for linux (Score:1)
Re:How to properly package for linux (Score:2)
There Should Be a Self-Installing Binary (Score:2)
There should be a self-installing binary.
Wow, it's so simple and so obvious.
Re:There Should Be a Self-Installing Binary (Score:2)
Re:There Should Be a Self-Installing Binary (Score:3, Interesting)
Is it simple or obvious?
64-bit? 32-bit? With debugging symbols? Without debugging symbols? Statically-linked? Dynamically linked? Which level of optimization? Which kernel? Which compiler? Which glibc? Which processor family? Which instruction set within a processor family? What options have I missed?
How big is this one self-installing binary you want someone else to create for you?
Re:There Should Be a Self-Installing Binary (Score:1, Interesting)
Re:There Should Be a Self-Installing Binary (Score:3, Insightful)
Wonderful idea! I'm sure that'll make everything
Re:There Should Be a Self-Installing Binary (Score:1, Insightful)
Dynamically linked. Great. So now, when a new release of a library introduces a security bug, you automatically compromise all the programs that use that library.
Hey, it cuts both ways.
Re:There Should Be a Self-Installing Binary (Score:2, Insightful)
Re:There Should Be a Self-Installing Binary (Score:2, Funny)
That's too much like Windows. If software is hard to write, it should be hard to install.
Third solution to Automatic Decisions (Score:4, Interesting)
The article is missing a third solution to the Automatic Decisions solutions: gracefully handle at runtime the absence of a (soft) dependancy.
What I mean is automatically enable all options which are available at build time, but don't hard link to them (use dlopen(3) or somesuch instead), so the same binary package would work in the presence or absence of such dependancies.
Of course, without the runtime dependancies, some options won't be available, but it's better to do it that way than to force everybody to download libfoo and libbar to satisfy an optional dependancy, or to arbitrarily disable some options (which will only be available to people building from source, not those using a package. You want your software to be useful, right?).
Re:Third solution to Automatic Decisions (Score:1, Interesting)
The Amiga allowed you to dynamically load libraries, yet when you were coding, late bound
Re:Third solution to Automatic Decisions (Score:3, Informative)
Re:Third solution to Automatic Decisions (Score:4, Informative)
Simple... (Score:4, Interesting)
Next, there's distro-based package systems like apt and portage. These work very well, as dependency control is automatic, and it is made to work with your distro specifically.
The third option, which is used by (I think, but am not sure) Loki Installer, and such programs, is to install the binaries, but leave you on your own to deal with dependencies. As long as you make sure the dependencies are easy to obtain, this is one of the best options for those without apt or a similar system. You could even, with GPL software, create your own installer for any dependancies, should you choose.
Why not Autopackage? Because it seems like a format that is, at best, a poor substitute for a package system like apt. The simplest solution, considering how much disk space is available on modern machines, is the folder concept like OS X. Very simple, and incredibly easy to remove programs.
Re:Simple... (Score:1)
Re:Simple... (Score:2)
This definately is a shortcomming in linux distros (Score:5, Insightful)
Re:This definately is a shortcomming in linux dist (Score:1)
Re:This definately is a shortcomming in linux dist (Score:2)
Compiling? Who's talking about compiling?
Oh... it's Linux. You HAVE to compile. -.-
Makefiles (Score:2)
I frequently need to package software up for distribution, and have seem bith increadibly easy and next to impossable.
Please please please do NOT make the build system more complex than the app being installed! Inside every 200 line monument to bogosity is a 10 line makefile trying to get out. I'm not kidding. I realise there are a few cases where it's justifiable, but those are a lot less common than people seem to think. When it's easier for a package maintainer to throw the makefiles away and copy in a