diff --git a/client/plugins.c b/client/plugins.c index d714015b..67bf128c 100644 --- a/client/plugins.c +++ b/client/plugins.c @@ -549,9 +549,8 @@ _TDNFLoadPluginLibs( } dwError = TDNFAllocateStringPrintf( &pszPlugin, - "%s/%s/lib%s.so", + "%s/lib%s.so", pszLibPath, - pPlugin->pszName, pPlugin->pszName); BAIL_ON_TDNF_ERROR(dwError); diff --git a/plugins/metalink/CMakeLists.txt b/plugins/metalink/CMakeLists.txt index a72078c6..3ee28e57 100644 --- a/plugins/metalink/CMakeLists.txt +++ b/plugins/metalink/CMakeLists.txt @@ -30,5 +30,5 @@ target_link_libraries(${PROJECT_NAME} ) set_target_properties(${PROJECT_NAME} PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/lib/${PROJECT_NAME}) + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/lib) install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/tdnf-plugins) diff --git a/plugins/metalink/utils.c b/plugins/metalink/utils.c index c0c74ca5..e89e3d4b 100644 --- a/plugins/metalink/utils.c +++ b/plugins/metalink/utils.c @@ -780,7 +780,9 @@ TDNFXmlParseData( BAIL_ON_TDNF_ERROR(dwError); } } - TDNFXmlParseData(ml_ctx, node->children, filename); + if (node->children) { + TDNFXmlParseData(ml_ctx, node->children, filename); + } node = node->next; } diff --git a/plugins/repogpgcheck/CMakeLists.txt b/plugins/repogpgcheck/CMakeLists.txt index ccf6d61b..c6e8a374 100644 --- a/plugins/repogpgcheck/CMakeLists.txt +++ b/plugins/repogpgcheck/CMakeLists.txt @@ -31,5 +31,5 @@ target_link_libraries(${PROJECT_NAME} ) set_target_properties(${PROJECT_NAME} PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/lib/${PROJECT_NAME}) + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/lib) install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/tdnf-plugins) diff --git a/tdnf.spec.in b/tdnf.spec.in index b50152b4..2e93d97b 100644 --- a/tdnf.spec.in +++ b/tdnf.spec.in @@ -116,7 +116,7 @@ mkdir build && cd build cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_INSTALL_LIBDIR:PATH=lib \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ -DSYSTEMD_DIR=%{_unitdir} \ .. @@ -130,15 +130,10 @@ cd build && make %{?_smp_mflags} check %install cd build && make DESTDIR=%{buildroot} install %{?_smp_mflags} find %{buildroot} -name '*.a' -delete -mkdir -p %{buildroot}/var/cache/tdnf %{buildroot}%{_unitdir} -ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/tyum -ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/yum -ln -sf %{_bindir}/tdnf %{buildroot}%{_bindir}/tdnfj -mv %{buildroot}%{_libdir}/pkgconfig/tdnfcli.pc %{buildroot}%{_libdir}/pkgconfig/tdnf-cli-libs.pc -mkdir -p %{buildroot}%{_tdnfpluginsdir}/tdnfmetalink -mkdir -p %{buildroot}%{_tdnfpluginsdir}/tdnfrepogpgcheck -mv %{buildroot}%{_tdnfpluginsdir}/libtdnfmetalink.so %{buildroot}%{_tdnfpluginsdir}/tdnfmetalink/ -mv %{buildroot}%{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %{buildroot}%{_tdnfpluginsdir}/tdnfrepogpgcheck/ +mkdir -p %{buildroot}/var/cache/%{name} %{buildroot}%{_unitdir} +ln -sfv %{name} %{buildroot}%{_bindir}/tyum +ln -sfv %{name} %{buildroot}%{_bindir}/yum +ln -sfv %{name} %{buildroot}%{_bindir}/tdnfj pushd python python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} @@ -235,13 +230,13 @@ systemctl try-restart tdnf-cache-updateinfo.timer >/dev/null 2>&1 || : %defattr(-,root,root) %dir %{_sysconfdir}/tdnf/pluginconf.d %config(noreplace) %{_sysconfdir}/tdnf/pluginconf.d/tdnfmetalink.conf -%{_tdnfpluginsdir}/tdnfmetalink/libtdnfmetalink.so +%{_tdnfpluginsdir}/libtdnfmetalink.so %files plugin-repogpgcheck %defattr(-,root,root) -%dir %{_sysconfdir}/tdnf/pluginconf.d -%config(noreplace) %{_sysconfdir}/tdnf/pluginconf.d/tdnfrepogpgcheck.conf -%{_tdnfpluginsdir}/tdnfrepogpgcheck/libtdnfrepogpgcheck.so +%dir %{_sysconfdir}/%{name}/pluginconf.d +%config(noreplace) %{_sysconfdir}/%{name}/pluginconf.d/tdnfrepogpgcheck.conf +%{_tdnfpluginsdir}/libtdnfrepogpgcheck.so %files python %defattr(-,root,root) diff --git a/tools/cli/lib/CMakeLists.txt b/tools/cli/lib/CMakeLists.txt index 070556ee..7f5e3ab4 100644 --- a/tools/cli/lib/CMakeLists.txt +++ b/tools/cli/lib/CMakeLists.txt @@ -8,8 +8,8 @@ # configure pkgconfig file configure_file( - tdnfcli.pc.in - tdnfcli.pc @ONLY + tdnf-cli-libs.pc.in + tdnf-cli-libs.pc @ONLY ) add_library(${LIB_TDNF_CLI} SHARED @@ -38,5 +38,5 @@ set_target_properties(${LIB_TDNF_CLI} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} ) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIB_TDNF_CLI}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tdnf-cli-libs.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(TARGETS ${LIB_TDNF_CLI} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library) diff --git a/tools/cli/lib/tdnfcli.pc.in b/tools/cli/lib/tdnf-cli-libs.pc.in similarity index 100% rename from tools/cli/lib/tdnfcli.pc.in rename to tools/cli/lib/tdnf-cli-libs.pc.in