All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro
@ 2021-10-12 13:50 Anthony Iliopoulos
  2021-10-12 14:28 ` David Disseldorp
  2021-10-12 15:39 ` Darrick J. Wong
  0 siblings, 2 replies; 5+ messages in thread
From: Anthony Iliopoulos @ 2021-10-12 13:50 UTC (permalink / raw)
  To: fstests

Commit 5868405dce1d ("Sync up different copies of the m4 macros, noop
change for this package.") introduced this macro, by the function was
never really used by any test, remove it.

Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
---
 m4/package_xfslibs.m4 | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
index 9be56e1103ac..1bfd955479b8 100644
--- a/m4/package_xfslibs.m4
+++ b/m4/package_xfslibs.m4
@@ -64,20 +64,6 @@ AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS],
     AC_SUBST(libxfs)
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHANDLE],
-  [ AC_CHECK_LIB(handle, open_by_fshandle,, [
-        echo
-        echo 'FATAL ERROR: could not find a current XFS handle library.'
-        echo 'Install or upgrade the XFS library package.'
-        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
-        exit 1
-    ])
-    libhdl="-lhandle"
-    test -f ${libexecdir}${libdirsuffix}/libhandle.la && \
-	libhdl="${libexecdir}${libdirsuffix}/libhandle.la"
-    AC_SUBST(libhdl)
-  ])
-
 AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
   [ AC_CHECK_LIB(handle, attr_list_by_handle,, [
         echo
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro
  2021-10-12 13:50 [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro Anthony Iliopoulos
@ 2021-10-12 14:28 ` David Disseldorp
  2021-10-12 15:39 ` Darrick J. Wong
  1 sibling, 0 replies; 5+ messages in thread
From: David Disseldorp @ 2021-10-12 14:28 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: fstests

On Tue, 12 Oct 2021 15:50:57 +0200, Anthony Iliopoulos wrote:

> Commit 5868405dce1d ("Sync up different copies of the m4 macros, noop
> change for this package.") introduced this macro, by the function was
Nit: s/by the/but the/ above. Looks fine otherwise...
> never really used by any test, remove it.
> 
> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>

Reviewed-by: David Disseldorp <ddiss@suse.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro
  2021-10-12 13:50 [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro Anthony Iliopoulos
  2021-10-12 14:28 ` David Disseldorp
@ 2021-10-12 15:39 ` Darrick J. Wong
  2021-10-12 16:19   ` Anthony Iliopoulos
  1 sibling, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2021-10-12 15:39 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: fstests

On Tue, Oct 12, 2021 at 03:50:57PM +0200, Anthony Iliopoulos wrote:
> Commit 5868405dce1d ("Sync up different copies of the m4 macros, noop
> change for this package.") introduced this macro, by the function was
> never really used by any test, remove it.

If we're not going to keep this in sync (with what I have no idea) then
why not remove the other unused macros?

--D

> Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
> ---
>  m4/package_xfslibs.m4 | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
> index 9be56e1103ac..1bfd955479b8 100644
> --- a/m4/package_xfslibs.m4
> +++ b/m4/package_xfslibs.m4
> @@ -64,20 +64,6 @@ AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS],
>      AC_SUBST(libxfs)
>    ])
>  
> -AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHANDLE],
> -  [ AC_CHECK_LIB(handle, open_by_fshandle,, [
> -        echo
> -        echo 'FATAL ERROR: could not find a current XFS handle library.'
> -        echo 'Install or upgrade the XFS library package.'
> -        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
> -        exit 1
> -    ])
> -    libhdl="-lhandle"
> -    test -f ${libexecdir}${libdirsuffix}/libhandle.la && \
> -	libhdl="${libexecdir}${libdirsuffix}/libhandle.la"
> -    AC_SUBST(libhdl)
> -  ])
> -
>  AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
>    [ AC_CHECK_LIB(handle, attr_list_by_handle,, [
>          echo
> -- 
> 2.33.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro
  2021-10-12 15:39 ` Darrick J. Wong
@ 2021-10-12 16:19   ` Anthony Iliopoulos
  2021-10-24 13:57     ` Eryu Guan
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Iliopoulos @ 2021-10-12 16:19 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: fstests

On Tue, Oct 12, 2021 at 08:39:46AM -0700, Darrick J. Wong wrote:
> On Tue, Oct 12, 2021 at 03:50:57PM +0200, Anthony Iliopoulos wrote:
> > Commit 5868405dce1d ("Sync up different copies of the m4 macros, noop
> > change for this package.") introduced this macro, by the function was
> > never really used by any test, remove it.
> 
> If we're not going to keep this in sync (with what I have no idea) then
> why not remove the other unused macros?

This was standing out as I was looking specifically into fstests
dependencies to libhandle, but I didn't make a full pass through the
rest. Indeed at least AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS seems also
unused.

From looking at earlier commits, I think sync was referring to bringing
the m4 macros up to date with the rest of the packages (xfsprogs,
xfsdump at least). Commit c1ef92a938a1 ("Updates to QA scrdiff script to
keep package configure macros in sync.") includes the following comment:

  "xfstests directory m4 directory is a repository of all of the custom
  m4 macros used in the packages we look after."

I just checked xfsdump and most of the macros in package_xfslibs.m4 are
indeed unused.

Regards,
Anthony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro
  2021-10-12 16:19   ` Anthony Iliopoulos
@ 2021-10-24 13:57     ` Eryu Guan
  0 siblings, 0 replies; 5+ messages in thread
From: Eryu Guan @ 2021-10-24 13:57 UTC (permalink / raw)
  To: Anthony Iliopoulos; +Cc: Darrick J. Wong, fstests

On Tue, Oct 12, 2021 at 06:19:06PM +0200, Anthony Iliopoulos wrote:
> On Tue, Oct 12, 2021 at 08:39:46AM -0700, Darrick J. Wong wrote:
> > On Tue, Oct 12, 2021 at 03:50:57PM +0200, Anthony Iliopoulos wrote:
> > > Commit 5868405dce1d ("Sync up different copies of the m4 macros, noop
> > > change for this package.") introduced this macro, by the function was
> > > never really used by any test, remove it.
> > 
> > If we're not going to keep this in sync (with what I have no idea) then
> > why not remove the other unused macros?
> 
> This was standing out as I was looking specifically into fstests
> dependencies to libhandle, but I didn't make a full pass through the
> rest. Indeed at least AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS seems also
> unused.
> 
> From looking at earlier commits, I think sync was referring to bringing
> the m4 macros up to date with the rest of the packages (xfsprogs,
> xfsdump at least). Commit c1ef92a938a1 ("Updates to QA scrdiff script to
> keep package configure macros in sync.") includes the following comment:

Wow, that was more than 18 years ago, and I don't think we've kept the
m4 files in sync after that.

So I tend to agree with Darrick that it'd be better to removing other
unused macros all together. And I did a quick search[1] and it looked like
the following macros are only defined but not used anywhere:

AC_HAVE_FADVISE
AC_HAVE_MADVISE
AC_HAVE_MINCORE
AC_HAVE_SENDFILE
AC_HAVE_GETMNTENT
AC_HAVE_GETMNTINFO
AC_PACKAGE_NEED_NCURSES_H
AC_PACKAGE_WANT_WORKING_LIBNCURSES
AC_PACKAGE_NEED_PTHREAD_H
AC_PACKAGE_NEED_PTHREADMUTEXINIT
AC_TYPE_PSINT
AC_TYPE_PSUNSIGNED
AC_SIZEOF_POINTERS_AND_LONG
AC_PACKAGE_NEED_UUID_H
AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS
AC_PACKAGE_NEED_OPEN_BY_FSHANDLE
AC_FUNC_GCC_VISIBILITY

Thanks,
Eryu

P.S.
[1] the script to do the search
for m in `git grep AC_DEFUN | grep -o AC_[PHTSF].*[A-Z]`; do
	cnt=`git grep $m | wc -l`
	if [ $cnt -lt 2 ]; then
		echo $m
	fi
done
> 
>   "xfstests directory m4 directory is a repository of all of the custom
>   m4 macros used in the packages we look after."
> 
> I just checked xfsdump and most of the macros in package_xfslibs.m4 are
> indeed unused.
> 
> Regards,
> Anthony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-24 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 13:50 [PATCH] build: remove unused AC_PACKAGE_NEED_OPEN_BY_FSHANDLE macro Anthony Iliopoulos
2021-10-12 14:28 ` David Disseldorp
2021-10-12 15:39 ` Darrick J. Wong
2021-10-12 16:19   ` Anthony Iliopoulos
2021-10-24 13:57     ` Eryu Guan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.