Bug 226853 - archivers/libarchive: fix build with libressl-devel
Summary: archivers/libarchive: fix build with libressl-devel
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Greg Lewis
URL: https://github.com/libarchive/libarch...
Keywords:
Depends on:
Blocks: 226843
  Show dependency treegraph
 
Reported: 2018-03-22 19:54 UTC by Piotr Kubaj
Modified: 2018-04-02 17:51 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (glewis)


Attachments
patch (2.57 KB, patch)
2018-03-22 19:54 UTC, Piotr Kubaj
no flags Details | Diff
patch (2.49 KB, patch)
2018-03-25 06:59 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2018-03-22 19:54:25 UTC
Created attachment 191742 [details]
patch

LibreSSL 2.7 changes API, which breaks build.

This patch fixes it. Verified against LibreSSL 2.6, 2.7 and base OpenSSL.
Comment 1 Charlie Li 2018-03-25 06:04:16 UTC
The attached patch-libarchive-archive_openssl_evp_private.h (the first patch) does not apply, because it looks like you ran make makepatch after applying the old version of this patch:

--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)

This results in patch trying to find the macro looking for either the OpenSSL version less than 1.1 or any LibreSSL version, which does not appear in the original unpatched source.
Comment 2 Piotr Kubaj freebsd_committer 2018-03-25 06:59:16 UTC
Created attachment 191797 [details]
patch

Sorry, this one should apply.
Comment 3 commit-hook freebsd_committer 2018-03-27 07:07:54 UTC
A commit references this bug:

Author: glewis
Date: Tue Mar 27 07:07:17 UTC 2018
New revision: 465666
URL: https://svnweb.freebsd.org/changeset/ports/465666

Log:
  . Fix the build with libressl-devel

  PR:		226853
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Changes:
  head/archivers/libarchive/files/patch-libarchive-archive_openssl_evp_private.h
  head/archivers/libarchive/files/patch-libarchive_openssl_hmac_private.h
Comment 4 Greg Lewis freebsd_committer 2018-03-27 07:08:39 UTC
Patch committed.  Thanks!
Comment 5 Bernard Spil freebsd_committer 2018-04-02 17:51:52 UTC
For reference, add upstream pull-request
https://github.com/libarchive/libarchive/pull/1005