目录
一:了解DEB仓库最简单的创建方式
1、下载reprepro来进行DEB仓库中DEB包的添加、同步、删除等。
(1)创建格式
(2)配置信息
2、运用reprepro工具来对DEB仓库进行添加、删除、更新等。(以后的操作都需要在你创建的目录中,ls后应出现conf目录)
(1)是我的自动化创建Deb仓库的可执行代码
(2)添加Deb包(已经创建好Deb包)
(3)删除Deb包(已经添加好Deb包)
二、shell自动化创建Deb仓库源码
DEB打包流程—新手入门(附自动化打包shell源码)
reprepro工具同步Deb仓库详解(附Shell半自动与自动同步Deb仓库源码)【提供两种配置web服务的方式,nginx与apache2】
一:了解DEB仓库最简单的创建方式
1、下载reprepro来进行DEB仓库中DEB包的添加、同步、删除等。
sudo apt-get install reprepro
(1)创建格式
1、建立一个目录名称,如Deb_conf_Test。
mkdir Deb_conf_Test2、进入Deb_conf_Test,创建conf目录。再进入conf目录创建distributions与updates文件。(updates可以不创建)
cd Deb_conf_Testcd conf && touch distributions updates
(2)配置信息
1、vim编辑仓库配置信息(distributions)。
设置自己的公钥:
sudo apt-get install gpggpg --full-gen
#一路回车、y后,o键之后设置用户名和密码。
gpg --list-key

origin: ppa . repo Label: ppa. repo Codename: ppa Update: sink Architectures: amd64 arm64 i 386 Components: main Description: the best repo of ppa
#SignWith为公钥,需要填上你自己的,也可以不填。 SignWith: 6B7FC1801B1 734DEAFCF 782F3A805B095AE7DE78 UDebComponents: main Log: ppa. log
字段 | 意义 |
Codename | 版本的代号,我称之为代号。(对应其他仓库updates中的Suite字段)(重要) |
Update | 仓库同步的策略。 |
Architectures | 仓库中deb包支持的架构。 |
Components | 仓库中deb包的组件类型。 |
4、vim编辑仓库同步配置信息(updates)。

Name: sink Suite: eagle Architectures : amd64 arm64 Components: main
#Method为我自己搭建的web服务所建立的仓库地址,你可以不填。或者创建本地仓库。 Method: http: / / 127.0.0.1 /wwa / VerifyRelease: blindtrust
字段 | 意义 |
Name | 同步策略名称,对应conf/distributions文件中的Update字段。 |
Suite | 发型版本。对应你要同步的仓库的Codename的值。 |
Architectures | 同步架构,需要确认上游仓库支持的架构和当前仓库需要同步的架构。 |
Components | 同步组件,需要确认上游仓库支持的组件和当前仓库需要同步的组件。(填错可能造成update失败) |
Method | 同步的上游仓库URL地址或是本地仓库地址。 |
好的,到目前你已经建立好你的DEB仓库了。
2、运用reprepro工具来对DEB仓库进行添加、删除、更新等。(以后的操作都需要在你创建的目录中,ls后应出现conf目录)
(1)是我的自动化创建Deb仓库的可执行代码

1、reprepro [--delete] includedeb <distribution> <.deb-file>
添加Deb包
2、reprepro [-C <component>] [-A <architecture>] [-T <type>] remove <codename> <package-names>
删除Deb包
3、reprepro update <codename> 同步Deb仓库
4、reprepro [-C <component>] [-A <architecture>] [-T <type>] list <codename> [<package-name>] 查看Deb仓库中的Deb包(可以直接用tree来查看)
(2)添加Deb包(已经创建好Deb包)
reprepro includedeb ppa ~/Desktop/wwcy_1.1.0_amd64.deb

(3)删除Deb包(已经添加好Deb包)
reprepro remove ppa wwcy
好的,到目前位置你已经掌握了Deb仓库的创建和用reprepro进行仓库的维护,同步(update)操作请等后续更新。
二、shell自动化创建Deb仓库源码

















