#1 Introduce nss_wrapper-libs package to allow install smaller footprint
Merged 2 years ago by asn. Opened 2 years ago by hhorak.
rpms/ hhorak/nss_wrapper devel-pkg  into  rawhide

file modified
+18 -4
@@ -1,6 +1,6 @@ 

  Name:           nss_wrapper

  Version:        1.1.11

- Release:        6%{?dist}

+ Release:        7%{?dist}

  

  License:        BSD

  Summary:        A wrapper for the user, group and hosts NSS API
@@ -16,6 +16,7 @@ 

  BuildRequires:  libcmocka-devel

  BuildRequires:  perl-generators

  

+ Requires:       %{name}-libs%{?_isa} = %version-%release

  Recommends:     cmake

  Recommends:     pkgconfig

  
@@ -42,6 +43,13 @@ 

  This package doesn't have a devel package cause this project is for

  development/testing.

  

+ %package libs

+ Summary: nss_library shared library only

+ 

+ %description libs

+ The %{name}-libs package provides only the shared library.

+ For a minimal footprint, install just this package.

+ 

  %prep

  gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}

  %autosetup -p1
@@ -63,17 +71,23 @@ 

  %ctest

  

  %files

- %doc AUTHORS README.md CHANGELOG

- %license LICENSE

  %{_bindir}/nss_wrapper.pl

- %{_libdir}/libnss_wrapper.so*

  %dir %{_libdir}/cmake/nss_wrapper

  %{_libdir}/cmake/nss_wrapper/nss_wrapper-config-version.cmake

  %{_libdir}/cmake/nss_wrapper/nss_wrapper-config.cmake

  %{_libdir}/pkgconfig/nss_wrapper.pc

  %{_mandir}/man1/nss_wrapper.1*

  

+ %files libs

+ %doc AUTHORS README.md CHANGELOG

+ %license LICENSE

+ %{_libdir}/libnss_wrapper.so*

+ 

  %changelog

+ * Mon Nov 15 2021 Honza Horak <hhorak@redhat.com> - 1.1.11-7

+ - Introduce nss_wrapper-libs package to allow install smaller footprint

+   Resolves: RHBZ#2023435

+ 

  * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.11-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

  

Resolves: RHBZ#2023435

Can you explain why the few kilobytes of the other files are a problem?

It's not the files, but the dependencies that those files pull in -- cmake and many perl packages.

See https://bugzilla.redhat.com/show_bug.cgi?id=2023435 for more info. Installing nss_wrapper to a container pulls in 100MB at the end:

podman run -ti --rm fedora bash -c 'yum install -y nss_wrapper'
...
Install  78 Packages
...
Installed size: 109 M

nss_wrapper is a devel package and the files are normally needed to find the location for preloading it.

I would like to keep the library and manpage together in the main package!

The perl script could go into a nss_wrapper-tools package.

Now the question is where to put the cmake files. Maybe in a nss_wrapper-pkg subpackage together with the pkgconfig file and then recommend to install it?

Any other suggestions?

My first idea was to introduce nss_wrapper-devel -- wouldn't that be a good new home for both, the perl script and cmake files?

Hmm, then we need to create a devel package for all wrappers to be consistent.

Ah, I didn't realize there are more wrappers. It doesn't seem to be worth such a big change that would affect many depended packages.

Making the impact on depended packages invisible was the reason why I suggested to put just the library into a separate sub-package. It would effectively not change anything that would still pull in nss_wrapper package.

I think that detaching a library to an extra sub-package, so it can be installed as a stand-alone component when needed, is actually quite common practice across various packages in Fedora. Couldn't you maybe re-consider that approach?

Lets go with this for now.

Pull-Request has been merged by asn

2 years ago

I'm not able to build as it looks like the builtroot for (x86_64) is broken (openssl libcrypto.so issue)

Metadata