-
Notifications
You must be signed in to change notification settings - Fork 82
Conversation
setup-pointless-repo 脚本实际上来自 its-pointless/its-pointless.github.io 的 master 仓库 如果它有问题的话,请直接反馈给它。 |
在手册中,它有如下描述:
关键词是 “deprecated” 对于第三方仓库,你可以把OpenPGP公钥文件放进 etc/apt/trusted.gpg.d |
21实际上是安卓5~6 目前官方的安卓5源格式:
目前官方的安卓7源格式:
问题是上次commit在21 Jun 2021 看看他的issues,全乱套了( |
修改成:
这样就不需要gpg公钥 |
尽管文档还在不断完善,但是 repo 相关的内容已经谈到了一点点。 新版将会使用 其实我之前已经打过 bfsu 的 termux repo, 两周前被我删掉了 ( 注:源格式是更现代化的 deb-822) 我在犹豫要不要打包,准确来说要不要打兼容 "one-line-style" 的包。 实际上,我并不太想这么做。 |
实际上,新版不打算依赖 src/lib.rs pub mod download; src/download/mod.rs use error_chain::error_chain;
use std::fs::File;
use std::io::copy;
use std::path::{Path, PathBuf};
error_chain! {
foreign_links {
Io(std::io::Error);
HttpRequest(reqwest::Error);
}
}
#[tokio::main]
pub async fn download_file(
url: &str,
file_dir: &Path,
default_name: &str,
) -> Result<()> {
let response = reqwest::get(url).await?;
let mut file = {
let file_name = response
.url()
.path_segments()
.and_then(|segments| segments.last())
.and_then(|name| {
if name.is_empty() {
None
} else {
Some(name)
}
})
.unwrap_or(default_name);
println!(r#"文件名称: "{}""#, file_name);
let file_path: PathBuf = file_dir.join(file_name);
println!("文件路径: {:?}", file_path);
File::create(file_path)?
};
let content = response.text().await?;
copy(&mut content.as_bytes(), &mut file)?;
Ok(())
} src/main.rs use your_rust_crate_name::download::download_file;
use std::path::Path;
fn main() {
download_file(
r#"https://its-pointless.github.io/pointless.gpg"#,
Path::new("./"),
"pointless.gpg",
)
.expect("Failed to download");
} |
一个小脚本用 |
这是更合理的解决方案吗? |
非常合理 https://github.com/termux/termux-apt-repo#accessing-the-repository |
|
Signed-off-by: 2096779623 <[email protected]>
Signed-off-by: 2096779623 <[email protected]>
改好了 |
Signed-off-by: 2096779623 <[email protected]>
我是否能在Copyright加上许可证?
|
抱歉,今天我的身体不适。 明天,如果身体好转的话,那我将告诉您这个PR的后续。 |
抱歉,这个 PR 可能合并不了。
下次提交 PR 前,您可以先发一个 issue。 就算要合并的话,这个 PR 我可能也要完全重写了。 对于 edition 2021: 保持原来的内容不变,加上下面两个函数: modify_pointless_src_list() {
local old_version new_version file
old_version=$1
new_version=$2
file="$PREFIX/etc/apt/sources.list.d/pointless.list"
sed -E \
-e \
"s@(files/)${old_version}@\1${new_version}@" \
-i "$file"
}
fix_pointless_list() {
if ((ANDROID_VERSION >= 7)); then
modify_pointless_src_list 21 24
else
modify_pointless_src_list 24 21
fi
} 在执行完 pointless 官方脚本后,执行
对于 edition 2022: file: pointless-24.sources name: pointless 24 github
# yes or no
enabled: yes
uris: https://its-pointless.github.io/files/24
suites: termux
# deb deb-src
types: deb
# architectures: aarch64 arm i686 x86_64
#trusted: yes
components: extras
signed-by: /data/data/com.termux/files/usr/share/keyrings/pointless.gpg
#-----------------
name: pointless 24 ustc
enabled: no
uris: https://mirrors.ustc.edu.cn/termux-its-pointless/24
suites: termux
types: deb
# architectures: aarch64 arm i686 x86_64
components: extras
signed-by: /data/data/com.termux/files/usr/share/keyrings/pointless.gpg
file: pointless-21.sources name: pointless 21 github
# yes or no
enabled: yes
uris: https://its-pointless.github.io/files/21
suites: termux
# deb deb-src
types: deb
# architectures: aarch64 arm i686 x86_64
#trusted: yes
components: extras
signed-by: /data/data/com.termux/files/usr/share/keyrings/pointless.gpg 接着写与这个仓库相关的 Makefile 和 postinst 等脚本,最后把它打成 deb 包。 |
修复its-pointless
its准备跑路了https://github.com/its-pointless/gcc_termux/blob/811b270ee996439a16f453ff6b646b28dffdad04/setup-pointless-repo.sh#L9
这个判断过时了
更改
packages.termux.org
到packages.termux.dev
Grimler91最近又买了个termux.dev
现在
packages.termux.org
会被重定向到packages.termux.dev
,packages-cf.termux.org
会被重定向到packages-cf.termux.dev
由于fosshost的问题,运气不好可能会500😅 ,等Fosshost修复
更改低于安卓7的提示
termux/termux-app#2740
关于换源的建议
把全部源砍掉,用官方的termux-change-repo
或者全部加上,或者挑一些速度快的()
国内源:https://github.com/termux/termux-packages/wiki/Mirrors#mirrors-hosted-in-china
国内源就有14个((((((