Bug 197146

Summary: [MAINTAINER] security/libgcrypt: Fix crash on amd64
Product: Ports & Packages Reporter: Carlos J Puga Medina <cjpm>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: koobs, marino, pi
Priority: --- Keywords: patch, patch-ready
Version: Latest   
Hardware: amd64   
OS: Any   
Bug Depends on:    
Bug Blocks: 196674    
Attachments:
Description Flags
libgcrypt-1.6.2_1.diff
none
libgcrypt-1.6.2_1.zip
none
libgcrypt-1.6.2_1.diff none

Description Carlos J Puga Medina 2015-01-28 01:21:26 UTC
Created attachment 152288 [details]
libgcrypt-1.6.2_1.diff

- Fix crash at cipher/salsa20.c module on amd64.
- Fix strip shared object.
- Bump PORTREVISION.

For further details, see bug 196674.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-01-28 05:28:33 UTC
Thanks Carlos! Please include QA output as attachments for portlint and poudriere please
Comment 2 Carlos J Puga Medina 2015-01-28 18:21:37 UTC
(In reply to Kubilay Kocak from comment #1)

% portlint -ac
WARN: Consider to set DEVELOPER=yes in /etc/make.conf
0 fatal errors and 1 warning found.

Build logs via poudriere:

https://fbsd.es/~cpm/freebsd/poudriere/freebsd:8:x86:32/libgcrypt-1.6.2_1.log
https://fbsd.es/~cpm/freebsd/poudriere/freebsd:9:x86:32/libgcrypt-1.6.2_1.log
https://fbsd.es/~cpm/freebsd/poudriere/freebsd:10:x86:32/libgcrypt-1.6.2_1.log
Comment 3 Carlos J Puga Medina 2015-01-28 18:23:28 UTC
Created attachment 152313 [details]
libgcrypt-1.6.2_1.zip
Comment 5 John Marino freebsd_committer freebsd_triage 2015-02-02 11:27:50 UTC
Just to clarify, "INSTALL_TARGET= install-strip" doesn't work, so that's why you replaced it with a post-install target that does?
Comment 6 Carlos J Puga Medina 2015-02-02 11:38:50 UTC
(In reply to John Marino from comment #5)

Yes, I changed it because using ${STRIP_CMD} works fine. I'm not sure why "INSTALL_TARGET= install-strip" doesn't work here.
Comment 7 John Marino freebsd_committer freebsd_triage 2015-02-02 12:11:39 UTC
I think you mean you changed it *because* INSTALL_TARGET doesn't work (because INSTALL_TARGET is preferred).  The most likely reason is that install-strip isn't a valid target on that makefile.


The rest looks okay to me, so I'll promote this PR.
Comment 8 Carlos J Puga Medina 2015-02-02 12:18:36 UTC
Regarding to ${COMPILER_TYPE} variable. Probably, it will be necessary to add this variable in /etc/make.conf instead declare it in libgcrypt/Makefile. Are you agree?
Comment 9 Carlos J Puga Medina 2015-02-02 12:21:13 UTC
(In reply to Carlos Jacobo Puga Medina from comment #8)

I mean to add a new entry in /usr/ports/UPDATING.
Comment 10 John Marino freebsd_committer freebsd_triage 2015-02-06 10:33:12 UTC
nope. (as documented in private email)
Comment 11 Carlos J Puga Medina 2015-02-06 21:28:43 UTC
Created attachment 152642 [details]
libgcrypt-1.6.2_1.diff

Patch modified according to Mk/Uses/compiler.mk

# Fix crash at cipher/salsa20.c module on amd64
.if ${ARCH} == "amd64" && exists(/usr/bin/clang)
CFLAGS:=	${CFLAGS:N-O*} -O2
.endif
Comment 12 commit-hook freebsd_committer freebsd_triage 2015-02-07 07:26:12 UTC
A commit references this bug:

Author: pi
Date: Sat Feb  7 07:25:23 UTC 2015
New revision: 378572
URL: https://svnweb.freebsd.org/changeset/ports/378572

Log:
  security/libgcrypt: fix some issues

  - Fix crash at cipher/salsa20.c module on amd64.
  - Fix strip shared object.
  - Bump PORTREVISION.

  PR:		197146
  Submitted by:	cpm@fbsd.es (maintainer)

Changes:
  head/security/libgcrypt/Makefile
  head/security/libgcrypt/files/patch-cipher-Makefile.in
Comment 13 Kurt Jaeger freebsd_committer freebsd_triage 2015-02-07 07:26:57 UTC
Committed, thanks.