mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-24 11:37:20 -08:00
@@ -1,3 +1,4 @@
|
||||
DIST cvmfs-2.12.7.tar.gz 76792875 BLAKE2B 402bf915c1d71e1c49bf52e9312cf1a19ad9f85b7672b824b067aedaa5ba3d14827b838573e8a63bc51108ae9d28e8930385a47322336f88df6b1efd7a3e4a0b SHA512 a13a1faa9c37433d6d287d29ac56f45a34a564aaaf6df97fe58e79dad57769f01f10048a7e66b90347b7e791bac9d4cbdefb01d07f9ee7c8d61d7ff0833e8e69
|
||||
DIST cvmfs-2.13.1.tar.gz 68403758 BLAKE2B f0d7ff3ff458fa0c2fe7388d72eaa57d5acd3344be8aab00fec51f81bbca40242831746d14636e8f4417afa67ec3acd866315c230d04e0dea938adedc6b3f6c2 SHA512 fa21787a062cc28b745e5b7731a00439d0e9bf54a5dad50884daf9824c6bf646484d5091a3911000f95a02bdf8234628685d70e6cc1fdae51d5968e8d6a5e502
|
||||
DIST cvmfs-2.13.3.tar.gz 68265114 BLAKE2B 74e0e3e4f0e18f2746ad4a1d2fa269eb1e5979d6c7915e1e30d02b71af01b3986b45996e0fadac4d1f99a14c2c1eec80e1ea657e280e07ce57acd5773e540876 SHA512 299d19d799720d79ede88cc64b65408262ab4363a9ae43b7591ffbb781af286fba88772e1baa02254f3cf9a1c7fd4714b2e7206b8c6352f59d078a52eded5c2c
|
||||
DIST cvmfs-2.14.1.tar.gz 122499063 BLAKE2B b73924a6f50b6c95987c1510f99249fe569124ab0a060fd3ee29a96ad3e0438e23813c07d56ad8e3bc2c545dd0d596770c4f54918c0fce96b7b4b6e6c1eef293 SHA512 e49ac3c53a8ad1c535bae9bafb3f0fd856af35183ceaa5cc1eb72b546fa694c92ed61a0cf854389be9adf87403145274462bfac3bfcc4c33f2fc93c0d20c7c78
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake linux-info bash-completion-r1
|
||||
|
||||
DESCRIPTION="HTTP read-only file system for distributing software"
|
||||
HOMEPAGE="https://cernvm.cern.ch/fs/"
|
||||
SRC_URI="https://ecsft.cern.ch/dist/cvmfs/${P}/source.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="server"
|
||||
|
||||
CDEPEND="
|
||||
acct-group/cvmfs
|
||||
acct-user/cvmfs
|
||||
app-arch/libarchive
|
||||
dev-cpp/gtest
|
||||
dev-cpp/nlohmann_json
|
||||
dev-cpp/sparsehash
|
||||
dev-db/sqlite:3=
|
||||
dev-libs/leveldb:0=
|
||||
dev-libs/openssl:0=
|
||||
dev-libs/protobuf:0=
|
||||
net-dns/c-ares:0=
|
||||
net-libs/pacparser:0=
|
||||
net-misc/curl:0[adns]
|
||||
sys-apps/attr
|
||||
sys-fs/fuse:0=
|
||||
sys-fs/fuse:3=
|
||||
sys-libs/libcap:0=
|
||||
virtual/zlib:=
|
||||
"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
app-admin/sudo
|
||||
net-fs/autofs
|
||||
"
|
||||
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.14.1-unbundle-libressl.patch
|
||||
"${FILESDIR}"/${PN}-2.14.1-gentoo.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use server; then
|
||||
CONFIG_CHECK="~OVERLAY_FS"
|
||||
ERROR_AUFS_FS="CONFIG_OVERLAY_FS: is required to be set"
|
||||
linux-info_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
# gentoo stuff
|
||||
sed -i -e "s:/usr/bin/systemctl:/bin/systemctl:g" \
|
||||
-e "/^INSTALL_BASE/s:=.*\$:=${EPREFIX}/usr:" \
|
||||
-e "s:/bin/pidof:/usr/bin/pidof:g" cvmfs/cvmfs_config || die
|
||||
sed -i -e 's/COPYING//' -e "s:cvmfs-\${CernVM-FS_VERSION_STRING}:${PF}:" \
|
||||
CMakeLists.txt || die
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILTIN_EXTERNALS=OFF
|
||||
-DBUILD_CVMFS=ON
|
||||
-DBUILD_LIBCVMFS=OFF # static library used only for development
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DBUILD_GEOAPI=OFF # only used for stratum 1 servers
|
||||
-DBUILD_LIBCVMFS_CACHE=OFF # for exotic cache configs
|
||||
-DBUILD_PRELOADER=OFF # special purpose utility for HPCs
|
||||
-DBUILD_RECEIVER=OFF # for distributed publishers only
|
||||
-DBUILD_SERVER=$(usex server)
|
||||
-DINSTALL_BASH_COMPLETION=OFF
|
||||
-DINSTALL_MOUNT_SCRIPTS=ON
|
||||
-DINSTALL_PUBLIC_KEYS=ON
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
newbashcomp cvmfs/bash_completion/cvmfs.bash_completion cvmfs_config
|
||||
bashcomp_alias cvmfs_config cvmfs_server
|
||||
dodoc doc/*.md
|
||||
keepdir /var/lib/cvmfs
|
||||
use server && keepdir /var/lib/cvmfs-server
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "Setting up CernVM-FS client"
|
||||
cvmfs_config setup
|
||||
einfo "Now edit ${EROOT}/etc/cvmfs/default.local"
|
||||
einfo "and restart the autofs service"
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
Patch to unbundle dependencies to build in Gentoo.
|
||||
|
||||
- SHA3 -> externals/sha3 shipped in the tarball, built as a static library
|
||||
with the same sources as the built-in externals build.
|
||||
- JSON -> the system dev-cpp/nlohmann_json (the externals/json machinery is
|
||||
only used with BUILTIN_EXTERNALS; without it no nlohmann_json target
|
||||
would exist). nlohmann_json is header-only but its C++ headers need the
|
||||
C++ standard library, hence the C project type.
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -443,7 +443,7 @@ if (BUILD_CVMFS OR BUILD_LIBCVMFS OR BUILD_SERVER OR BUILD_SERVER_DEBUG OR
|
||||
find_package (ZLIB REQUIRED)
|
||||
set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
- find_package (SHA3 REQUIRED)
|
||||
+ add_subdirectory(externals/sha3)
|
||||
set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${SHA3_INCLUDE_DIRS})
|
||||
endif ()
|
||||
|
||||
diff --git a/externals/sha3/CMakeLists.txt b/externals/sha3/CMakeLists.txt
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/externals/sha3/CMakeLists.txt
|
||||
@@ -0,0 +1,21 @@
|
||||
+project(SHA3 C CXX)
|
||||
+
|
||||
+# Gentoo: build the bundled Keccak/SHA3 code as a static library instead of
|
||||
+# requiring a system SHA3 package (no such package exists in Gentoo).
|
||||
+add_library(cvmfs_sha3 STATIC
|
||||
+ src/64opt/KeccakF-1600-opt64.c
|
||||
+ src/KeccakHash.c
|
||||
+ src/KeccakSponge.c
|
||||
+ src/SnP-FBWL-default.c
|
||||
+)
|
||||
+
|
||||
+set_property(TARGET cvmfs_sha3 PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||
+
|
||||
+target_include_directories(cvmfs_sha3 PRIVATE
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/64opt
|
||||
+)
|
||||
+
|
||||
+set(SHA3_LIBRARY $<TARGET_FILE:cvmfs_sha3> PARENT_SCOPE)
|
||||
+set(SHA3_LIBRARIES cvmfs_sha3 PARENT_SCOPE)
|
||||
+set(SHA3_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/64opt PARENT_SCOPE)
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -455,0 +457,2 @@ if (BUILD_CVMFS OR BUILD_LIBCVMFS OR BUILD_SERVER OR BUILD_SERVER_DEBUG OR
|
||||
+
|
||||
+ find_package (nlohmann_json REQUIRED)
|
||||
@@ -0,0 +1,40 @@
|
||||
Revert upstream PR #3023 ("Bump LibreSSL and use it for libcvmfs_crypto")
|
||||
for Gentoo and unbundle libressl.
|
||||
|
||||
libcvmfs_crypto links against the system OpenSSL again. The symbol
|
||||
isolation the PR was aiming for is preserved: cvmfs_crypto keeps its
|
||||
existing -fvisibility=hidden and -Wl,--exclude-libs,ALL flags (used with
|
||||
the bundled static LibreSSL), so it exports only the cvmfs C++ API and no
|
||||
libcrypto symbols, and at runtime it simply DT_NEEDEDs the same
|
||||
libcrypto.so.3 that curl/cvmfs2 already use -- the same situation as
|
||||
before the PR.
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -427,6 +427,9 @@ endif ()
|
||||
find_package (OpenSSL REQUIRED)
|
||||
set (INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
+set(Libcrypto_LIBRARIES OpenSSL::Crypto)
|
||||
+set(Libcrypto_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
||||
+
|
||||
find_package (Libcrypto REQUIRED)
|
||||
# We do not add the Libcrypto include directories to INCLUDE_DIRECTORIES
|
||||
# to avoid a clash with the system openssl. We only use it for libcvmfs_crypto
|
||||
diff --git a/cvmfs/crypto/openssl_version.h b/cvmfs/crypto/openssl_version.h
|
||||
--- a/cvmfs/crypto/openssl_version.h
|
||||
+++ b/cvmfs/crypto/openssl_version.h
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
// Safeguard when compiling libcvmfs_crypto: make sure we pick up the built-in
|
||||
// LibreSSL and not the system's OpenSSL
|
||||
-#ifdef CVMFS_LIBRARY
|
||||
-#ifndef LIBRESSL_VERSION_NUMBER
|
||||
-#error "picking up OpenSSL includes instead of LibreSSL"
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
#define OPENSSL_API_INTERFACE_V11
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||
Reference in New Issue
Block a user