英文:
How do I specify the `nodoc` debian build profile (or any other build profile) to pbuilder-dist?
问题
我正在尝试为较旧版本的Ubuntu(Focal Fossa)创建一组新的Qt软件包。我使用的Ubuntu版本比我要创建软件包的版本要新,因此我正在使用pbuilder-dist
,它可以自动创建用于目标分发的chroot环境。在这个过程中,我遇到了一个鸡和蛋的问题,qtbase的Ubuntu仓库(包含必要的debian/control
规则等)包含对Qt文档工具的可选要求,而这些工具本身依赖于基本软件包。通常情况下,可以通过使用环境变量DEB_BUILD_PROFILES
并指定nodoc
Debian构建配置文件来解决这个问题,这将在执行pbuilder构建时跳过这些要求,但似乎不起作用。
我看到了pbuilder-dist实现中的逻辑(位于/usr/lib/pbuilder/pbuilder-satisfydepends-funcs
中的filter_restriction_deps
函数),它应该读取环境变量并在指定nodoc
时过滤掉标记为!nodoc
的依赖项,但无论我如何指定DEB_BUILD_PROFILES
,似乎都被忽略了。
在查看了Debian打包工具的各种文档后,应该有一种方法来指定这个,但我还没有找到。目前,我通过在发出pbuilder-dist
命令行之前粗略地删除这些可选依赖项来解决了这个问题。
有人可以告诉我如何将构建配置文件规范传递给pbuilder_dist
吗?
英文:
I am trying to create a new set of Qt packages for an older version of Ubuntu (Focal Fossa). I am using a newer release of Ubuntu than the one I am creating packages for, so I am using pbuilder-dist
which automates the creation of a chroot for the intended distribution. During this process, I have encountered a chicken and egg problem, where the qtbase ubuntu repo (that contains the necessary debian/control
rules, etc) contains an optional requirement on Qt documentation tools, which themselves depend on the base packages. It appears this is normally worked around by specifying the nodoc
debian build profile using the environment variable DEB_BUILD_PROFILES
, which will skip these requirements when performing the pbuilder build, however it doesn't seem to work.
I see the logic in the pbuilder-dist implementation (filter_restriction_deps
in /usr/lib/pbuilder/pbuilder-satisfydepends-funcs
) that should be reading the environment variable and filtering out the dependencies that are marked !nodoc
when nodoc
is specified, but any means of me specifying DEB_BUILD_PROFILES
seems to be ignored.
From poking around the various documentation for the debian packaging tools, there should be a way to specify this, but it eludes me. For the moment I have very crudely worked around this by just removing these optional dependencies from the build before issuing the pbuilder-dist
command line.
Can someone inform me how I can pass a build profile specifier to pbuilder_dist
?
答案1
得分: 0
为了回答我的问题,pbuilder-dist
有一个 --profiles
选项来完成这个任务。环境变量似乎不能传递到 pbuilder-dist
运行的 pbuilder
命令,但 --profiles
选项可以。
因此,为了解决这个问题,我在 pbuilder-dist
命令的命令行上添加了 --profiles nodoc
:
pbuilder-dist focal build --profiles nodoc ../qtbase-opensource-src_5.15.9+kkyz-0.1.2.dsc
英文:
To answer my own question, there is a --profiles
option to pbuilder-dist
which fulfills this task. Environment variables do not seem to pass onto the pbuilder
command that pbuilder-dist
runs, however the --profiles
option does.
So, to solve this, I add --profiles nodoc
on the command line for the pbuilder-dist
command:
pbuilder-dist focal build --profiles nodoc ../qtbase-opensource-src_5.15.9+kkyz-0.1.2.dsc
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论