Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS
@ 2015-10-17 19:38 Bernd Kuhls
  2015-10-17 19:55 ` Yann E. MORIN
  2015-10-18 13:45 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Bernd Kuhls @ 2015-10-17 19:38 UTC (permalink / raw)
  To: buildroot

Besides OpenSSL ffmpeg also supports GnuTLS.

If both GnuTLS and OpenSSL are enabled, the former takes precedence over
the latter:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=configure;h=7f9fed31a491ed0991aee2d354dba82e54e3291e;hb=refs/heads/release/2.8#l2719

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v4: Removed Kconfig options (Thomas)
v3: rebased
v2: OpenSSL and gpl'ed code from ffmpeg play together when nonfree

 package/ffmpeg/ffmpeg.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index 287338d..d4815ca 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -200,6 +200,11 @@ else
 FFMPEG_CONF_OPTS += --disable-libfdk-aac
 endif
 
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl
+FFMPEG_DEPENDENCIES += gnutls
+else
+FFMPEG_CONF_OPTS += --disable-gnutls
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 # openssl isn't license compatible with GPL
 ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx)
@@ -211,6 +216,7 @@ endif
 else
 FFMPEG_CONF_OPTS += --disable-openssl
 endif
+endif
 
 ifeq ($(BR2_PACKAGE_LIBDCADEC),y)
 FFMPEG_CONF_OPTS += --enable-libdcadec
-- 
2.6.1

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

* [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS
  2015-10-17 19:38 [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS Bernd Kuhls
@ 2015-10-17 19:55 ` Yann E. MORIN
  2015-10-18 13:45 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2015-10-17 19:55 UTC (permalink / raw)
  To: buildroot

Bernd, All,

On 2015-10-17 21:38 +0200, Bernd Kuhls spake thusly:
> Besides OpenSSL ffmpeg also supports GnuTLS.
> 
> If both GnuTLS and OpenSSL are enabled, the former takes precedence over
> the latter:
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=configure;h=7f9fed31a491ed0991aee2d354dba82e54e3291e;hb=refs/heads/release/2.8#l2719
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

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

> ---
> v4: Removed Kconfig options (Thomas)

And I agreed with Thomas when we talked about this on IRC yesterday. ;-)

Regards,
Yann E. MORIN.

