Bug 224291 - Move script-templates from sysconfdir to datadir
Move script-templates from sysconfdir to datadir
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Install/Uninstall (Show other bugs)
1.0.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 152373 240316 FDS1.1.0
  Show dependency treegraph
 
Reported: 2007-01-24 22:23 EST by Rich Megginson
Modified: 2015-12-07 11:43 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 11:43:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
diffs (1.74 KB, patch)
2007-01-24 22:23 EST, Rich Megginson
no flags Details | Diff
new diffs (3.59 KB, patch)
2007-01-24 22:29 EST, Rich Megginson
no flags Details | Diff
cvs commit log (880 bytes, text/plain)
2007-01-25 11:49 EST, Rich Megginson
no flags Details

  None (edit)
Description Rich Megginson 2007-01-24 22:23:39 EST
The script-templates are really just data, so they should go under
%{datadir}/fedora-ds
Comment 1 Rich Megginson 2007-01-24 22:23:40 EST
Created attachment 146493 [details]
diffs
Comment 2 Rich Megginson 2007-01-24 22:29:19 EST
Created attachment 146494 [details]
new diffs
Comment 3 Dennis Gilmore 2007-01-24 23:20:49 EST
looks sane to me
Comment 4 Nathan Kinder 2007-01-25 11:30:38 EST
Looks good.
Comment 5 Rich Megginson 2007-01-25 11:49:00 EST
Created attachment 146578 [details]
cvs commit log

Reviewed by: nkinder, dennis (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: Just change sysconfdir to datadir in both the Makefile.am
(which controls where the files are put during installation) and in
create_instance.c (which controls where instance creation looks for the
templates to use them to create the real scripts).
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Comment 6 Noriko Hosoi 2007-01-25 12:18:08 EST
Thank you, Rich, for fixing the template file location.
Now, how about the spec file fedora-ds.spec?
1) removing these 2 lines
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/script-templates
$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
2) and adding the template files to the %files section?
%{_datadir}/%{name}/template-*

I'm using the spec file fedora-ds/RHEL-4/fedora-ds.spec checked in in the CVS
:gserver:cvs.devel.redhat.com:/cvs/dist for the nightly build.
Comment 7 Rich Megginson 2007-01-25 12:26:25 EST
(In reply to comment #6)
> Thank you, Rich, for fixing the template file location.
> Now, how about the spec file fedora-ds.spec?
> 1) removing these 2 lines
> mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
> mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/script-templates
> $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
> 2) and adding the template files to the %files section?
> %{_datadir}/%{name}/template-*
> 
> I'm using the spec file fedora-ds/RHEL-4/fedora-ds.spec checked in in the CVS
> :gserver:cvs.devel.redhat.com:/cvs/dist for the nightly build.

Sure.  I'm doing a test build right now to make sure it works, once that's done
I'll commit it.

Comment 8 Noriko Hosoi 2007-01-25 18:52:56 EST
I'm trying to start the server installed from the rpm built with the
fedora-ds.spec you checked in.  Now, the script template files are in
/usr/share/fedora-ds/script-templates. (Thanks!)  Next, the server fails to
start since the libraries (plugins and 4 libraries in /usr/lib/fedora-ds) do not
have its symlink <libname>.so pointing to <libname>.so.0.0.0 (note: there is
<libname>.so.0 pointing to <libname>.so.0.0.0)

        Fedora-Directory/1.1 B2007.025.2240
        <host>:<port> (/dev/shm/DS7.2-4024/server/slapd-laputa)

[25/Jan/2007:15:27:07 -0800] - Netscape Portable Runtime error -5977:
//usr/lib/fedora-ds/plugins/libpwdstorage-plugin.so: cannot open shared object
file: No such file or directory
[25/Jan/2007:15:27:07 -0800] - Could not open library
"//usr/lib/fedora-ds/plugins/libpwdstorage-plugin.so" for plugin SSHA
[25/Jan/2007:15:27:07 -0800] - The plugin entry [cn=SSHA,cn=Password Storage
Schemes,cn=plugins,cn=config] in the configfile
/dev/shm/DS7.2-4024/server/slapd-laputa/dse.ldif was invalid
[25/Jan/2007:15:27:07 -0800] startup - The configuration files in directory
/dev/shm/DS7.2-4024/server/slapd-laputa could not be read or were not found. 
Please refer to the error log or output for more information.

