我在我的 Manjaro 机器上创建了一个自定义存储库(以制作自定义 Manjaro ISO)并添加:
[manjaro-mate-aur-packages]
SigLevel = Never
Server = https://github.com/FreaxMATE/manjaro-mate-aur-packages/blob/main/manjaro-mate-aur-packages/x86_64/manjaro-mate-aur-packages.db.tar.gz?raw=true
到pacman.conf
。
sudo pacman -Syu
运行没有任何问题:
:: Synchronising package databases...
core 172,1 KiB 637 KiB/s 00:00 [########################################] 100%
extra 1903,1 KiB 1710 KiB/s 00:01 [########################################] 100%
community 6,7 MiB 1883 KiB/s 00:04 [########################################] 100%
multilib 177,2 KiB 1441 KiB/s 00:00 [########################################] 100%
manjaro-mate-aur-packages 2,5 KiB 7,11 KiB/s 00:00 [########################################] 100%
当我尝试从此存储库安装软件包时,出现以下错误:
:: Retrieving packages...
mate-layouts-0.0.5-2-any 2,5 KiB 21,6 KiB/s 00:00 [########################################] 100%
(1/1) checking keys in keyring [########################################] 100%
(1/1) checking package integrity [########################################] 100%
:: File /var/cache/pacman/pkg/mate-layouts-0.0.5-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (checksum)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (checksum))
Errors occurred, no packages were upgraded.
虽然我设定了SigLevel = Never
。使用 创建包时是否必须对其进行签名buildpkg
?如果是这种情况,我该如何将它们添加到 Manjaro 自定义 ISO 中?
我用过这个文档: https://wiki.manjaro.org/index.php/Buildiso_with_AUR_packages:_Using_buildpkg和https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso
答案1
问题就在Server
一线。您指向存储库的 db 文件。它应该指向存储库。 pacman 正在下载的是https://github.com/FreaxMATE/manjaro-mate-aur-packages/blob/main/manjaro-mate-aur-packages/x86_64/manjaro-mate-aur-packages.db.tar.gz?raw=true/mate-layouts-0.0.5-2-any.pkg.tar.zst
,它显然不存在,而是下载了 404 错误页面。另外,您应该使用raw
URL 而不是blob
,因为blob
URL 指的是包的 HTML 页面,而不是实际的包。服务器 URL 应更改为https://github.com/FreaxMATE/manjaro-mate-aur-packages/raw/main/manjaro-mate-aur-packages/$arch
。另外,它仍然无法使用,因为 db 和 file 文件被符号链接到它们的压缩形式,这些压缩形式在 git 中表示为文本文件,因此在下载时它们实际上并未指向,ratehr 会下载一个分别读取manjaro-mate-aur-packages.db.tar.gz
和的纯文本文件manjaro-mate-aur-packages.file.tar.gz
。您应该提出问题。
编辑:
用我自己的叉子测试过
[manjaro-mate-aur-packages]
SigLevel = Never
Server = https://github.com/abdullah-if/manjaro-mate-aur-packages/raw/main/manjaro-mate-aur-packages/x86_64
输出:
$ sudo pacman -Swd manjaro-mate-aur-packages/caja-admin
resolving dependencies...
Packages (11) caja-1.26.0-1 exempi-2.5.2-1 gcr-3.40.0-1 gvfs-1.48.1-1 libcddb-1.3.2-6.1
libcdio-2.1.0-2.1 libcdio-paranoia-10.2+2.0.1-2.1 mate-desktop-1.26.0-1
python-caja-1.26.0-1 startup-notification-0.12-7 caja-admin-0.0.5-1
Total Download Size: 0.02 MiB
:: Proceed with download? [Y/n] y
:: Retrieving packages...
caja-admin-0.0.5-1-any 18.8 KiB 9.79 KiB/s 00:02 [--------------------------------] 100%
(11/11) checking keys in keyring [--------------------------------] 100%
(11/11) checking package integrity [--------------------------------] 100%
没有错误。