Bug 29105 - Wrong information in libtomcrypt.pc file
Summary: Wrong information in libtomcrypt.pc file
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-11 16:11 CEST by Philippe Makowski
Modified: 2021-06-12 10:44 CEST (History)
2 users (show)

See Also:
Source RPM: libtomcrypt-1.18.2-4.mga8.src.rpm,firebird-3.0.7.33374-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Philippe Makowski 2021-06-11 16:11:48 CEST
Description of problem:
Firebird build don't find tomcrypt.h.
In fact /usr/lib64/pkgconfig/libtomcrypt.pc is wrong:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: LibTomCrypt
Description: public domain open source cryptographic toolkit
Version: 1.18.2
Libs: -L${libdir} -ltomcrypt
Cflags: -I${includedir}

it should be :

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include//tomcrypt

Name: LibTomCrypt
Description: public domain open source cryptographic toolkit
Version: 1.18.2
Libs: -L${libdir} -ltomcrypt
Cflags: -I${includedir}
Comment 1 Philippe Makowski 2021-06-11 16:15:47 CEST
Another solution should be to do like Fedora and put headers under
/usr/include/ not /usr/include/tomcrypt
Comment 2 Philippe Makowski 2021-06-11 16:25:01 CEST
may be add in the spec after %make_install:

# Fix pkgconfig path
sed -i \
    -e 's|^prefix=.*|prefix=%{_prefix}|g' \
    -e 's|^libdir=.*|libdir=${prefix}/%{_lib}|g' \
    -e 's|^includedir=.*|includedir=%{_prefix}/include/tomcrypt|g' \
    %{buildroot}%{_libdir}/pkgconfig/%{name}.pc

or do :

%make_install INSTALL_OPTS="-m 0755" INCPATH=%{_includedir} LIBPATH=%{_libdir} -f makefile.shared
# Fix pkgconfig path
sed -i \
    -e 's|^prefix=.*|prefix=%{_prefix}|g' \
    -e 's|^libdir=.*|libdir=${prefix}/%{_lib}|g' \
    %{buildroot}%{_libdir}/pkgconfig/%{name}.pc

find %{buildroot} -name "*.la" -delete
find %{buildroot} -name '*.a' -delete

%files -n %{libname}
%doc LICENSE
%{_libdir}/lib*.so.%{major}{,.*}

%files -n %{libname_devel}
%doc doc/crypt.pdf
%{_includedir}/*.h
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
Comment 3 Lewis Smith 2021-06-11 21:28:50 CEST
Thanks for the report & all the information.
I am unsure whether that relates to 'libtomcrypt' or 'firebird'. You look after the latter, so I assume the former. That is officially with danf (still around, so CC'ing him); but is committed by different people, so assigning the bug globally.

CC: (none) => dan
Summary: Wrong information in pc file => Wrong information in libtomcrypt.pc file
Source RPM: libtomcrypt-1.18.2-4.mga8.src.rpm => libtomcrypt-1.18.2-4.mga8.src.rpm,firebird-3.0.7.33374-1.mga8.src.rpm
Assignee: bugsquad => pkg-bugs

Comment 4 Jani Välimaa 2021-06-12 10:44:31 CEST
Fixed in libtomcrypt-1.18.2-5.mga9.

Moved headers to /usr/include and fixed paths in pkgconf .pc file.

Resolution: (none) => FIXED
CC: (none) => jani.valimaa
Status: NEW => RESOLVED


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