mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
1.8 KiB
1.8 KiB
date | title | weight | toc | draft | menu | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2016-11-08T16:00:00+02:00 | Title | 10 | true | false |
|
Arch package registry
Gitea has arch package registry, which can act as a fully working arch linux mirror and connected directly in /etc/pacman.conf
. Gitea automatically creates pacman database for packages in user/organization space when new arch package is uploaded.
Table of Contents
{{< toc >}}
Install packages
First, you need to update your pacman configuration, adding following lines:
[{owner}.{domain}]
SigLevel = Optional TrustAll
Server = https://{domain}/api/packages/{owner}/arch/{distribution}/{architecture}
Then, you can run pacman sync command (with -y flag to load connected database file), to install your package.
pacman -Sy package
Upload packages
Get into folder with package and signature, push package with curl.
curl -X PUT \
'https://{domain}/api/packages/{owner}/arch/push' \
-H "Authorization: {your-authorization-token}" \
-H "filename: package-1-1-x86_64.pkg.tar.zst" \
-H "distro: archlinux" \
-H "sign: $(xxd -p package-1-1-x86_64.pkg.tar.zst.sig | tr -d '\n')"
-H "Content-Type: application/octet-stream" \
--data-binary '@/path/to/package/file/package-1-1-x86_64.pkg.tar.zst'
Delete packages
Send delete message with curl.
curl -X DELETE \
http://localhost:3000/api/packages/{user}/arch/remove \
-H "Authorization: {your-authorization-token}" \
-H "target: package" \
-H "version: {version-release}"
Clients
You can use gitea CLI tool to - tea to push/remove arch packages from gitea. Alternatively, you can try pack.