LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-16-2014, 04:59 PM   #1
oldneb
LQ Newbie
 
Registered: Jun 2014
Posts: 4

Rep: Reputation: Disabled
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!
 
Old 06-16-2014, 07:01 PM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,121
Blog Entries: 21

Rep: Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476Reputation: 3476
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.
 
Old 06-16-2014, 08:11 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by oldneb View Post
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 View Post
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 View Post

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

Last edited by jailbait; 06-16-2014 at 08:17 PM.
 
Old 06-17-2014, 09:47 AM   #4
oldneb
LQ Newbie
 
Registered: Jun 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 06-17-2014, 10:06 AM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by oldneb View Post
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
 
Old 06-18-2014, 05:49 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Distribution and Management Tool (mcrsft clients) karnac01 General 2 09-06-2010 05:33 PM
New V9 Package Kit Software Management wombat53 Fedora 1 11-05-2008 09:16 AM
LXer: Linux 101: Efficient software management with the Advanced Package Tool in Debian LXer Syndicated Linux News 0 08-13-2006 06:54 PM
Which Software package management? godders48 Linux - Software 1 10-05-2003 06:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration