如何构建一个包含源代码树之外的符号链接的debian软件包? [英] How do I build a debian package whose sources include symbolic links outside of the source tree?

查看:141
本文介绍了如何构建一个包含源代码树之外的符号链接的debian软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,其源代码包括与其他源代码树的符号链接(特别是 CppUTest 框架)。我需要从我的项目中构建一个debian软件包,但 dpkg-source 不会遵循符号链接。



进一步挖掘,我相信这是因为 tar 的默认行为不是取消引用符号链接,除非明确告知(使用 -h )。



当建立时,我无法找到一种方法来将这个额外的选项传递给 tar debian源码tarball。



那么我在这里做错了什么?是否可以构建一个debian源码包,其起源包括符号链接?如果是这样,那么如何?

解决方案

正如在这个线程中读到的那样.. http://ubuntuforums.org/showpost.php?p=9752860&postcount=3



它们可以像普通文件一样被包含在包中。



细节取决于你正在做包装的方式,但是使用类似的东西debian / rules的安装目标中的以下内容应该可以工作:

  ln -s / usr / share / whatever / file / you / want $(CURDIR)/ debian /< pkgname> / usr / whatever / place / you / want / the / link 

debian中的所有内容都将结束在.deb中,包括您在那里的符号链接。


I have a project whose source includes symbolic links to other source trees (notably, the CppUTest framework). I need to build a debian package out of my project, but dpkg-source will not follow the symbolic links.

Digging further, I believe this is because the default behavior for tar is not to dereference symbolic links unless explicitly told to (with -h).

I was unable to find a way to pass this extra option to tar when building the debian source tarball.

So what am I doing wrong here? Is it possible to build a debian source tarball whose origin includes symbolic links? If so, how?

解决方案

As read in this thread.. http://ubuntuforums.org/showpost.php?p=9752860&postcount=3

They can be included in the package just like normal files.

The details depend on the way you're doing the packaging, but using something like the following in debian/rules's `install' target should work:

ln -s /usr/share/whatever/file/you/want $(CURDIR)/debian/<pkgname>/usr/whatever/place/you/want/the/link

Everything inside debian/ will end up inside the .deb, including the symlinks you put there.

这篇关于如何构建一个包含源代码树之外的符号链接的debian软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