all-am: modules
modules: undef.h ldiskfs-sources lustre-sources
- $(MAKE) CC="$(CC)" $(CROSS_VARS) -C $(LINUX_OBJ) \
+ $(MAKE) CC="$(CC)" -C $(LINUX_OBJ) \
-f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
LINUXINCLUDE='-I$$(srctree)/arch/$$(SRCARCH)/include -Iarch/$$(SRCARCH)/include/generated -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -I$$(srctree)/arch/$$(SRCARCH)/include/uapi -Iarch/$$(SRCARCH)/include/generated/uapi -I$$(srctree)/include/uapi -Iinclude/generated/uapi -include $(CONFIG_INCLUDE)' \
$(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
EXTRA_DIST = @PACKAGE_TARNAME@.spec \
build/Makefile \
build/Rules.in \
- build/gen_filelist.sh \
config.h.in \
undef.h \
lustre-dkms_pre-build.sh \
+++ /dev/null
-#!/bin/sh
-
-# Run this script after a package install and pre uninstall
-usage()
-{
- echo "Usage: $0 <root_dir> <create|remove>"
- exit 1
-}
-
-if [ $# -ne 2 ]; then usage; fi
-if [ ! -d $1 ]; then usage; fi
-
-NAME=$(basename "$0" .sh)
-ROOT_DIR="$1"
-FILELIST="$(dirname $ROOT_DIR)/$NAME.filelist"
-MIC_LIST="$(micctrl --status | grep "mic[0-9]*:" | sed -ne 's/\(mic[0-9]*\):.*$/\1/gp')"
-case "$2" in
-create)
- EXCLUDE="\(share\|include\|src\)"
-
- # Create filelist for Intel(R) Xeon Phi(TM) infrastructure
- for i in $(rpm -ql $NAME | grep $ROOT_DIR | grep -v $EXCLUDE); do
- find $ROOT_DIR -path $i -type f -printf "file /%P $(basename $ROOT_DIR)/%P %#m 0 0\n"
- dir=$(dirname $i)
- while [ "$dir" != "$ROOT_DIR" ]; do
- echo "dir $dir 0755 0 0" | sed -e "s#$ROOT_DIR##"
- dir=$(dirname $dir)
- done
- # Link scripts for autorun after boot (NOT READY YET)
- #if [ -n "$(echo $i | grep '/init.d/')" ]; then
- # echo "slink /etc/rc3.d/S31$(basename $i) ../init.d/$(basename $i) 0755 0 0"
- #fi
- done | sort -u > $FILELIST
-
- micctrl --overlay=filelist --source=$(dirname $ROOT_DIR) --target=$FILELIST --state=on $MIC_LIST
- ;;
-remove)
- micctrl --overlay=filelist --source=$(dirname $ROOT_DIR) --target=$FILELIST --state=delete $MIC_LIST
- rm -f $FILELIST
- ;;
-*)
- usage
- ;;
-esac
-exit 0
AC_MSG_RESULT($KMP_MODDIR)
AC_SUBST(KMP_MODDIR)
-moduledir='$(CROSS_PATH)/lib/modules/$(LINUXRELEASE)/$(KMP_MODDIR)/kernel'
+moduledir='/lib/modules/$(LINUXRELEASE)/$(KMP_MODDIR)/kernel'
AC_SUBST(moduledir)
modulefsdir='$(moduledir)/fs/$(PACKAGE)'
])
#
-# LB_LINUX_CROSS
-#
-# check for cross compilation
-#
-AC_DEFUN([LB_LINUX_CROSS], [
-AC_CACHE_CHECK([for cross compilation], lb_cv_cross, [
-lb_cv_cross="no"
-AS_IF([test "x$cross_compiling" = xyes],
- [AS_CASE([$host_vendor],
- [k1om | mpss], [
- # The K1OM architecture is an extension of the x86 architecture
- # and in MPSS 2.1 it's defined in $host_vendor. But in MPSS 3.x
- # it's defined in $host_arch. So, try to support both case.
- lb_cv_cross=$($CC -v 2>&1 | grep Target: | sed -e 's/Target: //')
- AS_IF([test "$lb_cv_cross" != x86_64-k1om-linux -a \
- "$lb_cv_cross" != k1om-mpss-linux], [
- AC_MSG_ERROR([Cross compiler not found in PATH.])
- ])
- ])
- ])
-])
-AS_IF([test "$lb_cv_cross" = x86_64-k1om-linux -o \
- "$lb_cv_cross" = k1om-mpss-linux], [
- CROSS_VARS="ARCH=k1om CROSS_COMPILE=${lb_cv_cross}-"
- CROSS_PATH="${CROSS_PATH:=/opt/lustre/$VERSION/$lb_cv_cross}"
- CCAS=$CC
- # need to produce special section for debuginfo extraction
- LDFLAGS="$LDFLAGS -Wl,--build-id"
- EXTRA_KLDFLAGS="$EXTRA_KLDFLAGS -Wl,--build-id"
- AS_IF([test "x$enable_server" != xno], [
- AC_MSG_WARN([Disabling server (not supported for $lb_cv_cross).])
- enable_server="no"
- ])
- AS_IF([test "x$enable_mpitests" != xno], [
- AC_MSG_WARN([Disabling MPI tests (not supported for $lb_cv_cross).])
- enable_mpitests="no"
- ])
-])
-AC_SUBST(CROSS_VARS)
-AC_SUBST(CROSS_PATH)
-])
-
-#
# LB_ARG_REPLACE_PATH(PACKAGE, PATH)
#
AC_DEFUN([LB_ARG_REPLACE_PATH], [
])
# this is needed before we can build modules
-LB_LINUX_CROSS
LB_LINUX_VERSION
# --- check that we can build modules at all
[m4_ifvaln([$1], [AC_LANG_CONFTEST([AC_LANG_SOURCE([$1])])])dnl
rm -f build/conftest.o build/conftest.mod.c build/conftest.ko
SUBARCH=$(echo $target_cpu | sed -e 's/powerpc64le/powerpc/' -e 's/powerpc64/powerpc/' -e 's/x86_64/x86/' -e 's/i.86/x86/' -e 's/k1om/x86/' -e 's/aarch64/arm64/')
-AS_IF([AC_TRY_COMMAND(cp conftest.c build && make -d [$2] ${LD:+"LD=$LD"} CC="$CC" -f $PWD/build/Makefile LUSTRE_LINUX_CONFIG=$LINUX_CONFIG LINUXINCLUDE="$EXTRA_OFED_INCLUDE -I$LINUX/arch/$SUBARCH/include -Iinclude -Iarch/$SUBARCH/include/generated -I$LINUX/include -Iinclude2 -I$LINUX/include/uapi -Iinclude/generated -I$LINUX/arch/$SUBARCH/include/uapi -Iarch/$SUBARCH/include/generated/uapi -I$LINUX/include/uapi -Iinclude/generated/uapi ${SPL_OBJ:+-include $SPL_OBJ/spl_config.h} ${ZFS_OBJ:+-include $ZFS_OBJ/zfs_config.h} ${SPL:+-I$SPL -I$SPL/include } ${ZFS:+-I$ZFS -I$ZFS/include} -include $CONFIG_INCLUDE" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $CROSS_VARS $MODULE_TARGET=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])],
+AS_IF([AC_TRY_COMMAND(cp conftest.c build && make -d [$2] ${LD:+"LD=$LD"} CC="$CC" -f $PWD/build/Makefile LUSTRE_LINUX_CONFIG=$LINUX_CONFIG LINUXINCLUDE="$EXTRA_OFED_INCLUDE -I$LINUX/arch/$SUBARCH/include -Iinclude -Iarch/$SUBARCH/include/generated -I$LINUX/include -Iinclude2 -I$LINUX/include/uapi -Iinclude/generated -I$LINUX/arch/$SUBARCH/include/uapi -Iarch/$SUBARCH/include/generated/uapi -I$LINUX/include/uapi -Iinclude/generated/uapi ${SPL_OBJ:+-include $SPL_OBJ/spl_config.h} ${ZFS_OBJ:+-include $ZFS_OBJ/zfs_config.h} ${SPL:+-I$SPL -I$SPL/include } ${ZFS:+-I$ZFS -I$ZFS/include} -include $CONFIG_INCLUDE" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $MODULE_TARGET=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])],
[$4],
[_AC_MSG_LOG_CONFTEST
m4_ifvaln([$5],[$5])dnl])
# directories for binaries
AC_PREFIX_DEFAULT([/usr])
-sysconfdir='$(CROSS_PATH)/etc'
+sysconfdir='/etc'
AC_SUBST(sysconfdir)
# Directories for documentation and demos.
-docdir='$(datadir)/doc/$(PACKAGE)'
+docdir='${datadir}/doc/$(PACKAGE)'
AC_SUBST(docdir)
LIBCFS_PATH_DEFAULTS
if test -n "$KMP_MODDIR" ; then
RPMBINARGS="$RPMBINARGS --define \"kmoddir $KMP_MODDIR\""
fi
-if test -n "$CROSS_PATH" ; then
- if test x$enable_server = xyes ; then
- echo -e "\n"
- "*** Don't support cross compilation for the Intel(R) Xeon Phi(TM) card.\n"
- exit 1
- fi
- CROSS_SUFFIX="-mic"
- RPMBINARGS="$RPMBINARGS --define \"post_script build/gen_filelist.sh\""
- RPMBINARGS="$RPMBINARGS --define \"cross_path $CROSS_PATH\""
- RPMBINARGS="$RPMBINARGS --define \"rootdir %{cross_path}\""
- RPMBINARGS="$RPMBINARGS --define \"_prefix %{cross_path}/usr\""
- RPMBINARGS="$RPMBINARGS --define \"_mandir %{_prefix}/share/man\""
- RPMBINARGS="$RPMBINARGS --define \"_sysconfdir %{cross_path}/etc\""
- RPMBINARGS="$RPMBINARGS --define \"make_args $CROSS_VARS\""
- if test x$CC_TARGET_ARCH = x"x86_64-k1om-linux" ; then
- RPMBINARGS="$RPMBINARGS --define \"cross_requires intel-mic-gpl\""
- fi
-fi
if test x$enable_modules != xyes ; then
RPMBINARGS="$RPMBINARGS --without lustre_modules"
fi
fi
if test x$enable_server != xyes ; then
RPMBINARGS="$RPMBINARGS --without servers"
- if test -n "$CROSS_SUFFIX" ; then
- RPMBINARGS="$RPMBINARGS --define \"lustre_name lustre-client$CROSS_SUFFIX\""
- fi
fi
if test x$enable_ldiskfs != xyes ; then
RPMBINARGS="$RPMBINARGS --without ldiskfs"
}
-parse_mpss_info() {
- local file="$1"
- local build="$2"
- local distro="$3"
-
- [ -r "$file" ] || fatal 1 "Could not find MPSS info file"
-
- # convert to MPSS distro naming
- distro=${distro/sles/suse}
- distro_name=${distro%%-*}
-
- # extract links from MPSS info file
- local urls=$(cat "$file" | \
- tr -d '\t\r\n' | sed -e 's?\(</[a-zA-Z]*>\)?\1\n?g' | \
- grep '.intel.com/' | \
- sed -e 's/^.*[hH][rR][eE][fF]="\([^>"]\+\)".*$/\1/g' | \
- grep '.tar')
- local res2=""
- local res3=""
- for url in $urls; do
- local ver2=""
- local ver3=""
- # Try to match with MPSS 3.3 package
- if [[ $url =~ mpss-[0-9].[0-9](.[0-9]*)?-linux.tar ]]; then
- ver3=${url##*mpss-}
- ver3=${ver3%%-linux.tar}
- # Try to match with MPSS 3.x or 3.x.x distro package
- elif [[ $url =~ mpss-[0-9].[0-9](.[0-9]*)?-$distro.tar ]]; then
- ver3=${url##*mpss-}
- ver3=${ver3%%-$distro.tar}
- # Try to match with MPSS 3.x or 3.x.x source package
- elif [[ $url =~ mpss-src-[0-9].[0-9](.[0-9]*)?.tar ]]; then
- ver3=${url##*mpss-src-}
- ver3=${ver3%%.tar}
- # Try to match with MPSS 3.x or 3.x.x cross compiler package
- elif [[ $url =~ mpss-[0-9].[0-9](.[0-9]*)?-k1om.tar ]]; then
- ver3=${url##*mpss-}
- ver3=${ver3%%-k1om.tar}
- # Try to match with MPSS 2.1.x source package
- elif [[ $url =~ _src-[0-9].[0-9].[0-9]*-[0-9]*_$distro_name.tar ]]; then
- ver2=${url##*_src-}
- ver2=${ver2%%_$distro_name.tar}
- fi
-
- if [ -n "$ver3" ]; then
- ver3="${ver3}-0"
- if [ -z "$build" ]; then
- res3="$ver3"
- elif [ "${build%%-*}" = "${ver3%%-*}" ]; then
- res3="$res3 $url"
- fi
- elif [ -n "$ver2" ]; then
- if [ -z "$build" ]; then
- res2="$ver2"
- elif [ "$build" = "$ver2" ]; then
- res2="$res2 $url"
- fi
- fi
-
- done
-
- if [ -z "$build" ]; then
- # return a last version of MPSS
- if [ -n "$res3" ]; then
- echo "$res3"
- else
- echo "$res2"
- fi
- elif [ "${build%%.*}" = "3" ]; then
- # return URLs from MPSS info file
- echo "$res3"
- else
- # return URLs from MPSS info file
- echo "$res2"
- fi
-}
-
-# Get public information about last releases of
-# Intel Manycore Platform Software Stack (MPSS)
-download_mpss_info() {
- local file="$1"
- local force="${2:-true}"
- local url=${MPSS_URL:-"http://software.intel.com/en-us/articles/intel-manycore-platform-software-stack-mpss"}
-
- download_file "$url" "$file" "$force"
-}
-
-download_mpss() {
- local file="$1"
- local force="${2:-false}"
- local urls=$(parse_mpss_info "$file" ${MPSS_VERSION} ${MPSS_DISTRO})
-
- [ -z "$urls" ] && return 0
-
- local url
- local i=0
- for url in $urls; do
- file="$KERNELTREE/mpss_src-${MPSS_VER}-${MPSS_BLD}-${MPSS_DISTRO}-part$i.tar"
- download_file "$url" "$file" "$force"
- i=$((i+1))
- done
-}
-
load_target() {
EXTRA_VERSION_save="$EXTRA_VERSION"
}
-unpack_mpss() {
-
- [ -d mpss ] && return 0
-
- if [ "$MPSS_MAJ" = "3" ]; then
- local file
- local i
- for i in $(seq 0 9); do
- file="$KERNELTREE/mpss_src-${MPSS_VER}-${MPSS_BLD}-${MPSS_DISTRO}-part$i.tar"
- if [ -r "$file" ]; then
- untar "$file" \
- "mpss-$MPSS_VER/*/linux-*.tar.bz2" \
- "mpss-$MPSS_VER/*/kernel-dev-*.rpm" \
- "mpss-$MPSS_VER/*/ofed-driver-devel-*.rpm" \
- "mpss-$MPSS_VER/*/ofed-driver-*-devel-*.rpm"
- fi
- done
- # Extract kernel configs
- file=$(find mpss-$MPSS_VER -type f -path "*/kernel-dev-*.rpm" -print -quit)
- if ! rpm2cpio "$file" | cpio -idm; then
- echo "Error extracting MPSS kernel configs"
- return 1
- fi
- # Unpack kernel sources
- file=$(find mpss-$MPSS_VER -type f -path "*/linux-*.tar.bz2" -print -quit)
- if ! untar "$file"; then
- echo "Error unpacking MPSS kernel sources"
- return 1
- fi
- # Extract OFED headers
- file=$(find mpss-$MPSS_VER -type f -path "*/ofed-driver-*-devel-*.rpm" -print -quit)
- if ! rpm2cpio "$file" | cpio -idm; then
- # Name was changed in MPSS 3.3
- file=$(find mpss-$MPSS_VER -type f -path "*/ofed-driver-devel-*.rpm" -print -quit)
- if ! rpm2cpio "$file" | cpio -idm; then
- echo "Error extracting MPSS OFED headers"
- return 1
- fi
- fi
- # Remove unpacked archives to save space
- rm -rf mpss-$MPSS_VER
- # Make link to MPSS kernel sources
- ln -sf linux-* mpss
- else
- local dir="mpss-${MPSS_VER}-${MPSS_BLD}-${MPSS_DISTRO%%-*}"
-
- mkdir $dir || return 255
- pushd $dir >/dev/null || return 255
- if ! untar "$KERNELTREE/mpss_src-${MPSS_VER}-${MPSS_BLD}-${MPSS_DISTRO}-part0.tar" "*/gpl/*full_src*"; then
- popd >/dev/null
- rm -rf $dir
- echo "Error unpacking MPSS tarball 1"
- return 1
- fi
- local file=$(find . -type f -path "*/gpl/*full_src*")
- if ! untar "$file"; then
- popd >/dev/null
- rm -rf $dir
- echo "Error unpacking MPSS tarball 2"
- return 1
- fi
- popd >/dev/null
- ln -sf $dir mpss
- fi
-
-}
-
do_patch_linux() {
local do_patch=${1:-true}
# Only zfs Lustre DKMS Server is supported
build_lustre_dkms() {
- [ -n "$MPSS_VERSION" ] && return 0
local ver=$(eval echo $(awk '/LUSTRE_VERSION_STRING/ {print $3}' lustre/include/lustre_ver.h))
echo "Building Lustre DKMS RPMs for: $BUILD_ARCHS..."
./configure --enable-dist || return 255
return 0
}
-prepare_mpss() {
-
- pushd mpss >/dev/null || return 255
- if [ "$MPSS_MAJ" = "3" ]; then
- cp -f ../boot/config-* .config
- if ! make ARCH=k1om silentoldconfig ; then
- popd >/dev/null
- return 1
- fi
- if ! make ARCH=k1om modules_prepare ; then
- popd >/dev/null
- return 1
- fi
- cp -f ../boot/Module.symvers-* Module.symvers
- else
- if ! make defconfig-miclinux; then
- popd >/dev/null
- return 1
- fi
- if ! make -C card/kernel ARCH=k1om modules_prepare ; then
- popd >/dev/null
- return 1
- fi
- fi
- popd >/dev/null
-
-}
-
stage() {
[ "$STAGEDIR" ] || return 0
[ -r ~/.lbuildrc ] && . ~/.lbuildrc
-options=$(getopt -o D:h -l kerneltree:,distro:,kernelrpm:,reusebuild:,patchless,ccache,norpm,external-patches:,timestamp:,extraversion:,kerneldir:,linux:,lustre:,nodownload,nosrc,noiokit,ofed-version:,mpss-version:,publish,disable-zfs,release,set-value:,src,stage:,target:,target-archs:,with-linux:,xen -- "$@")
+options=$(getopt -o D:h -l kerneltree:,distro:,kernelrpm:,reusebuild:,patchless,ccache,norpm,external-patches:,timestamp:,extraversion:,kerneldir:,linux:,lustre:,nodownload,nosrc,noiokit,ofed-version:,publish,disable-zfs,release,set-value:,src,stage:,target:,target-archs:,with-linux:,xen -- "$@")
if [ $? != 0 ]; then
usage 1
OFED_VERSION="$2"
shift 2
;;
- --mpss-version)
- MPSS_VERSION="$2"
- shift 2
- ;;
--publish)
shift
;;
unpack_ofed || fatal 1 "Error unpacking OFED tarball"
fi
-if [ -n "$MPSS_VERSION" ]; then
- [ -z "$MPSS_DISTRO" ] && MPSS_DISTRO=$(autodetect_distro)
-
- MPSS_INFO=$(mktemp -u mpss-info-XXXXXXXXXX.html)
- download_mpss_info "$MPSS_INFO"
-
- if [ "$MPSS_VERSION" = "last" ]; then
- MPSS_VERSION=$(parse_mpss_info "$MPSS_INFO" "" ${MPSS_DISTRO})
- [ -z "$MPSS_VERSION" ] &&
- fatal 1 "Could not determine the last MPSS version"
- fi
-
- MPSS_MAJ=${MPSS_VERSION%%.*}
- MPSS_VER=${MPSS_VERSION%%-*}
- MPSS_BLD=${MPSS_VERSION##*-}
- [ "$MPSS_VER" = "$MPSS_BLD" ] && MPSS_BLD=0
-
- download_mpss "$MPSS_INFO"
- [ -r "$MPSS_INFO" ] && rm -f "$MPSS_INFO"
- echo "Building with MPSS $MPSS_VER-$MPSS_BLD"
- unpack_mpss || fatal 1 "Error unpacking MPSS tarballs"
- prepare_mpss || fatal 1 "Error preparing MPSS for kernel modules build"
-
- if [ -z "$MPSS_OFED" ]; then
- MPSS_OFED=$(find $PWD -type f -path "*/ofed-driver*/Module.symvers" -print -quit)
- if [ -n "$MPSS_OFED" ]; then
- MPSS_OFED="--with-o2ib=$(dirname $MPSS_OFED)"
- else
- MPSS_OFED="--without-o2ib"
- fi
- fi
-
- # disable unsupported parts:
- PATCHLESS=true
- IOKITRPM=false
- LDISKFSRPM=false
- WITH_ZFS="no"
-
- # define variables for cross compilation:
- CROSS_SUFFIX="-mic"
- if [ "$MPSS_MAJ" = "3" ]; then
- CC_TARGET_ARCH=k1om-mpss-linux
- LINUX="$TOPDIR/mpss"
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"cross_requires /bin/sh\""
- else
- CC_TARGET_ARCH=x86_64-k1om-linux
- LINUX="$TOPDIR/mpss/card/kernel"
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"cross_requires intel-mic-gpl = $MPSS_VER\""
- fi
- LUSTRE_VERSION=$(sed -n -e 's/^VERSION = //p' lustre/META)
- CONFIGURE_FLAGS="$CONFIGURE_FLAGS $MPSS_OFED --host=$CC_TARGET_ARCH --build=x86_64-pc-linux"
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"post_script build/gen_filelist.sh\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"make_args ARCH=k1om CROSS_COMPILE=${CC_TARGET_ARCH}-\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"cross_path ${CROSS_PATH:=/opt/lustre/${LUSTRE_VERSION}/${CC_TARGET_ARCH}}\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"rootdir %{cross_path}\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"_prefix %{cross_path}/usr\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"_mandir %{_prefix}/share/man\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"_sysconfdir %{cross_path}/etc\""
- RPMBUILD_DEFS="$RPMBUILD_DEFS --define \"kmoddir extra\""
-
- # redefine CC for proper ./configure during rpmbuild
- export CC=${CC_TARGET_ARCH}-gcc
-fi
-
# make sure the RPM build environment is set up
create_rpmbuild_dirs
%endif
%endif
-%if %{defined cross_path} && %{defined post_script}
-%define rpm_post_base %(dirname %{cross_path})/%{lustre_name}
-%endif
-
-# SUSE don't support .debug_info section from cross compiler:
-# /usr/lib/rpm/debugedit: Unhandled relocation 10 in .debug_info section
-%if %{defined cross_path} && 0%{?suse_version}
-%global __debug_install_post %{nil}
-%global __debug_package %{nil}
-%global debug_package %{nil}
-%endif
-
Summary: Lustre File System
Name: %{lustre_name}
Version: %{version}
Requires: lustre-osd-mount
Provides: lustre-client = %{version}-%{fullrelease}
%endif
-%if %{defined cross_requires}
-Requires: %{cross_requires}
-AutoReqProv: no
-%else
# GSS requires this: BuildRequires: pkgconfig, libgssapi-devel >= 0.10
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
#suse don't support selinux
BuildRequires: libselinux-devel
Requires: libselinux
%endif
-%endif
%description
Userspace tools and files for the Lustre file system.
%if %{with lustre_modules}
%package modules
Summary: Kernel Lustre modules for Linux %{kversion}
-%if %{defined cross_requires}
-Requires: %{cross_requires}
-AutoReqProv: no
-%else
# for SLES11, we need nothing here
%if %{_vendor}=="redhat" || %{_vendor}=="fedora"
%if %{defined krequires}
BuildRequires: libyaml-devel
%endif
%endif
-%endif
Group: Development/Kernel
%description modules
echo '%{_sbindir}/wirecheck' >>lustre-tests.files
echo '%{_sbindir}/wiretest' >>lustre-tests.files
%if %{with lustre_modules}
-echo '%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
-%endif
-%endif
-
-%if %{defined cross_path}
-%if %{defined rpm_post_base}
-POST_SCRIPT=$RPM_BUILD_DIR/lustre-%{version}/%{post_script}
-if [ -f $POST_SCRIPT ]; then
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}.sh
- echo '%attr(0555, root, root) %{rpm_post_base}.sh' >>lustre.files
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-modules.sh
-%if %{with ldiskfs}
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-osd-ldiskfs.sh
-%if %{with lustre_utils}
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-mount-osd-ldiskfs.sh
-%endif
-%endif
-%if %{with zfs}
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-osd-zfs.sh
-%if %{with lustre_utils}
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-mount-osd-zfs.sh
-%endif
-%endif
-%if %{with lustre_tests}
- cp -f $POST_SCRIPT $RPM_BUILD_ROOT/%{rpm_post_base}-tests.sh
- echo '%attr(0555, root, root) %{rpm_post_base}-tests.sh' >>lustre-tests.files
-%endif
-fi
-%endif
-%else
-%if %{with lustre_modules}
-# mark modules executable for find-debuginfo.sh
-find $RPM_BUILD_ROOT%{?rootdir}/lib/modules/%{kversion}/%{kmoddir} \
- -name \*.ko -type f -exec chmod u+x {} \;
+echo '/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko' >>lustre-tests.files
%endif
%endif
%{_bindir}/lfs
%{_bindir}/lfs_migrate
-%{?rootdir}/sbin/mount.lustre
+/sbin/mount.lustre
%{_libdir}/libptlctl.a
%{_libdir}/libcfsutil.a
%{_libdir}/liblustreapi.a
%if %{with lustre_modules}
%files modules
%defattr(-,root,root)
-%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/*
+/lib/modules/%{kversion}/%{kmoddir}/*
%if %{with lustre_tests}
-%exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
+%exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/llog_test.ko
%endif
%if %{with ldiskfs}
-%exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
-%exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
+%exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
+%exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
%endif
%if %{with zfs}
-%exclude %{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
-%endif
-%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-modules.sh
+%exclude /lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
%endif
%doc COPYING
%doc ChangeLog-lustre
%if %{with ldiskfs}
%files osd-ldiskfs
%defattr(-,root,root)
-%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
-%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
-%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-osd-ldiskfs.sh
-%endif
+/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/ldiskfs.ko
+/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_ldiskfs.ko
%if %{with lustre_utils}
%files osd-ldiskfs-mount
%defattr(-,root,root)
%{_libdir}/@PACKAGE@/mount_osd_ldiskfs.so
-%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-mount-osd-ldiskfs.sh
-%endif
%endif
%endif
%if %{with zfs}
%files osd-zfs
%defattr(-,root,root)
-%{?rootdir}/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
+/lib/modules/%{kversion}/%{kmoddir}/kernel/fs/@PACKAGE@/osd_zfs.ko
%{_sbindir}/zfsobj2fid
-%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-osd-zfs.sh
-%endif
%if %{with lustre_utils}
%files osd-zfs-mount
%defattr(-,root,root)
%{_libdir}/@PACKAGE@/mount_osd_zfs.so
-%if %{defined rpm_post_base}
-%attr(0555, root, root) %{rpm_post_base}-mount-osd-zfs.sh
-%endif
%endif
%endif
%endif # with lustre_modules
%doc lustre-iokit/stats-collect/README.iokit-lstats
%endif
-%if %{defined rpm_post_base}
-%post
-if [ -x %{rpm_post_base}.sh ]; then
- %{rpm_post_base}.sh %{cross_path} create
-fi
-
-%preun
-if [ -x %{rpm_post_base}.sh ]; then
- %{rpm_post_base}.sh %{cross_path} remove
-fi
-%endif
-
%if %{with lustre_modules}
%post modules
-%if %{defined rpm_post_base}
-if [ -x %{rpm_post_base}-modules.sh ]; then
- %{rpm_post_base}-modules.sh %{cross_path} create
-fi
-%else
if [ -f /boot/System.map-%{kversion} ]; then
depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
else
into /etc/modprobe.d/unsupported_modules"
fi
-%endif
%if %{with ldiskfs}
%post osd-ldiskfs
-%if %{defined rpm_post_base}
-if [ -x %{rpm_post_base}-osd-ldiskfs.sh ]; then
- %{rpm_post_base}-osd-ldiskfs.sh %{cross_path} create
-fi
-%else
if [ -f /boot/System.map-%{kversion} ]; then
depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
else
into /etc/modprobe.d/unsupported_modules"
fi
%endif
-%if %{with lustre_utils} && %{defined rpm_post_base}
-%post osd-ldiskfs-mount
-if [ -x %{rpm_post_base}-mount-osd-ldiskfs.sh ]; then
- %{rpm_post_base}-mount-osd-ldiskfs.sh %{cross_path} create
-fi
-%endif
-%endif
%if %{with zfs}
%post osd-zfs
-%if %{defined rpm_post_base}
-if [ -x %{rpm_post_base}-osd-zfs.sh ]; then
- %{rpm_post_base}-osd-zfs.sh %{cross_path} create
-fi
-%else
if [ -f /boot/System.map-%{kversion} ]; then
depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
else
into /etc/modprobe.d/unsupported_modules"
fi
%endif
-%if %{with lustre_utils} && %{defined rpm_post_base}
-%post osd-zfs-mount
-if [ -x %{rpm_post_base}-mount-osd-zfs.sh ]; then
- %{rpm_post_base}-mount-osd-zfs.sh %{cross_path} create
-fi
-%endif
-%endif
%preun modules
-%if %{defined rpm_post_base}
-if [ -x %{rpm_post_base}-modules.sh ]; then
- %{rpm_post_base}-modules.sh %{cross_path} remove
-fi
-%else
MODULES_RPM_NAME=$(rpm -q %{name}-modules | grep "%{version}-%{release}")
rpm -ql $MODULES_RPM_NAME | grep '\.ko$' > /var/run/%{name}-modules || true
-%endif
%if %{with ldiskfs}
%preun osd-ldiskfs
-%if %{defined rpm_post_base}
-if [ -x %{rpm_post_base}-osd-ldiskfs.sh ]; then
- %{rpm_post_base}-osd-ldiskfs.sh %{cross_path} remove
-fi
-%else
OSD_LDISKFS_RPM_NAME=$(rpm -q %{name}-osd-ldiskfs | grep "%{version}-%{release}")
rpm -ql $OSD_LDISKFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-ldiskfs || true
%endif
-%if %{with lustre_utils} && %{defined rpm_post_base}
-%preun osd-ldiskfs-mount
-if [ -x %{rpm_post_base}-mount-osd-ldiskfs.sh ]; then
- %{rpm_post_base}-mount-osd-ldiskfs.sh %{cross_path} remove
-fi
-%endif
-%endif
%if %{with zfs}
%preun osd-zfs
-%if %{defined rpm_post_base}
-if [ -x %{rpm_post_base}-osd-zfs.sh ]; then
- %{rpm_post_base}-osd-zfs.sh %{cross_path} remove
-fi
-%else
OSD_ZFS_RPM_NAME=$(rpm -q %{name}-osd-zfs | grep "%{version}-%{release}")
rpm -ql $OSD_ZFS_RPM_NAME | grep '\.ko$' > /var/run/%{name}-osd-zfs || true
%endif
-%if %{with lustre_utils} && %{defined rpm_post_base}
-%preun osd-zfs-mount
-if [ -x %{rpm_post_base}-mount-osd-zfs.sh ]; then
- %{rpm_post_base}-mount-osd-zfs.sh %{cross_path} remove
-fi
-%endif
-%endif
-%if %{undefined cross_path}
%postun modules
if [ -f /boot/System.map-%{kversion} ]; then
depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
fi
rm /var/run/%{name}-osd-zfs
%endif
-%endif
%endif # with lustre_modules
%if %{with lustre_tests}
-%if %{defined rpm_post_base}
-%post tests
-if [ -x %{rpm_post_base}-tests.sh ]; then
- %{rpm_post_base}-tests.sh %{cross_path} create
-fi
-
-%preun tests
-if [ -x %{rpm_post_base}-tests.sh ]; then
- %{rpm_post_base}-tests.sh %{cross_path} remove
-fi
-%else
%if %{with lustre_modules}
%post tests
if [ -f /boot/System.map-%{kversion} ]; then
fi
%endif
%endif
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
AC_SUBST(LUSTRE)
# mount.lustre
-rootsbindir='$(CROSS_PATH)/sbin'
+rootsbindir='/sbin'
AC_SUBST(rootsbindir)
demodir='$(docdir)/demo'