Whamcloud - gitweb
LU-16382 spec: use pkgconfig() as appropriate. 66/49366/4
authorMr NeilBrown <neilb@suse.de>
Mon, 12 Dec 2022 04:42:11 +0000 (15:42 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Feb 2023 06:04:24 +0000 (06:04 +0000)
pkgconfig() is preferred over explicit dependencies on libfoo-devel.
For SUSE, this is particularly needed for system and with SLE15-SP4
the OBS automatically includes "systemd-mini", but that conflicts with
"system".  Usig "pkgconfig(systemd) resolves this.

Also there is no need to have "Depends" for library packages.  These
are determined automatically from the result of the build.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Idfa4fdfd8bf060175b64a1991d3367024a368344
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
lustre.spec.in

index 77a36e5..7a622a0 100644 (file)
@@ -210,7 +210,7 @@ Requires: %{requires_kmod_name} = %{requires_kmod_version}
 Requires: python3 >= 3.6.0
 BuildRequires: python3-devel >= 3.6.0, swig
 %endif
-BuildRequires: libtool libyaml-devel zlib-devel libnl3-devel flex bison
+BuildRequires: libtool pkgconfig(yaml-0.1) pkgconfig(zlib) pkgconfig(libnl-3.0) flex bison
 %if "%{_vendor}" == "redhat"
 BuildRequires: redhat-rpm-config
 BuildRequires: pkgconfig
@@ -233,7 +233,7 @@ Obsoletes: lustre-client < %{version}
 Provides: lustre-client = %{version}-%{release}
 %if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora" || "%{_vendor}" == "openEuler"
 #suse don't support selinux
-BuildRequires: libselinux-devel
+BuildRequires: pkgconfig(libselinux)
 %endif
 %if %{with lustre_modules}
 %if %{with mofed}
@@ -264,7 +264,7 @@ BuildRequires: kernel-abi-whitelists
 Requires(post): systemd
 Requires(preun): systemd
 Requires(postun): systemd
-BuildRequires: systemd
+BuildRequires: pkgconfig(systemd)
 %endif
 
 %description
@@ -298,8 +298,8 @@ echo $TMPFILE
 %if %{with lustre_utils}
 %package osd-ldiskfs-mount
 Summary: osd-ldiskfs-mount contains mount's ldiskfs specific dso.
-BuildRequires: e2fsprogs-devel >= 1.44.3 libmount-devel
-Requires: ldiskfsprogs > 1.45.6 libmount
+BuildRequires: e2fsprogs-devel >= 1.44.3 pkgconfig(mount)
+Requires: ldiskfsprogs > 1.45.6
 Provides: lustre-osd-mount = %{version}
 Provides: %{name}-osd-mount = %{version}
 Obsoletes: %{name}-osd-mount < %{version}
@@ -318,8 +318,7 @@ LDISKFS hooks for mount/mkfs into a dynamic library.
 %if %{with lustre_utils}
 %package osd-zfs-mount
 Summary: osd-zfs-mount contains mount's zfs specific dso.
-BuildRequires: libmount-devel
-Requires: libmount
+BuildRequires: pkgconfig(mount)
 Provides: %{name}-osd-mount = %{version}
 Obsoletes: lustre-osd-mount < %{version}
 # Tests also require zpool from zfs package: