eudev-project / eudev

Repository for eudev development
GNU General Public License v2.0
523 stars 147 forks source link

udevhwdbdir #144

Closed udeved closed 11 months ago

udeved commented 7 years ago

Hi,

I found some little shortcoming with udevhwdbdir.

It is currently tied to sysconfdir, ie I can only make it install in /etc/udev/hwdb.d

However, it would be really nice to configure udevhwdbdir independently of sysconfdir, so it can be installed to /usr/lib/udev/hwdb.d, so perhaps make udevhwdbdir depends on udevlibexecdir instead of sysconfdir?

udeved commented 7 years ago

This patch ...

 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 480d22a4e..da27f15b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,13 +173,13 @@ AC_SUBST([udevlibexecdir], [${rootlibexecdir}])
 # sysconfdir paths
 AC_SUBST([udevconfdir],[${sysconfdir}/udev])
 AC_SUBST([udevconffile],[${udevconfdir}/udev.conf])
-AC_SUBST([udevhwdbdir],[${udevconfdir}/hwdb.d])
-AC_SUBST([udevhwdbbin],[${udevconfdir}/hwdb.bin])

 # udevlibexecdir paths
 AC_SUBST([udevkeymapdir],[${udevlibexecdir}/keymaps])
 AC_SUBST([udevkeymapforceredir],[${udevkeymapdir}/force-release])
 AC_SUBST([udevrulesdir],[${udevlibexecdir}/rules.d])
+AC_SUBST([udevhwdbdir],[${udevlibexecdir}/hwdb.d])
+AC_SUBST([udevhwdbbin],[${udevlibexecdir}/hwdb.bin])

 # pkgconfigdir paths
 AC_SUBST([pkgconfiglibdir], [${libdir}/pkgconfig])

produces ...

        prefix:                  /usr
        exec_prefix:             ${prefix}
        sysconfdir:              /etc
        datadir:                 ${datarootdir}
        includedir:              ${prefix}/include
        libdir:                  /usr/lib

        rootprefix:              /usr
        rootlibdir:              /usr/lib
        rootlibexecdir:          /usr/lib/udev
        datarootdir:             ${prefix}/share
        rootrundir:              /run

        udevconfdir:             /etc/udev
        udevconffile:            /etc/udev/udev.conf
        udevhwdbdir:             /usr/lib/udev/hwdb.d
        udevhwdbbin:             /usr/lib/udev/hwdb.bin
        udevlibexecdir:          /usr/lib/udev
        udevkeymapdir:           /usr/lib/udev/keymaps
        udevkeymapforceredir:    /usr/lib/udev/keymaps/force-release
        udevrulesdir:            /usr/lib/udev/rules.d

        pkgconfiglibdir:         /usr/lib/pkgconfig
        sharepkgconfigdir        ${datarootdir}/pkgconfig

        girdir                   ${datarootdir}/gir-1.0
        typelibsdir              /usr/lib/girepository-1.0

I am not sure its best way, but if you want, I can send PR.

https://github.com/systemd/systemd/blob/master/Makefile.am#L93

Reason is, I need compatibility with systemd, ie packages that provide hwdb in /usr/lib/udev/hwdb.d on arch based linux.

blueness commented 7 years ago

I'll test this out in about 1 week. Sorry for the delays, but exams are heavy this year ;)

udeved commented 7 years ago

No worries, I patched the build in the meantime and it seems to work well.

I wish success for the exams.

rworkman commented 6 years ago

Related to #127

concatime commented 3 years ago

Up @blueness https://github.com/gentoo/eudev/pull/127#issuecomment-167581064.

bbonev commented 11 months ago

I think PR #262 , #263 and #264 have addressed that, closing