deb包中的conf文件和静态文件
我正在使用 dh_help 构建包模板,并尝试遵循 ubuntu 和 debian 打包指南来创建二进制包。
我如何告诉 debuild 哪个文件是 conf 文件并且应该转到 /etc/mypkg.conf ? 我尝试将其放在 mypkg-0.1/etc/mypkg/fname.conf 下,但 debuild 会忽略它。 debian 指南说 etc/ 下的所有文件都会自动视为 conf 文件,但它对我不起作用(http://www.debian.org/doc/maint-guid...ml#s-conffiles)。 我尝试将conf文件放在mypkg-1.0/etc/mypkg.conf和mypkg-1.0/debain/etc/mypkg.conf下,但它不包括在内。我还尝试在配置文件中列出该文件,但在构建包时收到错误,无法找到该文件。
我也不明白如何在包中包含静态文件。 我是否必须使用安装文件来列出所有文件和文件夹? 我认为将具有完整路径的所有内容放在 mypkgs-0.1 文件夹下应该像手动使用 dpkg 时一样工作。
谢谢
I'm using dh_help to build a package template and trying to follow the ubuntu and debian packaging guides for creating a binary package.
How do I tell debuild which file is a conf file and should go for example to /etc/mypkg.conf ?
I've tried to put it under mypkg-0.1/etc/mypkg/fname.conf but debuild ignores it.
The debian guide says all files under etc/ are treated automatically as conf files but it doesn't work for me (http://www.debian.org/doc/maint-guid...ml#s-conffiles).
I've tried putting the conf file under mypkg-1.0/etc/mypkg.conf and under mypkg-1.0/debain/etc/mypkg.conf but it is not included. I also tried to list the file in conffiles but I'm getting an error that it can't be found when building the package.
I also don't understand how to include static files in the package.
Do I have to use the install file to list all the files and folders?
I thought that putting everything with the full path under the mypkgs-0.1 folder should work like it does when using dpkg manually.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 viraptor 所说,您可以将每个文件的安装命令放入您的 debian/rules 中,以将文件安装到 debian/pkgname 目录中。
或者您可以使用
debian/install
文件来简单地列出所有文件(或只是目录),并在您的debian/rules
中使用 dh_install 命令来为您完成此操作。看来您对如何构建包以及包含哪些文件有点困惑。这是非常普遍的,但是当
debian/rules
脚本使用标准./configure && 编译程序时,制作&& make install
方法,它指示make install
将文件安装到debian/pkgname
而不是/
。然后它知道debian/pkgname
下的所有内容都是最终 .deb 中应该包含的内容。如果make install
步骤没有将所有内容放在正确的位置,则debian/rules
脚本需要执行此操作。以前,从debian/rules
调用install ...
将文件复制到debian/pkgname
目录似乎很常见,但现在使用 < code>debian/install 文件似乎是首选方法。As viraptor said you can put an install command for each file into your
debian/rules
to install the files into the debian/pkgname directory.Or you can use a
debian/install
file to simply list all the files (or just directories) and have a dh_install command in yourdebian/rules
to do it for you.It seems you are a little confused about how packages are built and which files are included. This is extremely generalized, but when the
debian/rules
script compiles a program using standard./configure && make && make install
method, it instructs themake install
to install the files todebian/pkgname
instead of/
. Then it knows that everything underdebian/pkgname
is what should be in the final .deb. If themake install
step doesn't put everything in the correct location, then thedebian/rules
script needs to do that. Previously it seems callinginstall ...
fromdebian/rules
to copy the files to thedebian/pkgname
directory was common but now using adebian/install
file seems to be the preferred method.如果您通过标准 debhelper / debian/rules 文件安装文件,则不必包含软件包版本。相反,在安装步骤中执行以下操作:
并且应该正确包含它。
You don't have to include the package version if you install files via the standard debhelper /
debian/rules
file. Instead, in the install step do:And it should be included properly.