入門如何設定採用 Arch Custom Local Repository

Arch Wiki

編輯「pacman.conf」

編輯「/etc/pacman.conf」,加入如下的內容

[demo-os]
SigLevel = Optional TrustAll
#Server = file:///opt/demo-os/demo-repository/x86_64
Server = file:///opt/demo-os/demo-repository/$arch

更新「Repository DB Data」

執行

sudo pacman -Sy

執行

pacman -Sl demo-os 

顯示

demo-os demo-hello 0.1-1

安裝「demo-hello」

執行下面指令,安裝「demo-hello」

sudo pacman -S demo-hello 

安裝完成後,執行下面指令

pacman -Sl demo-os 

顯示

demo-os demo-hello 0.1-1 [installed]

執行下面指令

pacman -Ql demo-hello

顯示

demo-hello /usr/
demo-hello /usr/bin/
demo-hello /usr/bin/demo-hello
demo-hello /usr/share/
demo-hello /usr/share/demo-hello/
demo-hello /usr/share/demo-hello/content.txt

執行下面指令

pacman -Ql -q demo-hello

執行下面指令

pacman -Qlq demo-hello

顯示

/usr/
/usr/bin/
/usr/bin/demo-hello
/usr/share/
/usr/share/demo-hello/
/usr/share/demo-hello/content.txt

執行下面指令

pacman -Qi demo-hello

顯示

Name            : demo-hello
Version         : 0.1-1
Description     : Demo Hello Packaging
Architecture    : any
URL             : https://github.com/samwhelp/note-about-archlinux/tree/gh-pages/_demo/iso/build-iso/demo-os/demo-packaging/demo-hello
Licenses        : MIT
Groups          : None
Provides        : demo-hello
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 104.00 B
Packager        : Unknown Packager
Build Date      : Wed 06 Jul 2022 06:02:03 PM CST
Install Date    : Wed 06 Jul 2022 11:32:43 PM CST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : SHA-256 Sum