deb包中的conf文件和静态文件

发布于 2024-10-12 03:12:08 字数 508 浏览 8 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

栀子花开つ 2024-10-19 03:12:08

正如 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 your debian/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 the make install to install the files to debian/pkgname instead of /. Then it knows that everything under debian/pkgname is what should be in the final .deb. If the make install step doesn't put everything in the correct location, then the debian/rules script needs to do that. Previously it seems calling install ... from debian/rules to copy the files to the debian/pkgname directory was common but now using a debian/install file seems to be the preferred method.

凉月流沐 2024-10-19 03:12:08

如果您通过标准 debhelper / debian/rules 文件安装文件,则不必包含软件包版本。相反,在安装步骤中执行以下操作:

install -cm 644 fname.conf $(CURDIR)/debian/mypkg/etc/mypkg/fname.conf

并且应该正确包含它。

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:

install -cm 644 fname.conf $(CURDIR)/debian/mypkg/etc/mypkg/fname.conf

And it should be included properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文