unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49538] [CORE-UPDATES][PATCH] gnu: openssl-1.0: Build with openssl sources.
@ 2021-07-12 17:50 Efraim Flashner
  2021-07-12 18:03 ` bug#49538: " Efraim Flashner
  0 siblings, 1 reply; 3+ messages in thread
From: Efraim Flashner @ 2021-07-12 17:50 UTC (permalink / raw)
  To: 49538; +Cc: Efraim Flashner

* gnu/packages/tls.scm (openssl-1.0): Replace package with openssl built
with openssl-1.0 API.
---

I was poking around with openssl on master and I realized that
openssl-1.1 can be built targeting the API for 1.1, 1.0 or 0.9.8. I test
built dillo with openssl-1.1 with the API for 1.0 and it was working for
me. I figure this isn't a bad way to make things a bit better while we
try to get rid of openssl-1.0.

---

 gnu/packages/tls.scm | 92 ++------------------------------------------
 1 file changed, 3 insertions(+), 89 deletions(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 297e16dd70..ed22518e02 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -447,97 +447,11 @@ required structures.")
    (home-page "https://www.openssl.org/")))
 
 (define-public openssl-1.0
-  (package
-    (inherit openssl)
+  (package/inherit openssl
     (name "openssl")
-    (version "1.0.2u")
-    (source (origin
-              (method url-fetch)
-              (uri (list (string-append "https://www.openssl.org/source/openssl-"
-                                        version ".tar.gz")
-                         (string-append "ftp://ftp.openssl.org/source/"
-                                        "openssl-" version ".tar.gz")
-                         (string-append "ftp://ftp.openssl.org/source/old/"
-                                        (string-trim-right version char-set:letter)
-                                        "/openssl-" version ".tar.gz")))
-              (sha256
-               (base32
-                "05lxcs4hzyfqd5jn0d9p0fvqna62v2s4pc9qgmq0dpcknkzwdl7c"))
-              (patches (search-patches "openssl-runpath.patch"
-                                       "openssl-c-rehash-in.patch"))))
-    (outputs '("out"
-               "doc"                    ;1.5MiB of man3 pages
-               "static"))               ;6MiB of .a files
     (arguments
-     (substitute-keyword-arguments (package-arguments openssl)
-       ;; Parallel build is not supported in 1.0.x.
-       ((#:parallel-build? _ #f) #f)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (add-before 'patch-source-shebangs 'patch-tests
-             (lambda* (#:key inputs native-inputs #:allow-other-keys)
-               (let ((bash (assoc-ref (or native-inputs inputs) "bash")))
-                 (substitute* (find-files "test" ".*")
-                   (("/bin/sh")
-                    (string-append bash "/bin/sh"))
-                   (("/bin/rm")
-                    "rm"))
-                 #t)))
-           (add-before 'configure 'patch-Makefile.org
-             (lambda* (#:key outputs #:allow-other-keys)
-               ;; The default MANDIR is some unusual place.  Fix that.
-               (let ((out (assoc-ref outputs "out")))
-                 (patch-makefile-SHELL "Makefile.org")
-                 (substitute* "Makefile.org"
-                   (("^MANDIR[[:blank:]]*=.*$")
-                    (string-append "MANDIR = " out "/share/man\n")))
-                 #t)))
-	   (replace 'configure
-	     ;; Override this phase because OpenSSL 1.0 does not understand -rpath.
-	     (lambda* (#:key outputs #:allow-other-keys)
-	       (let ((out (assoc-ref outputs "out")))
-		 (invoke ,@(if (%current-target-system)
-			       '("./Configure")
-			       '("./config"))
-			 "shared"                 ;build shared libraries
-			 "--libdir=lib"
-
-			 ;; The default for this catch-all directory is
-			 ;; PREFIX/ssl.  Change that to something more
-			 ;; conventional.
-			 (string-append "--openssldir=" out
-					"/share/openssl-" ,version)
-
-			 (string-append "--prefix=" out)
-			 ,@(if (%current-target-system)
-			       '((getenv "CONFIGURE_TARGET_ARCH"))
-			       '())))))
-        (delete 'move-extra-documentation)
-        (add-after 'install 'move-man3-pages
-          (lambda* (#:key outputs #:allow-other-keys)
-            ;; Move section 3 man pages to "doc".
-            (let* ((out    (assoc-ref outputs "out"))
-                   (man3   (string-append out "/share/man/man3"))
-                   (doc    (assoc-ref outputs "doc"))
-                   (target (string-append doc "/share/man/man3")))
-              (mkdir-p target)
-              (for-each (lambda (file)
-                          (rename-file file
-                                       (string-append target "/"
-                                                      (basename file))))
-                        (find-files man3))
-              (delete-file-recursively man3)
-              #t)))
-           ;; XXX: Duplicate this phase to make sure 'version' evaluates
-           ;; in the current scope and not the inherited one.
-           (replace 'remove-miscellany
-             (lambda* (#:key outputs #:allow-other-keys)
-               ;; The 'misc' directory contains random undocumented shell and Perl
-               ;; scripts.  Remove them to avoid retaining a reference on Perl.
-               (let ((out (assoc-ref outputs "out")))
-                 (delete-file-recursively (string-append out "/share/openssl-"
-                                                         ,version "/misc"))
-                 #t)))))))))
+     `(#:configure-flags (list "--api=1.0.0")
+       ,@((package-arguments openssl))))))
 
 (define-public libressl
   (package

base-commit: 12c2648f4e8e050d9374ca70efd1856dc8238979
-- 
2.32.0





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

* bug#49538: [CORE-UPDATES][PATCH] gnu: openssl-1.0: Build with openssl sources.
  2021-07-12 17:50 [bug#49538] [CORE-UPDATES][PATCH] gnu: openssl-1.0: Build with openssl sources Efraim Flashner
@ 2021-07-12 18:03 ` Efraim Flashner
  2021-07-12 19:41   ` [bug#49538] " Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Efraim Flashner @ 2021-07-12 18:03 UTC (permalink / raw)
  To: 49538-done

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

Nevermind, this needs more work.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [bug#49538] [CORE-UPDATES][PATCH] gnu: openssl-1.0: Build with openssl sources.
  2021-07-12 18:03 ` bug#49538: " Efraim Flashner
@ 2021-07-12 19:41   ` Leo Famulari
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2021-07-12 19:41 UTC (permalink / raw)
  To: Efraim Flashner, 49538-done

On Mon, Jul 12, 2021 at 09:03:27PM +0300, Efraim Flashner wrote:
> Nevermind, this needs more work.

Oh, too bad. It's definitely an exciting option, if it can be made to
work. Otherwise we'll have to remove those packages that depend on
OpenSSL 1.0... sometime soon?




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

end of thread, other threads:[~2021-07-12 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 17:50 [bug#49538] [CORE-UPDATES][PATCH] gnu: openssl-1.0: Build with openssl sources Efraim Flashner
2021-07-12 18:03 ` bug#49538: " Efraim Flashner
2021-07-12 19:41   ` [bug#49538] " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).