From 727f62cf32c39005b3b7a7e078fbadf8459e93df Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Sun, 25 Jan 2026 23:42:30 -0500 Subject: [PATCH 1/3] testing --- .github/workflows/python-tests.yml | 123 ++++++++++++++--------------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index f076431..712ca67 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -43,29 +43,29 @@ jobs: run: | uv run pytest test_cloudcheck.py -v - publish: - runs-on: ubuntu-latest - needs: test - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' - steps: - - uses: actions/checkout@v6 - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: "3.x" - - name: Set up Rust - uses: dtolnay/rust-toolchain@stable - - name: Set up uv - uses: astral-sh/setup-uv@v7 - - name: Build PyPi package - run: uv run maturin build --release --out dist - - name: Publish PyPi package - # TODO: Remove || true - run: uv run maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} || true + # publish: + # runs-on: ubuntu-latest + # needs: test + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # steps: + # - uses: actions/checkout@v6 + # - name: Set up Python + # uses: actions/setup-python@v6 + # with: + # python-version: "3.x" + # - name: Set up Rust + # uses: dtolnay/rust-toolchain@stable + # - name: Set up uv + # uses: astral-sh/setup-uv@v7 + # - name: Build PyPi package + # run: uv run maturin build --release --out dist + # - name: Publish PyPi package + # # TODO: Remove || true + # run: uv run maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} || true linux: runs-on: ${{ matrix.platform.runner }} - needs: publish - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # needs: publish + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -89,10 +89,6 @@ jobs: python-version: 3.x - name: Build wheels uses: PyO3/maturin-action@v1 - env: - # Fix ARM cross-compilation: define __ARM_ARCH for assembly files - CFLAGS_aarch64_unknown_linux_gnu: "-march=armv8-a" - CFLAGS_armv7_unknown_linux_gnueabihf: "-march=armv7-a -mfpu=neon" with: target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter @@ -119,8 +115,8 @@ jobs: musllinux: runs-on: ${{ matrix.platform.runner }} - needs: publish - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # needs: publish + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -145,16 +141,19 @@ jobs: sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: musllinux_1_2 before-script-linux: | - if command -v apt-get >/dev/null 2>&1; then + if command -v apk >/dev/null 2>&1; then + # Alpine (musllinux) + apk add --no-cache openssl-dev pkgconfig perl make musl-dev + elif command -v apt-get >/dev/null 2>&1; then # Debian-based sudo apt-get update - sudo apt-get install -y pkg-config libssl-dev + sudo apt-get install -y pkg-config libssl-dev perl make gcc g++ binutils elif command -v yum >/dev/null 2>&1; then # CentOS-based yum update -y - yum install -y openssl openssl-devel + yum install -y openssl openssl-devel perl perl-core make gcc gcc-c++ binutils else - echo "Error: Neither apt-get nor yum found" + echo "Error: No supported package manager found" exit 1 fi @@ -166,8 +165,8 @@ jobs: windows: runs-on: ${{ matrix.platform.runner }} - needs: publish - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # needs: publish + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -195,8 +194,8 @@ jobs: macos: runs-on: ${{ matrix.platform.runner }} - needs: publish - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # needs: publish + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -223,8 +222,8 @@ jobs: sdist: runs-on: ubuntu-latest - needs: publish - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # needs: publish + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' steps: - uses: actions/checkout@v6 - name: Build sdist @@ -238,28 +237,28 @@ jobs: name: wheels-sdist path: dist - release: - name: Release - runs-on: ubuntu-latest - needs: [linux, musllinux, windows, macos, sdist] - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' - permissions: - # Use to sign the release artifacts - id-token: write - # Used to upload release artifacts - contents: write - # Used to generate artifact attestation - attestations: write - steps: - - uses: actions/download-artifact@v7 - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v3 - with: - subject-path: 'wheels-*/*' - - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - with: - command: upload - args: --non-interactive --skip-existing wheels-*/* \ No newline at end of file + # release: + # name: Release + # runs-on: ubuntu-latest + # needs: [linux, musllinux, windows, macos, sdist] + # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + # permissions: + # # Use to sign the release artifacts + # id-token: write + # # Used to upload release artifacts + # contents: write + # # Used to generate artifact attestation + # attestations: write + # steps: + # - uses: actions/download-artifact@v7 + # - name: Generate artifact attestation + # uses: actions/attest-build-provenance@v3 + # with: + # subject-path: 'wheels-*/*' + # - name: Publish to PyPI + # uses: PyO3/maturin-action@v1 + # env: + # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + # with: + # command: upload + # args: --non-interactive --skip-existing wheels-*/* \ No newline at end of file From 8f575b993096588395a414d5a20c9194ef749e9a Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Sun, 25 Jan 2026 23:48:54 -0500 Subject: [PATCH 2/3] vendored --- Cargo.lock | 11 +++++++++++ Cargo.toml | 1 + 2 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 7816218..65f9ba5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -237,6 +237,7 @@ dependencies = [ "clap", "env_logger", "log", + "openssl", "pyo3", "pyo3-async-runtimes", "radixtarget", @@ -1036,6 +1037,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-src" +version = "300.5.4+3.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507b3792995dae9b0df8a1c1e3771e8418b7c2d9f0baeba32e6fe8b06c7cb72" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.111" @@ -1044,6 +1054,7 @@ checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index 01626d2..ab54bdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1", features = ["full"] } reqwest = { version = "0.13", default-features = false, features = ["json", "native-tls", "http2"] } +openssl = { version = "0.10", features = ["vendored"] } pyo3 = { version = "0.27", optional = true } pyo3-async-runtimes = { version = "0.27", features = ["tokio-runtime"], optional = true } radixtarget = "4.2" From dfc9b140c73c81ac813f1c01f9f051ea774ea07e Mon Sep 17 00:00:00 2001 From: TheTechromancer Date: Mon, 26 Jan 2026 00:19:31 -0500 Subject: [PATCH 3/3] ssl vendored --- .github/workflows/docker-tests.yml | 4 +- .github/workflows/python-tests.yml | 108 ++++++++++++++--------------- Cargo.lock | 2 +- Cargo.toml | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml index 159dd48..1a5af3f 100644 --- a/.github/workflows/docker-tests.yml +++ b/.github/workflows/docker-tests.yml @@ -61,8 +61,8 @@ jobs: type=sha,prefix=sha- type=raw,value=latest,enable={{is_default_branch}} type=raw,value=v9 - type=raw,value=v9.1 - type=raw,value=v9.1.3 + type=raw,value=v9.2 + type=raw,value=v9.2.0 - name: Build and push Docker image uses: docker/build-push-action@v6 diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 712ca67..2b42e86 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -43,29 +43,29 @@ jobs: run: | uv run pytest test_cloudcheck.py -v - # publish: - # runs-on: ubuntu-latest - # needs: test - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' - # steps: - # - uses: actions/checkout@v6 - # - name: Set up Python - # uses: actions/setup-python@v6 - # with: - # python-version: "3.x" - # - name: Set up Rust - # uses: dtolnay/rust-toolchain@stable - # - name: Set up uv - # uses: astral-sh/setup-uv@v7 - # - name: Build PyPi package - # run: uv run maturin build --release --out dist - # - name: Publish PyPi package - # # TODO: Remove || true - # run: uv run maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} || true + publish: + runs-on: ubuntu-latest + needs: test + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + steps: + - uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.x" + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + - name: Set up uv + uses: astral-sh/setup-uv@v7 + - name: Build PyPi package + run: uv run maturin build --release --out dist + - name: Publish PyPi package + # TODO: Remove || true + run: uv run maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} || true linux: runs-on: ${{ matrix.platform.runner }} - # needs: publish - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + needs: publish + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -115,8 +115,8 @@ jobs: musllinux: runs-on: ${{ matrix.platform.runner }} - # needs: publish - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + needs: publish + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -165,8 +165,8 @@ jobs: windows: runs-on: ${{ matrix.platform.runner }} - # needs: publish - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + needs: publish + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -194,8 +194,8 @@ jobs: macos: runs-on: ${{ matrix.platform.runner }} - # needs: publish - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + needs: publish + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' strategy: matrix: platform: @@ -222,8 +222,8 @@ jobs: sdist: runs-on: ubuntu-latest - # needs: publish - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + needs: publish + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' steps: - uses: actions/checkout@v6 - name: Build sdist @@ -237,28 +237,28 @@ jobs: name: wheels-sdist path: dist - # release: - # name: Release - # runs-on: ubuntu-latest - # needs: [linux, musllinux, windows, macos, sdist] - # if: github.event_name == 'push' && github.ref == 'refs/heads/stable' - # permissions: - # # Use to sign the release artifacts - # id-token: write - # # Used to upload release artifacts - # contents: write - # # Used to generate artifact attestation - # attestations: write - # steps: - # - uses: actions/download-artifact@v7 - # - name: Generate artifact attestation - # uses: actions/attest-build-provenance@v3 - # with: - # subject-path: 'wheels-*/*' - # - name: Publish to PyPI - # uses: PyO3/maturin-action@v1 - # env: - # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - # with: - # command: upload - # args: --non-interactive --skip-existing wheels-*/* \ No newline at end of file + release: + name: Release + runs-on: ubuntu-latest + needs: [linux, musllinux, windows, macos, sdist] + if: github.event_name == 'push' && github.ref == 'refs/heads/stable' + permissions: + # Use to sign the release artifacts + id-token: write + # Used to upload release artifacts + contents: write + # Used to generate artifact attestation + attestations: write + steps: + - uses: actions/download-artifact@v7 + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v3 + with: + subject-path: 'wheels-*/*' + - name: Publish to PyPI + uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + with: + command: upload + args: --non-interactive --skip-existing wheels-*/* \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 65f9ba5..f84e27c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -231,7 +231,7 @@ checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "cloudcheck" -version = "9.1.3" +version = "9.2.0" dependencies = [ "axum", "clap", diff --git a/Cargo.toml b/Cargo.toml index ab54bdb..9b7e475 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cloudcheck" -version = "9.1.3" +version = "9.2.0" edition = "2024" description = "CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider." license = "GPL-3.0" diff --git a/pyproject.toml b/pyproject.toml index d18901a..a5e18f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "cloudcheck" -version = "9.1.3" +version = "9.2.0" description = "Detailed database of cloud providers. Instantly look up a domain or IP address" readme = "README.md" requires-python = ">=3.9" diff --git a/uv.lock b/uv.lock index 5a8327e..433f538 100644 --- a/uv.lock +++ b/uv.lock @@ -49,7 +49,7 @@ wheels = [ [[package]] name = "cloudcheck" -version = "9.1.3" +version = "9.2.0" source = { editable = "." } [package.dev-dependencies]