LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do software distribution and package management work? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-software-distribution-and-package-management-work-4175508199/)

oldneb 06-16-2014 04:59 PM

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...

Thanks!

rokytnji 06-16-2014 07:01 PM

Search term

"How to build a portable application" for

Quote:

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
I don't envy you if you are struggling already. Because I am a just a Linux using Biker.

Even I have built my own pianobar application from source when I needed to when pandora broke it.
But I tune motorcycles for a living though.

jailbait 06-16-2014 08:11 PM

Quote:

Originally Posted by oldneb (Post 5189022)
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 (Post 5189022)
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 (Post 5189022)

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.

-----------------------------
Steve Stites

oldneb 06-17-2014 09:47 AM

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?

Thanks,
Ben

jailbait 06-17-2014 10:06 AM

Quote:

Originally Posted by oldneb (Post 5189330)
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.

------------------------
Steve Stites

chrism01 06-18-2014 05:49 AM

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.

As above, try googling 'portable ...' eg http://www.linuxfoundation.org/colla...r-app-portable


All times are GMT -5. The time now is 02:24 PM.