LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-04-2006, 08:30 PM   #1
some_cs_student
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Rep: Reputation: 0
Post Recommended software for configuring a program with many dependencies


Hi,

Apologies if this is the wrong section (please move to Software if I was wrong :P). This is not directly related to programming, it is however in-directly related.
I'm not even sure if this is the correct place to ask

I'm just making some enquiries about how to create some kind of script to check that the correct versions of certain programs are installed and configure a program.

I was thinking about a configure script but I'm unsure if that is the correct way to do things.

Its not a program that actually requires a makefile as such, its a bash script (or a set of them) and it relies on certain software:
http://karakas-online.de/mySGML/required-software.html

Another complication is that its not just having the software installed, it requires the correct versions of the software as well.

Once the correct software is installed it then must know where the configuration files of things are, in the case of docbook, where the "catalog" files are located and this also appears to be distribution specific.

I can think of one way to do this, create bash scripts that use rpm to check for versions, dump out lists of the files and try to locate the correct ones from using grep on those lists of files.

This may work but does not seem very smart, is there a standerdised way of doing this kind of configuration? Will a configure script work?

And if so a pointer to any tutorials?

Thankyou,
Gareth
 
Old 03-05-2006, 03:13 AM   #2
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
a simple method, run automake and autoconf on the project, they will create a configure.in script that you can edit to make sure it has the required software available.

so yes, configure scripts are the common used method of doing this.

an note, it is generally concidered bad to require specific versions of programs, newer versions should be acceptable to it, as they do maintain backwards compatability. With the speed of open source development being months between releases instead of years, you very quickly lose the opportunity to have your script used by new people, they will not have the correct version of required software.

the common check is for minimal version number:
checking for libjpeg >=1.6
 
Old 03-05-2006, 03:20 AM   #3
some_cs_student
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
hmm, well thats a start I could use automake and autoconf to try and help me...

In regard to the version numbers, some programs are ok if its above a certain version. And some require specific versions.

It is not the fault of Chris (author of the software), the problem is the fact that we are dealing with a complex tool chain.

Going from docbook SGML -> pdf/txt/html/rtf requires certain stylesheets and various programs to interact correctly.

So while ideally any version would be good the current aim is to get things working so its easier for people to install (ie. they don't have to do as much hand editing of a script to make things work).

Any more ideas besides autoconf and automake?

Also any idea how I can automate finding the correct files? (say i need to know where the TeX configuration files are and this is distro-dependent. Would you recommend bash scripting that uses RPM to get a list of files or something?)

Regards,
Gareth
 
Old 03-05-2006, 03:34 AM   #4
some_cs_student
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
Actually I've had a quick look at the pages. It might actually be simpler to script the entire thing using bash scripts.

As this program is a bash script it doesn't require to actually be made, it just needs some configuration which would probably be easier to script.

Last edited by some_cs_student; 03-05-2006 at 03:38 AM.
 
Old 03-05-2006, 04:01 AM   #5
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
the only problem with writing a script to use rpm to get information, not every distro has rpm, Debian and Debian based use dpkg, suse uses yast as does gentoo, lfs doesn't have a package manager... [ more distros not using rpm than are ]
 
Old 03-05-2006, 05:08 PM   #6
some_cs_student
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
As far as I know, yast has a RPM base, like urpmi in Mandriva. Gentoo and debian are different unfortunately.

Configuration scripts may work, but I see it as being messy with the requirements for this. As I'm not actually compiling anything in the end...

I might try a basic script and see if anyone is actually going to use it. If people say they want a debian version it shouldn't be too hard.

I'm not too sure about others...
 
Old 03-05-2006, 08:30 PM   #7
aluser
Member
 
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 43
The normal way to manage installing dependencies is with the distro's package format. The most convenient thing you can do for your users is supply an appropriate package for them; this might take a fair amount of work to keep current for every distro. It's an unfortunate aspect of the current state of linux.

autoconf will help in detecting what versions of different software a user has installed, but only their package manager has a smooth way to install it all.

If your software can set itself up differently depending on what versions of different things are installed, autoconf might be a good idea. If you can get it to do the same thing inexpensively at runtime, that might be even better.
 
Old 03-08-2006, 07:29 PM   #8
some_cs_student
LQ Newbie
 
Registered: Apr 2004
Posts: 14

Original Poster
Rep: Reputation: 0
Yes, I considered doing package files. But I'm not sure how I would install this.

Its just a shell script(s) that tie together a bunch of programs (effectively a toolchain for going from Docbook SGML to PDF/TXT/RTF/HTML at the touch of a button).

This is not a simple task in itself and getting everything working together correctly is complicated.

The first step is to check that say, lyx is installed in a basic configure script (this is a requirement).

I'm writing the configure script and am aiming to check that programs are installed, not take over the installation of the packages (I'm sure distro's handle docbook and html tidy installations etc).

So currently I'm looking into AAP http://a-a-p.org just trying to work out how things work...
 
  


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
Recommended Software and compatibility questions... vxd Linux - Software 7 02-26-2006 10:39 PM
Recommended Linux Security Software Hangetsu Linux - Security 4 11-21-2005 05:28 PM
Recommended websites for software search66 Linux - Newbie 5 02-23-2005 01:56 PM
Program Dependencies Problem DrakIE Linux - Newbie 7 04-05-2004 05:31 PM
Post your recommended software here! :) kazuni Linux - Software 18 06-08-2003 03:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:54 AM.

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