aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/zimport.sh
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-02-15 17:53:18 -0800
committerBrian Behlendorf <[email protected]>2018-05-29 16:00:33 -0700
commit93ce2b4ca5a40c41ac945cd3aaf4a4a22bb751e1 (patch)
tree6832f5c9dfdbe0f0bd5c8708344a769676b1f95d /scripts/zimport.sh
parent1272941f49321bcb7b26025670720c98785427ee (diff)
Update build system and packaging
Minimal changes required to integrate the SPL sources in to the ZFS repository build infrastructure and packaging. Build system and packaging: * Renamed SPL_* autoconf m4 macros to ZFS_*. * Removed redundant SPL_* autoconf m4 macros. * Updated the RPM spec files to remove SPL package dependency. * The zfs package obsoletes the spl package, and the zfs-kmod package obsoletes the spl-kmod package. * The zfs-kmod-devel* packages were updated to add compatibility symlinks under /usr/src/spl-x.y.z until all dependent packages can be updated. They will be removed in a future release. * Updated copy-builtin script for in-kernel builds. * Updated DKMS package to include the spl.ko. * Updated stale AUTHORS file to include all contributors. * Updated stale COPYRIGHT and included the SPL as an exception. * Renamed README.markdown to README.md * Renamed OPENSOLARIS.LICENSE to LICENSE. * Renamed DISCLAIMER to NOTICE. Required code changes: * Removed redundant HAVE_SPL macro. * Removed _BOOT from nvpairs since it doesn't apply for Linux. * Initial header cleanup (removal of empty headers, refactoring). * Remove SPL repository clone/build from zimport.sh. * Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due to build issues when forcing C99 compilation. * Replaced legacy ACCESS_ONCE with READ_ONCE. * Include needed headers for `current` and `EXPORT_SYMBOL`. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> TEST_ZIMPORT_SKIP="yes" Closes #7556
Diffstat (limited to 'scripts/zimport.sh')
-rwxr-xr-xscripts/zimport.sh75
1 files changed, 1 insertions, 74 deletions
diff --git a/scripts/zimport.sh b/scripts/zimport.sh
index 61c9aba4a..426c329c9 100755
--- a/scripts/zimport.sh
+++ b/scripts/zimport.sh
@@ -42,9 +42,7 @@
# --------------------- ZFS on Linux Source Versions --------------
# zfs-0.6.2 master 0.6.2-175_g36eb554
# -----------------------------------------------------------------
-# Clone SPL Local Local Skip
# Clone ZFS Local Local Skip
-# Build SPL Pass Pass Skip
# Build ZFS Pass Pass Skip
# -----------------------------------------------------------------
# zevo-1.1.1 Pass Pass Pass
@@ -190,7 +188,6 @@ trap 'rm -Rf "$SRC_DIR"' INT TERM EXIT
populate "$SRC_DIR" 10 100
SRC_DIR="$TEST_DIR/src"
-SRC_DIR_SPL="$SRC_DIR/spl"
SRC_DIR_ZFS="$SRC_DIR/zfs"
if [ "$COLOR" = "no" ]; then
@@ -224,9 +221,6 @@ fail() {
#
# Set several helper variables which are derived from a source tag.
#
-# SPL_TAG - The tag zfs-x.y.z is translated to spl-x.y.z.
-# SPL_DIR - The spl directory name.
-# SPL_URL - The spl github URL to fetch the tarball.
# ZFS_TAG - The passed zfs-x.y.z tag
# ZFS_DIR - The zfs directory name
# ZFS_URL - The zfs github URL to fetch the tarball
@@ -234,10 +228,6 @@ fail() {
src_set_vars() {
local TAG=$1
- SPL_TAG="${TAG//zfs/spl}"
- SPL_DIR="$SRC_DIR_SPL/$SPL_TAG"
- SPL_URL="$REPO/spl/tarball/$SPL_TAG"
-
ZFS_TAG="$TAG"
ZFS_DIR="$SRC_DIR_ZFS/$ZFS_TAG"
ZFS_URL="$REPO/zfs/tarball/$ZFS_TAG"
@@ -397,43 +387,6 @@ echo -e "\n-----------------------------------------------------------------"
# Attempt to generate the tarball from your local git repository, if that
# fails then attempt to download the tarball from Github.
#
-printf "%-16s" "Clone SPL"
-for TAG in $SRC_TAGS; do
- src_set_vars "$TAG"
-
- if [ -d "$SPL_DIR" ]; then
- skip_nonewline
- elif [ "$SPL_TAG" = "installed" ]; then
- skip_nonewline
- else
- cd "$SRC_DIR" || fail "Failed 'cd $SRC_DIR'"
-
- if [ ! -d "$SRC_DIR_SPL" ]; then
- mkdir -p "$SRC_DIR_SPL"
- fi
-
- git archive --format=tar --prefix="$SPL_TAG/ $SPL_TAG" \
- -o "$SRC_DIR_SPL/$SPL_TAG.tar" &>/dev/null || \
- rm "$SRC_DIR_SPL/$SPL_TAG.tar"
- if [ -s "$SRC_DIR_SPL/$SPL_TAG.tar" ]; then
- tar -xf "$SRC_DIR_SPL/$SPL_TAG.tar" -C "$SRC_DIR_SPL"
- rm "$SRC_DIR_SPL/$SPL_TAG.tar"
- echo -n -e "${COLOR_GREEN}Local${COLOR_RESET}\t\t"
- else
- mkdir -p "$SPL_DIR" || fail "Failed to create $SPL_DIR"
- curl -sL "$SPL_URL" | tar -xz -C "$SPL_DIR" \
- --strip-components=1 || \
- fail "Failed to download $SPL_URL"
- echo -n -e "${COLOR_GREEN}Remote${COLOR_RESET}\t\t"
- fi
- fi
-done
-printf "\n"
-
-#
-# Attempt to generate the tarball from your local git repository, if that
-# fails then attempt to download the tarball from Github.
-#
printf "%-16s" "Clone ZFS"
for TAG in $SRC_TAGS; do
src_set_vars "$TAG"
@@ -468,31 +421,6 @@ done
printf "\n"
# Build the listed tags
-printf "%-16s" "Build SPL"
-for TAG in $SRC_TAGS; do
- src_set_vars "$TAG"
-
- if [ -f "$SPL_DIR/module/spl/spl.ko" ]; then
- skip_nonewline
- elif [ "$SPL_TAG" = "installed" ]; then
- skip_nonewline
- else
- cd "$SPL_DIR" || fail "Failed 'cd $SPL_DIR'"
- make distclean &>/dev/null
- ./autogen.sh >>"$CONFIG_LOG" 2>&1 || \
- fail "Failed SPL 'autogen.sh'"
- # shellcheck disable=SC2086
- ./configure $CONFIG_OPTIONS >>"$CONFIG_LOG" 2>&1 || \
- fail "Failed SPL 'configure $CONFIG_OPTIONS'"
- # shellcheck disable=SC2086
- make $MAKE_OPTIONS >>"$MAKE_LOG" 2>&1 || \
- fail "Failed SPL 'make $MAKE_OPTIONS'"
- pass_nonewline
- fi
-done
-printf "\n"
-
-# Build the listed tags
printf "%-16s" "Build ZFS"
for TAG in $SRC_TAGS; do
src_set_vars "$TAG"
@@ -507,8 +435,7 @@ for TAG in $SRC_TAGS; do
./autogen.sh >>"$CONFIG_LOG" 2>&1 || \
fail "Failed ZFS 'autogen.sh'"
# shellcheck disable=SC2086
- ./configure --with-spl="$SPL_DIR" $CONFIG_OPTIONS \
- >>"$CONFIG_LOG" 2>&1 || \
+ ./configure $CONFIG_OPTIONS >>"$CONFIG_LOG" 2>&1 || \
fail "Failed ZFS 'configure $CONFIG_OPTIONS'"
# shellcheck disable=SC2086
make $MAKE_OPTIONS >>"$MAKE_LOG" 2>&1 || \