* [PATCH] xfsprogs: make scrub build config-optional
@ 2018-09-24 17:07 Eric Sandeen
2018-09-25 13:08 ` Bill O'Donnell
2018-09-25 14:19 ` Darrick J. Wong
0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2018-09-24 17:07 UTC (permalink / raw)
To: linux-xfs
This lets us do:
# ./configure --enable-scrub=no
or
# ./configure --disable-scrub
for any distros that may not want to ship the experimental scrub utility.
The default is still to build scrub.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
(skipping libicu checks is maybe overkill, I can drop that
if preferred; checking but not using is harmless)
diff --git a/Makefile b/Makefile
index 6774825..dd6ad16 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,11 @@ LIBFROG_SUBDIR = libfrog
DLIB_SUBDIRS = libxlog libxcmd libhandle
LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \
- mdrestore repair rtcp m4 man doc debian spaceman scrub
+ mdrestore repair rtcp m4 man doc debian spaceman
+
+ifeq ("$(ENABLE_SCRUB)","yes")
+TOOL_SUBDIRS += scrub
+endif
ifneq ("$(PKG_PLATFORM)","darwin")
TOOL_SUBDIRS += fsr
diff --git a/configure.ac b/configure.ac
index 5fdf78e..467ca2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,9 +95,15 @@ AC_ARG_ENABLE(lto,
enable_lto=probe)
AC_SUBST(enable_lto)
+# Enable xfs_scrub build
+AC_ARG_ENABLE(scrub,
+[ --enable-scrub=[yes/no] Enable build of xfs_scrub utility [default=yes]],,
+ enable_scrub=yes)
+AC_SUBST(enable_scrub)
+
# Enable libicu for xfs_scrubbing of malicious unicode sequences in names
AC_ARG_ENABLE(libicu,
-[ --enable-libicu=[yes/no] Enable Unicode name scanning (libicu) [default=probe]],,
+[ --enable-libicu=[yes/no] Enable Unicode name scanning in xfs_scrub (libicu) [default=probe]],,
enable_libicu=probe)
#
@@ -178,11 +184,13 @@ AC_HAVE_DEVMAPPER
AC_HAVE_MALLINFO
AC_PACKAGE_WANT_ATTRIBUTES_H
AC_HAVE_LIBATTR
-if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
- AC_HAVE_LIBICU
-fi
-if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
- AC_MSG_ERROR([libicu not found.])
+if test "$enable_scrub" = "yes"; then
+ if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
+ AC_HAVE_LIBICU
+ fi
+ if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
+ AC_MSG_ERROR([libicu not found.])
+ fi
fi
AC_HAVE_OPENAT
AC_HAVE_FSTATAT
diff --git a/include/builddefs.in b/include/builddefs.in
index f7d39a4..f3fc187 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -81,6 +81,7 @@ ENABLE_GETTEXT = @enable_gettext@
ENABLE_EDITLINE = @enable_editline@
ENABLE_READLINE = @enable_readline@
ENABLE_BLKID = @enable_blkid@
+ENABLE_SCRUB = @enable_scrub@
HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfsprogs: make scrub build config-optional
2018-09-24 17:07 [PATCH] xfsprogs: make scrub build config-optional Eric Sandeen
@ 2018-09-25 13:08 ` Bill O'Donnell
2018-09-25 14:19 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Bill O'Donnell @ 2018-09-25 13:08 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Mon, Sep 24, 2018 at 12:07:00PM -0500, Eric Sandeen wrote:
> This lets us do:
>
> # ./configure --enable-scrub=no
> or
> # ./configure --disable-scrub
>
> for any distros that may not want to ship the experimental scrub utility.
>
> The default is still to build scrub.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks good.
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
> ---
>
> (skipping libicu checks is maybe overkill, I can drop that
> if preferred; checking but not using is harmless)
>
> diff --git a/Makefile b/Makefile
> index 6774825..dd6ad16 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -49,7 +49,11 @@ LIBFROG_SUBDIR = libfrog
> DLIB_SUBDIRS = libxlog libxcmd libhandle
> LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
> TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \
> - mdrestore repair rtcp m4 man doc debian spaceman scrub
> + mdrestore repair rtcp m4 man doc debian spaceman
> +
> +ifeq ("$(ENABLE_SCRUB)","yes")
> +TOOL_SUBDIRS += scrub
> +endif
>
> ifneq ("$(PKG_PLATFORM)","darwin")
> TOOL_SUBDIRS += fsr
> diff --git a/configure.ac b/configure.ac
> index 5fdf78e..467ca2d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -95,9 +95,15 @@ AC_ARG_ENABLE(lto,
> enable_lto=probe)
> AC_SUBST(enable_lto)
>
> +# Enable xfs_scrub build
> +AC_ARG_ENABLE(scrub,
> +[ --enable-scrub=[yes/no] Enable build of xfs_scrub utility [default=yes]],,
> + enable_scrub=yes)
> +AC_SUBST(enable_scrub)
> +
> # Enable libicu for xfs_scrubbing of malicious unicode sequences in names
> AC_ARG_ENABLE(libicu,
> -[ --enable-libicu=[yes/no] Enable Unicode name scanning (libicu) [default=probe]],,
> +[ --enable-libicu=[yes/no] Enable Unicode name scanning in xfs_scrub (libicu) [default=probe]],,
> enable_libicu=probe)
>
> #
> @@ -178,11 +184,13 @@ AC_HAVE_DEVMAPPER
> AC_HAVE_MALLINFO
> AC_PACKAGE_WANT_ATTRIBUTES_H
> AC_HAVE_LIBATTR
> -if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
> - AC_HAVE_LIBICU
> -fi
> -if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
> - AC_MSG_ERROR([libicu not found.])
> +if test "$enable_scrub" = "yes"; then
> + if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
> + AC_HAVE_LIBICU
> + fi
> + if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
> + AC_MSG_ERROR([libicu not found.])
> + fi
> fi
> AC_HAVE_OPENAT
> AC_HAVE_FSTATAT
> diff --git a/include/builddefs.in b/include/builddefs.in
> index f7d39a4..f3fc187 100644
> --- a/include/builddefs.in
> +++ b/include/builddefs.in
> @@ -81,6 +81,7 @@ ENABLE_GETTEXT = @enable_gettext@
> ENABLE_EDITLINE = @enable_editline@
> ENABLE_READLINE = @enable_readline@
> ENABLE_BLKID = @enable_blkid@
> +ENABLE_SCRUB = @enable_scrub@
>
> HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfsprogs: make scrub build config-optional
2018-09-24 17:07 [PATCH] xfsprogs: make scrub build config-optional Eric Sandeen
2018-09-25 13:08 ` Bill O'Donnell
@ 2018-09-25 14:19 ` Darrick J. Wong
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2018-09-25 14:19 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs
On Mon, Sep 24, 2018 at 12:07:00PM -0500, Eric Sandeen wrote:
> This lets us do:
>
> # ./configure --enable-scrub=no
> or
> # ./configure --disable-scrub
>
> for any distros that may not want to ship the experimental scrub utility.
>
> The default is still to build scrub.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Looks ok to me (you tested --enable-scrub and --disable-scrub, right?);
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
>
> (skipping libicu checks is maybe overkill, I can drop that
> if preferred; checking but not using is harmless)
>
> diff --git a/Makefile b/Makefile
> index 6774825..dd6ad16 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -49,7 +49,11 @@ LIBFROG_SUBDIR = libfrog
> DLIB_SUBDIRS = libxlog libxcmd libhandle
> LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
> TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \
> - mdrestore repair rtcp m4 man doc debian spaceman scrub
> + mdrestore repair rtcp m4 man doc debian spaceman
> +
> +ifeq ("$(ENABLE_SCRUB)","yes")
> +TOOL_SUBDIRS += scrub
> +endif
>
> ifneq ("$(PKG_PLATFORM)","darwin")
> TOOL_SUBDIRS += fsr
> diff --git a/configure.ac b/configure.ac
> index 5fdf78e..467ca2d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -95,9 +95,15 @@ AC_ARG_ENABLE(lto,
> enable_lto=probe)
> AC_SUBST(enable_lto)
>
> +# Enable xfs_scrub build
> +AC_ARG_ENABLE(scrub,
> +[ --enable-scrub=[yes/no] Enable build of xfs_scrub utility [default=yes]],,
> + enable_scrub=yes)
> +AC_SUBST(enable_scrub)
> +
> # Enable libicu for xfs_scrubbing of malicious unicode sequences in names
> AC_ARG_ENABLE(libicu,
> -[ --enable-libicu=[yes/no] Enable Unicode name scanning (libicu) [default=probe]],,
> +[ --enable-libicu=[yes/no] Enable Unicode name scanning in xfs_scrub (libicu) [default=probe]],,
> enable_libicu=probe)
>
> #
> @@ -178,11 +184,13 @@ AC_HAVE_DEVMAPPER
> AC_HAVE_MALLINFO
> AC_PACKAGE_WANT_ATTRIBUTES_H
> AC_HAVE_LIBATTR
> -if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
> - AC_HAVE_LIBICU
> -fi
> -if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
> - AC_MSG_ERROR([libicu not found.])
> +if test "$enable_scrub" = "yes"; then
> + if test "$enable_libicu" = "yes" || test "$enable_libicu" = "probe"; then
> + AC_HAVE_LIBICU
> + fi
> + if test "$enable_libicu" = "yes" && test "$have_libicu" != "yes"; then
> + AC_MSG_ERROR([libicu not found.])
> + fi
> fi
> AC_HAVE_OPENAT
> AC_HAVE_FSTATAT
> diff --git a/include/builddefs.in b/include/builddefs.in
> index f7d39a4..f3fc187 100644
> --- a/include/builddefs.in
> +++ b/include/builddefs.in
> @@ -81,6 +81,7 @@ ENABLE_GETTEXT = @enable_gettext@
> ENABLE_EDITLINE = @enable_editline@
> ENABLE_READLINE = @enable_readline@
> ENABLE_BLKID = @enable_blkid@
> +ENABLE_SCRUB = @enable_scrub@
>
> HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-25 20:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-24 17:07 [PATCH] xfsprogs: make scrub build config-optional Eric Sandeen
2018-09-25 13:08 ` Bill O'Donnell
2018-09-25 14:19 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).