From: Eric Biggers <ebiggers3@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: [PATCH 7/7] xfstests-bld: optionally build keyctl
Date: Thu, 25 May 2017 12:25:49 -0700 [thread overview]
Message-ID: <20170525192549.138518-8-ebiggers3@gmail.com> (raw)
In-Reply-To: <20170525192549.138518-1-ebiggers3@gmail.com>
From: Eric Biggers <ebiggers@google.com>
Add support for optionally including the keyctl program in the xfstests
tarball built by xfstests-bld. keyctl is used by the filesystem
encryption tests. Although keyctl is already included in the test
appliances, including it in the xfstests tarball can be useful in cases
where the tarball is being used on its own, without being contained in a
dedicated test appliance.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
.gitignore | 1 +
Documentation/building-xfstests.md | 4 ++++
Makefile | 1 +
build-all | 28 ++++++++++++++++++++++++----
config | 5 +++++
get-all | 1 +
6 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index db604f8..6831ef0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,6 +62,7 @@ MAKELOG
/e2fsprogs-libs/lib/blkid/blkid.h
/e2fsprogs-libs/lib/uuid/uuid.h
/fio/
+/keyutils/
/popt/.deps/
/popt/Doxyfile
/popt/Makefile
diff --git a/Documentation/building-xfstests.md b/Documentation/building-xfstests.md
index 4ec3042..fc1c783 100644
--- a/Documentation/building-xfstests.md
+++ b/Documentation/building-xfstests.md
@@ -32,6 +32,10 @@ be free to make local changes or update it with "git pull" as desired.
the fio tree have caused test regressions in the past, so it may be
preferable to let things be as far as the fio repo is concerned.)
+The build also supports some optional repositories which are only
+included when their URLs are uncommented in the config file; see the
+config file for a full list.
+
## Installing the necessary packages to build xfstests
In order to build xfstests, a number of prerequisite packages are
diff --git a/Makefile b/Makefile
index ced32b2..9d505f3 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
#
REPOS = fio \
+ keyutils \
quota \
stress-ng \
xfsprogs-dev \
diff --git a/build-all b/build-all
index b41c51a..c3392ad 100755
--- a/build-all
+++ b/build-all
@@ -24,6 +24,7 @@ case "$CROSS_COMPILE" in
SKIP_QUOTA=yes
SKIP_FIO=yes
SKIP_DBENCH=yes
+ SKIP_KEYUTILS=yes
;;
esac
@@ -43,13 +44,13 @@ function set_skip_all () {
SKIP_XFSTESTS=yes
SKIP_QUOTA=yes
SKIP_KVM_UTILS=yes
+ SKIP_KEYUTILS=yes
SKIP_STRESS_NG=yes
}
-if test ! -d stress-ng
-then
- SKIP_STRESS_NG=yes
-fi
+# Optional components
+[ -d keyutils ] || SKIP_KEYUTILS=yes
+[ -d stress-ng ] || SKIP_STRESS_NG=yes
while [ "$1" != "" ]; do
@@ -88,6 +89,10 @@ while [ "$1" != "" ]; do
set_skip_all
unset SKIP_FIO
;;
+ --keyutils-only)
+ set_skip_all
+ unset SKIP_KEYUTILS
+ ;;
--quota-only)
set_skip_all
unset SKIP_QUOTA
@@ -182,6 +187,21 @@ if test -z "$SKIP_AIO" ; then
rm $DESTDIR/lib/libaio.so*
fi
+if test -z "$SKIP_KEYUTILS" ; then
+ build_start "keyutils"
+ (cd keyutils ;
+ ver=$(git describe --always --dirty); echo "keyutils $ver ($(git log -1 --pretty=%cD))" > ../keyutils.ver ;
+
+ # For now we only care about keyctl, not libkeyutils. Therefore, specify
+ # NO_SOLIB=1 so that libkeyutils is only built as a static library. Then
+ # keyctl will be statically linked to it, and we won't have to install
+ # libkeyutils.so.
+ make $J NO_SOLIB=1 CFLAGS="$LCF" LDFLAGS="$EXEC_LDFLAGS" keyctl ;
+
+ install -D -m 0755 keyctl $DESTDIR/bin/keyctl ;
+ )
+fi
+
if test -z "$SKIP_STRESS_NG" ; then
build_start "stress-ng"
mkdir -p $DESTDIR/lib
diff --git a/config b/config
index 0703829..5b21803 100644
--- a/config
+++ b/config
@@ -7,6 +7,11 @@ XFSPROGS_GIT=git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git
FIO_GIT=git://git.kernel.dk/fio.git
QUOTA_GIT=git://git.kernel.org/pub/scm/utils/quota/quota-tools.git
+# Optional repositories, uncomment only if needed
+#
+# KEYUTILS_GIT=git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git
+# STRESS_NG_GIT=https://github.com/ColinIanKing/stress-ng
+
FIO_COMMIT=fio-2.19
QUOTA_COMMIT=e0b6335
XFSPROGS_COMMIT=v4.11.0-rc1
diff --git a/get-all b/get-all
index bb1cd4c..45f6c57 100755
--- a/get-all
+++ b/get-all
@@ -107,6 +107,7 @@ setup_repo xfsprogs-dev XFSPROGS_GIT XFSPROGS_COMMIT true
setup_repo xfstests-dev XFSTESTS_GIT XFSTESTS_COMMIT true
# optional repositories
+setup_repo keyutils KEYUTILS_GIT KEYUTILS_COMMIT false
setup_repo stress-ng STRESS_NG_GIT STRESS_NG_COMMIT false
# Make sure acl doesn't try regenerate these files because of the
--
2.13.0.219.gdb65acc882-goog
next prev parent reply other threads:[~2017-05-25 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 19:25 [PATCH 0/7] xfstests-bld: get-all improvements and adding keyctl Eric Biggers
2017-05-25 19:25 ` [PATCH 1/7] get-all: use helper function to clone repositories Eric Biggers
2017-05-25 19:25 ` [PATCH 2/7] get-all: check out correct commits in already-cloned repositories Eric Biggers
2017-05-25 19:25 ` [PATCH 3/7] get-all: fail if optional repositories have been deconfigured Eric Biggers
2017-05-25 19:25 ` [PATCH 4/7] Makefile: always run get-all Eric Biggers
2017-05-25 19:25 ` [PATCH 5/7] do-all, get-all: run with 'set -e' Eric Biggers
2017-05-25 19:25 ` [PATCH 6/7] Makefile: check whether xfsprogs-dev exists before cleaning it Eric Biggers
2017-05-25 19:25 ` Eric Biggers [this message]
2017-05-27 3:37 ` [PATCH 0/7] xfstests-bld: get-all improvements and adding keyctl Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170525192549.138518-8-ebiggers3@gmail.com \
--to=ebiggers3@gmail.com \
--cc=ebiggers@google.com \
--cc=fstests@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox