me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Build OpenSSL against the selected Vinix target SDK

diviocity committed 6 days ago · 19f9785ff6225f1d4093cb3eeb7b56a3cc29bb50 View patch
Unverified signature 1 files changed +14 -9
openssl/PKGBUILD.vile +14 -9

@@ -1,11 +1,16 @@

11; Keep the libssl.so.3 and libcrypto.so.3 ABI used by the Alpine 3.21 userland.

22; Use upstream's supported 3.5 LTS branch and Alpine's corresponding fixes.

3+selected := get-environment-variable("VPAC_TARGET_ARCH")

4+arch := if string?(selected) { selected } else if memq(string->symbol("aarch64"), features()) { "aarch64" } else { "x86_64" }

5+cross := get-environment-variable("CROSS_COMPILE")

6+prefix := if string?(cross) { cross } else { "" }

7+

38defpkgbuild(openssl,

49 #:pkgname, "openssl",

510 #:pkgver, "3.5.9",

6- #:pkgrel, 1,

11+ #:pkgrel, 2,

712 #:pkgdesc, "OpenSSL TLS toolkit, libraries and development headers for Vinix",

8- #:arch, [#:x86-64],

13+ #:arch, [#:x86-64, #:aarch64],

914 #:url, "https://openssl-library.org/",

1015 #:license, "Apache-2.0",

1116 #:depends, ["musl"],

@@ -27,19 +32,19 @@ defpkgbuild(openssl,

2732 run("patch", "--batch", "--fuzz=0", "-p1", "-d", "openssl-3.5.9", "-i", string-append("../", patch))

2833 }, list("CVE-2026-88822.patch", "CVE-2026-88823.patch", "CVE-2026-95691.patch",

2934 "CVE-2026-95692.patch", "CVE-2026-107496.patch"))

30- run("ln", "-s", get-environment-variable("VPAC_MAKEPKG_ROOT"), "vinix-sysroot")

3135 },

3236 #:build, fn() {

33- run("env", "CC=gcc --sysroot=vinix-sysroot -specs=vinix-sysroot/usr/lib/musl-gcc-sysroot.specs",

34- "perl", "openssl-3.5.9/Configure", "linux-x86_64", "--prefix=/usr", "--libdir=lib",

37+ ; OpenSSL prefixes tool names itself. vinix-cc selects the real target

38+ ; compiler and sysroot, so pass the archive tools to Configure explicitly.

39+ run("env", "-u", "CROSS_COMPILE", "CC=vinix-cc", string-append("VINIX_REAL_CC=", prefix, "gcc"),

40+ string-append("AR=", prefix, "ar"), string-append("RANLIB=", prefix, "ranlib"),

41+ "perl", "openssl-3.5.9/Configure", string-append("linux-", arch), "--prefix=/usr", "--libdir=lib",

3542 "--openssldir=/etc/ssl", "shared", "no-tests", "no-docs", "no-zlib", "no-async", "no-afalgeng")

3643 run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "make", "build_sw")

3744 },

3845 #:check, fn() {

39- run("vinix-sysroot/lib/ld-musl-x86_64.so.1", "--library-path", ".:vinix-sysroot/usr/lib",

40- "apps/openssl", "version")

41- run("vinix-sysroot/lib/ld-musl-x86_64.so.1", "--library-path", ".:vinix-sysroot/usr/lib",

42- "apps/openssl", "dgst", "-sha256", "/dev/null")

46+ run("vinix-run", "--library-path", ".", "apps/openssl", "version")

47+ run("vinix-run", "--library-path", ".", "apps/openssl", "dgst", "-sha256", "/dev/null")

4348 },

4449 #:package, fn() {

4550 ; The core command implements 'openssl rehash'. Optional upstream Perl