How to create Debian packages for release 3.9.0

L.S.,

I'm currently in the process of creating Debian packages for
clang/llvm release 3.9.0. For this I'm using the steps as explained on
'How to build LLVM Debian/Ubuntu packages from source?’. Up until now I have done:

$ debcheckout svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/
$ cd llvm-toolchain/branches
$ sh 3.9/debian/orig-tar.sh RELEASE_390 final

Now, as is explained, I would have to run 'unpack.sh', however, this
script assumes the version name to be an SVN-version-based name (which
is not the case for '3.9'). So I had to modify unpack.sh for this. Now
for one of the last steps of unpack.sh, there is the line:

  cp -R ../snapshot/debian .

But this step should also be changed for a specific release version
build, now the patches fail (and most likely the build as well, later
on). Where can I find the properly versioned 'debian' directory for my
specific release version build?

As a sidenote, I'd like to note that even for a non-specific release
the build process is flawed. When building the 3.9 branch without
being specific:

$ debcheckout svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/

$ cd llvm-toolchain/branches/

$ sh 3.9/debian/orig-tar.sh release_39

$ sh unpack.sh
tar (child): llvm-toolchain-snapshot_3.9_3.9~svn288847.orig.tar.bz2:
Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

$ ls *.bz2
llvm-toolchain-3.9_3.9~svn288847.orig-clang.tar.bz2
llvm-toolchain-3.9_3.9~svn288847.orig-clang-tools-extra.tar.bz2
llvm-toolchain-3.9_3.9~svn288847.orig-compiler-rt.tar.bz2
llvm-toolchain-3.9_3.9~svn288847.orig-lldb.tar.bz2
llvm-toolchain-3.9_3.9~svn288847.orig-lld.tar.bz2
llvm-toolchain-3.9_3.9~svn288847.orig-polly.tar.bz2
llvm-toolchain-3.9_3.9~svn288847.orig.tar.bz2

I.e. the assumed name part 'snapshot' is not there. After removing the
'snapshot_' part from all filenames in the script, the unpacking
works.

Then, as a next step, the creating of symlinks fails due to the
filenames having the major version number in it twice (whereas the
script assumes it to be only once). After modification this works too.

Then, the next step further down the line the patching step (partly) fails:

+Sylvestre who knows about these things.

Hello,

+Sylvestre who knows about these things.

L.S.,

I'm currently in the process of creating Debian packages for
clang/llvm release 3.9.0. For this I'm using the steps as explained on
'How to build LLVM Debian/Ubuntu packages from source?’. Up until now I have done:

$ debcheckout svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/
$ cd llvm-toolchain/branches
$ sh 3.9/debian/orig-tar.sh RELEASE_390 final

Now, as is explained, I would have to run 'unpack.sh', however, this
script assumes the version name to be an SVN-version-based name (which
is not the case for '3.9'). So I had to modify unpack.sh for this. Now
for one of the last steps of unpack.sh, there is the line:

  cp -R ../snapshot/debian .

snapshot is for 4.0
debian/ for 3.9 package is available here:
https://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/3.9/

Btw, you can get the packages uploaded in debian directly here:
http://snapshot.debian.org/package/llvm-toolchain-3.9/1%3A3.9.1-1/

For example, to get the latest 3.9.1 package:
dget -x http://snapshot.debian.org/archive/debian-debug/20161214T151055Z/pool/main/l/llvm-toolchain-3.9/llvm-toolchain-3.9_3.9.1-1.dsc
will do the job

S

Hi Sylvestre,

Thanks for getting back to me.

I'm trying to build the debian packages for release 3.9.0 for Ubuntu
14.04 AMD64 (i.e. trusty) and I used the build commands as described
on 'How to build LLVM Debian/Ubuntu packages from source?’. The Debian package
repository you kindly provided have dependencies that cannot be
resolved for my OS version.

Hello,

Btw, you can get the packages uploaded in debian directly here:
llvm-toolchain-3.9 (1:3.9.1-1) - snapshot.debian.org

For example, to get the latest 3.9.1 package:
dget -x http://snapshot.debian.org/archive/debian-debug/20161214T151055Z/pool/main/l/llvm-toolchain-3.9/llvm-toolchain-3.9_3.9.1-1.dsc
will do the job

Using your suggestion, I did:

  $ dget -x http://snapshot.debian.org/archive/debian-debug/20161214T151055Z/pool/main/l/llvm-toolchain-3.9/llvm-toolchain-3.9_3.9.1-1.dsc

This works fine. Then I would like to build the package (by using the
command from http://apt.llvm.org/building-pkgs.php:

  $ cd llvm-toolchain-3.9-3.9.1
  $ fakeroot debian/rules binary

But the build fails with the message (full log at the bottom of the mail):