Bug 1169684 - libnml pkg, from security:netfilter, installs headers in incorrect path, wrong info added to pkg-config
Summary: libnml pkg, from security:netfilter, installs headers in incorrect path, wron...
Status: RESOLVED DUPLICATE of bug 795968
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Security (show other bugs)
Version: Leap 15.2
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jan Engelhardt
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-16 16:21 UTC by Forgotten User 7645792743
Modified: 2020-04-16 23:11 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User 7645792743 2020-04-16 16:21:09 UTC
installing

	libmnl-1.0.4-lp151.43.1
	libmnl-devel-1.0.4-lp151.43.1.x86_64

from

	security:netfilter

installs in incorrect paths

	rpm -ql libmnl-devel
		/usr/include/libmnl
!!		/usr/include/libmnl/libmnl
!!		/usr/include/libmnl/libmnl/libmnl.h
		/usr/lib64/libmnl.so
		/usr/lib64/pkgconfig/libmnl.pc

and incorrectly reports the installed path in pkgconfig

	cat /usr/lib64/pkgconfig/libmnl.pc
		# libmnl pkg-config file

		prefix=/usr
		exec_prefix=/usr
		libdir=/usr/lib64
!!		includedir=/usr/include/libmnl

		Name: libmnl
		Description: Minimalistic Netlink communication library
		URL: http://netfilter.org/projects/libmnl/
		Version: 1.0.4
		Requires:
		Conflicts:
		Libs: -L${libdir} -lmnl
		Cflags: -I${includedir}

	pkg-config --libs --cflags libmnl
		-I/usr/include/libmnl -lmnl
Comment 2 Jan Engelhardt 2020-04-16 21:27:32 UTC
Intentional.

You need both `pkg-config libmnl --cflags` as well as `#include <libmnl/libmnl.h>` in any conforming project wishing to use libmnl.

*** This bug has been marked as a duplicate of bug 795968 ***
Comment 3 Forgotten User 7645792743 2020-04-16 22:06:33 UTC
'intended' ?

so the 'intention' is to diverge from upstream & standard installs?

from upstream, vanilla install

	cd /usr/local/src
	git clone git://git.netfilter.org/libmnl
	cd libmnl
	./autogen.sh
	./configure --prefix=/usr/local/libmnl-test
	make
	make install

	cd /usr/local/libmnl-test/
	tree .
		.
		├── [root            4096]  include
		│   └── [root            4096]  libmnl
		│       └── [root            8052]  libmnl.h
		└── [root            4096]  lib64
		    ├── [root             915]  libmnl.la
		    ├── [root              15]  libmnl.so -> libmnl.so.0.2.0
		    ├── [root              15]  libmnl.so.0 -> libmnl.so.0.2.0
		    ├── [root           30264]  libmnl.so.0.2.0
		    └── [root            4096]  pkgconfig
		        └── [root             332]  libmnl.pc

		4 directories, 6 files

installed, as expected, in

	$PREFIX/include/libmnl/libmnl.h

consistent with its .pc

	grep includedir lib64/pkgconfig/libmnl.pc
		includedir=${prefix}/include
		Cflags: -I${includedir}

NOT installed in

	$PREFIX/include/libmnl/libmnl/libmnl.h
	                ^^^^^^^^^^^^^

as packaged, and INconsistent with its

	grep includedir /usr/lib64/pkgconfig/libmnl.pc
		includedir=/usr/include/libmnl
		Cflags: -I${includedir}

as currently packaged, breaks upstream source builds of, e.g., 'unbound', which looks for libmnl.h in sane locations,

	...
	# Check whether --with-libmnl was given.
	if test "${with_libmnl+set}" = set; then :
	  withval=$with_libmnl;
	else
	   withval="yes"
	fi

	        found_libmnl="no"
	        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmnl" >&5
	$as_echo_n "checking for libmnl... " >&6; }
	        if test x_$withval = x_ -o x_$withval = x_yes; then
	            withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
	        fi
	        for dir in $withval ; do
	            if test -f "$dir/include/libmnl/libmnl.h"; then
	                found_libmnl="yes"
	                                if test "$dir" != "/usr"; then
	                    CPPFLAGS="$CPPFLAGS -I$dir/include"
	                    LDFLAGS="$LDFLAGS -L$dir/lib"
	                fi
	                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
	$as_echo "found in $dir" >&6; }
	                LIBS="$LIBS -lmnl"
	                break;
	            fi


NOT in

	$PREFIX/include/libmnl/libmnl/libmnl.h
Comment 4 Jan Engelhardt 2020-04-16 22:47:05 UTC
The intention is to catch failures to abide by pkgconfig files, which is important for cases like sysroots. While not specifically for libmnl (but for other libraries very much so), one example of a sysroot is our mingw installation.

*** This bug has been marked as a duplicate of bug 795968 ***
Comment 5 Forgotten User 7645792743 2020-04-16 23:11:06 UTC
broken by design.  well, ok then.

np.  rm'd from all machines, & blacklisted.  local builds are trivial & correct.