Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUIC] Alpine packaging #83789

Closed
CarnaViire opened this issue Mar 22, 2023 · 4 comments
Closed

[QUIC] Alpine packaging #83789

CarnaViire opened this issue Mar 22, 2023 · 4 comments
Assignees
Milestone

Comments

@CarnaViire
Copy link
Member

CarnaViire commented Mar 22, 2023

We currently don't have official packages for libmsquic on Alpine.
The way to workaround that is to build MsQuic from sources (example).

The problem with official package is that packages.microsoft.com is not available on Alpine, so common distribution path can't be followed.

A possible solution could be to submit the definition to Alpine packaging system.
With that, we will not need to worry about building, signing & publishing.
It would just come to Alpine users (and .NET) via normal means.

However, there are few open questions:

  1. Maintainer
    Up for discussion with MsQuic team /cc @nibanks
    I assume the expectation would be to update the definition shortly after MsQuic releases.
    It should become part of the release process similar to signing & publishing.

  2. Architecture
    We could restrict to subset or we could keep it open and wait for user reports

  3. Naming
    Alpine really expects convection of $pkgname-$pkgver. So the question is if this should be msquic-2.1.7 or libmsquic-2.1.7 like we do for other distributions.

  4. Versioning
    It is unfortunate that the releases still depends on commit hashes and are not tagged/branched. That make it more difficult to make reproducible builds. unable to recreate published binaries from published assets  microsoft/msquic#3395 is opened to track ask for improvements.

  5. OpenSSL 3
    The draft below uses OpenSSL 3 dependency (as it's needed for Alpine 3.17) -- would that mean dependency on MsQuic 2.2 release?

Working draft for Alpine packaging system by @wfurt
42446f45cd0d:~/github/aports/testing/libmsquic$ cat APKBUILD
# Contributor:
# Maintainer: Microsoft QUIC Team [[email protected]](mailto:[email protected])
pkgname=msquic
pkgver=2.1.7
pkgrel=0
pkgdesc="Microsoft implementation of the IETF QUIC"
url=https://github.com/microsoft/msquic
arch="all"
license="MIT"
depends="openssl"
makedepends="cmake openssl-dev linux-headers lttng-ust-dev perl"
subpackages="$pkgname-dev"

_clog_commit=a4f472c5fe2c8298c0ada2e24717458c45a17eb1
_googletest_commit=dd7a9d29a33de34836c345c3b753d4eba15c5f44
_quictls_version=openssl-3.0.7+quic1

#source="$pkgname-$pkgver.tar.gz::https://github.com/microsoft/msquic/archive/refs/tags/v$pkgver.tar.gz
source="
$pkgname-new.tar.gz::https://github.com/microsoft/msquic/archive/2e2b9c18ade862c0cd9c6682dcf13e87c0e33661.tar.gz
https://github.com/google/googletest/archive/$_googletest_commit.tar.gz
https://github.com/microsoft/CLOG/archive/$_clog_commit.tar.gz
openssl-3.0.7.tar.tgz::https://github.com/quictls/openssl/archive/refs/tags/$_quictls_version.tar.gz
"
builddir="$srcdir/"

unpack() {
            default_unpack
            mv msquic-2e2b9c18ade862c0cd9c6682dcf13e87c0e33661 $pkgname-$pkgver

            rm -rf $pkgname-$pkgver/submodules/clog $pkgname-$pkgver/submodules/googletest $pkgname-$pkgver/submodules/openssl3
            mv -f CLOG-$_clog_commit $pkgname-$pkgver/submodules/clog
            mv -f googletest-$_googletest_commit $pkgname-$pkgver/submodules/googletest
            mv -f openssl-openssl* $pkgname-$pkgver/submodules/openssl3
}

build() {
            cmake \
                        -B "$pkgname-$pkgver/build" \
                        -S "$pkgname-$pkgver" \
                        -DCMAKE_BUILD_TYPE:STRING='Release' \
                        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
                        -DCMAKE_SKIP_INSTALL_RPATH:BOOL='YES' \
                        -DQUIC_BUILD_TOOLS=off \
                        -DQUIC_ENABLE_LOGGING=true -DQUIC_TLS=openssl3 \
                        -Wno-dev
            make -C "$pkgname-$pkgver/build"
}

check() {
            make -C "$pkgname-$pkgver/build" test
}

package() {
            make -C "$pkgname-$pkgver/build" DESTDIR="$pkgdir/" install
            rm -rf "$pkgdir/usr/share/msquic"
}

sha512sums="
2847f0a0c25998c7177c672c3296cf9d11ab638cc41382e913a9239293db82e087129720937ccd4ac887cc5d04c66d313827fca794f8f53389fd29e70015525c  msquic-new.tar.gz
ad897fa82f7b17c8ad59376e039b026b092973495a41b30527afd656714302bb05dd8564c77f18cf13a8e6f952df2e6483d79a25ee30cdfd9211078ecd1ee5cb  dd7a9d29a33de34836c345c3b753d4eba15c5f44.tar.gz
593ebae4f2dd0f76c56b21b849cceaa9847bd2fc5eea511b3c6236c577e869134381e3d20a1511e7c649b4e305501f6689004880d8155fb0e3ce8cbe18e4f2c2  a4f472c5fe2c8298c0ada2e24717458c45a17eb1.tar.gz
b3fa09b973e84779d44812f5da1beeebb8f4eee22f6a997390f1935994ed9a54611fadf8701f4796b55e12363f4b7d0bb93aed1c7ab44733240b7c8efaf7f2d0  openssl-3.0.7.tar.tgz
"

Alpine wiki on packaging: Creating an Alpine package

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Mar 22, 2023
@ghost
Copy link

ghost commented Mar 22, 2023

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

We currently don't have official packages for libmsquic on Alpine.
The way to workaround that is to build MsQuic from sources (example).

The problem with official package is that packages.microsoft.com is not available on Alpine, so common distribution path can't be followed.

A possible solution could be to submit the definition to Alpine packaging system.
With that, we will not need to worry about building, signing & publishing.
It would just come to Alpine users (and .NET) via normal means.

However, there are few open questions:

  1. Maintainer
    Up for discussion with MsQuic team /cc @nibanks
    I assume the expectation would be to update the definition shortly after MsQuic releases.
    It should become part of the release process similar to signing & publishing.

  2. Architecture
    We could restrict to subset or we could keep it open and wait for user reports

  3. Naming
    Alpine really expects convection of $pkgname-$pkgver. So the question is if this should be msquic-2.1.7 or libmsquic-2.1.7 like we do for other distributions.

  4. Versioning
    It is unfortunate that the releases still depends on commit hashes and are not tagged/branched. That make it more difficult to make reproducible builds. unable to recreate published binaries from published assets  microsoft/msquic#3395 is opened to track ask for improvements.

Working draft for Alpine packaging system by @wfurt
42446f45cd0d:~/github/aports/testing/libmsquic$ cat APKBUILD
# Contributor:
# Maintainer: Microsoft QUIC Team [[email protected]](mailto:[email protected])
pkgname=msquic
pkgver=2.1.7
pkgrel=0
pkgdesc="Microsoft implementation of the IETF QUIC"
url=https://github.com/microsoft/msquic
arch="all"
license="MIT"
depends="openssl"
makedepends="cmake openssl-dev linux-headers lttng-ust-dev perl"
subpackages="$pkgname-dev"

_clog_commit=a4f472c5fe2c8298c0ada2e24717458c45a17eb1
_googletest_commit=dd7a9d29a33de34836c345c3b753d4eba15c5f44
_quictls_version=openssl-3.0.7+quic1

#source="$pkgname-$pkgver.tar.gz::https://github.com/microsoft/msquic/archive/refs/tags/v$pkgver.tar.gz
source="
$pkgname-new.tar.gz::https://github.com/microsoft/msquic/archive/2e2b9c18ade862c0cd9c6682dcf13e87c0e33661.tar.gz
https://github.com/google/googletest/archive/$_googletest_commit.tar.gz
https://github.com/microsoft/CLOG/archive/$_clog_commit.tar.gz
openssl-3.0.7.tar.tgz::https://github.com/quictls/openssl/archive/refs/tags/$_quictls_version.tar.gz
"
builddir="$srcdir/"

unpack() {
            default_unpack
            mv msquic-2e2b9c18ade862c0cd9c6682dcf13e87c0e33661 $pkgname-$pkgver

            rm -rf $pkgname-$pkgver/submodules/clog $pkgname-$pkgver/submodules/googletest $pkgname-$pkgver/submodules/openssl3
            mv -f CLOG-$_clog_commit $pkgname-$pkgver/submodules/clog
            mv -f googletest-$_googletest_commit $pkgname-$pkgver/submodules/googletest
            mv -f openssl-openssl* $pkgname-$pkgver/submodules/openssl3
}

build() {
            cmake \
                        -B "$pkgname-$pkgver/build" \
                        -S "$pkgname-$pkgver" \
                        -DCMAKE_BUILD_TYPE:STRING='Release' \
                        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
                        -DCMAKE_SKIP_INSTALL_RPATH:BOOL='YES' \
                        -DQUIC_BUILD_TOOLS=off \
                        -DQUIC_ENABLE_LOGGING=true -DQUIC_TLS=openssl3 \
                        -Wno-dev
            make -C "$pkgname-$pkgver/build"
}

check() {
            make -C "$pkgname-$pkgver/build" test
}

package() {
            make -C "$pkgname-$pkgver/build" DESTDIR="$pkgdir/" install
            rm -rf "$pkgdir/usr/share/msquic"
}

sha512sums="
2847f0a0c25998c7177c672c3296cf9d11ab638cc41382e913a9239293db82e087129720937ccd4ac887cc5d04c66d313827fca794f8f53389fd29e70015525c  msquic-new.tar.gz
ad897fa82f7b17c8ad59376e039b026b092973495a41b30527afd656714302bb05dd8564c77f18cf13a8e6f952df2e6483d79a25ee30cdfd9211078ecd1ee5cb  dd7a9d29a33de34836c345c3b753d4eba15c5f44.tar.gz
593ebae4f2dd0f76c56b21b849cceaa9847bd2fc5eea511b3c6236c577e869134381e3d20a1511e7c649b4e305501f6689004880d8155fb0e3ce8cbe18e4f2c2  a4f472c5fe2c8298c0ada2e24717458c45a17eb1.tar.gz
b3fa09b973e84779d44812f5da1beeebb8f4eee22f6a997390f1935994ed9a54611fadf8701f4796b55e12363f4b7d0bb93aed1c7ab44733240b7c8efaf7f2d0  openssl-3.0.7.tar.tgz
"
Author: CarnaViire
Assignees: -
Labels:

area-System.Net.Quic

Milestone: -

@ManickaP
Copy link
Member

ManickaP commented Sep 2, 2024

@liveans I know you've done some work on this recently, can you give me a quick update? I'm asking to figure out whether this issue is solved and should be closed or if not, what is missing to close it.

@liveans
Copy link
Member

liveans commented Sep 2, 2024

msquic packages are available through testing repository on Alpine package manager now. libmsquic package on alpine, only thing we need to do is contributing msquic repo and add package testing/automation for this.

@liveans liveans self-assigned this Sep 30, 2024
@liveans
Copy link
Member

liveans commented Sep 30, 2024

This work has been completed, community/libmsquic: upgrade to 2.4.5, move from testing this PR moved libmsquic package from testing to community repository, as of now on newer alpine versions (3.21 is around corner) we will able to install msquic package like this:

apk add libmsquic

but for now, on already released versions we need to pull the package from edge branch on community repository, we can do it like this:

apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/ libmsquic

@liveans liveans closed this as completed Sep 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants