From 36463a651189d65118302a94dfa65886e4e86e6c Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 3 Jul 2023 11:02:14 -0700 Subject: [PATCH 1/2] curl: split out rustls-ffi backend to its own dedicated package this allows the rustls backend to be built at a point in time after the openssl backend is built, thus resolving a dependency cycle: curl -> rust -> rustls -> curl (there is a similar cycle with cmake which is also solved by this) Signed-off-by: Ariadne Conill --- curl-rustls.yaml | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ curl.yaml | 36 +-------------------------- packages.txt | 1 + 3 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 curl-rustls.yaml diff --git a/curl-rustls.yaml b/curl-rustls.yaml new file mode 100644 index 000000000000..80cf27214e69 --- /dev/null +++ b/curl-rustls.yaml @@ -0,0 +1,65 @@ +package: + name: curl-rustls + version: 8.1.2 + epoch: 1 + description: "URL retrieval utility and library" + copyright: + - license: MIT + dependencies: + runtime: + - libcurl-rustls4 + +environment: + contents: + packages: + - wolfi-base + - busybox + - ca-certificates-bundle + - build-base + - nghttp2-dev + - openssl-dev + - zlib-dev + - brotli-dev + - rustls-ffi + +pipeline: + - uses: fetch + with: + uri: https://curl.se/download/curl-${{package.version}}.tar.xz + expected-sha256: 31b1118eb8bfd43cd95d9a3f146f814ff874f6ed3999b29d94f4d1e7dbac5ef6 + + - uses: autoconf/configure + with: + opts: | + --enable-ipv6 \ + --enable-unix-sockets \ + --without-openssl \ + --with-rustls \ + --with-nghttp2 \ + --with-pic \ + --disable-ldap \ + --without-libssh2 + + - uses: autoconf/make + + - runs: | + make install DESTDIR="/home/build/curl-rustls" + + - uses: strip + +subpackages: + - name: "libcurl-rustls4" + description: "curl library (rustls backend)" + dependencies: + provider-priority: 10 + pipeline: + - runs: | + mkdir -p "${{targets.subpkgdir}}"/usr/lib + mv "/home/build/curl-rustls"/usr/lib/libcurl.so.* "${{targets.subpkgdir}}"/usr/lib/ + +update: + enabled: true + version-separator: _ + github: + identifier: curl/curl + strip-prefix: curl- diff --git a/curl.yaml b/curl.yaml index 8903195a75c2..faa44fe70366 100644 --- a/curl.yaml +++ b/curl.yaml @@ -1,7 +1,7 @@ package: name: curl version: 8.1.2 - epoch: 0 + epoch: 1 description: "URL retrieval utility and library" copyright: - license: MIT @@ -17,7 +17,6 @@ environment: - openssl-dev - zlib-dev - brotli-dev - - rustls-ffi pipeline: - uses: fetch @@ -41,23 +40,6 @@ pipeline: - uses: autoconf/make-install - - uses: autoconf/configure - with: - opts: | - --enable-ipv6 \ - --enable-unix-sockets \ - --without-openssl \ - --with-rustls \ - --with-nghttp2 \ - --with-pic \ - --disable-ldap \ - --without-libssh2 - - - uses: autoconf/make - - - runs: | - make install DESTDIR="/home/build/curl-rustls" - - uses: strip subpackages: @@ -65,9 +47,6 @@ subpackages: description: "headers for libcurl" pipeline: - uses: split/dev - dependencies: - runtime: - - libcurl4 - name: "curl-doc" description: "documentation for curl" @@ -77,25 +56,12 @@ subpackages: - name: "libcurl-openssl4" description: "curl library (openssl backend)" dependencies: - provides: - - libcurl4=7.87.1 provider-priority: 5 pipeline: - runs: | mkdir -p "${{targets.subpkgdir}}"/usr/lib mv "${{targets.destdir}}"/usr/lib/libcurl.so.* "${{targets.subpkgdir}}"/usr/lib/ - - name: "libcurl-rustls4" - description: "curl library (rustls backend)" - dependencies: - provides: - - libcurl4=7.87.1 - provider-priority: 10 - pipeline: - - runs: | - mkdir -p "${{targets.subpkgdir}}"/usr/lib - mv "/home/build/curl-rustls"/usr/lib/libcurl.so.* "${{targets.subpkgdir}}"/usr/lib/ - update: enabled: true version-separator: _ diff --git a/packages.txt b/packages.txt index 620d6e23c6a8..f7e7475ce88b 100644 --- a/packages.txt +++ b/packages.txt @@ -298,6 +298,7 @@ krb5-conf krb5 libtirpc rustls-ffi +curl-rustls spire-server kustomize alpine-keys From 06cc121d27d0f3e494b72069287bf9edb26cca48 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 3 Jul 2023 11:07:03 -0700 Subject: [PATCH 2/2] curl-rustls: drop strip pipeline Signed-off-by: Ariadne Conill --- curl-rustls.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/curl-rustls.yaml b/curl-rustls.yaml index 80cf27214e69..18b4d302de84 100644 --- a/curl-rustls.yaml +++ b/curl-rustls.yaml @@ -45,8 +45,6 @@ pipeline: - runs: | make install DESTDIR="/home/build/curl-rustls" - - uses: strip - subpackages: - name: "libcurl-rustls4" description: "curl library (rustls backend)" @@ -56,6 +54,7 @@ subpackages: - runs: | mkdir -p "${{targets.subpkgdir}}"/usr/lib mv "/home/build/curl-rustls"/usr/lib/libcurl.so.* "${{targets.subpkgdir}}"/usr/lib/ + strip "${{targets.subpkgdir}}"/usr/lib/libcurl.so.* update: enabled: true