> v3: rebased
> v2: OpenSSL and gpl'ed code from ffmpeg play together when nonfree
> 
>  package/ffmpeg/ffmpeg.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
> index 287338d..d4815ca 100644
> --- a/package/ffmpeg/ffmpeg.mk
> +++ b/package/ffmpeg/ffmpeg.mk
> @@ -200,6 +200,11 @@ else
>  FFMPEG_CONF_OPTS += --disable-libfdk-aac
>  endif
>  
> +ifeq ($(BR2_PACKAGE_GNUTLS),y)
> +FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl
> +FFMPEG_DEPENDENCIES += gnutls
> +else
> +FFMPEG_CONF_OPTS += --disable-gnutls
>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  # openssl isn't license compatible with GPL
>  ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx)
> @@ -211,6 +216,7 @@ endif
>  else
>  FFMPEG_CONF_OPTS += --disable-openssl
>  endif
> +endif
>  
>  ifeq ($(BR2_PACKAGE_LIBDCADEC),y)
>  FFMPEG_CONF_OPTS += --enable-libdcadec
> -- 
> 2.6.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS
  2015-10-17 19:38 [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS Bernd Kuhls
  2015-10-17 19:55 ` Yann E. MORIN
@ 2015-10-18 13:45 ` Thomas Petazzoni
  2015-10-19 19:23   ` Bernd Kuhls
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-10-18 13:45 UTC (permalink / raw)
  To: buildroot

Bernd, Yann,

On Sat, 17 Oct 2015 21:38:56 +0200, Bernd Kuhls wrote:
> Besides OpenSSL ffmpeg also supports GnuTLS.
> 
> If both GnuTLS and OpenSSL are enabled, the former takes precedence over
> the latter:
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=configure;h=7f9fed31a491ed0991aee2d354dba82e54e3291e;hb=refs/heads/release/2.8#l2719
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v4: Removed Kconfig options (Thomas)
> v3: rebased
> v2: OpenSSL and gpl'ed code from ffmpeg play together when nonfree

I've applied. However, I find the code to not be very pretty. What
about something like this instead:

ifeq ($(BR2_PACKAGE_GNUTLS),y)
FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl
FFMPEG_DEPENDENCIES += gnutls
# OpenSSL license is not compatible with the LGPL license of ffmpeg.
else ifeq ($(BR2_PACKAGE_OPENSSL):$(BR2_PACKAGE_FFMPEG_GPL):$(BR2_PACKAGE_FFMPEG_NONFREE),y::y)
FFMPEG_CONF_OPTS += --enable-openssl
FFMPEG_DEPENDENCIES += openssl
else
FFMPEG_CONF_OPTS += --disable-gnutls --disable-openssl
endif

I think it is functionally equivalent, but much nicer to read. If you
agree (and the above works), can you send a patch doing this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS
  2015-10-18 13:45 ` Thomas Petazzoni
@ 2015-10-19 19:23   ` Bernd Kuhls
  0 siblings, 0 replies; 4+ messages in thread
From: Bernd Kuhls @ 2015-10-19 19:23 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Am Sun, 18 Oct 2015 15:45:30 +0200 schrieb Thomas Petazzoni:

> # OpenSSL license is not compatible with the LGPL license of ffmpeg.
> else ifeq ($(BR2_PACKAGE_OPENSSL):$(BR2_PACKAGE_FFMPEG_GPL)
$(BR2_PACKAGE_FFMPEG_NONFREE),y::y)
> FFMPEG_CONF_OPTS += --enable-openssl
> FFMPEG_DEPENDENCIES += openssl
> else
> FFMPEG_CONF_OPTS += --disable-gnutls --disable-openssl
> endif
> 
> I think it is functionally equivalent, but much nicer to read. If you
> agree (and the above works), can you send a patch doing this?

your code does not duplicate the logic of ffmpeg configure. In your 
proposal the following settings are required for OpenSSL support:

	BR2_PACKAGE_FFMPEG_GPL		disabled
	BR2_PACKAGE_FFMPEG_NONFREE	enabled

This is one of three valid combinations, ffmpeg configure also
accepts these combinations for OpenSSL support:

	BR2_PACKAGE_FFMPEG_GPL		disabled
	BR2_PACKAGE_FFMPEG_NONFREE	disabled
and
	BR2_PACKAGE_FFMPEG_GPL		enabled
	BR2_PACKAGE_FFMPEG_NONFREE	enabled

because in

http://git.videolan.org/?
p=ffmpeg.git;a=blob;f=configure;h=7f9fed31a491ed0991aee2d354dba82e54e3291e;hb=refs/
heads/release/2.8#l4664

the following code line

enabled gpl && die_license_disabled_gpl nonfree openssl

checks whether --enable-gpl was issued and breaks only if --enable-
nonfree is not used at the same time like in the third example.

If --enable-gpl is not used, like in the first and second example, there 
will be no OpenSSL-related license checks during ffmpeg configure.

In other words: You can enable gpl-only code in ffmpeg along with OpenSSL 
support if you do not re-distribute the resulting binaries. If you do not 
enable gpl-only code you can do what you want regarding OpenSSL ;)

I am a bit lost atm trying to mirror this logic in an optimized form in 
package/ffmpeg/ffmpeg.mk as requested, sorry.

Regards, Bernd

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

end of thread, other threads:[~2015-10-19 19:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-17 19:38 [Buildroot] [PATCH v4 1/1] package/ffmpeg: Add support for GnuTLS Bernd Kuhls
2015-10-17 19:55 ` Yann E. MORIN
2015-10-18 13:45 ` Thomas Petazzoni
2015-10-19 19:23   ` Bernd Kuhls

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox