diff mbox

[1/5] wireshark: remove documentation

Message ID 1465917079-30473-1-git-send-email-gilles.chanteperdrix@xenomai.org
State Accepted
Commit 0fee4f51ac6bc7c99b2ded8444f03ff42d885679
Headers show

Commit Message

Gilles Chanteperdrix June 14, 2016, 3:11 p.m. UTC
Remove html and txt documentation from the rootfs as they unlikely to be
needed.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
---
 package/wireshark/wireshark.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Yann E. MORIN June 14, 2016, 7:33 p.m. UTC | #1
Gilles, All,

On 2016-06-14 17:11 +0200, Gilles Chanteperdrix spake thusly:
> Remove html and txt documentation from the rootfs as they unlikely to be
> needed.
> 
> Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> ---
>  package/wireshark/wireshark.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
> index c7bf6c2..23996a3 100644
> --- a/package/wireshark/wireshark.mk
> +++ b/package/wireshark/wireshark.mk
> @@ -99,4 +99,10 @@ else
>  WIRESHARK_CONF_OPTS += --with-sbc=no
>  endif
>  
> +define WIRESHARK_REMOVE_DOCS
> +	find $(TARGET_DIR)/usr/share/wireshark -\( -name '*.txt' -o -name '*.html' -\) -delete

My busybox' find does not like:

  - '-(' ')-' : it is not POSIX, is not even talked about in the find
    manpage. It's a GNUism.

  - -delete : it is disabled in our default busybox configuration

Regards,
Yann E. MORIN.

> +endef
> +
> +WIRESHARK_POST_INSTALL_TARGET_HOOKS += WIRESHARK_REMOVE_DOCS
> +
>  $(eval $(autotools-package))
> -- 
> 2.8.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN June 14, 2016, 7:37 p.m. UTC | #2
Gilles, All,

On 2016-06-14 21:33 +0200, Yann E. MORIN spake thusly:
> On 2016-06-14 17:11 +0200, Gilles Chanteperdrix spake thusly:
> > Remove html and txt documentation from the rootfs as they unlikely to be
> > needed.
> > 
> > Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> > ---
> >  package/wireshark/wireshark.mk | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
> > index c7bf6c2..23996a3 100644
> > --- a/package/wireshark/wireshark.mk
> > +++ b/package/wireshark/wireshark.mk
> > @@ -99,4 +99,10 @@ else
> >  WIRESHARK_CONF_OPTS += --with-sbc=no
> >  endif
> >  
> > +define WIRESHARK_REMOVE_DOCS
> > +	find $(TARGET_DIR)/usr/share/wireshark -\( -name '*.txt' -o -name '*.html' -\) -delete
> 
> My busybox' find does not like:
> 
>   - '-(' ')-' : it is not POSIX, is not even talked about in the find
>     manpage. It's a GNUism.
> 
>   - -delete : it is disabled in our default busybox configuration

Grr.. Forget it; this is done at build-time...

Sorry for the noise  (I should not do two things in parallel in two
terminals)...

Regards,
Yann E. MORIN.
Yann E. MORIN June 14, 2016, 7:42 p.m. UTC | #3
Gilles, All,

On 2016-06-14 17:11 +0200, Gilles Chanteperdrix spake thusly:
> Remove html and txt documentation from the rootfs as they unlikely to be
> needed.
> 
> Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> ---
>  package/wireshark/wireshark.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
> index c7bf6c2..23996a3 100644
> --- a/package/wireshark/wireshark.mk
> +++ b/package/wireshark/wireshark.mk
> @@ -99,4 +99,10 @@ else
>  WIRESHARK_CONF_OPTS += --with-sbc=no
>  endif
>  
> +define WIRESHARK_REMOVE_DOCS
> +	find $(TARGET_DIR)/usr/share/wireshark -\( -name '*.txt' -o -name '*.html' -\) -delete

The slight change that I'd suggest (not request!) is to not add a dash
in front of the commas, since it is not even talked about in find's
manpage.

