]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Slight enhancement of commentary for exported configurations
authorRichard Levitte <levitte@openssl.org>
Sat, 11 Oct 2025 04:53:18 +0000 (06:53 +0200)
committerRichard Levitte <levitte@openssl.foundation>
Thu, 26 Mar 2026 15:14:26 +0000 (16:14 +0100)
There's a misunderstanding regarding the use of .pc and .cmake files
found in the top of the build tree vs in its 'exporters' subdirectory.

Some added commentary, especially in the files being produced, might
help clarify their uses.

Resolves: https://github.com/openssl/openssl/issues/28803

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Thu Mar 26 15:19:09 2026
(Merged from https://github.com/openssl/openssl/pull/28858)

build.info
exporters/cmake/OpenSSLConfig.cmake.in
exporters/cmake/OpenSSLConfigVersion.cmake.in
exporters/pkg-config/libcrypto.pc.in
exporters/pkg-config/libssl.pc.in
exporters/pkg-config/openssl.pc.in
util/mkinstallvars.pl

index fdcccb46dad26711ba6615570b11f754bce6a49a..de909255e18d8593f3dd54d628299c6717b966b8 100644 (file)
@@ -464,12 +464,10 @@ IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-|BC-)/ -}]
   SHARED_SOURCE[libssl]=libssl.rc
 ENDIF
 
-# This file sets the build directory up for CMake inclusion
-# Note: This generation of OpenSSLConfig[Version].cmake is used
-# for building openssl locally, and so the build variables are 
-# taken from builddata.pm rather than installdata.pm.  For exportable
-# versions of these generated files, you'll find them in the exporters
-# directory
+# These files set the build directory up for CMake inclusion.
+# To achieve this, their variables are taken from builddata.pm.
+# These files are not installed; you will find the installable
+# versions in the 'exporters' directory.
 GENERATE[OpenSSLConfig.cmake]=exporters/cmake/OpenSSLConfig.cmake.in
 DEPEND[OpenSSLConfig.cmake]=builddata.pm
 GENERATE[OpenSSLConfigVersion.cmake]=exporters/cmake/OpenSSLConfigVersion.cmake.in
@@ -477,7 +475,10 @@ DEPEND[OpenSSLConfigVersion.cmake]=builddata.pm
 DEPEND[OpenSSLConfigVersion.cmake]=OpenSSLConfig.cmake
 DEPEND[""]=OpenSSLConfigVersion.cmake
 
-# This file sets the build directory up for pkg-config
+# These files set the build directory up for pkg-config use.
+# To achieve this, their variables are taken from builddata.pm.
+# These files are not installed; you will find the installable
+# versions in the 'exporters' directory.
 GENERATE[libcrypto.pc]=exporters/pkg-config/libcrypto.pc.in
 DEPEND[libcrypto.pc]=builddata.pm
 GENERATE[libssl.pc]=exporters/pkg-config/libssl.pc.in
@@ -487,6 +488,7 @@ DEPEND[openssl.pc]=builddata.pm
 DEPEND[openssl.pc]=libcrypto.pc libssl.pc
 
 GENERATE[builddata.pm]=util/mkinstallvars.pl \
+    COMMENT="This file should be used when building against this OpenSSL build, and should never be installed" \
     PREFIX=. BINDIR=apps APPLINKDIR=ms \
     LIBDIR= INCLUDEDIR=include "INCLUDEDIR=$(SRCDIR)/include" \
     MODULESDIR=providers \
index 07b7a3e4dff3091cc03da2b42dd9a210f8af51cb..4970528573ce8b651d290f6067fbb9c68877cfb1 100644 (file)
@@ -1,4 +1,5 @@
 # Generated by OpenSSL
+# {- $OpenSSL::safe::installdata::COMMENT // "" -}
 {-
    use lib catdir($config{sourcedir}, 'Configurations');
    use platform;
index b1290a9eec76f082eddc65f46d01ae2634b77851..15bae5697220d6323a494e3918132a3f041853ef 100644 (file)
@@ -1,4 +1,5 @@
 # Generated by OpenSSL
+# {- $OpenSSL::safe::installdata::COMMENT // "" -}
 
 set(PACKAGE_VERSION {- $config{version} -})
 
index cb00b749d1c009760b6c036d45854eacc11f9dba..b0481093a1ed7fafdd3da81491780b4047865a2e 100644 (file)
@@ -1,3 +1,4 @@
+# {- $OpenSSL::safe::installdata::COMMENT // "" -}
 prefix={- $OpenSSL::safe::installdata::PREFIX[0] -}
 exec_prefix=${prefix}
 libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) {
index f73be2e9f2aa0e463b802d99814e1de45860ecc9..50132b7502512bec5556a2edaf0e32e757c7bff9 100644 (file)
@@ -1,3 +1,4 @@
+# {- $OpenSSL::safe::installdata::COMMENT // "" -}
 prefix={- $OpenSSL::safe::installdata::PREFIX[0] -}
 exec_prefix=${prefix}
 libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) {
index d41eea7e3a1a9be2c6dac26931e9347f507896fd..3573ed98727233e750546ab49cc67c5271f4b0f5 100644 (file)
@@ -1,3 +1,4 @@
+# {- $OpenSSL::safe::installdata::COMMENT // "" -}
 prefix={- $OpenSSL::safe::installdata::PREFIX[0] -}
 exec_prefix=${prefix}
 libdir={- if (defined $OpenSSL::safe::installdata::LIBDIR_REL_PREFIX[0]) {
index 6588c5f23029f16032fccdc6e91db89a4aac390f..b0674acad05b70162119eab46847debf0c4b6190 100644 (file)
@@ -29,7 +29,7 @@ my @subdirs = _pairs (PREFIX => [ qw(BINDIR LIBDIR INCLUDEDIR APPLINKDIR) ],
                       LIBDIR => [ qw(MODULESDIR PKGCONFIGDIR
                                      CMAKECONFIGDIR) ]);
 # For completeness, other expected variables
-my @others = qw(VERSION LDLIBS);
+my @others = qw(COMMENT VERSION LDLIBS);
 
 my %all = ( );
 foreach (@absolutes) { $all{$_} = 1 }
@@ -135,9 +135,10 @@ foreach my $pair (@subdirs) {
 }
 
 print <<_____;
-    \$VERSION \@LDLIBS
+    \$COMMENT \$VERSION \@LDLIBS
 );
 
+our \$COMMENT                    = '$values{COMMENT}->[0]';
 _____
 
 foreach my $k (@absolutes) {