* [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference
@ 2020-04-21  2:04 Thomas Monjalon
  2020-04-21  7:49 ` David Marchand
  2020-05-24 17:43 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Monjalon @ 2020-04-21  2:04 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, david.marchand
When building an ABI reference with meson, some static libraries
are built and linked in apps. They are useless and take a lot of space.
Those binaries, and other useless files (examples and doc files)
in the share/ directory, are removed after being installed.
In order to save time when building the ABI reference,
the examples (which are not installed anyway) are not compiled.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/test-meson-builds.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index e8df017596..16271e057d 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -141,10 +141,15 @@ build () # <directory> <target compiler> <meson options>
 			fi
 
 			rm -rf $abirefdir/build
-			config $abirefdir/src $abirefdir/build $*
+			config $abirefdir/src $abirefdir/build -Dexamples= $*
 			compile $abirefdir/build
 			install_target $abirefdir/build $abirefdir/$targetdir
 			$srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
+
+			# save disk space by removing static libs and apps
+			rm $abirefdir/$targetdir/usr/local/lib/*.a
+			rm -rf $abirefdir/$targetdir/usr/local/bin
+			rm -rf $abirefdir/$targetdir/usr/local/share
 		fi
 
 		install_target $builds_dir/$targetdir \
-- 
2.26.0
^ permalink raw reply related	[flat|nested] 8+ messages in thread
- * Re: [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference
  2020-04-21  2:04 [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference Thomas Monjalon
@ 2020-04-21  7:49 ` David Marchand
  2020-04-21  9:22   ` Thomas Monjalon
  2020-05-24 17:43 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  1 sibling, 1 reply; 8+ messages in thread
From: David Marchand @ 2020-04-21  7:49 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson
On Tue, Apr 21, 2020 at 4:05 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> When building an ABI reference with meson, some static libraries
> are built and linked in apps. They are useless and take a lot of space.
> Those binaries, and other useless files (examples and doc files)
> in the share/ directory, are removed after being installed.
>
> In order to save time when building the ABI reference,
> the examples (which are not installed anyway) are not compiled.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  devtools/test-meson-builds.sh | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index e8df017596..16271e057d 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -141,10 +141,15 @@ build () # <directory> <target compiler> <meson options>
>                         fi
>
>                         rm -rf $abirefdir/build
> -                       config $abirefdir/src $abirefdir/build $*
> +                       config $abirefdir/src $abirefdir/build -Dexamples= $*
>                         compile $abirefdir/build
>                         install_target $abirefdir/build $abirefdir/$targetdir
>                         $srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
> +
> +                       # save disk space by removing static libs and apps
> +                       rm $abirefdir/$targetdir/usr/local/lib/*.a
The install directory for libraries is not lib/ in all cases.
This breaks the ABI generation for gcc-shared:
DESTDIR=/home/dmarchan/abi/v20.02/build-gcc-shared ninja -C
/home/dmarchan/abi/v20.02/build install >/dev/null
rm: cannot remove
'/home/dmarchan/abi/v20.02/build-gcc-shared/usr/local/lib/*.a': No
such file or directory
$ ls ~/abi/v20.02/build-gcc-shared/usr/local/
bin  include  lib64  share
-- 
David Marchand
^ permalink raw reply	[flat|nested] 8+ messages in thread 
- * Re: [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference
  2020-04-21  7:49 ` David Marchand
@ 2020-04-21  9:22   ` Thomas Monjalon
  2020-04-21  9:26     ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2020-04-21  9:22 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Bruce Richardson
21/04/2020 09:49, David Marchand:
> On Tue, Apr 21, 2020 at 4:05 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > +                       rm $abirefdir/$targetdir/usr/local/lib/*.a
> 
> The install directory for libraries is not lib/ in all cases.
> This breaks the ABI generation for gcc-shared:
> 
> DESTDIR=/home/dmarchan/abi/v20.02/build-gcc-shared ninja -C
> /home/dmarchan/abi/v20.02/build install >/dev/null
> rm: cannot remove
> '/home/dmarchan/abi/v20.02/build-gcc-shared/usr/local/lib/*.a': No
> such file or directory
> 
> $ ls ~/abi/v20.02/build-gcc-shared/usr/local/
> bin  include  lib64  share
Is it enough to change lib to lib* ?
^ permalink raw reply	[flat|nested] 8+ messages in thread 
- * Re: [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference
  2020-04-21  9:22   ` Thomas Monjalon
@ 2020-04-21  9:26     ` David Marchand
  2020-04-21 10:33       ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2020-04-21  9:26 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson
On Tue, Apr 21, 2020 at 11:22 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 21/04/2020 09:49, David Marchand:
> > On Tue, Apr 21, 2020 at 4:05 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > +                       rm $abirefdir/$targetdir/usr/local/lib/*.a
> >
> > The install directory for libraries is not lib/ in all cases.
> > This breaks the ABI generation for gcc-shared:
> >
> > DESTDIR=/home/dmarchan/abi/v20.02/build-gcc-shared ninja -C
> > /home/dmarchan/abi/v20.02/build install >/dev/null
> > rm: cannot remove
> > '/home/dmarchan/abi/v20.02/build-gcc-shared/usr/local/lib/*.a': No
> > such file or directory
> >
> > $ ls ~/abi/v20.02/build-gcc-shared/usr/local/
> > bin  include  lib64  share
>
> Is it enough to change lib to lib* ?
I can see only lib/ or lib64/ so ok for me.
-- 
David Marchand
^ permalink raw reply	[flat|nested] 8+ messages in thread 
- * Re: [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference
  2020-04-21  9:26     ` David Marchand
@ 2020-04-21 10:33       ` Bruce Richardson
  0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2020-04-21 10:33 UTC (permalink / raw)
  To: David Marchand; +Cc: Thomas Monjalon, dev
On Tue, Apr 21, 2020 at 11:26:58AM +0200, David Marchand wrote:
> On Tue, Apr 21, 2020 at 11:22 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 21/04/2020 09:49, David Marchand:
> > > On Tue, Apr 21, 2020 at 4:05 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > +                       rm $abirefdir/$targetdir/usr/local/lib/*.a
> > >
> > > The install directory for libraries is not lib/ in all cases.
> > > This breaks the ABI generation for gcc-shared:
> > >
> > > DESTDIR=/home/dmarchan/abi/v20.02/build-gcc-shared ninja -C
> > > /home/dmarchan/abi/v20.02/build install >/dev/null
> > > rm: cannot remove
> > > '/home/dmarchan/abi/v20.02/build-gcc-shared/usr/local/lib/*.a': No
> > > such file or directory
> > >
> > > $ ls ~/abi/v20.02/build-gcc-shared/usr/local/
> > > bin  include  lib64  share
> >
> > Is it enough to change lib to lib* ?
> 
> I can see only lib/ or lib64/ so ok for me.
> 
If it's using lib, then the .a files could be in /lib/x86_64-linux-gnu/,
rather than in lib directly.  Therefore I think it's better to use find or
similar to remove the .a files from /usr/local/:
find /usr/local -name 'librte*.a' -exec rm -f {}
^ permalink raw reply	[flat|nested] 8+ messages in thread
 
 
 
- * [dpdk-dev] [PATCH v2] devtools: remove useless files from ABI reference
  2020-04-21  2:04 [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference Thomas Monjalon
  2020-04-21  7:49 ` David Marchand
@ 2020-05-24 17:43 ` Thomas Monjalon
  2020-05-28 13:16   ` David Marchand
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2020-05-24 17:43 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, bruce.richardson
When building an ABI reference with meson, some static libraries
are built and linked in apps. They are useless and take a lot of space.
Those binaries, and other useless files (examples and doc files)
in the share/ directory, are removed after being installed.
In order to save time when building the ABI reference,
the examples (which are not installed anyway) are not compiled.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: find static libraries anywhere it tries hiding from being swept
---
 devtools/test-meson-builds.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 18b874fac5..de569a486f 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -140,10 +140,15 @@ build () # <directory> <target compiler> <meson options>
 			fi
 
 			rm -rf $abirefdir/build
-			config $abirefdir/src $abirefdir/build $*
+			config $abirefdir/src $abirefdir/build -Dexamples= $*
 			compile $abirefdir/build
 			install_target $abirefdir/build $abirefdir/$targetdir
 			$srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
+
+			# save disk space by removing static libs and apps
+			find $abirefdir/$targetdir/usr/local -name '*.a' -delete
+			rm -rf $abirefdir/$targetdir/usr/local/bin
+			rm -rf $abirefdir/$targetdir/usr/local/share
 		fi
 
 		install_target $builds_dir/$targetdir \
-- 
2.26.2
^ permalink raw reply related	[flat|nested] 8+ messages in thread 
- * Re: [dpdk-dev] [PATCH v2] devtools: remove useless files from ABI reference
  2020-05-24 17:43 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
@ 2020-05-28 13:16   ` David Marchand
  2020-07-03  9:08     ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2020-05-28 13:16 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson
On Sun, May 24, 2020 at 7:43 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> When building an ABI reference with meson, some static libraries
> are built and linked in apps. They are useless and take a lot of space.
> Those binaries, and other useless files (examples and doc files)
> in the share/ directory, are removed after being installed.
>
> In order to save time when building the ABI reference,
> the examples (which are not installed anyway) are not compiled.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> v2: find static libraries anywhere it tries hiding from being swept
> ---
>  devtools/test-meson-builds.sh | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index 18b874fac5..de569a486f 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -140,10 +140,15 @@ build () # <directory> <target compiler> <meson options>
>                         fi
>
>                         rm -rf $abirefdir/build
> -                       config $abirefdir/src $abirefdir/build $*
> +                       config $abirefdir/src $abirefdir/build -Dexamples= $*
>                         compile $abirefdir/build
>                         install_target $abirefdir/build $abirefdir/$targetdir
>                         $srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
> +
> +                       # save disk space by removing static libs and apps
> +                       find $abirefdir/$targetdir/usr/local -name '*.a' -delete
I would prefer -exec rm -f {} as Bruce proposed, because -delete is not posix.
But otherwise, it works and looks good to me.
> +                       rm -rf $abirefdir/$targetdir/usr/local/bin
> +                       rm -rf $abirefdir/$targetdir/usr/local/share
>                 fi
>
>                 install_target $builds_dir/$targetdir \
> --
> 2.26.2
>
With either -delete or -exec rm:
Acked-by: David Marchand <david.marchand@redhat.com>
-- 
David Marchand
^ permalink raw reply	[flat|nested] 8+ messages in thread
- * Re: [dpdk-dev] [PATCH v2] devtools: remove useless files from ABI reference
  2020-05-28 13:16   ` David Marchand
@ 2020-07-03  9:08     ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2020-07-03  9:08 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson
On Thu, May 28, 2020 at 3:16 PM David Marchand
<david.marchand@redhat.com> wrote:
> On Sun, May 24, 2020 at 7:43 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > When building an ABI reference with meson, some static libraries
> > are built and linked in apps. They are useless and take a lot of space.
> > Those binaries, and other useless files (examples and doc files)
> > in the share/ directory, are removed after being installed.
> >
> > In order to save time when building the ABI reference,
> > the examples (which are not installed anyway) are not compiled.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
-- 
David Marchand
^ permalink raw reply	[flat|nested] 8+ messages in thread 
 
 
end of thread, other threads:[~2020-07-03  9:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-21  2:04 [dpdk-dev] [PATCH] devtools: remove useless files from ABI reference Thomas Monjalon
2020-04-21  7:49 ` David Marchand
2020-04-21  9:22   ` Thomas Monjalon
2020-04-21  9:26     ` David Marchand
2020-04-21 10:33       ` Bruce Richardson
2020-05-24 17:43 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2020-05-28 13:16   ` David Marchand
2020-07-03  9:08     ` David Marchand
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).