Recommended software for configuring a program with many dependencies
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
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?
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
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?)
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 ]
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.