#50352 Remove the path prefix from the cert.h source file inclusion
Closed 3 years ago by spichugi. Opened 4 years ago by hmc.
hmc/389-ds-base nss  into  master

file modified
+1 -1
@@ -16,7 +16,7 @@ 

  /* What was extcmap.h begins ... */

  

  #include <ldap.h>

- #include <nss3/cert.h>

+ #include <cert.h>

  

  #ifndef NSAPI_PUBLIC

  #define NSAPI_PUBLIC

file modified
+1 -1
@@ -15,7 +15,7 @@ 

  #include <stdio.h>

  #include <string.h>

  #include <ctype.h>

- #include <nss3/cert.h>

+ #include <cert.h>

  #include "certmap.h" /* Public Certmap API */

  #include "plugin.h"  /* must define extern "C" functions */

  

file modified
+1 -3
@@ -333,8 +333,6 @@ 

  %endif

  

  %{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"}

- # hack hack hack https://bugzilla.redhat.com/show_bug.cgi?id=833529

- NSSARGS="--with-nss-lib=%{_libdir} --with-nss-inc=%{_includedir}/nss3"

  

  %if %{use_asan} && !%{use_rust}

  ASAN_FLAGS="--enable-asan --enable-debug"
@@ -379,7 +377,7 @@ 

             --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \

             --with-systemdgroupname=%{groupname} \

             --libexecdir=%{_libexecdir}/%{pkgname} \

-            $NSSARGS $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \

+            $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \

             --enable-cmocka \

             --enable-perl

  

This patch removes the path prefix from #include <nss3/cert.h>.

Note that we use pkg-config to obtain the correct include path for NSS headers.

@mreynolds / @mhonek I have no issue with this patch, but I'd like your review to be 100% sure. I think this change is correct, because there are some platforms that don't use the folder nss3, so having this come from include path is correct.

LGTM.

As part of this we could also do this:

diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index d1ea16167..d5b64643d 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -333,8 +333,6 @@ CLANG_FLAGS="--enable-clang"
 %endif

 %{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"}
-# hack hack hack https://bugzilla.redhat.com/show_bug.cgi?id=833529
-NSSARGS="--with-nss-lib=%{_libdir} --with-nss-inc=%{_includedir}/nss3"

 %if %{use_asan} && !%{use_rust}
 ASAN_FLAGS="--enable-asan --enable-debug"
@@ -379,7 +377,7 @@ autoreconf -fiv
            --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \
            --with-systemdgroupname=%{groupname} \
            --libexecdir=%{_libexecdir}/%{pkgname} \
-           $NSSARGS $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \
+           $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \
            --enable-cmocka \
            --enable-perl

The bug referenced in the file has been long fixed and building on F29 works just fine with the above patch on top, too. @mreynolds @hmc What do you think?

@mhonek I’ve got no problems with your suggested addition. Is this a patch that can be rebased on mine, or do I need to update my PR?

@hmc It's probably easiest if you just add this diff into your PR :)

rebased onto f30b7be9586086920dde0e098e39951dd49c441a

4 years ago

@mhonek, @firstyear, @mreynolds I've updated this PR to include the RPM spec file patch.

@hmc Looks good, thanks. However, please change the commit message(s) according to our Contribution Guide for better trackability; also feel free to squash the commits as described in the very same section. Thanks!

Then, if @mreynolds agrees, we can merge this.

rebased onto 06c9f53

4 years ago

Okay, @mhonek, I've had another go at the commit message. :-)

Pull-Request has been merged by mhonek

4 years ago

Merged. Thanks a lot!

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3411

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago