Bug 24037 - Poor coding practices result in broken software
Summary: Poor coding practices result in broken software
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat High Availability Server
Classification: Retired
Component: piranha
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: Phil Copeland
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-15 17:26 UTC by Paul Lussier
Modified: 2007-04-18 16:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-01-15 17:49:47 UTC
Embargoed:


Attachments (Terms of Use)

Description Paul Lussier 2001-01-15 17:26:31 UTC
Various components of the piranha package have the path to the ipvsadm
command *hardcoded* into the lvsconfig.c and nanny.c files as
/usr/sbin/ipvadm.

Hard coding paths in the source is a very poor coding practice, and results
in broken configurations when the target is not located in the specified
path.

A better alternative would be to make this a configuration option at least
in the the make file so the person installing the software from source can
specify where things really exist on their systems.

The ultimately and most desirable thing would be to use the GNU
Autoconf/Automake tools so someone installing from source can easily
specify on the command line where things exist.  For example, one should be
able to do something like:

	./configure --prefix=/usr/local

so they could install the pirahna package down the /usr/local hierarchy.

Additionally, by using the Autoconf/Automake tools, you could simply
specify a macro rule telling configure that you wanted to simply locate
certain required software like ipvsadm within a configure.in file:

	AC_PATH_PROGS(IPVSADM, ipvsadm)

Then, if ipvsadm were installed someplace else than where RH normally
expects it, configure would find it, and if it didn't, building would fail.
That way, you the software maintainer can dictate dependancies, while the
installer can dictate preferences.

At the very least though, this should be a Makefile option so the installer
of the software can easily change the location of where to look for certain
software.


Note You need to log in before you can comment on or make changes to this bug.