创建debian存储库的简单命令行实用程序

vdt.simpleaptrepo的Python项目详细描述


创建apt存储库的简单命令行工具。这将在debian和ubuntu上工作。

https://api.travis-ci.org/devopsconsulting/vdt.simpleaptrepo.svg?branch=master

安装:

首先从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包复制到组件目录中并更新repo:

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):

  • 已检查是否支持Python3.7

0.0.4(2017-11-20):

  • 添加了一个--skip-signed选项,以便我们可以跳过已经签名的debian包
  • 增加了Python3支持

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java从类对象访问静态变量   java无法在三星A5上使用Toast(2016年)   java处理阻止图像在选择其他图像时消失   java Install4j Linux应用程序   swing在jpanel form java上具有暂停/恢复按钮   java Log4J登录年份文件夹   java XmlPullParser资源管理   JavaGoogleCloudEndpoints方法总是导致NullPointerException,为什么?   java JSON到带有POJO和Enum的Spring控制器   java制作自定义名称生成器?   java仅在设备屏幕的特定部分显示google地图多段线   java图像没有重新绘制,只是相乘   java如何将格式化字符串转换为浮点?   java无法提前很长时间安排TimerTask   当引用函数::和时,java Intellij IDEA无法解析“和”函数接口方法   java结束了dowhile循环   java Spring路径变量绑定   log4j API中FileAppender中的java问题   java使用QMessageBox从选项列表中进行选择