问题标签 [debhelper]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
debian - debian dh-exec install 创建额外的目录
我正在构建一个 debian 包,它将几个配置文件安装到具有其他名称的不同位置。为此,我想使用dh-exec
install-rename 功能。
在我声明为Build-Dependency的控制文件中:dh-exec
该package.install
文件如下所示:
我希望这会default.*
在具有该名称的那些地方部署现有文件,但是创建了一个包含该文件的父目录,因为它是:
所有声明的文件都会发生同样的情况。
debian/rules
文件中没有可能干扰此操作的覆盖:
设置时,DH_VERBOSE=1
这是dh_install
助手所做的:
我觉得我在这里错过了一些非常愚蠢的东西。在检查了文档和代码之后,我认为输出和运行dh-exec
之间一定有一些奇怪的东西。dh-exec
dh-install
我会很感激这方面的任何提示。
版本:
- dh-exec 0.22
- debhelper 9.20160115ubuntu
- Ubuntu 16.04.1 LTS
debhelper - Default sequence of debhelper
I am trying to get a better understanding of debhelper's dh
tool. As I understand it, dh
is a frontend for various dh_*
helper tools. These helper tools can both be called standalone or automatically from the dh
tool. Usually a debian/rules
file is created which somehow invokes dh
and possibly overrides certain dh_*
invocations. dh
then seems to know which of the dh_*
tools it needs to invoke and in which sequence.
The example under /usr/share/doc/debhelper/examples/rules.tiny
contains the following as an example for a debian/rules
file:
What is the sequence of dh_*
helper tools that gets executed by dh
as result of this rules file? And more importantly, how does dh
determine this sequence and where is this documented.
python - 使用 dh_virtualenv 对 python 包进行 debianising 时,console_scripts 不在路径上
我已经密切关注这里的教程https://dh-virtualenv.readthedocs.io/en/latest/tutorial.html#step-2-setup-the-debian-packaging并且一切构建和安装都很好。
但是,我的 python 包通常会安装一些控制台脚本,我希望能够安装 .deb 以便这些命令在全局范围内可用,即在路径上,而不是仅在激活虚拟环境时可用。
我可以将我想要的任何内容从 /opt/venvs/my_package/bin/ 复制到 /usr/bin/,或者其他类似的简单方法,可能在 postinst 文件中。
但是,我想知道的是是否有一种特定的方式来构成“最佳实践”。
谢谢
debian - dh_link 不覆盖另一个包的符号链接
我有两个包:
- libsai-A
- libsai-B
这两个包都“提供”了一个名为“libsai”的虚拟包,但 libsai-B 可以“替换”(复制)libsai-A。出于某种原因,安装 libsai-B 时,并非 libsai-A 中的所有符号链接都会被覆盖。
libsai-A .deb 包中的符号链接:
./usr/lib/x86_64-linux-gnu/libsai-0.9.6.so -> libsai-0.9.6.so.1.0.0
./usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1 -> libsai-0.9.6.so.1.0.0
libsai-B .deb 包中的符号链接:
./usr/lib/x86_64-linux-gnu/libsai-0.9.6.so -> ../test/dist/libsai-B-test.so
./usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1 -> ../test/dist/libsai-B-test.so
第一个符号链接 (libsai-0.9.6.so) 被正确覆盖。但第二个没有(libsai-0.9.6.so.1):
root@TB:~# ls -alt /usr/lib/x86_64-linux-gnu/libsai*
/usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1 -> libsai-0.9.6.so.1.0.0 <<<== WRONG LOCATION
/usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1.0.0
/usr/lib/x86_64-linux-gnu/libsai-0.9.6.la
/usr/lib/x86_64-linux-gnu/libsai-0.9.6.so -> ../test/dist/libsai-B-test.so
root@TB:~# dpkg -S /usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1
libsai-B: /usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1
root@TB:~# dpkg -S /usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1.0.0
libsai-A: /usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1.0.0
看起来符号链接 (libsai-0.9.6.so.1) 已更新为归 libsai-B 所有,但该符号链接的目标仍指向旧位置(libsai-A 拥有的文件)。
这是我的 libsai-B.link 文件的样子:
usr/lib/test/dist/libsai-B-test.so usr/lib/x86_64-linux-gnu/libsai-0.9.6.so.1
usr/lib/test/dist/libsai-B-test.so usr/lib/x86_64-linux-gnu/libsai-0.9.6.so
我正在使用 Autotools 来触发所有 dh_helper 东西来创建我的包。知道我做错了什么吗?
谢谢!
debian - 如何修改 Debian 源代码包以包含附加的可执行脚本?
目标:我想创建一个修改过的Debian源码包,即官方rrdtool包+“一些改动”。其中一项更改是添加了可执行脚本。
我有这个用于修补我使用多年的软件包的秘诀:
如果补丁不 chmod 任何文件,但使用引入可执行文件的补丁,则此方法有效,按照上面的配方会产生以下消息:
果然,当我解压我的新源包foobar
时存在但不可执行。
据我了解,被子处理基于 GNU diff+patch 的补丁。GNU diff+patch 不处理文件权限。唔...
那么如何将可执行脚本引入被quilt维护的源码包中呢?
谷歌搜索没有帮助。似乎其他人已经问过了,但没有回复。
我知道我可以简单地对*.orig.tar.gz
存档进行修改,但如果可能的话,我想避免这种情况。我只是惊讶于这是如此困难......
c++ - 如何使用 CPackDeb 创建自启动 C++ systemd 服务?
我是 Debian 打包的新手,我相信这是一个相当基本的问题,但我很尴尬地说我已经在 Google 上被淘汰了。
我有一个使用 CMake 构建并使用 CPack 打包 debian 的 C++ 项目。这个项目有一个服务组件(systemd 风格)。我的目标是在安装软件包时启用服务并自动启动。
我的研究产生了两种方法:
systemctl
1)在 Debian 的 {pre,post}{inst,rm} 脚本中运行各种命令。需要注意正确处理安装、删除和升级方案。
2) 只需将目录放在project.service
里面debian
,让debhelper
(使用dh_systemd_enable)处理服务安装并“自动”启动。
选项 #2 显然是首选,因为 {pre,post}{inst,rm} 非常手动,因此容易出错,但我不知道是否有一种支持良好的方式来利用debhelper
CPack。
问题:我想避免在我的项目的 CMake 中重写 debian 打包内容,因为它已经存在了一段时间并且运行良好。CPackDeb
和之间的关系(如果有的话)debhelper
我不清楚——CPack 可以利用这些dh_systemd_enable
功能还是我必须在 {pre,post}{inst,rm} 脚本中手动管理服务?
debian - debian-policy 声明需要的目标,dh pass 可以吗?
https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rules
有问题的文件^
我正在学习构建 debian 软件包并阅读上述政策,特别是关于主要(必需)目标的信息。
- 有人告诉我,如果我使用 dh,我不需要指定目标。这对 dh 提供这些目标的政策有效吗?
..当然,必须覆盖dh
命令无法正常工作的地方。
- 在任何情况下,您绝对需要手动定义目标以实现兼容性,还是仅仅因为缺少明确定义的目标而被拒绝?
setuptools - 升级时重新启动软件包中的 Systemd 服务
我使用 debhelper 和 python setuptools 来构建我的包。我最近将兼容级别 9 更新到了 11,以便使用 systemd 计时器。
从那一刻起,每次我升级包时,包含的服务都会重新启动。我尝试使用以下规则进行构建:
根据文档,这些标签应该可以满足我的要求,但我可能缺少一些东西:
每次我更新它时,包含的服务都会重新启动。该服务正在运行更新本身,因此重新启动时更新未完成。
linux - 如何使用 debhelper 安装内核模块
我有一个构建 .ko 二进制文件的 Makefile,有一个带有应用程序的主包,其中有一个目录 debian/ ,其中包含构建包所需的所有文件。问题是在哪里指定以及如何指定,以便在解包时组装模块并为它们制作中间探针。找到了 dh_installmodules 和 dkms 之类的工具,但找不到任何如何使用它们的示例。
debhelper - 如何在 debhelper dh_gencontrol 中使用变量?
我试图在构建过程中将数据附加到 Debian 包的描述中。所需的数据存储在debian/rules
文件中声明的常量中。
我已经覆盖dh_gencontrol
并添加@printf
了格式化数据的调用。
我遇到的问题与包含空格的字符串有关:
printf
拆分给定的字符串,将每个单词匹配到一个%s
实例。我希望它改用整个字符串。- 如何操作所述字符串,用空格替换空格
_
并将其添加到同一行?
相关部分来自debian/rules
:
预期输出:
实际输出: