summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4330a21)
raw | patch | inline | side by side (parent: 4330a21)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 10 Oct 2008 13:07:05 +0000 (15:07 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 3 Nov 2008 12:56:43 +0000 (13:56 +0100) |
The FHS specifies that /usr/share should be used to store architecture
independent data while /usr/lib includes object files, libraries and
architecture dependent data.
independent data while /usr/lib includes object files, libraries and
architecture dependent data.
diff --git a/contrib/exec-munin.px b/contrib/exec-munin.px
index 223a8a5ecf9c84e811a427751abe69ed4ca89b06..9163730c6e8c61041b288a9e538f4c8956948dbe 100755 (executable)
--- a/contrib/exec-munin.px
+++ b/contrib/exec-munin.px
can use a hyphen to add a "type instance" to the type.
For a list of already defined "types" look at the F<types.db> file in
-collectd's library path, e.E<nbsp>g. F</usr/lib/collectd/>.
+collectd's shared data directory, e.E<nbsp>g. F</usr/share/collectd/>.
=item B<Interval> I<Seconds>
index 89ce1237499395aaad888badce63528810ebf103..35eb8bec1eb61e1d74bd63f9cfa326cd0d3e15b6 100644 (file)
%attr(0644,root,root) %{_libdir}/%{name}/wireless.so*
%attr(0644,root,root) %{_libdir}/%{name}/wireless.la
-%attr(0644,root,root) %{_libdir}/%{name}/types.db
+%attr(0644,root,root) %{_datadir}/%{name}/types.db
%dir /var/lib/collectd
index 7a026fac0cfd6484a74145ed52f83fe0b8935a09..0aaaee317bcfb71c7689e4181fe1e873fe33cc2c 100644 (file)
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/lib/collectd"
-TypesDB "/usr/lib/collectd/types.db"
+TypesDB "/usr/share/collectd/types.db"
Interval 10
ReadThreads 5
index bce76473382112f2f32714ef593dd00fee7624b3..62acc184acf7c31c4cf368d00187b55c62afd69c 100644 (file)
sed -i 's:#BaseDir "/usr/var/lib/collectd":BaseDir "/var/lib/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#PIDFile "/usr/var/run/collectd.pid":PIDFile "/var/run/collectd.pid":' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#PluginDir "/usr/lib/collectd":PluginDir "/usr/lib/collectd":' $RPM_BUILD_ROOT/etc/collectd.conf
-sed -i 's:#TypesDB "/usr/lib/collectd/types.db":TypesDB "/usr/lib/collectd/types.db":' $RPM_BUILD_ROOT/etc/collectd.conf
+sed -i 's:#TypesDB "/usr/share/collectd/types.db":TypesDB "/usr/share/collectd/types.db":' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#Interval 10:Interval 10:' $RPM_BUILD_ROOT/etc/collectd.conf
sed -i 's:#ReadThreads 5:ReadThreads 5:' $RPM_BUILD_ROOT/etc/collectd.conf
##Move config contribs
%attr(0644,root,root) %{_libdir}/%{name}/wireless.so*
%attr(0644,root,root) %{_libdir}/%{name}/wireless.la
-%attr(0644,root,root) %{_libdir}/%{name}/types.db
+%attr(0644,root,root) %{_datadir}/%{name}/types.db
%exclude %{_libdir}/perl5/5.8.8/%{_arch}-linux-thread-multi/perllocal.pod
%attr(0644,root,root) %{_libdir}/perl5/site_perl/5.8.8/Collectd.pm
diff --git a/src/Makefile.am b/src/Makefile.am
index cd50eea1d3adf4c66ff2b42f1e17239cf44dcda7..87401983e22208918367d38a785145831f0f1632 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
else \
$(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
fi; \
- cp -f $(srcdir)/types.db $(DESTDIR)$(pkglibdir)/;
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+ $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
$(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
$(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index 28004afa6f049fe9bd1d9beb0db7bdf1e227376e..cdbef5a19dec66b3ac6e6f50bd54737862c95455 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
#BaseDir "@prefix@/var/lib/@PACKAGE_NAME@"
#PIDFile "@prefix@/var/run/@PACKAGE_NAME@.pid"
#PluginDir "@prefix@/lib/@PACKAGE_NAME@"
-#TypesDB "@prefix@/lib/@PACKAGE_NAME@/types.db"
+#TypesDB "@prefix@/share/@PACKAGE_NAME@/types.db"
#Interval 10
#ReadThreads 5
diff --git a/src/configfile.c b/src/configfile.c
index 9609086feca391d0e6c097c03eeef3e7207a5b74..ca0cafeb70d8a146365a36100bc9b03f2bbcd8d4 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
/* Read the default types.db if no `TypesDB' option was given. */
if (cf_default_typesdb)
- read_types_list (PLUGINDIR"/types.db");
+ read_types_list (PKGDATADIR"/types.db");
return (0);
} /* int cf_read */
diff --git a/src/types.db.pod b/src/types.db.pod
index f0a49f6b96e52e09b8b229ebd40922d96ad7afd7..11c7f794c248568306d97ed5b5931c834089aff4 100644 (file)
--- a/src/types.db.pod
+++ b/src/types.db.pod
=head1 FILES
The location of the types.db file is defined by the B<TypesDB> configuration
-option (see L<collectd.conf(5)>). If you want to specify custom data-sets, you
-should do so by using a custom file specified as an additional argument to the
-B<TypesDB> option.
+option (see L<collectd.conf(5)>). It defaults to collectd's shared data
+directory, i.E<nbsp>e. F<I<prefix>/share/collectd/>. If you want to specify
+custom data-sets, you should do so by using a custom file specified as an
+additional argument to the B<TypesDB> option.
=head1 SEE ALSO