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

[libcap] Failed to download from https://git.kernel.org/pub/scm/libs/libcap #38591

Closed
Arcnor opened this issue May 6, 2024 · 3 comments · Fixed by #38599
Closed

[libcap] Failed to download from https://git.kernel.org/pub/scm/libs/libcap #38591

Arcnor opened this issue May 6, 2024 · 3 comments · Fixed by #38599
Assignees
Labels
category:question This issue is a question

Comments

@Arcnor
Copy link

Arcnor commented May 6, 2024

Operating system

Linux

Compiler

No response

Steps to reproduce the behavior

Install SDL2 with x11 & wayland features

Failure logs

Full log at https://productionresultssa10.blob.core.windows.net/actions-results/199cd38c-ee3a-4a30-96ac-c327197c125d/workflow-job-run-2a6e03da-9c06-5941-6460-ce81c601de8a/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-05-06T10%3A16%3A56Z&sig=9caX%2BbxSZjEqbna368NXi6hT2FtPS1pzQzITgFD2Ix4%3D&sp=r&spr=https&sr=b&st=2024-05-06T10%3A06%3A51Z&sv=2021-12-02

Installing 11/19 libcap:x64-linux@2.69#4...
  Building libcap:x64-linux@2.69#4...
  /home/runner/work/Descent3/Descent3/vcpkg/buildtrees/versioning_/versions/libcap/f81a07cf694095f60c759c9a18adc57e94296a5f: info: installing overlay port from here
  -- Downloading https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-2.69.tar.gz -> libcap-2.69.tar.gz...
  [DEBUG] To include the environment variables in debug output, pass --debug-env
  [DEBUG] Trying to load bundleconfig from /home/runner/work/Descent3/Descent3/vcpkg/vcpkg-bundle.json
  [DEBUG] Failed to open: /home/runner/work/Descent3/Descent3/vcpkg/vcpkg-bundle.json
  [DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt
  [DEBUG] Metrics enabled.
  [DEBUG] Feature flag 'binarycaching' unset
  [DEBUG] Feature flag 'compilertracking' unset
  [DEBUG] Feature flag 'registries' unset
  [DEBUG] Feature flag 'versions' unset
  [DEBUG] Feature flag 'dependencygraph' unset
  [DEBUG] Detected CI environment: GitHub_Actions
  [DEBUG] 1000: execute_process(curl --fail -L https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-2.69.tar.gz --create-dirs --output /home/runner/work/Descent3/Descent3/vcpkg/downloads/libcap-2.69.tar.gz.51978.part)
  [DEBUG] 1000: cmd_execute_and_stream_data() returned 22 after   152829 us
  error: Failed to download from mirror set
  error: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-2.69.tar.gz: curl failed to download with exit code 22
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
  curl: (22) The requested URL returned error: 400
  
  [DEBUG] /source/src/vcpkg/base/downloads.cpp(997): 
  [DEBUG] Time in subprocesses: 152829us
  [DEBUG] Time in parsing JSON: 5us
  [DEBUG] Time in JSON reader: 0us
  [DEBUG] Time in filesystem: [264](https://github.com/DescentDevelopers/Descent3/actions/runs/8966782203/job/24623758216?pr=242#step:6:265)us
  [DEBUG] Time in loading ports: 0us
  [DEBUG] Exiting after 154 ms (153334us)

Additional context

It seems libcap is failing to download because git.kernel.org doesn't support tar.gz as a package format? I get that error when trying to download the file myself (Unsupported snapshot format: libcap-2.69.tar.gz)

@Arcnor Arcnor added the category:port-bug The issue is with a library, which is something the port should already support label May 6, 2024
@WangWeiLin-MV WangWeiLin-MV changed the title [libcap] build failure [libcap] Failed to download from https://git.kernel.org/pub/scm/libs/libcap May 6, 2024
@WangWeiLin-MV
Copy link
Contributor

See #37851.

Please temporarily use the patch workaround.

diff --git a/ports/libcap/portfile.cmake b/ports/libcap/portfile.cmake
index f5e3830a1..fc9218935 100644
--- a/ports/libcap/portfile.cmake
+++ b/ports/libcap/portfile.cmake
@@ -1,11 +1,9 @@
-vcpkg_download_distfile(ARCHIVE
-    URLS "https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-${VERSION}.tar.gz"
-    FILENAME "libcap-${VERSION}.tar.gz"
-    SHA512 b243ae403d45af2ff1204931b9e24c3b7f3e0c444f1ff2f3ed524c212b61a7ff1bc3c98df1855b2f0d300ebabf604b95440cdaddd666914ad60575e2e2f29fe8
-)
-
-vcpkg_extract_source_archive(SOURCE_PATH
-    ARCHIVE "${ARCHIVE}"
+vcpkg_from_git(
+    OUT_SOURCE_PATH SOURCE_PATH
+    URL https://git.kernel.org/pub/scm/libs/libcap/libcap.git
+    FETCH_REF "libcap-${VERSION}"
+    REF 8bed80f9b54b7bd2a1ee1fdc2124a094733c9356
+    HEAD_REF "master"
 )
 
 file(COPY "${CMAKE_CURRENT_LIST_DIR}/configure" DESTINATION "${SOURCE_PATH}")

@WangWeiLin-MV WangWeiLin-MV added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels May 6, 2024
@Arcnor
Copy link
Author

Arcnor commented May 6, 2024

Hi @WangWeiLin-MV , thanks for your comment. Is there a specific procedure to apply that patch without having to add custom ports and all that jazz to my repo? We're not even depending on libcap ourselves, just want to install SDL2...

@WangWeiLin-MV
Copy link
Contributor

@Arcnor This patch can applied by saving it as a file then git apply _saved_filename_, then add option to vcpkg install with --overlay-ports=ports/libcap

@WangWeiLin-MV WangWeiLin-MV linked a pull request May 7, 2024 that will close this issue
data-queue pushed a commit that referenced this issue May 8, 2024
Fix recurring problem with on-the-fly tarballs:
#38591,
#37948.
yurybura pushed a commit to yurybura/vcpkg that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants