[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to build a source tarball that includes symbolic links?



Hi,

Here is what my project looks like:

fornol$ ll

    ./
    ../
    CppUTest -> ../../CppUTest/
    debian/
    fornol.c
    fornol.h
    Makefile
    NEWS
    ....

As you can see, I have a `CppUTest' symbolic link that points to
elswhere on my filesystem where I have the latest CppUTest
distribution. For various reasons I'd like to avoid copying that
distribution over to the project, mainly because we are using it for
several projects.

Now when I call `dpkg-buildpackage' to build the project, I obtain a
source tarbal with the following contents:

    fornol/
    fornol/CppUTest
    fornol/Makefile
    fornol/debian/
    fornol/debian/init.d.ex
    fornol/debian/emacsen-startup.ex
    fornol/fornol.c
    fornol/NEWS
    fornol/fornol.h
    .....

As you can see, instead of copying over the files pointed to by the
`CppUTest' symbolic link, now I have an (empty) CppUTest file.

I need to build this tarball because I need to build this project from
Ubuntu to the wheezy distribution. I use the `pbuilder' tool for that;
from what I understand I need to have a complete, standalone source
tarball that includes all the sources needed to compile the project.

I understand that a project should ideally be entirely self-contained
and that is a goal we will reach for eventually. But not this sprint :-)

Does this make more sense? Is there something I can try?

Thanks in advance for your help,

David

On Thu, Jun 7, 2012 at 5:52 AM, Paul Wise <pabs@debian.org> wrote:
> On Thu, Jun 7, 2012 at 11:42 AM, David Lindelöf wrote:
>
>> I'm trying to build my first cross-distribution package, but I run
>> into the following problem.
>>
>> The source of my project includes symbolic links to other source trees
>> (notably, the CppUTest framework and a library used by several of our
>> projects). When I call `dpkg-buildpackage` to build a debian package
>> out of my project, I've found that `dpkg-source` will not follow the
>> symbolic links and leaves them as empty files in the source's tarball.
>> As a result, they cannot be used by `pbuilder` to build the package
>> for another distribution.
>>
>> 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 any way to pass this extra option to
>> `tar` when building the debian source's tarball.
>>
>> I've also asked the question on StackOverflow
>> (http://stackoverflow.com/q/10917214/1428) but to no avail.
>>
>> What am I doing wrong here? Is it possible to build a debian source
>> tarball whose origin includes symbolic links? If so, how?
>
> Could you give us a link to the tarball or Debian source package?
>
> It isn't clear to me what you are doing wrong from your description,
> but please note that source packages are self-contained apart from
> being able to Build-Depend on binary packages.
>
> --
> bye,
> pabs
>
> http://wiki.debian.org/PaulWise
>
>
> --
> To UNSUBSCRIBE, email to debian-mentors-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: http://lists.debian.org/CAKTje6Ge619pXYANYGaUNA6_sxdtvQQi303nKdhm+WcpGFEmA@mail.gmail.com
>



-- 
::::::::::::::::::::::::::::::::::::::::::::
David Lindelöf, Ph.D.
+41 (0)79 415 66 41 or skype:david.lindelof
Better Software for Tomorrow's Cities:
  http://computersandbuildings.com
Follow me on Twitter:
  http://twitter.com/dlindelof


Reply to: