Hi, did you talk to Kern about modifying Bacula so that it builds these libraries into different names and dynamically loads the correct one? This would allow the user to actually have the DB backend as a configuration option. This could be as primitive as putting the various libraries into different subdirs of _libdir/bacula and adding the correct dir to LD_LIBRARY_PATH of the start script. IMHO any solution you make here should go upstream... An alternative is the use of update-alternatives as mentioned already in this thread. Any "hacking solution" as part of the RPMs or SPEC files is likely to produce much more management overhead for you as the maintainer. You could for example build different subpackages that exclude each other. But then the user would be confronted at installation time to choose the correct database, not so intuitive to the average user as a configuration option. Bottom line is, either Bacula solves this problem or you will have a lot of pain maintaining the RPMs. BTW, are you the author of the RPMs on http://www.bacula.org/en/?page=downloads? If not, maybe you look at the src.rpm that can be found there and how it builds the different DB backend RPMs... And of course you might merge your work back into the "official" Bacula SPEC file... Regards, Schlomo Dave Plater wrote:
On 12/20/2009 01:03 PM, Richard Bos wrote:
Op zondag 20 december 2009 06:20:24 schreef Dave Plater:
Unfortunately rpm doesn't support normal commands like cp in the %files section because that would solve my problem.
You should use the cp (%__cp) command in the make section of the specfile. In case you want to install the files in directory, create the directory (%__install -d -m 755 ....) and move (%__mv) the files to the directory. Once you have done this, you can list them in the files section of the rpm
An idea I've just had is to place them in a different directory and use the %pre section to copy them across to %{_libdir}.
That's not the right way to do it!
I think that the problem is misunderstood, bacula builds with either mysql, postgresql or sqlite support and the built libraries all have the same names but support the three different databases. So at the end of the %build process I have three sets of libraries to be installed in _libdir for bacula-mysql, bacula-postgresql and bacula-sqlite rpms and the last ones to be installed will overwrite the others. If there isn't a way to get osc to build with three different spec files then short of installing them in _libdir/bacula-mysql/, _libdir/bacula-posgresql/ and _libdir/bacula-sqlite/ and then moving them to _libdir in the %pre or %post section of the three different rpms then they have to be built in three different project packages. I once saw a package in build service with two spec files but I can't remember which one it was and whether more than one was used in the package build. Regards Dave P
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org