[arch-commits] Commit in facter/repos/community-x86_64 (5 files)
Thore Bödecker
foxxx0 at archlinux.org
Mon Aug 12 13:19:16 UTC 2019
Date: Monday, August 12, 2019 @ 13:19:15
Author: foxxx0
Revision: 499024
archrelease: copy trunk to community-x86_64
Added:
facter/repos/community-x86_64/FindUDEV.cmake
(from rev 499023, facter/trunk/FindUDEV.cmake)
facter/repos/community-x86_64/PKGBUILD
(from rev 499023, facter/trunk/PKGBUILD)
facter/repos/community-x86_64/fix-shared-libwhereami-detection.patch
(from rev 499023, facter/trunk/fix-shared-libwhereami-detection.patch)
Deleted:
facter/repos/community-x86_64/PKGBUILD
facter/repos/community-x86_64/java10.patch
----------------------------------------+
FindUDEV.cmake | 79 ++++++++++++++++++
PKGBUILD | 133 +++++++++++++++++++------------
fix-shared-libwhereami-detection.patch | 13 +++
java10.patch | 38 --------
4 files changed, 174 insertions(+), 89 deletions(-)
Copied: facter/repos/community-x86_64/FindUDEV.cmake (from rev 499023, facter/trunk/FindUDEV.cmake)
===================================================================
--- FindUDEV.cmake (rev 0)
+++ FindUDEV.cmake 2019-08-12 13:19:15 UTC (rev 499024)
@@ -0,0 +1,79 @@
+##
+# based on https://github.com/rpavlik/cmake-modules/blob/master/Findudev.cmake
+##
+# - try to find the udev library
+#
+# Cache Variables: (probably not for direct use in your scripts)
+# UDEV_INCLUDE_DIR
+# UDEV_SOURCE_DIR
+# UDEV_LIBRARY
+#
+# Non-cache variables you might use in your CMakeLists.txt:
+# UDEV_FOUND
+# UDEV_INCLUDE_DIRS
+# UDEV_LIBRARIES
+#
+# Requires these CMake modules:
+# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
+#
+# Original Author:
+# 2014 Kevin M. Godby <kevin at godby.org>
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+set(UDEV_ROOT_DIR
+ "${UDEV_ROOT_DIR}"
+ CACHE
+ PATH
+ "Directory to search for udev")
+
+find_package(PkgConfig QUIET)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_LIBUDEV libudev)
+endif()
+
+find_library(UDEV_LIBRARY
+ NAMES
+ udev
+ PATHS
+ ${PC_LIBUDEV_LIBRARY_DIRS}
+ ${PC_LIBUDEV_LIBDIR}
+ HINTS
+ "${UDEV_ROOT_DIR}"
+ PATH_SUFFIXES
+ lib
+ )
+
+get_filename_component(_libdir "${UDEV_LIBRARY}" PATH)
+
+find_path(UDEV_INCLUDE_DIR
+ NAMES
+ libudev.h
+ PATHS
+ ${PC_LIBUDEV_INCLUDE_DIRS}
+ ${PC_LIBUDEV_INCLUDEDIR}
+ HINTS
+ "${_libdir}"
+ "${_libdir}/.."
+ "${UDEV_ROOT_DIR}"
+ PATH_SUFFIXES
+ include
+ )
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(UDEV
+ DEFAULT_MSG
+ UDEV_LIBRARY
+ UDEV_INCLUDE_DIR
+ )
+
+if(UDEV_FOUND)
+ list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
+ list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
+ mark_as_advanced(UDEV_ROOT_DIR)
+endif()
+
+mark_as_advanced(UDEV_INCLUDE_DIR
+ UDEV_LIBRARY)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-08-12 13:19:12 UTC (rev 499023)
+++ PKGBUILD 2019-08-12 13:19:15 UTC (rev 499024)
@@ -1,51 +0,0 @@
-# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
-# Contributor: Jonathan Steel <jsteel at archlinux.org>
-# Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr>
-# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux at free.fr>
-# Contributor: Thomas S Hatch <thatch45 (at) Gmail.com>
-# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com>
-# Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com>
-
-pkgname=facter
-pkgver=3.13.1
-pkgrel=3
-pkgdesc="Collect and display system facts"
-arch=('x86_64')
-url="https://puppetlabs.com/facter"
-license=('APACHE')
-depends=('yaml-cpp' 'boost-libs' 'curl')
-makedepends=('ruby' 'boost' 'cmake' 'java-environment>=10' 'leatherman' 'cpp-hocon' 'java-environment-common')
-optdepends=('java-environment: jruby support')
-replaces=('cfacter')
-source=("https://github.com/puppetlabs/facter/archive/${pkgver}.tar.gz"
- 'java10.patch')
-sha512sums=('22d65d3c7eeedc674b99dcba1503bcecdc268abda0f25e6e209f1c3560dc8077b13fc5a6bbb8de1b45f2b7f5d1f2dfec8aa4fe20461a1b1d6a1a65674f570e56'
- '0db7f0a636bb31850b4440b3e7acc273cefc4091bd177ffaeb51434f80b142b9a96730d2a31a6ef48bf94dbd1cb21943a18e4f329a75b87718efd06a7124260b')
-
-prepare() {
- cd "${pkgname}-${pkgver}"
-
- # Replace rb_data_object_alloc symbol with rb_data_object_wrap
- # 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 )
-}
-
-build() {
- cd "${pkgname}-${pkgver}"
-
- # Do not treat warnings as errors
- CXXFLAGS+=' -Wno-error'
-
- JAVA_HOME=/usr/lib/jvm/default cmake -DCMAKE_INSTALL_PREFIX=/usr
-
- make
-}
-
-package() {
- cd "${pkgname}-${pkgver}"
-
- make install DESTDIR="${pkgdir}"
-
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
-}
Copied: facter/repos/community-x86_64/PKGBUILD (from rev 499023, facter/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-08-12 13:19:15 UTC (rev 499024)
@@ -0,0 +1,82 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr>
+# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux at free.fr>
+# Contributor: Thomas S Hatch <thatch45 (at) Gmail.com>
+# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com>
+# Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com>
+
+pkgname=facter
+pkgver=3.14.2
+pkgrel=1
+pkgdesc="Collect and display system facts"
+arch=('x86_64')
+url="https://puppetlabs.com/facter"
+license=('APACHE')
+depends=('yaml-cpp' 'boost-libs' 'curl' 'libwhereami')
+makedepends=('boost' 'boost-libs' 'cmake' 'java-environment>=10' 'leatherman'
+ 'cpp-hocon' 'java-environment-common' 'ruby' 'python'
+ 'libudev0-shim' 'libwhereami')
+checkdepends=('ruby-bundler' 'ruby-rake' 'ruby-rspec' 'ruby-mocha')
+optdepends=('java-environment: jruby support'
+ 'puppet: retrieve puppet facts')
+replaces=('cfacter')
+source=("https://downloads.puppet.com/facter/facter-${pkgver}.tar.gz"{,.asc}
+ 'FindUDEV.cmake'
+ 'fix-shared-libwhereami-detection.patch')
+validpgpkeys=('6F6B15509CF8E59E6E469F327F438280EF8D349F') # "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release at puppet.com>"
+sha512sums=('e8f0b8b509c5d5ea1d7f2c3a0a7ff36d25aa55001237cc9cdc96eafcd59da845eb2a01a8ac334c2376a1692e80862dc575a551340a03d7ae02d6f32e5215a3ec'
+ 'SKIP'
+ 'c06f8b75a697c89c696729aaca88d30cf4d8652406245d457d97a0de973f6129a037e226847e71785070dc16d5b40b98f287258f961da7904cf5338eb601fc09'
+ '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Puppet builds Facter in a way that the java library is compatible with Java 6
+ # We require at least Java 8. 7 technically works, but already throws a deprecation warning
+ sed --in-place 's/-source 1.6 -target 1.6/-source 1.8 -target 1.8/' CMakeLists.txt
+
+ # https://tickets.puppetlabs.com/browse/FACT-1968
+ # facter is designed for ruby 2.4, which uses rb_data_object_alloc.
+ # This is deprecated in our Ruby 2.6 version
+ sed --in-place 's/rb_data_object_alloc/rb_data_object_wrap/g' lib/src/ruby/*.cc
+
+ # strip version boundary of gems
+ sed -i -r 's|(gem .\w+.).*|\1|' lib/Gemfile
+
+ # add missing cmake helper to find the udev lib (provided by systemd)
+ install -Dm644 "${srcdir}/FindUDEV.cmake" cmake/
+
+ # patch FindWHEREAMI.cmake so that it works with the shared lib
+ patch -p1 -N -i "${srcdir}/fix-shared-libwhereami-detection.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ mkdir build
+ cd build
+
+ export JAVA_HOME=/usr/lib/jvm/default
+ cmake \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DENABLE_CXX_WERROR=OFF \
+ ..
+ make
+}
+
+check(){
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+ make test
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
Copied: facter/repos/community-x86_64/fix-shared-libwhereami-detection.patch (from rev 499023, facter/trunk/fix-shared-libwhereami-detection.patch)
===================================================================
--- fix-shared-libwhereami-detection.patch (rev 0)
+++ fix-shared-libwhereami-detection.patch 2019-08-12 13:19:15 UTC (rev 499024)
@@ -0,0 +1,13 @@
+diff -upr a/cmake/FindWHEREAMI.cmake b/cmake/FindWHEREAMI.cmake
+--- a/cmake/FindWHEREAMI.cmake 2019-07-19 10:11:10.000000000 +0200
++++ b/cmake/FindWHEREAMI.cmake 2019-08-12 14:49:04.730902701 +0200
+@@ -1,6 +1,6 @@
+ include(FindDependency)
+-find_dependency(WHEREAMI DISPLAY "whereami" HEADERS "whereami/whereami.hpp" LIBRARIES "libwhereami.a")
++find_dependency(WHEREAMI DISPLAY "whereami" HEADERS "whereami/whereami.hpp" LIBRARIES "libwhereami.so")
+
+ include(FeatureSummary)
+ set_package_properties(WHEREAMI PROPERTIES DESCRIPTION "A hypervisor detection library" URL "https://github.com/puppetlabs/libwhereami")
+-set_package_properties(WHEREAMI PROPERTIES PURPOSE "Reports hypervisors in use.")
+\ No newline at end of file
++set_package_properties(WHEREAMI PROPERTIES PURPOSE "Reports hypervisors in use.")
Deleted: java10.patch
===================================================================
--- java10.patch 2019-08-12 13:19:12 UTC (rev 499023)
+++ java10.patch 2019-08-12 13:19:15 UTC (rev 499024)
@@ -1,38 +0,0 @@
-From 05050b84320e118fc7490609b77b5cdeafd83add Mon Sep 17 00:00:00 2001
-From: mlevitt <mark.s.levitt at gmail.com>
-Date: Sat, 14 Apr 2018 14:51:22 -0600
-Subject: [PATCH] (FACT-1844) JDK10 drops support for javah
-
-Any JDK post 9 requires change of invocation from
-
- javah -d <dir>
-to
- javac -h <dir>
----
- lib/CMakeLists.txt | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index be67e0e2b..f7e8d4493 100644
---- a/lib/CMakeLists.txt
-+++ b/lib/CMakeLists.txt
-@@ -283,8 +283,18 @@ if (JRUBY_SUPPORT)
-
- # javah does not atomically write the header file, so parallel builds can
- # read it before it finishes writing if not careful.
-+ # JDK versions after 9 don't provide javah. Use javac in these cases
-+
-+ if(Java_VERSION VERSION_LESS "10")
-+ set(JAVAH_COMMAND javah)
-+ set(JAVAH_ARG -classpath facter.jar -d "${CMAKE_CURRENT_LIST_DIR}/src/java" com.puppetlabs.Facter)
-+ else()
-+ set(JAVAH_COMMAND javac)
-+ set(JAVAH_ARG -h "${CMAKE_CURRENT_LIST_DIR}/src/java" com/puppetlabs/Facter.java)
-+ endif()
-+
- add_custom_command(OUTPUT "${CMAKE_CURRENT_LIST_DIR}/src/java/com_puppetlabs_Facter.h"
-- COMMAND javah ARGS -classpath facter.jar -d "${CMAKE_CURRENT_LIST_DIR}/src/java" com.puppetlabs.Facter
-+ COMMAND ${JAVAH_COMMAND} ARGS ${JAVAH_ARG}
- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
- DEPENDS facter-jruby-jar)
- # Anything that depends on facter-jruby wants both the jar AND the completely written header.
More information about the arch-commits
mailing list