svn commit: r412077 - in head: multimedia/mpv security/libgcrypt security/libgcrypt/files
Carlos J Puga Medina
cpm at fbsd.es
Tue Mar 29 00:37:23 UTC 2016
On Mon, 2016-03-28 at 23:41 +0000, Carlos J. Puga Medina wrote:
Oops, I think I need more coffee! The multimedia/mpv changes should
have committed in a separate commit and should say PR 202588.
> Author: cpm
> Date: Mon Mar 28 23:41:45 2016
> New Revision: 412077
> URL: https://svnweb.freebsd.org/changeset/ports/412077
>
> Log:
> - cipher/salsa20.c (selftest): Ensure 16-byte alignment for salsa20
> context structure.
>
> - mpi/longlong.h: Fix build on sparc.
>
> PR: 206919
> Approved by: junovitch (mentor)
>
> Added:
> head/security/libgcrypt/files/patch-cipher_salsa20.c (contents,
> props changed)
> head/security/libgcrypt/files/patch-mpi_longlong.h (contents,
> props changed)
> Deleted:
> head/security/libgcrypt/files/patch-cipher-Makefile.in
> Modified:
> head/multimedia/mpv/Makefile
> head/security/libgcrypt/Makefile
>
> Modified: head/multimedia/mpv/Makefile
> =====================================================================
> =========
> --- head/multimedia/mpv/Makefile Mon Mar 28 23:05:43 2016
> (r412076)
> +++ head/multimedia/mpv/Makefile Mon Mar 28 23:41:45 2016
> (r412077)
> @@ -4,6 +4,7 @@
> PORTNAME= mpv
> PORTVERSION= 0.16.0
> DISTVERSIONPREFIX= v
> +PORTREVISION= 1
> PORTEPOCH= 1
> CATEGORIES= multimedia audio
>
> @@ -44,7 +45,7 @@ OPTIONS_DEFAULT= ASS DVDREAD DVDNAV ENCA
> OPTIONS_GROUP= IN VO AO
> OPTIONS_GROUP_IN= CDIO DVDREAD DVDNAV LIBBLURAY V4L YTDL SMB
> OPTIONS_GROUP_VO= CACA OPENGL VAAPI VDPAU X11 XINERAMA
> -OPTIONS_GROUP_AO= ALSA JACK PULSEAUDIO
> +OPTIONS_GROUP_AO= ALSA JACK PULSEAUDIO SDL
> OPTIONS_SUB= yes
>
> ASS_DESC= ASS/SSA subtitle and OSD rendering
> @@ -104,6 +105,10 @@ OPENGL_IMPLIES= X11
> PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio
> /pulseaudio
> PULSEAUDIO_CONFIGURE_OFF= --disable-pulse
>
> +SDL_USE= SDL=sdl2
> +SDL_CONFIGURE_ON= --enable-sdl2
> +SDL_CONFIGURE_OFF= --disable-sdl2
> +
> SMB_LIB_DEPENDS= libsmbclient.so:${PORTSDIR}/net/samb
> a-libsmbclient
> SMB_CONFIGURE_OFF= --disable-libsmbclient
>
> @@ -135,11 +140,6 @@ ZSH_CONFIGURE_ENABLE= zsh-comp
>
> .include <bsd.port.options.mk>
>
> -# Fix crash on i386
> -.if ${ARCH} == "i386"
> -CFLAGS:= ${CFLAGS:N-O*} -O0
> -.endif
> -
> post-patch:
> @${REINPLACE_CMD} -e
> 's|/pkgconfig/mpv.pc|data/pkgconfig/mpv.pc|g' \
> ${WRKSRC}/wscript_build.py
>
> Modified: head/security/libgcrypt/Makefile
> =====================================================================
> =========
> --- head/security/libgcrypt/Makefile Mon Mar 28 23:05:43 2016
> (r412076)
> +++ head/security/libgcrypt/Makefile Mon Mar 28 23:41:45 2016
> (r412077)
> @@ -2,6 +2,7 @@
>
> PORTNAME= libgcrypt
> PORTVERSION= 1.6.5
> +PORTREVISION= 1
> CATEGORIES= security
> MASTER_SITES= GNUPG
>
> @@ -40,11 +41,6 @@ post-patch:
> ${RM} -f ${WRKSRC}/doc/gcrypt.info*
> ${REINPLACE_CMD} -e 's|ALIGN (3)|ALIGN (2)|g'
> ${WRKSRC}/mpi/i386/*.S
>
> -# Fix crash at cipher/salsa20.c module on amd64
> -.if ${ARCH} == "amd64" && exists(/usr/bin/clang)
> -CFLAGS:= ${CFLAGS:N-O*} -O2
> -.endif
> -
> post-install:
> ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}.so
>
>
> Added: head/security/libgcrypt/files/patch-cipher_salsa20.c
> =====================================================================
> =========
> --- /dev/null 00:00:00 1970 (empty, because file is
> newly added)
> +++ head/security/libgcrypt/files/patch-cipher_salsa20.c Mon
> Mar 28 23:41:45 2016 (r412077)
> @@ -0,0 +1,62 @@
> +--- cipher/salsa20.c.orig 2016-03-23 16:34:00 UTC
> ++++ cipher/salsa20.c
> +@@ -485,7 +485,8 @@ salsa20r12_encrypt_stream (void *context
> + static const char*
> + selftest (void)
> + {
> +- SALSA20_context_t ctx;
> ++ byte ctxbuf[sizeof(SALSA20_context_t) + 15];
> ++ SALSA20_context_t *ctx;
> + byte scratch[8+1];
> + byte buf[256+64+4];
> + int i;
> +@@ -502,32 +503,35 @@ selftest (void)
> + static const byte ciphertext_1[] =
> + { 0xE3, 0xBE, 0x8F, 0xDD, 0x8B, 0xEC, 0xA2, 0xE3};
> +
> +- salsa20_setkey (&ctx, key_1, sizeof key_1);
> +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1);
> ++ /* 16-byte alignment required for amd64 implementation. */
> ++ ctx = (SALSA20_context_t *)((uintptr_t)(ctxbuf + 15) &
> ~(uintptr_t)15);
> ++
> ++ salsa20_setkey (ctx, key_1, sizeof key_1);
> ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1);
> + scratch[8] = 0;
> +- salsa20_encrypt_stream (&ctx, scratch, plaintext_1, sizeof
> plaintext_1);
> ++ salsa20_encrypt_stream (ctx, scratch, plaintext_1, sizeof
> plaintext_1);
> + if (memcmp (scratch, ciphertext_1, sizeof ciphertext_1))
> + return "Salsa20 encryption test 1 failed.";
> + if (scratch[8])
> + return "Salsa20 wrote too much.";
> +- salsa20_setkey( &ctx, key_1, sizeof(key_1));
> +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1);
> +- salsa20_encrypt_stream (&ctx, scratch, scratch, sizeof
> plaintext_1);
> ++ salsa20_setkey( ctx, key_1, sizeof(key_1));
> ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1);
> ++ salsa20_encrypt_stream (ctx, scratch, scratch, sizeof
> plaintext_1);
> + if (memcmp (scratch, plaintext_1, sizeof plaintext_1))
> + return "Salsa20 decryption test 1 failed.";
> +
> + for (i = 0; i < sizeof buf; i++)
> + buf[i] = i;
> +- salsa20_setkey (&ctx, key_1, sizeof key_1);
> +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1);
> ++ salsa20_setkey (ctx, key_1, sizeof key_1);
> ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1);
> + /*encrypt*/
> +- salsa20_encrypt_stream (&ctx, buf, buf, sizeof buf);
> ++ salsa20_encrypt_stream (ctx, buf, buf, sizeof buf);
> + /*decrypt*/
> +- salsa20_setkey (&ctx, key_1, sizeof key_1);
> +- salsa20_setiv (&ctx, nonce_1, sizeof nonce_1);
> +- salsa20_encrypt_stream (&ctx, buf, buf, 1);
> +- salsa20_encrypt_stream (&ctx, buf+1, buf+1, (sizeof buf)-1-1);
> +- salsa20_encrypt_stream (&ctx, buf+(sizeof buf)-1, buf+(sizeof
> buf)-1, 1);
> ++ salsa20_setkey (ctx, key_1, sizeof key_1);
> ++ salsa20_setiv (ctx, nonce_1, sizeof nonce_1);
> ++ salsa20_encrypt_stream (ctx, buf, buf, 1);
> ++ salsa20_encrypt_stream (ctx, buf+1, buf+1, (sizeof buf)-1-1);
> ++ salsa20_encrypt_stream (ctx, buf+(sizeof buf)-1, buf+(sizeof
> buf)-1, 1);
> + for (i = 0; i < sizeof buf; i++)
> + if (buf[i] != (byte)i)
> + return "Salsa20 encryption test 2 failed.";
>
> Added: head/security/libgcrypt/files/patch-mpi_longlong.h
> =====================================================================
> =========
> --- /dev/null 00:00:00 1970 (empty, because file is
> newly added)
> +++ head/security/libgcrypt/files/patch-mpi_longlong.h Mon Mar
> 28 23:41:45 2016 (r412077)
> @@ -0,0 +1,27 @@
> +--- mpi/longlong.h.orig 2016-03-23 17:33:08 UTC
> ++++ mpi/longlong.h
> +@@ -170,6 +170,7 @@ MA 02111-1307, USA. */
> + (pl) = __m0 * __m1;
> \
> + } while (0)
> + #define UMUL_TIME 46
> ++#if 0
> + #ifndef LONGLONG_STANDALONE
> + #define udiv_qrnnd(q, r, n1, n0, d) \
> + do { UDItype __r;
> \
> +@@ -179,6 +180,7 @@ MA 02111-1307, USA. */
> + extern UDItype __udiv_qrnnd ();
> + #define UDIV_TIME 220
> + #endif /* LONGLONG_STANDALONE */
> ++#endif /* 0 */
> + #endif /* __alpha */
> +
> + /***************************************
> +@@ -1287,7 +1289,7 @@ typedef unsigned int UTItype __attribute
> + "rJ"
> ((USItype)(al)), \
> + "rI"
> ((USItype)(bl)) \
> + __CLOBBER_CC)
> +-#if defined (__sparc_v8__) || defined(__sparcv8)
> ++#if defined (__sparc_v8__) || defined(__sparcv8) || defined
> (__sparc__)
> + /* Don't match immediate range because, 1) it is not often useful,
> + 2) the 'I' flag thinks of the range as a 13 bit signed interval,
> + while we want to match a 13 bit interval, sign extended to 32
> bits,
>
--
Carlos Jacobo Puga Medina <cpm at fbsd.es>
PGP fingerprint = C60E 9497 5302 793B CC2D BB89 A1F3 5D66 E6D0 5453
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20160329/8e275511/attachment.sig>
More information about the svn-ports-head
mailing list