我有一个带有自定义构建系统的项目,因此 Debian 软件包只是目标之一:我使用dpkg-deb
.
但现在我想将我的包上传到一些企业存储库 - 我需要一些文件,例如.dsc
和.changes
,它们也应该使用 PGP 签名。
签署已构建的包并生成这些文件的最简单方法是什么?
答案1
如果我正确理解你的问题,那么你正在寻找一个构建存储库的简单方法为您的包裹提供签名。
有很多困难的方法以及一些可以减轻这项任务痛苦的工具,其中最简单的可能是恰当地。它具有许多常见的与存储库相关的任务,例如镜像其他存储库、从镜像导入包等。此外,它还默认正确签署存储库。 他们也提供 deb 包。
功能不太齐全但可能更好地完成您手头任务的解决方案是货运,请参阅此博客文章以获取介绍。您还可以以包的形式获取它,包括手册页和一些帮助程序。
答案2
您可能正在寻找 design(1)。您可能需要安装它:
$ sudo apt-get install devscripts
用法
$ debsign -h
Usage: debsign [options] [changes, dsc or commands file]
Options:
-r [username@]remotehost
The machine on which the changes/dsc files live.
A changes file with full pathname (or relative
to the remote home directory) must be given in
such a case
-k<keyid> The key to use for signing
-p<sign-command> The command to use for signing
-e<maintainer> Sign using key of <maintainer> (takes precedence over -m)
-m<maintainer> The same as -e
-S Use changes file made for source-only upload
-a<arch> Use changes file made for Debian target architecture <arch>
-t<target> Use changes file made for GNU target architecture <target>
--multi Use most recent multiarch .changes file found
--re-sign Re-sign if the file is already signed.
--no-re-sign Don't re-sign if the file is already signed.
--debs-dir <directory>
The location of the .changes / .dsc files when called from
within a source tree (default ..)
--no-conf, --noconf
Don't read devscripts config files;
must be the first option given
--help Show this message
--version Show version and copyright information
If a commands or dsc or changes file is specified, it and any .dsc files in
the changes file are signed, otherwise debian/changelog is parsed to find
the changes file.
Default settings modified by devscripts configuration files:
(none)