Otherwise:

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> +endef
> +
> +WIRESHARK_POST_INSTALL_TARGET_HOOKS += WIRESHARK_REMOVE_DOCS
> +
>  $(eval $(autotools-package))
> -- 
> 2.8.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Peter Korsgaard June 14, 2016, 8:12 p.m. UTC | #4
>>>>> "Gilles" == Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> writes:

 > Remove html and txt documentation from the rootfs as they unlikely to be
 > needed.

 > Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>

Committed, thanks.

usr/share/wireshark still contains >5MB of files, mainly xml and similar
text files. Do you know if these are all needed?
Peter Korsgaard June 14, 2016, 8:22 p.m. UTC | #5
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Gilles, All,
 > On 2016-06-14 17:11 +0200, Gilles Chanteperdrix spake thusly:
 >> Remove html and txt documentation from the rootfs as they unlikely to be
 >> needed.
 >> 
 >> Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
 >> ---
 >> package/wireshark/wireshark.mk | 6 ++++++
 >> 1 file changed, 6 insertions(+)
 >> 
 >> diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
 >> index c7bf6c2..23996a3 100644
 >> --- a/package/wireshark/wireshark.mk
 >> +++ b/package/wireshark/wireshark.mk
 >> @@ -99,4 +99,10 @@ else
 >> WIRESHARK_CONF_OPTS += --with-sbc=no
 >> endif
 >> 
 >> +define WIRESHARK_REMOVE_DOCS
 >> +	find $(TARGET_DIR)/usr/share/wireshark -\( -name '*.txt' -o -name '*.html' -\) -delete

 > My busybox' find does not like:

 >   - '-(' ')-' : it is not POSIX, is not even talked about in the find
 >     manpage. It's a GNUism.

 >   - -delete : it is disabled in our default busybox configuration

I agree to stick to posix where possible / sensible, but Are you really
*building* on a busybox based system?
Peter Korsgaard June 14, 2016, 8:25 p.m. UTC | #6
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> +define WIRESHARK_REMOVE_DOCS
 >> +	find $(TARGET_DIR)/usr/share/wireshark -\( -name '*.txt' -o -name '*.html' -\) -delete

 > My busybox' find does not like:

 >   - '-(' ')-' : it is not POSIX, is not even talked about in the find
 >     manpage. It's a GNUism.

 >   - -delete : it is disabled in our default busybox configuration

With that said, I've changed it to use xargs:

find $(TARGET_DIR)/usr/share/wireshark -name '*.txt' -o '*.html' -print0 \
        | xargs -0 rm -f
Peter Korsgaard June 14, 2016, 8:31 p.m. UTC | #7
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > With that said, I've changed it to use xargs:

 > find $(TARGET_DIR)/usr/share/wireshark -name '*.txt' -o '*.html' -print0 \
 >         | xargs -0 rm -f

Ups, I missed a -print0 after -name '*.txt'.
Gilles Chanteperdrix June 15, 2016, 9:30 p.m. UTC | #8
On Tue, Jun 14, 2016 at 10:12:18PM +0200, Peter Korsgaard wrote:
> >>>>> "Gilles" == Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> writes:
> 
>  > Remove html and txt documentation from the rootfs as they unlikely to be
>  > needed.
> 
>  > Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> 
> Committed, thanks.
> 
> usr/share/wireshark still contains >5MB of files, mainly xml and similar
> text files. Do you know if these are all needed?

No, no idea. The only problem I had was that the html documentation
made a non reproducible build.
diff mbox

Patch

diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk
index c7bf6c2..23996a3 100644
--- a/package/wireshark/wireshark.mk
+++ b/package/wireshark/wireshark.mk
@@ -99,4 +99,10 @@  else
 WIRESHARK_CONF_OPTS += --with-sbc=no
 endif
 
+define WIRESHARK_REMOVE_DOCS
+	find $(TARGET_DIR)/usr/share/wireshark -\( -name '*.txt' -o -name '*.html' -\) -delete
+endef
+
+WIRESHARK_POST_INSTALL_TARGET_HOOKS += WIRESHARK_REMOVE_DOCS
+
 $(eval $(autotools-package))