[arch-commits] Commit in facter/trunk (1581.patch PKGBUILD)

Jonathan Steel jsteel at archlinux.org
Mon Jul 3 08:28:50 UTC 2017


    Date: Monday, July 3, 2017 @ 08:28:49
  Author: jsteel
Revision: 242116

upgpkg: facter 3.7.0-1

Added:
  facter/trunk/1581.patch
Modified:
  facter/trunk/PKGBUILD

------------+
 1581.patch |   79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD   |   25 ++++++++----------
 2 files changed, 91 insertions(+), 13 deletions(-)

Added: 1581.patch
===================================================================
--- 1581.patch	                        (rev 0)
+++ 1581.patch	2017-07-03 08:28:49 UTC (rev 242116)
@@ -0,0 +1,79 @@
+From 8d23b66e7463787e5ad037f665a90f54ca570543 Mon Sep 17 00:00:00 2001
+From: Michael Smith <michael.smith at puppet.com>
+Date: Fri, 2 Jun 2017 11:50:40 -0700
+Subject: [PATCH 1/2] (FACT-1588) Fix for OpenSSL 1.1.0
+
+Building with OpenSSL 1.1.0 failed due to a change in const-ness of the
+`BIO_f_base64` return value. Update functions to accept a const value
+when appropriate. Should be backwards compatible with non-const version.
+---
+ lib/inc/internal/util/posix/scoped_bio.hpp | 2 +-
+ lib/src/util/posix/scoped_bio.cc           | 7 +++++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/inc/internal/util/posix/scoped_bio.hpp b/lib/inc/internal/util/posix/scoped_bio.hpp
+index 5be7f74ae..16639f5f9 100644
+--- a/lib/inc/internal/util/posix/scoped_bio.hpp
++++ b/lib/inc/internal/util/posix/scoped_bio.hpp
+@@ -19,7 +19,7 @@ namespace facter { namespace util { namespace posix {
+          * Constructs a scoped_bio.
+          * @param method The BIO_METHOD to use.
+          */
+-        explicit scoped_bio(BIO_METHOD* method);
++        explicit scoped_bio(const BIO_METHOD* method);
+ 
+         /**
+          * Constructs a scoped_bio.
+diff --git a/lib/src/util/posix/scoped_bio.cc b/lib/src/util/posix/scoped_bio.cc
+index d6667fc93..cdf25d63e 100644
+--- a/lib/src/util/posix/scoped_bio.cc
++++ b/lib/src/util/posix/scoped_bio.cc
+@@ -6,8 +6,11 @@ using namespace leatherman::util;
+ 
+ namespace facter { namespace util { namespace posix {
+ 
+-    scoped_bio::scoped_bio(BIO_METHOD* method) :
+-        scoped_resource(BIO_new(method), free)
++    // Remove const-ness before calling BIO_new. This is "unsafe",
++    // but in isolation here will not cause issues. Allows the code to work
++    // with both OpenSSL 1.0 and 1.1.
++    scoped_bio::scoped_bio(const BIO_METHOD* method) :
++        scoped_resource(BIO_new(const_cast<BIO_METHOD*>(method)), free)
+     {
+     }
+ 
+
+From e129c484acd3f72950e3af19aea117d716e0fd20 Mon Sep 17 00:00:00 2001
+From: Michael Smith <michael.smith at puppet.com>
+Date: Fri, 2 Jun 2017 13:01:52 -0700
+Subject: [PATCH 2/2] (maint) Remove unused translation strings
+
+A prior commit simplified the AIX resolver that originated these
+strings. Remove them now that they're no longer used.
+---
+ locales/FACTER.pot | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/locales/FACTER.pot b/locales/FACTER.pot
+index 45b09dfc2..988e5bb9e 100644
+--- a/locales/FACTER.pot
++++ b/locales/FACTER.pot
+@@ -303,18 +303,6 @@ msgstr ""
+ msgid "querylv returned success but we got a null LV. WTF?"
+ msgstr ""
+ 
+-#. warning
+-#: lib/src/facts/aix/kernel_resolver.cc
+-msgid "oslevel failed: {1}: kernel facts are unavailable"
+-msgstr ""
+-
+-#. warning
+-#: lib/src/facts/aix/kernel_resolver.cc
+-msgid ""
+-"Could not parse rml cache even after regenerating with oslevel: kernel facts "
+-"are unavailable. Try running 'oslevel -s' to debug."
+-msgstr ""
+-
+ #: lib/src/facts/aix/networking_resolver.cc
+ msgid "getkerninfo call was unsuccessful"
+ msgstr ""

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-07-03 08:28:17 UTC (rev 242115)
+++ PKGBUILD	2017-07-03 08:28:49 UTC (rev 242116)
@@ -7,18 +7,20 @@
 # Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com>
 
 pkgname=facter
-pkgver=3.6.4
-pkgrel=2
+pkgver=3.7.0
+pkgrel=1
 pkgdesc="Collect and display system facts"
 arch=('i686' 'x86_64')
 url="http://puppetlabs.com/facter"
 license=('APACHE')
-depends=('ruby' 'yaml-cpp' 'boost-libs' 'curl' 'openssl-1.0')
+depends=('ruby' 'yaml-cpp' 'boost-libs' 'curl')
 makedepends=('boost' 'cmake' 'java-environment' 'leatherman' 'cpp-hocon')
 optdepends=('java-environment: jruby support')
 replaces=('cfacter')
-source=(http://downloads.puppetlabs.com/$pkgname/$pkgname-$pkgver.tar.gz)
-md5sums=('f282e7768a61892fda5d2b5ec2cef103')
+source=(http://downloads.puppetlabs.com/$pkgname/$pkgname-$pkgver.tar.gz
+        1581.patch)
+md5sums=('633e7e5b3f62030e94dd3108fa96ae4b'
+         '6b2fddd8709f235e2e971e603f959cf6')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -27,23 +29,20 @@
   # https://tickets.puppetlabs.com/browse/FACT-1291
   sed -i 's/rb_data_object_alloc/rb_data_object_wrap/g' \
     $( grep -rl rb_data_object_alloc lib/src/ruby )
+
+  # Openssl 1.1 patch
+  # https://tickets.puppetlabs.com/browse/FACT-1588
+  patch -p1 -i ../1581.patch
 }
 
 build() {
   cd $pkgname-$pkgver
 
-  JAVA_HOME=/usr/lib/jvm/default cmake -DCMAKE_INSTALL_PREFIX=/usr -DOPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0 -DOPENSSL_SSL_LIBRARY=/usr/lib/openssl-1.0/libssl.so -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/openssl-1.0/libcrypto.so
+  JAVA_HOME=/usr/lib/jvm/default cmake -DCMAKE_INSTALL_PREFIX=/usr
 
   make
 }
 
-check() {
-  cd $pkgname-$pkgver
-
-  # TODO: Investigate why tests fail on i686 most of the time with Ruby 2.3.0
-  make test || [[ $CARCH == i686 ]]
-}
-
 package() {
   cd $pkgname-$pkgver
 



More information about the arch-commits mailing list