openafs_1_8: init at 1.8.0 (#41889)
- Introduce new "server" output holding the server binaries - Adapt tsmbac.patch to new build environment - Adapt openafs nixos server module accordingly - Update upstream CellServDB: 2017-03-14 -> 2018-05-14 - Introduce package attributes to refer to the openafs packages to use for server, programs and kernel module
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
diff -u openafs-1.8.0/src/bozo/bosserver.c /tmp/buffer-content-13110-gd
|
||||
--- openafs-1.8.0/src/bozo/bosserver.c
|
||||
+++ #<buffer bosserver.c>
|
||||
@@ -244,24 +244,6 @@
|
||||
static int
|
||||
CreateDirs(const char *coredir)
|
||||
{
|
||||
- if ((!strncmp
|
||||
- (AFSDIR_USR_DIRPATH, AFSDIR_CLIENT_ETC_DIRPATH,
|
||||
- strlen(AFSDIR_USR_DIRPATH)))
|
||||
- ||
|
||||
- (!strncmp
|
||||
- (AFSDIR_USR_DIRPATH, AFSDIR_SERVER_BIN_DIRPATH,
|
||||
- strlen(AFSDIR_USR_DIRPATH)))) {
|
||||
- if (MakeDir(AFSDIR_USR_DIRPATH))
|
||||
- return errno;
|
||||
- }
|
||||
- if (!strncmp
|
||||
- (AFSDIR_SERVER_AFS_DIRPATH, AFSDIR_SERVER_BIN_DIRPATH,
|
||||
- strlen(AFSDIR_SERVER_AFS_DIRPATH))) {
|
||||
- if (MakeDir(AFSDIR_SERVER_AFS_DIRPATH))
|
||||
- return errno;
|
||||
- }
|
||||
- if (MakeDir(AFSDIR_SERVER_BIN_DIRPATH))
|
||||
- return errno;
|
||||
if (MakeDir(AFSDIR_SERVER_ETC_DIRPATH))
|
||||
return errno;
|
||||
if (MakeDir(AFSDIR_SERVER_LOCAL_DIRPATH))
|
||||
|
||||
Diff finished. Fri Jun 29 15:45:46 2018
|
||||
@@ -0,0 +1,97 @@
|
||||
{ stdenv, fetchurl, fetchgit, which, autoconf, automake, flex, yacc
|
||||
, glibc, perl, kerberos, libxslt, docbook_xsl, docbook_xml_dtd_43
|
||||
, libtool_2, removeReferencesTo
|
||||
, ncurses # Extra ncurses utilities. Only needed for debugging.
|
||||
, tsmbac ? null # Tivoli Storage Manager Backup Client from IBM
|
||||
}:
|
||||
|
||||
with (import ./srcs.nix { inherit fetchurl; });
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "openafs-${version}";
|
||||
inherit version srcs;
|
||||
|
||||
nativeBuildInputs = [ autoconf automake flex libxslt libtool_2 perl
|
||||
removeReferencesTo which yacc ];
|
||||
|
||||
buildInputs = [ kerberos ncurses ];
|
||||
|
||||
patches = [ ./bosserver.patch ] ++ stdenv.lib.optional (tsmbac != null) ./tsmbac.patch;
|
||||
|
||||
outputs = [ "out" "dev" "man" "doc" "server" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
setOutputFlags = false;
|
||||
|
||||
# Makefiles don't include install targets for all new shared libs, yet.
|
||||
dontDisableStatic = true;
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
for i in `grep -l -R '/usr/\(include\|src\)' .`; do
|
||||
echo "Patch /usr/include and /usr/src in $i"
|
||||
substituteInPlace $i \
|
||||
--replace "/usr/include" "${glibc.dev}/include" \
|
||||
--replace "/usr/src" "$TMP"
|
||||
done
|
||||
|
||||
for i in ./doc/xml/{AdminGuide,QuickStartUnix,UserGuide}/*.xml; do
|
||||
substituteInPlace "''${i}" --replace "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
|
||||
"${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
|
||||
done
|
||||
|
||||
./regen.sh
|
||||
|
||||
configureFlagsArray=(
|
||||
"--with-gssapi"
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"--disable-kernel-module"
|
||||
"--disable-fuse-client"
|
||||
"--with-html-xsl=${docbook_xsl}/share/xml/docbook-xsl/html/chunk.xsl"
|
||||
${stdenv.lib.optionalString (tsmbac != null) "--enable-tivoli-tsm"}
|
||||
${stdenv.lib.optionalString (ncurses == null) "--disable-gtx"}
|
||||
"--disable-linux-d_splice-alias-extra-iput"
|
||||
"--libexecdir=$server/libexec"
|
||||
)
|
||||
'' + stdenv.lib.optionalString (tsmbac != null) ''
|
||||
export XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I${tsmbac}/lib64/sample -DXBSA_TSMLIB=\\\"${tsmbac}/lib64/libApiTSM64.so\\\""
|
||||
export XBSA_XLIBS="-ldl"
|
||||
'';
|
||||
|
||||
buildFlags = [ "all_nolibafs" ];
|
||||
|
||||
postBuild = ''
|
||||
for d in doc/xml/{AdminGuide,QuickStartUnix,UserGuide}; do
|
||||
make -C "''${d}" index.html
|
||||
done
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $doc/share/doc/openafs/{AdminGuide,QuickStartUnix,UserGuide}
|
||||
cp -r doc/{pdf,protocol,txt} README LICENSE $doc/share/doc/openafs
|
||||
for d in AdminGuide QuickStartUnix UserGuide ; do
|
||||
cp "doc/xml/''${d}"/*.html "$doc/share/doc/openafs/''${d}"
|
||||
done
|
||||
|
||||
rm -r $out/lib/openafs
|
||||
'';
|
||||
|
||||
# Avoid references to $TMPDIR by removing it and let patchelf cleanup the
|
||||
# binaries.
|
||||
preFixup = ''
|
||||
rm -rf "$(pwd)" && mkdir "$(pwd)"
|
||||
|
||||
find $out -type f -exec remove-references-to -t $server '{}' '+'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
outputsToInstall = [ "out" "doc" "man" ];
|
||||
description = "Open AFS client";
|
||||
homepage = https://www.openafs.org;
|
||||
license = licenses.ipl10;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.z77z maintainers.spacefrogg ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{ stdenv, fetchurl, which, autoconf, automake, flex, yacc
|
||||
, kernel, glibc, perl, libtool_2, kerberos }:
|
||||
|
||||
with (import ./srcs.nix { inherit fetchurl; });
|
||||
|
||||
let
|
||||
modDestDir = "$out/lib/modules/${kernel.modDirVersion}/extra/openafs";
|
||||
kernelBuildDir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "openafs-${version}-${kernel.version}";
|
||||
inherit version src;
|
||||
|
||||
nativeBuildInputs = [ autoconf automake flex libtool_2 perl which yacc ]
|
||||
++ kernel.moduleBuildDependencies;
|
||||
|
||||
buildInputs = [ kerberos ];
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-linux-kernel-build=${kernelBuildDir}"
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"--with-gssapi"
|
||||
"--disable-linux-d_splice-alias-extra-iput"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
for i in `grep -l -R '/usr/\(include\|src\)' .`; do
|
||||
echo "Patch /usr/include and /usr/src in $i"
|
||||
substituteInPlace $i \
|
||||
--replace "/usr/include" "${glibc.dev}/include" \
|
||||
--replace "/usr/src" "${kernelBuildDir}"
|
||||
done
|
||||
|
||||
./regen.sh -q
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make V=1 only_libafs
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p ${modDestDir}
|
||||
cp src/libafs/MODLOAD-*/libafs-${kernel.version}.* ${modDestDir}/libafs.ko
|
||||
xz -f ${modDestDir}/libafs.ko
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Open AFS client kernel module";
|
||||
homepage = https://www.openafs.org;
|
||||
license = licenses.ipl10;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.z77z maintainers.spacefrogg ];
|
||||
broken = (versionOlder kernel.version "3.18") || stdenv.targetPlatform.isAarch64;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ fetchurl }:
|
||||
rec {
|
||||
version = "1.8.0";
|
||||
src = fetchurl {
|
||||
url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-src.tar.bz2";
|
||||
sha256 = "63fae6b3a4339e4a40945fae1afb9b99a5e7f8e8dbde668938ab8c4ff569fd7d";
|
||||
};
|
||||
|
||||
srcs = [ src
|
||||
(fetchurl {
|
||||
url = "http://www.openafs.org/dl/openafs/${version}/openafs-${version}-doc.tar.bz2";
|
||||
sha256 = "e26f3bb399f524b4978543eb3ec169fd58f2d409cf4bc22c75c65fb9b09f12e8";
|
||||
})];
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
diff -ru openafs-1.8.0/src/butc/afsxbsa.c openafs-1.8.0.new/src/butc/afsxbsa.c
|
||||
--- openafs-1.8.0/src/butc/afsxbsa.c 2018-04-06 03:21:12.000000000 +0200
|
||||
+++ openafs-1.8.0.new/src/butc/afsxbsa.c 2018-06-12 16:26:26.272522305 +0200
|
||||
@@ -651,7 +651,7 @@
|
||||
#if defined(AFS_AIX_ENV)
|
||||
dynlib = dlopen("/usr/lib/libApiDS.a(dsmapish.o)", RTLD_NOW | RTLD_LOCAL | RTLD_MEMBER);
|
||||
#elif defined (AFS_AMD64_LINUX26_ENV)
|
||||
- dynlib = dlopen("/usr/lib64/libApiTSM64.so", RTLD_NOW | RTLD_LOCAL);
|
||||
+ dynlib = dlopen(XBSA_TSMLIB, RTLD_NOW | RTLD_LOCAL);
|
||||
#elif defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
|
||||
dynlib = dlopen("/usr/lib/libApiDS.so", RTLD_NOW | RTLD_LOCAL);
|
||||
#else
|
||||
diff -ru openafs-1.8.0/src/cf/tivoli.m4 openafs-1.8.0.new/src/cf/tivoli.m4
|
||||
--- openafs-1.8.0/src/cf/tivoli.m4 2018-04-06 03:21:12.000000000 +0200
|
||||
+++ openafs-1.8.0.new/src/cf/tivoli.m4 2018-06-12 16:26:26.072522485 +0200
|
||||
@@ -1,45 +1,7 @@
|
||||
AC_DEFUN([OPENAFS_TIVOLI_TESTS],[
|
||||
dnl check for tivoli
|
||||
AC_MSG_CHECKING(for tivoli tsm butc support)
|
||||
-XBSA_CFLAGS=""
|
||||
-if test "$enable_tivoli_tsm" = "yes"; then
|
||||
- XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
|
||||
- XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
|
||||
- XBSADIR3=/usr/tivoli/tsm/client/api/bin/sample
|
||||
- XBSADIR4=/opt/tivoli/tsm/client/api/bin/sample
|
||||
- XBSADIR5=/usr/tivoli/tsm/client/api/bin64/sample
|
||||
- XBSADIR6=/opt/tivoli/tsm/client/api/bin64/sample
|
||||
-
|
||||
- if test -r "$XBSADIR3/dsmapifp.h"; then
|
||||
- XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR3"
|
||||
- XBSA_XLIBS="-ldl"
|
||||
- AC_MSG_RESULT([yes, $XBSA_CFLAGS])
|
||||
- elif test -r "$XBSADIR4/dsmapifp.h"; then
|
||||
- XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR4"
|
||||
- XBSA_XLIBS="-ldl"
|
||||
- AC_MSG_RESULT([yes, $XBSA_CFLAGS])
|
||||
- elif test -r "$XBSADIR5/dsmapifp.h"; then
|
||||
- XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR5"
|
||||
- XBSA_XLIBS="-ldl"
|
||||
- AC_MSG_RESULT([yes, $XBSA_CFLAGS])
|
||||
- elif test -r "$XBSADIR6/dsmapifp.h"; then
|
||||
- XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR6"
|
||||
- XBSA_XLIBS="-ldl"
|
||||
- AC_MSG_RESULT([yes, $XBSA_CFLAGS])
|
||||
- elif test -r "$XBSADIR1/xbsa.h"; then
|
||||
- XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
|
||||
- XBSA_XLIBS=""
|
||||
- AC_MSG_RESULT([yes, $XBSA_CFLAGS])
|
||||
- elif test -r "$XBSADIR2/xbsa.h"; then
|
||||
- XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
|
||||
- XBSA_XLIBS=""
|
||||
- AC_MSG_RESULT([yes, $XBSA_CFLAGS])
|
||||
- else
|
||||
- AC_MSG_RESULT([no, missing xbsa.h and dsmapifp.h header files])
|
||||
- fi
|
||||
-else
|
||||
- AC_MSG_RESULT([no])
|
||||
-fi
|
||||
+AC_MSG_RESULT([yes])
|
||||
AC_SUBST(XBSA_CFLAGS)
|
||||
AC_SUBST(XBSA_XLIBS)
|
||||
XLIBS="$XBSA_XLIBS $XLIBS"
|
||||
Reference in New Issue
Block a user