Skip to content

Conversation

@LZhaoM
Copy link
Contributor

@LZhaoM LZhaoM commented Jan 5, 2026

这个PR目前算是一个proof-of-concept,目前修改只支持Debian。
这样修改的话就能够直接把snapshot的url通过-m传给rsdk使用,比如:

-m https://snapshot.debian.org/archive/debian/20260101T022824Z/

不过因为发现Ubuntu使用snapshot的方法[0]跟Debian有些不太一样所以有些犹豫了,会不会多设置一个--snapshot命令更好一些?

@LZhaoM LZhaoM requested a review from RadxaYuntian as a code owner January 5, 2026 06:16
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@LZhaoM LZhaoM marked this pull request as draft January 5, 2026 06:16
@RadxaYuntian
Copy link
Contributor

ubuntu的话你传入比如https://snapshot.ubuntu.com/ubuntu/20240301T030400Z/这种行么?
另外ubuntu是有单独的ports源的,不确定这个snapshot里面有没有arm64包

head -n 1 "$1/etc/apt/sources.list" | sed -E -e "s/(%(suite)s)/\\1-backports/" > "$1/etc/apt/sources.list.d/50-%(suite)s-backports.list"
# security archive
head -n 1 "$1/etc/apt/sources.list" | sed -E -e "s/(%(suite)s)/\\1-security/" -e "s|/debian |/debian-security |" > "$1/etc/apt/sources.list.d/50-%(suite)s-security.list"
head -n 1 "$1/etc/apt/sources.list" | sed -E -e "s/(%(suite)s)/\\1-security/" -e "s|/debian([ /])|/debian-security\1|" > "$1/etc/apt/sources.list.d/50-%(suite)s-security.list"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这是对应哪种内容?

distro_mirror_default
else
distro_mirror)
+ "/" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这算一个breaking change了。这边代码本意是给deb镜像站用的,他们同一个路径下会同时有/debian/ubuntu,这样就只需要指定一个url就能同时支持两个distro。现在改的需要完整路径了,那就没法一个url
支持多个distro了。看起来的确需要一个单独的参数,并且跟现有的-m要互斥

@LZhaoM
Copy link
Contributor Author

LZhaoM commented Jan 5, 2026

ok那我就多增加一个类似--snapshot <timestamp>option,然后如果-m--snapshot同时出现就报错。这个PR就先关闭了。

@LZhaoM LZhaoM closed this Jan 5, 2026
@RadxaYuntian
Copy link
Contributor

可以直接改好了强推这个分支,然后再继续review

@LZhaoM LZhaoM reopened this Jan 5, 2026
@LZhaoM LZhaoM changed the title RFC: Allow using -m with Debian snapshot url feat: support building with Debian / Ubuntu snapshot services Jan 6, 2026
@LZhaoM LZhaoM requested a review from RadxaYuntian January 6, 2026 10:08
@LZhaoM LZhaoM marked this pull request as ready for review January 6, 2026 10:08
Copy link
Contributor

@RadxaYuntian RadxaYuntian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有冲突,你先rebase一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants