tuna / issues

Code Unrelated Issues
362 stars 28 forks source link

Mirror request: conan-center #617

Open 9chu opened 5 years ago

9chu commented 5 years ago

项目名称与简介(Project Intro.)

Conan, the C / C++ Package Manager for Developers https://conan.io/

上游地址与镜像方法(How to Mirror)

see: https://docs.conan.io/en/latest/uploading_packages/artifactory_ce.html

import os
import subprocess

def run(cmd):
ret = os.system(cmd)
if ret != 0:
    raise Exception("Command failed: %s" % cmd)

# Assuming local = conan_server and artifactory remotes
output = subprocess.check_output("conan search -r=conan-center --raw")
packages = output.splitlines()

for package in packages:
    print("Downloading %s" % package)
    run("conan download %s -r=conan-center" % package)

# note: artifactory is name of the remote repo
run("conan upload * --all --confirm -r=artifactory")

其他信息(Other)

cxwx commented 3 years ago

同请求,国内貌似很卡

tonyseek commented 2 years ago

这样上传的只是 recipes(构建脚本),二进制 packages 还是没上传。而 recipes 根本没多大,直接 clone 仓库 https://github.com/conan-io/conan-center-index 就能看到了。

感觉 conan 这种二进制包和目标平台 ABI 强绑定的,不太适合建公有 mirror,如果是组织用,不如自己基于 conan-center-index 搭个 in-house remote,直接用开源的 conan_server 很方便的。怕数据丢失就拿 s3fs 或者 juicefs 挂载一个 data volume 再启动 conan_server 用。