一个用于创建Debian仓库的简单命令行工具
项目描述
简单的命令行工具,用于创建apt仓库。这将适用于Debian和Ubuntu。
安装
首先从pypi安装
pip install vdt.simpleaptrepo
此工具是一些Debian特定软件包的包装器,因此您需要首先安装它们
apt-get install gnupg dpkg-sig apt-utils
显示可用的命令
simpleapt --help
创建仓库
首先您需要创建一个gpg密钥来签名您的软件包。这不是强制性的,但强烈推荐
simpleapt create-gpg-key
复制并记住密钥的哈希值。输出看起来像这样
gpg: key 10FB8BDC marked as ultimately trusted
因此复制 10FB8BDC 哈希,您稍后会需要它。
现在创建一个仓库
simpleapt create-repo myrepo /www/ --gpgkey 10FB8BDC Repository 'myrepo' created Now add a component with the 'add-component' command
创建一个组件
在一个仓库中,您可以有多个组件
simpleapt add-component myrepo test
您现在会看到需要做什么
Component 'test' created in repo 'myrepo' Now add some unsigned debian packages in the directory and run the 'update-repo' command (see the 'add packages' section below) Configure your webservice to set the www-root to /www/ Add http://<hostname>/myrepo/test / to your sources.list Add the key on the host where you want to install the packages. (This is only needed once per repository) wget -qO - http://<hostname>/myrepo/test/keyfile | sudo apt-key add -
如果您喜欢,可以添加更多
simpleapt add-component myrepo staging simpleapt add-component myrepo production
看到我们的仓库在那里
simpleapt list-repos myrepo (gpgkey: 10FB8BDC) test staging main
添加软件包
将一些Debian软件包复制到组件目录中,并更新仓库
simpleapt update-repo myrepo test Exported key 10FB8BDC to /www/myrepo/test/keyfile Signed package /www/myrepo/test/my-package_0.0.1_all.deb Creates Packages Creates Packages.gz Create Release with key 10FB8BDC Create InRelease with key 10FB8BDC Create Releases.gpg with key 10FB8BDC
当有很多软件包时,您可以使用 --skip-signed 选项跳过重新签名软件包
simpleapt update-repo myrepo test --skip-signed Exported key 10FB8BDC to /www/myrepo/test/keyfile Skipped signing /www/myrepo/test/my-package_0.0.1_all.deb Creates Packages Creates Packages.gz Create Release with key 10FB8BDC Create InRelease with key 10FB8BDC Create Releases.gpg with key 10FB8BDC
现在您可以安装这些软件包了!
变更日志
0.0.5 (2018-08-04):
检查了对Python 3.7的支持
0.0.4 (2017-11-20):
添加了 --skip-signed 选项,以便我们可以跳过已签名的 Debian 软件包
添加了 Python 3 支持
有用的网址
http://blog.packagecloud.io/eng/2014/10/28/howto-gpg-sign-verify-deb-packages-apt-repositories/
https://keyring.debian.org/creating-key.html
https://wiki.debian.org/SecureApt#How_apt_uses_Release.gpg
https://help.ubuntu.com/community/CreateAuthenticatedRepository
http://lists.gnupg.org/pipermail/gnupg-users/2004-May/022471.html
项目详情
关闭
vdt.simpleaptrepo-0.0.5.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d7c13b30f7f105619b4803a300a06d534cdbacd860637e016930d371626de179 |
|
MD5 | 45416caafa19db24862a902380d437ac |
|
BLAKE2b-256 | 59ddfe9b076fda89e812c2884f91af9f24174ade4e028a8f12db5e219cbf092e |