I noticed that the *.so files are in fedora-ds-devel...  That is, to start the
server, fedora-ds-devel must be installed, as well?  That sounds a little odd to
me...  Is that how you run/test the DS7.2?

    $ rpm -ql fedora-ds-devel
    /usr/lib/fedora-ds/libback-ldbm.so
    /usr/lib/fedora-ds/libds_admin.so
    /usr/lib/fedora-ds/libns-dshttpd.so
    /usr/lib/fedora-ds/libslapd.so
    /usr/lib/fedora-ds/plugins/libacl-plugin.so
    /usr/lib/fedora-ds/plugins/libattr-unique-plugin.so
    /usr/lib/fedora-ds/plugins/libchainingdb-plugin.so
    /usr/lib/fedora-ds/plugins/libcollation-plugin.so
    /usr/lib/fedora-ds/plugins/libcos-plugin.so
    /usr/lib/fedora-ds/plugins/libdes-plugin.so
    /usr/lib/fedora-ds/plugins/libdistrib-plugin.so
    /usr/lib/fedora-ds/plugins/libhttp-client-plugin.so
    /usr/lib/fedora-ds/plugins/libpam-passthru-plugin.so
    /usr/lib/fedora-ds/plugins/libpassthru-plugin.so
    /usr/lib/fedora-ds/plugins/libpresence-plugin.so
    /usr/lib/fedora-ds/plugins/libpwdstorage-plugin.so
    /usr/lib/fedora-ds/plugins/libreferint-plugin.so
    /usr/lib/fedora-ds/plugins/libreplication-plugin.so
    /usr/lib/fedora-ds/plugins/libretrocl-plugin.so
    /usr/lib/fedora-ds/plugins/libroles-plugin.so
    /usr/lib/fedora-ds/plugins/libstatechange-plugin.so
    /usr/lib/fedora-ds/plugins/libsyntax-plugin.so
    /usr/lib/fedora-ds/plugins/libviews-plugin.so
    /usr/share/doc/fedora-ds-devel-1.1.0
    /usr/share/doc/fedora-ds-devel-1.1.0/EXCEPTION
    /usr/share/doc/fedora-ds-devel-1.1.0/LICENSE

Comment 9 Rich Megginson 2007-01-25 19:19:22 EST
Right.  The usual convention is that the -devel package has the libraries
libname.so which is a symlink to the 'real' lib libname.so.x.y.z, which is
supplied by the regular package.  What should happen is that at build time, you
link against the library libname.so, and the linker is supposed to magically
figure out that it can use libname.so or libname.so.x or libname.so.x.y or
libname.so.x.y.z to resolve that dependency at runtime.

The plugins are a special case though, because they are loaded directly by the
application via dlopen and not by the dynamic linker, so we should probably have
just a libname-plugin.so file in the fedora-ds package and remove them from the
-devel package.
Comment 10 Noriko Hosoi 2007-01-25 20:04:11 EST
It looks we also need ot have libback-ldbm.so in fedora-ds, since it's yet
another plugin...

        Fedora-Directory/1.1 B2007.026.034
        laputa:17353 (/dev/shm/DS7.2-5356/server/slapd-laputa)

[25/Jan/2007:16:55:04 -0800] - Netscape Portable Runtime error -5977:
//usr/lib/fedora-ds/libback-ldbm.so: cannot open shared object file: No such
file or directory
[25/Jan/2007:16:55:04 -0800] - Could not open library
"//usr/lib/fedora-ds/libback-ldbm.so" for plugin ldbm database
[25/Jan/2007:16:55:04 -0800] - Unable to load plugin "cn=ldbm
database,cn=plugins,cn=config"

$ rpm -ql fedora-ds | egrep libback-ldbm
/usr/lib/fedora-ds/libback-ldbm.so.0
/usr/lib/fedora-ds/libback-ldbm.so.0.0.0
Comment 11 Rich Megginson 2007-01-25 20:19:14 EST
Ok.  I just moved all of the .so files into the base package.
Comment 12 Nathan Kinder 2007-01-26 11:42:58 EST
Do we even want to have versioned libraries?  They are all currently version
"0.0.0".  Versioned libraries only seem useful for libraries that one would need
to link to when writing a plugin.

We can tell libtool to not create the versioned libraries by adding the
"-avoid-version" option to LDFLAGS.
Comment 13 Rich Megginson 2007-01-26 11:49:46 EST
(In reply to comment #12)
> We can tell libtool to not create the versioned libraries by adding the
> "-avoid-version" option to LDFLAGS.

Ok.  That's a good idea for the plug-ins, or anything loaded via dlopen().

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