128 Star 519 Fork 642

OpenHarmony / community

 / 详情

能否提供按周打包的所有源代码repo镜像下载

已完成
需求
创建于  
2021-10-18 18:50

【需求价值】:
按周提供打包的全量repo 镜像下载,为开发者获取源代码提供便利
【需求描述】:

  1. 提供按周自动打包的全量repo 源代码,zip格式
  2. 每周定时执行,生产当周最新的全量源代码打包
  3. 提供直接下载,或者torrent分流

【方案描述】:
通过提供全量镜像下载,用户下载这个全量代码包,解压到本地,然后执行一个 repo sync动作,就能增量更新到最新的代码。
为所有有志于阅读,参与鸿蒙系统的用户提供便利。
同时,考虑到源代码仓库巨大,推荐部署torrent 分布式下载分流。
打包命名按周,一周更新一版。
保留最近2周即可,其他的版本不需要保留,只需要保留种子下载。

【配套文档】:

【验收标准】:

提出这个需求的前提,是我在尝试了几天,通过repo工具下载完整的鸿蒙代码,一直遇到错误,推测是gitee的资源不够用,拒绝用户正常下载。

所以非常有必要提供第二种获取源代码的方式。


startup_appspawn:
fatal: the remote end hung up unexpectedly
error: Cannot fetch startup_appspawn from https://gitee.com/openharmony/startup_appspawn
Fetching: 27% (72/263) update_packaging_tools
fatal: the remote end hung up unexpectedly

developtools_ace-ets2bundle:
fatal: the remote end hung up unexpectedly
developtools_ace-ets2bundle: sleeping 4.0 seconds before retrying
fatal: the remote end hung up unexpectedly

developtools_ace-ets2bundle:
fatal: the remote end hung up unexpectedly
error: Cannot fetch developtools_ace-ets2bundle from https://gitee.com/openharmony/developtools_ace-ets2bundle
Fetching: 45% (120/263) distributedschedule_dms_fwk
fatal: the remote end hung up unexpectedly

distributedschedule_samgr:
fatal: the remote end hung up unexpectedly
distributedschedule_samgr: sleeping 4.0 seconds before retrying
fatal: the remote end hung up unexpectedly

由于错误一直都在,我至今仍未能获取全量的鸿蒙源代码。
非常遗憾。

评论 (5)

cnmade 创建了需求
cnmade 关联仓库设置为OpenHarmony/community
展开全部操作日志

参考 https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
清华大学为 AOSP项目提供的镜像下载,为国内开发者首次获取源代码,提供了便利。

使用每月更新的初始化包
由于首次同步需要下载约 95GB 数据,过程中任何网络故障都可能造成同步失败,我们强烈建议您使用初始化包进行初始化。

下载 https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar,下载完成后记得根据 checksum.txt 的内容校验一下。

由于所有代码都是从隐藏的 .repo 目录中 checkout 出来的,所以我们只保留了 .repo 目录,下载后解压 再 repo sync 一遍即可得到完整的目录。

使用方法如下:

wget -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar # 下载初始化包
tar xf aosp-latest.tar
cd AOSP   # 解压得到的 AOSP 工程目录
# 这时 ls 的话什么也看不到,因为只有一个隐藏的 .repo 目录
repo sync # 正常同步一遍即可得到完整目录
# 或 repo sync -l 仅checkout代码
此后,每次只需运行 repo sync 即可保持同步。 我们强烈建议您保持每天同步,并尽量选择凌晨等低峰时间
jinguang 负责人设置为openharmony_ci

@明帅 请评估一下可行性

从2.2-Beta2版本开始, 每个发布版本都会同时发布对应的源码包(含.repo)
最近一次发布版本3.0-LTS对应的源码包下载链接
另外你通过https协议下载如果失败, 建议更换为ssh协议下载, 对应主干下载命令是:

repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'

这部分内容在源码下载章节有提示, 感兴趣可以看下文档原文

请注意, 如果你是在私有网络使用代理访问gitee,请与你们的网络管理员联系代理是否支持ssh协议

如果不支持,请先下载3.0-LTS源码包,在解压后的目录执行以下命令:

repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify # 切换3.0-LTS分支到master分支
repo sync -c  # 更新最新代码
repo forall -c 'git lfs pull' # 更新最新lfs内容

@mamingshuai 你们还没明白。Git它协议本来就不具备断点续传。
所以如果中断了。它只会从头开始。
这也是为什么我提这个问题的原因。

很高兴看到你们提供了源码包。感谢。

jinguang 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
1842 cnmade 1600048049 5126245 dongjinguang 1625667980
1
https://gitee.com/openharmony/community.git
git@gitee.com:openharmony/community.git
openharmony
community
community

搜索帮助