How do software distribution and package management work?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do software distribution and package management work?
Hi,
So I've fiddled with several Linux distros but never really understood deeply what is going on with Linux.
Case in point, I don't really know what search terms to use, so I'm here.
I have been given the task of taking some scripts and source code and turning it into an installation package that can be put on various variants (like CentOS, Suse, and in the future, whatever a Cray XE6 runs).
So.... how do apps work in linux? I read that rpm files will tend to include binary code, which will only work with a specific linux build. (Is it a specific kernel precisely?)
When I try to put my program on a new linux system, will I need to check dependencies and recompile the program using whatever files are on the system? Can I include my own dependencies, and will they have to be compiled on that particular linux system as well?
Really, I could do with a term to describe what I'm trying to understand, maybe then I could find a guide on the subject. So many guides out there just try to get the user into a GUI or show the user around the shell window...
I read that rpm files will tend to include binary code, which will only work with a specific linux build. (Is it a specific kernel precisely?)
A program's dependencies could be any other program or package. But programs that are dependent on a specific kernel are rare.
Quote:
Originally Posted by oldneb
1. When I try to put my program on a new linux system, will I need to check dependencies and recompile the program using whatever files are on the system?
2. Can I include my own dependencies,
3. will they have to be compiled on that particular linux system as well?
1. yes
2. yes, provided they don't already exist on the target system. If they already exist on the target system you can destroy the system by changing packages to versions that are incompatible with the pre-existing packages.
3. yes
Quote:
Originally Posted by oldneb
Really, I could do with a term to describe what I'm trying to understand, maybe then I could find a guide on the subject. So many guides out there just try to get the user into a GUI or show the user around the shell window...
The best way to control your dependency problems is to compile several versions of your package against current Linux distributions. Then you can offer binary packages which are compatible with the current versions of slackware, debian, fedora, etc. You also have some leeway with this approach. Most packages are not in constant flux. So if your package was dependent on 6 packages created by other programmers you would only have to consider changing your binary packages whenever one of the six dependencies made a change which was incompatible with your package. For example if you need compatibility with gorilla-killer 5.03 and gorilla-killer goes through 4 minor changes which have no effect on your program you could set your dependency to gorilla-killer 5.03 or higher.
Thank you rokytnji, that search term got me some useful pages.
Jailbait, is there some resource or search term that would teach me about the whys of all of this dependency stuff? I want to learn the why's of linux.
For item 2, couldn't I include my own dependencies (are they usually just libraries?) in my package but not overwrite the system dependencies? Or would that defeat the purpose of making my application run on any particular distro?
For item 2, couldn't I include my own dependencies (are they usually just libraries?) in my package but not overwrite the system dependencies?
Dependencies are usually just libraries. If other programs are dependent on installed libraries and you substitute your own version of the libraries you will probably screw up the system.
What jailbait said...
This is why if you download a 'tgz' pkg, you usually have to run make etc and you can (should) supply an install base dir, so that the new libs etc don't overwrite the already installed ones.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.