Re: No relro when building from inside a Git package ?

2013-11-22 Thread Raphael Hertzog
Hi,

On Fri, 22 Nov 2013, Andreas Tille wrote:
 $ gbp-clone ssh://git.debian.org/git/debian-med/htslib.git
 $ cd htslib
 (debian/unstable) $ git branch
 * debian/unstable
   develop
   pristine-tar
 (debian/unstable) $ git-buildpackage
 (debian/unstable) $ lintian -I --pedantic 
 ../build-area/htslib_0.2.0~rc4-1_amd64.changes 

The mere fact that the generated files are in ../build-area/ means that
you're using --git-export-dir (via ~/.gbp.conf) and thus you are building
in a directory that doesn't have the .git dir. It's an export (with
git archive) that is unpacked in ../build-area/package/ that you use as
build directory.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131122081044.ga8...@x230-buxy.home.ouaza.com



Re: No relro when building from inside a Git package ?

2013-11-22 Thread Andreas Tille
Hi,

On Fri, Nov 22, 2013 at 09:10:44AM +0100, Raphael Hertzog wrote:
 Hi,
 
 On Fri, 22 Nov 2013, Andreas Tille wrote:
  $ gbp-clone ssh://git.debian.org/git/debian-med/htslib.git
  $ cd htslib
  (debian/unstable) $ git branch
  * debian/unstable
develop
pristine-tar
  (debian/unstable) $ git-buildpackage
  (debian/unstable) $ lintian -I --pedantic 
  ../build-area/htslib_0.2.0~rc4-1_amd64.changes 
 
 The mere fact that the generated files are in ../build-area/ means that
 you're using --git-export-dir (via ~/.gbp.conf) and thus you are building
 in a directory that doesn't have the .git dir. It's an export (with
 git archive) that is unpacked in ../build-area/package/ that you use as
 build directory.

Well, that's correct.  So trying again:

$ cd ..
$ ln -s build-area/htslib_0.2.0~rc4.orig.tar.gz
$ cd htslib
(debian/unstable) $ pdebuild
(debian/unstable) $ lintian -I --pedantic ../htslib_0.2.0~rc4-1_amd64.changes
$ lintian -I --pedantic ../htslib_0.2.0~rc4-1_amd64.changes
I: htslib source: quilt-patch-using-template-description debian-changes
W: htslib source: newer-standards-version 3.9.5 (current is 3.9.4)
P: libhts-dev: no-upstream-changelog
W: libhts-dev: manpage-has-errors-from-man usr/share/man/man5/vcf.5.gz  file 
`standard input', around line 15:
P: htslib-test: no-upstream-changelog
P: libhts0: no-upstream-changelog
E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
symbol cram_index_build@Base
W: libhts0: symbols-file-contains-debian-revision on symbol 
bam_mplp_init_overlaps@Base and 1 others

So no changes when just using pdebuild in the git directory -
`-Wl,-z,relro` is correctly specified (buildlog attached as well).

Sorry, can not confirm the observation from Charles

  Andreas.

-- 
http://fam-tille.de


htslib_0.2.0~rc4-1_amd64.build.with-.git-dir.bz2
Description: Binary data


Re: No relro when building from inside a Git package ?

2013-11-22 Thread Charles Plessy
Le Fri, Nov 22, 2013 at 09:31:25AM +0100, Andreas Tille a écrit :
 On Fri, Nov 22, 2013 at 09:10:44AM +0100, Raphael Hertzog wrote:
  
  On Fri, 22 Nov 2013, Andreas Tille wrote:
   $ gbp-clone ssh://git.debian.org/git/debian-med/htslib.git
   $ cd htslib
   (debian/unstable) $ git branch
   * debian/unstable
 develop
 pristine-tar
   (debian/unstable) $ git-buildpackage
   (debian/unstable) $ lintian -I --pedantic 
   ../build-area/htslib_0.2.0~rc4-1_amd64.changes 
  
  The mere fact that the generated files are in ../build-area/ means that
  you're using --git-export-dir (via ~/.gbp.conf) and thus you are building
  in a directory that doesn't have the .git dir. It's an export (with
  git archive) that is unpacked in ../build-area/package/ that you use as
  build directory.
 
 Well, that's correct.  So trying again:
 
 $ cd ..
 $ ln -s build-area/htslib_0.2.0~rc4.orig.tar.gz
 $ cd htslib
 (debian/unstable) $ pdebuild

Hi Andreas,

I suspect that pdebuild is also using either an export or an unpacked source 
package.

I think that if you use dpkg-buildpackage directly, you will reproduce the 
problem.

Cheers,

-- 
Charles


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131122090851.gi16...@falafel.plessy.net



Re: No relro when building from inside a Git package ?

2013-11-22 Thread Andreas Tille
Hi,

On Fri, Nov 22, 2013 at 06:08:51PM +0900, Charles Plessy wrote:
 Le Fri, Nov 22, 2013 at 09:31:25AM +0100, Andreas Tille a écrit :
  On Fri, Nov 22, 2013 at 09:10:44AM +0100, Raphael Hertzog wrote:
   
   On Fri, 22 Nov 2013, Andreas Tille wrote:
$ gbp-clone ssh://git.debian.org/git/debian-med/htslib.git
$ cd htslib
(debian/unstable) $ git branch
* debian/unstable
  develop
  pristine-tar
(debian/unstable) $ git-buildpackage
(debian/unstable) $ lintian -I --pedantic 
../build-area/htslib_0.2.0~rc4-1_amd64.changes 
   
   The mere fact that the generated files are in ../build-area/ means that
   you're using --git-export-dir (via ~/.gbp.conf) and thus you are building
   in a directory that doesn't have the .git dir. It's an export (with
   git archive) that is unpacked in ../build-area/package/ that you use as
   build directory.
  
  Well, that's correct.  So trying again:
  
  $ cd ..
  $ ln -s build-area/htslib_0.2.0~rc4.orig.tar.gz
  $ cd htslib
  (debian/unstable) $ pdebuild
 
 Hi Andreas,
 
 I suspect that pdebuild is also using either an export or an unpacked source 
 package.
 
 I think that if you use dpkg-buildpackage directly, you will reproduce the 
 problem.

OK, now I've got it using debuild.  While I can not see any suspicious
difference inside the build log I can confirm the effect that with
debuild the hardening-no-relro warning occures (even if `-Wl,-z,relro`
is properly specified - a lack of this option is the usual cause of this
problem).  I can confirm this for an up to date testing and unstable
system.  I noticed as well that the file size of the binary in question
is smaller in the later cases (with hardening-no-relro problem) as if I
build using pbuilder.

I further observed that it only happens if the dir is named .git.  I
tried

mv .git .tig
cat  debian/source/include-binaries EOT
.tig/index
.tig/objects/pack/pack-0c4620137efe646d9d99b9b2b09b861e364bc678.idx
.tig/objects/pack/pack-0c4620137efe646d9d99b9b2b09b861e364bc678.pack
EOT

debuild

and the problem vanishes (the lintian warning vanishes and the file size
is larger again == same as when using pdebuild).

So lacking better advise I can only say:

  - just use pbuilder (simply closing the eyes for the issue)
  - evil grinuse svn instead of git/evil grin

Now its time for you Git experts to solve this riddle.  I'm out.

Kind regards

 Andreas.

-- 
http://fam-tille.de


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131122102742.gj11...@an3as.eu



Re: No relro when building from inside a Git package ?

2013-11-22 Thread Henrique de Moraes Holschuh
On Fri, 22 Nov 2013, Andreas Tille wrote:
 I further observed that it only happens if the dir is named .git.  I
 tried
 
 mv .git .tig
 cat  debian/source/include-binaries EOT
 .tig/index
 .tig/objects/pack/pack-0c4620137efe646d9d99b9b2b09b861e364bc678.idx
 .tig/objects/pack/pack-0c4620137efe646d9d99b9b2b09b861e364bc678.pack
 EOT
 
 debuild
 
 and the problem vanishes (the lintian warning vanishes and the file size
 is larger again == same as when using pdebuild).
 
 So lacking better advise I can only say:
 
   - just use pbuilder (simply closing the eyes for the issue)
   - evil grinuse svn instead of git/evil grin
 
 Now its time for you Git experts to solve this riddle.  I'm out.

Maybe something is doing git clean -f -x or worse, git reset --hard just
before the build run, and clobbering important build tooling configured
early in the build prepare process?  This would account for the changed
behaviour when .git is present and valid...

If this is an idiotic automatically clean using git misfeature somewhere,
it might not show up in a regular build log because git output is being
supressed.

strace should show the culprit easily...

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131122115109.gc27...@khazad-dum.debian.net



Re: No relro when building from inside a Git package ?

2013-11-21 Thread Andreas Tille
Hi Charles,

On Thu, Nov 21, 2013 at 09:37:14AM +0900, Charles Plessy wrote:
 here it is (attached).  Could the problem be a side effect of the test suite ?

While I do no see why the test should be different depending from the
existence of a .git directory or not, I'd consider it suspicious that
the library is rebuilded when running the test.  IMHO this should not
happen.  I also see below that -Wl,-z,relro is missing in the

   gcc -shared -Wl,-soname,libhts.so.0 ...

call below which explains the lintian warning.  Seems this is also a
duplicated call since it there is no such call in your +++ without-.git
log.

Kind regards

   Andreas.

PS: Alioth is back online and I might have a look later this day if
you would commit there.
 
 Cheers,
 
 -- 
 Charles

 --- with-.git 2013-11-21 09:32:14.244499056 +0900
 +++ without-.git  2013-11-21 09:34:12.908497923 +0900
 @@ -150,15 +150,6 @@
  dh_auto_test
   make -j1 test
  make[2]: Entering directory `/tmp/htslib'
 -echo '#define HTS_VERSION debian/0.2.0_rc3-1-38-g9469458'  version.h
 -gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o hts.o hts.c
 -ar -rc libhts.a kfunc.o knetfile.o kstring.o bgzf.o faidx.o hfile.o 
 hfile_net.o hts.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o vcf.o 
 vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o 
 cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o 
 cram/files.o cram/mFILE.o cram/md5.o cram/open_trace_file.o 
 cram/pooled_alloc.o cram/sam_header.o cram/string_alloc.o cram/thread_pool.o 
 cram/vlen.o cram/zfio.o
 -ranlib libhts.a
 -gcc -pthread  -o test/fieldarith test/fieldarith.o libhts.a  -lz
 -gcc  -o test/hfile test/hfile.o libhts.a  -lz
 -gcc -pthread  -o test/test_view test/test_view.o libhts.a  -lz
 -gcc -pthread  -o test/test-vcf-api test/test-vcf-api.o libhts.a  -lz
 -gcc -pthread  -o test/test-vcf-sweep test/test-vcf-sweep.o libhts.a  -lz
  test/fieldarith test/fieldarith.sam
  test/hfile
  cd test  ./test_view.pl
 @@ -456,11 +447,11 @@
  Failures  0
  cd test  ./test.pl
  test_vcf_api:
 - /tmp/htslib/test/test-vcf-api /tmp/Vvj_N60T4W/test-vcf-api.bcf
 + /tmp/htslib/test/test-vcf-api /tmp/cUKPv4vctM/test-vcf-api.bcf
  .. ok
  
  test_vcf_sweep:
 - /tmp/htslib/test/test-vcf-sweep /tmp/Vvj_N60T4W/test-vcf-api.bcf
 + /tmp/htslib/test/test-vcf-sweep /tmp/cUKPv4vctM/test-vcf-api.bcf
  .. ok
  
  
 @@ -495,10 +486,6 @@
   make -j1 install DESTDIR=/tmp/htslib/debian/tmp AM_UPDATE_INFO_DIR=no 
 prefix=/usr PACKAGE_VERSION=0.2.0\~rc4-1
  make[2]: Entering directory `/tmp/htslib'
  mkdir -p /tmp/htslib/debian/tmp/usr/include/htslib 
 /tmp/htslib/debian/tmp/usr/lib /tmp/htslib/debian/tmp/usr/share/man/man5
 -echo '#define HTS_VERSION 0.2.0~rc4-1'  version.h
 -gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -fpic -c -o hts.pico hts.c
 -gcc -shared -Wl,-soname,libhts.so.0  -o libhts.so kfunc.pico knetfile.pico 
 kstring.pico bgzf.pico faidx.pico hfile.pico hfile_net.pico hts.pico sam.pico 
 synced_bcf_reader.pico vcf_sweep.pico tbx.pico vcf.pico vcfutils.pico 
 cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico 
 cram/cram_index.pico cram/cram_io.pico cram/cram_samtools.pico 
 cram/cram_stats.pico cram/files.pico cram/mFILE.pico cram/md5.pico 
 cram/open_trace_file.pico cram/pooled_alloc.pico cram/sam_header.pico 
 cram/string_alloc.pico cram/thread_pool.pico cram/vlen.pico cram/zfio.pico  
 -lz
 -ln -sf libhts.so libhts.so.0
  install -p -m 644 libhts.so 
 /tmp/htslib/debian/tmp/usr/lib/libhts.so.0.2.0~rc4-1
  ln -sf libhts.so.0.2.0~rc4-1 /tmp/htslib/debian/tmp/usr/lib/libhts.so
  ln -sf libhts.so.0.2.0~rc4-1 /tmp/htslib/debian/tmp/usr/lib/libhts.so.0
 @@ -660,7 +647,7 @@
  dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see 
 diff output below
  dpkg-gensymbols: warning: debian/libhts0/DEBIAN/symbols doesn't match 
 completely debian/libhts0.symbols
  --- debian/libhts0.symbols (libhts0_0.2.0~rc4-1_amd64)
 -+++ dpkg-gensymbolskXM3kh2013-11-21 09:32:00.312499189 +0900
  dpkg-gensymbols4DQT532013-11-21 09:34:08.056497969 +0900
  @@ -230,6 +230,7 @@
cram_huffman_encode_int0@Base 0.2.0~rc3
cram_huffman_encode_int@Base 0.2.0~rc3
 @@ -675,12 +662,12 @@
   rm -f debian/htslib-test/DEBIAN/shlibs
 dh_shlibdeps
   dpkg-shlibdeps -Tdebian/libhts0.substvars 
 debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0\~rc4-1
 -dpkg-shlibdeps: warning: symbol exp used by 
 debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none 
 of the libraries
 -dpkg-shlibdeps: warning: symbol pthread_join used by 
 debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none 
 of the libraries
 -dpkg-shlibdeps: warning: symbol pthread_kill used by 
 debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none 
 of the libraries
  dpkg-shlibdeps: warning: symbol pthread_create used by 
 debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none 
 of the libraries
 

Re: No relro when building from inside a Git package ?

2013-11-21 Thread Charles Plessy
Le Thu, Nov 21, 2013 at 09:00:48AM +0100, Andreas Tille a écrit :
 
 PS: Alioth is back online and I might have a look later this day if
 you would commit there.

Thanks a lot !

gbp clone git.debian.org:/git/debian-med/htslib.git

Cheers,

-- 
Charles


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131121082926.gf16...@falafel.plessy.net



Re: No relro when building from inside a Git package ?

2013-11-21 Thread Andreas Tille
Hi Charles,

On Thu, Nov 21, 2013 at 05:29:26PM +0900, Charles Plessy wrote:
 Le Thu, Nov 21, 2013 at 09:00:48AM +0100, Andreas Tille a écrit :
  
  PS: Alioth is back online and I might have a look later this day if
  you would commit there.
 
 Thanks a lot !
 
 gbp clone git.debian.org:/git/debian-med/htslib.git

When doing `git-buildpackage` (which for sure includes the .git dir) I
can not see the effect you are describing.  The only thing lintian (and
I) are more concerned about is:

  E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
symbol cram_index_build@Base
  W: libhts0: symbols-file-contains-debian-revision on symbol 
bam_mplp_init_overlaps@Base and 1 others

I personally would simply drop the symbols file since it seems to
introduce more harm than good.

Am I missing something?

Kind regards

   Andreas.

-- 
http://fam-tille.de


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131121102624.gc7...@an3as.eu



Re: No relro when building from inside a Git package ?

2013-11-21 Thread Andreas Tille
Hi Charles,

On Fri, Nov 22, 2013 at 02:23:33PM +0900, Charles Plessy wrote:
 Le Thu, Nov 21, 2013 at 11:26:24AM +0100, Andreas Tille a écrit :
  On Thu, Nov 21, 2013 at 05:29:26PM +0900, Charles Plessy wrote:
   
   gbp clone git.debian.org:/git/debian-med/htslib.git
  
  When doing `git-buildpackage` (which for sure includes the .git dir) I
  can not see the effect you are describing.  The only thing lintian (and
  I) are more concerned about is:
  
E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
  symbol cram_index_build@Base
W: libhts0: symbols-file-contains-debian-revision on symbol 
  bam_mplp_init_overlaps@Base and 1 others
  
  I personally would simply drop the symbols file since it seems to
  introduce more harm than good.
 
 Hi Andreas,
 
 this is strange, in my case, from a fresh clone, and when building with git
 buildpackage -us -uc, I see the hardening-no-relro tag.
 
 $ lintian -I --pedantic ../htslib_0.2.0~rc4-1_amd64.changes
 I: htslib source: quilt-patch-using-template-description debian-changes
 W: htslib source: newer-standards-version 3.9.5 (current is 3.9.4)
 W: libhts0: hardening-no-relro usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1
 P: libhts0: no-upstream-changelog
 E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
 symbol cram_index_build@Base
 W: libhts0: symbols-file-contains-debian-revision on symbol 
 bam_mplp_init_overlaps@Base and 1 others
 P: libhts-dev: no-upstream-changelog
 W: libhts-dev: manpage-has-errors-from-man usr/share/man/man5/vcf.5.gz  file 
 `standard input', around line 15:
 P: htslib-test: no-upstream-changelog

$ gbp-clone ssh://git.debian.org/git/debian-med/htslib.git
$ cd htslib
(debian/unstable) $ git branch
* debian/unstable
  develop
  pristine-tar
(debian/unstable) $ git-buildpackage
(debian/unstable) $ lintian -I --pedantic 
../build-area/htslib_0.2.0~rc4-1_amd64.changes 
I: htslib source: quilt-patch-using-template-description debian-changes
W: htslib source: newer-standards-version 3.9.5 (current is 3.9.4)
P: libhts0: no-upstream-changelog
E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
symbol cram_index_build@Base
W: libhts0: symbols-file-contains-debian-revision on symbol 
bam_mplp_init_overlaps@Base and 1 others
P: htslib-test: no-upstream-changelog
P: libhts-dev: no-upstream-changelog
W: libhts-dev: manpage-has-errors-from-man usr/share/man/man5/vcf.5.gz  file 
`standard input', around line 15:

The attached build log clearly contains '-Wl,-z,relro' where it needs to
be.

 For the tags related to the symbols file, this is because the package is work
 in progress.  I pull upsteam commits as they go and only update the version
 number when upstream makes new tags, therefore Debian revisions contain 
 changes
 to the library's symbols.
 
 Given that the API is not yet stable, I understand that the symbols file is 
 not
 yet useful, but I prefer having it in the package now so that I do not forget
 to add it when I start to upload packages built on the htslib-dev package.

I personally would choose some kinf of changelog entry:
  TODO: create symbols file
to get rid of this noise ... but I now understand your motivation.

Kind regards

  Andreas.

-- 
http://fam-tille.de


htslib_0.2.0~rc4-1_amd64.build.bz2
Description: Binary data


Re: No relro when building from inside a Git package ?

2013-11-21 Thread Charles Plessy
Le Thu, Nov 21, 2013 at 11:26:24AM +0100, Andreas Tille a écrit :
 On Thu, Nov 21, 2013 at 05:29:26PM +0900, Charles Plessy wrote:
  
  gbp clone git.debian.org:/git/debian-med/htslib.git
 
 When doing `git-buildpackage` (which for sure includes the .git dir) I
 can not see the effect you are describing.  The only thing lintian (and
 I) are more concerned about is:
 
   E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
 symbol cram_index_build@Base
   W: libhts0: symbols-file-contains-debian-revision on symbol 
 bam_mplp_init_overlaps@Base and 1 others
 
 I personally would simply drop the symbols file since it seems to
 introduce more harm than good.

Hi Andreas,

this is strange, in my case, from a fresh clone, and when building with git
buildpackage -us -uc, I see the hardening-no-relro tag.

$ lintian -I --pedantic ../htslib_0.2.0~rc4-1_amd64.changes
I: htslib source: quilt-patch-using-template-description debian-changes
W: htslib source: newer-standards-version 3.9.5 (current is 3.9.4)
W: libhts0: hardening-no-relro usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1
P: libhts0: no-upstream-changelog
E: libhts0: symbols-file-contains-current-version-with-debian-revision on 
symbol cram_index_build@Base
W: libhts0: symbols-file-contains-debian-revision on symbol 
bam_mplp_init_overlaps@Base and 1 others
P: libhts-dev: no-upstream-changelog
W: libhts-dev: manpage-has-errors-from-man usr/share/man/man5/vcf.5.gz  file 
`standard input', around line 15:
P: htslib-test: no-upstream-changelog

For the tags related to the symbols file, this is because the package is work
in progress.  I pull upsteam commits as they go and only update the version
number when upstream makes new tags, therefore Debian revisions contain changes
to the library's symbols.

Given that the API is not yet stable, I understand that the symbols file is not
yet useful, but I prefer having it in the package now so that I do not forget
to add it when I start to upload packages built on the htslib-dev package.

Cheers,

-- 
Charles


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131122052333.gh16...@falafel.plessy.net



Re: No relro when building from inside a Git package ?

2013-11-20 Thread Andreas Tille
Hi Charles,

without having checked out the repository and diving into it:  Can you
post a diff of the two build logs?

Kind regards

Andreas.

On Wed, Nov 20, 2013 at 02:44:39PM +0900, Charles Plessy wrote:
 Dear all,
 
 I am experience a strange variation when building package from a Git 
 repository
 or from the same source with the .git directory deleted.
 
 In the first case I have the Lintian warning 'libhts0: hardening-no-relro
 usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1', but not in the second case.
 
 The only git-dependant code that I found is to create a package version, but
 I override it in debian/rules by the Debian package's version.
 
 In Makefile:
 
 ifneq $(wildcard .git) 
 original_version := $(PACKAGE_VERSION)
 PACKAGE_VERSION := $(shell git describe --always --dirty)
 
 In debian/rules:
 
 override_dh_auto_build:
   dh_auto_build -- \
 CFLAGS=$$(dpkg-buildflags --get CFLAGS) \
 CPPFLAGS=-I. -DSAMTOOLS=1 $$(dpkg-buildflags --get CPPFLAGS) \
 LDFLAGS=$$(dpkg-buildflags --get LDFLAGS) \
 PACKAGE_VERSION=$(DEB_VERSION)
 
 override_dh_auto_install:
   dh_auto_install -- prefix=/usr PACKAGE_VERSION=$(DEB_VERSION)
 
 (Digression: I do this because after tagging a debian revision, for instance
 'debian/0.2.0_rc3-1', the package will fail to build from the Git repository
 since the tag becomes used for the soversion of the library, and the slash is
 mistaken as a directory separator.  Is there a smart solution to this problem 
 ?)
 
 You can get the source with 'gbp clone https://github.com/Debian/htslib'.  
 Does
 anybody see why the hardening-no-relro is triggered when building in presence
 of the .git directory ?
 
 Cheers,
 
 -- 
 Charles Plessy
 Debian Med packaging team,
 http://www.debian.org/devel/debian-med
 Tsurumi, Kanagawa, Japan
 
 
 -- 
 To UNSUBSCRIBE, email to debian-med-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/20131120054439.gb16...@falafel.plessy.net
 
 

-- 
http://fam-tille.de


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131120212429.gc7...@an3as.eu



Re: No relro when building from inside a Git package ?

2013-11-20 Thread Charles Plessy
Le Wed, Nov 20, 2013 at 10:24:29PM +0100, Andreas Tille a écrit :
 
 without having checked out the repository and diving into it:  Can you
 post a diff of the two build logs?

Hi Andreas,

here it is (attached).  Could the problem be a side effect of the test suite ?

Cheers,

-- 
Charles
--- with-.git   2013-11-21 09:32:14.244499056 +0900
+++ without-.git2013-11-21 09:34:12.908497923 +0900
@@ -150,15 +150,6 @@
 dh_auto_test
make -j1 test
 make[2]: Entering directory `/tmp/htslib'
-echo '#define HTS_VERSION debian/0.2.0_rc3-1-38-g9469458'  version.h
-gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -c -o hts.o hts.c
-ar -rc libhts.a kfunc.o knetfile.o kstring.o bgzf.o faidx.o hfile.o 
hfile_net.o hts.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o vcf.o vcfutils.o 
cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_index.o 
cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o 
cram/md5.o cram/open_trace_file.o cram/pooled_alloc.o cram/sam_header.o 
cram/string_alloc.o cram/thread_pool.o cram/vlen.o cram/zfio.o
-ranlib libhts.a
-gcc -pthread  -o test/fieldarith test/fieldarith.o libhts.a  -lz
-gcc  -o test/hfile test/hfile.o libhts.a  -lz
-gcc -pthread  -o test/test_view test/test_view.o libhts.a  -lz
-gcc -pthread  -o test/test-vcf-api test/test-vcf-api.o libhts.a  -lz
-gcc -pthread  -o test/test-vcf-sweep test/test-vcf-sweep.o libhts.a  -lz
 test/fieldarith test/fieldarith.sam
 test/hfile
 cd test  ./test_view.pl
@@ -456,11 +447,11 @@
 Failures  0
 cd test  ./test.pl
 test_vcf_api:
-   /tmp/htslib/test/test-vcf-api /tmp/Vvj_N60T4W/test-vcf-api.bcf
+   /tmp/htslib/test/test-vcf-api /tmp/cUKPv4vctM/test-vcf-api.bcf
 .. ok
 
 test_vcf_sweep:
-   /tmp/htslib/test/test-vcf-sweep /tmp/Vvj_N60T4W/test-vcf-api.bcf
+   /tmp/htslib/test/test-vcf-sweep /tmp/cUKPv4vctM/test-vcf-api.bcf
 .. ok
 
 
@@ -495,10 +486,6 @@
make -j1 install DESTDIR=/tmp/htslib/debian/tmp AM_UPDATE_INFO_DIR=no 
prefix=/usr PACKAGE_VERSION=0.2.0\~rc4-1
 make[2]: Entering directory `/tmp/htslib'
 mkdir -p /tmp/htslib/debian/tmp/usr/include/htslib 
/tmp/htslib/debian/tmp/usr/lib /tmp/htslib/debian/tmp/usr/share/man/man5
-echo '#define HTS_VERSION 0.2.0~rc4-1'  version.h
-gcc -g -Wall -O2 -I. -DSAMTOOLS=1 -fpic -c -o hts.pico hts.c
-gcc -shared -Wl,-soname,libhts.so.0  -o libhts.so kfunc.pico knetfile.pico 
kstring.pico bgzf.pico faidx.pico hfile.pico hfile_net.pico hts.pico sam.pico 
synced_bcf_reader.pico vcf_sweep.pico tbx.pico vcf.pico vcfutils.pico 
cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico 
cram/cram_index.pico cram/cram_io.pico cram/cram_samtools.pico 
cram/cram_stats.pico cram/files.pico cram/mFILE.pico cram/md5.pico 
cram/open_trace_file.pico cram/pooled_alloc.pico cram/sam_header.pico 
cram/string_alloc.pico cram/thread_pool.pico cram/vlen.pico cram/zfio.pico  -lz
-ln -sf libhts.so libhts.so.0
 install -p -m 644 libhts.so 
/tmp/htslib/debian/tmp/usr/lib/libhts.so.0.2.0~rc4-1
 ln -sf libhts.so.0.2.0~rc4-1 /tmp/htslib/debian/tmp/usr/lib/libhts.so
 ln -sf libhts.so.0.2.0~rc4-1 /tmp/htslib/debian/tmp/usr/lib/libhts.so.0
@@ -660,7 +647,7 @@
 dpkg-gensymbols: warning: some new symbols appeared in the symbols file: see 
diff output below
 dpkg-gensymbols: warning: debian/libhts0/DEBIAN/symbols doesn't match 
completely debian/libhts0.symbols
 --- debian/libhts0.symbols (libhts0_0.2.0~rc4-1_amd64)
-+++ dpkg-gensymbolskXM3kh  2013-11-21 09:32:00.312499189 +0900
 dpkg-gensymbols4DQT53  2013-11-21 09:34:08.056497969 +0900
 @@ -230,6 +230,7 @@
   cram_huffman_encode_int0@Base 0.2.0~rc3
   cram_huffman_encode_int@Base 0.2.0~rc3
@@ -675,12 +662,12 @@
rm -f debian/htslib-test/DEBIAN/shlibs
dh_shlibdeps
dpkg-shlibdeps -Tdebian/libhts0.substvars 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0\~rc4-1
-dpkg-shlibdeps: warning: symbol exp used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
-dpkg-shlibdeps: warning: symbol pthread_join used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
-dpkg-shlibdeps: warning: symbol pthread_kill used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
 dpkg-shlibdeps: warning: symbol pthread_create used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
+dpkg-shlibdeps: warning: symbol exp used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
 dpkg-shlibdeps: warning: symbol lgamma used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
+dpkg-shlibdeps: warning: symbol pthread_kill used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none of 
the libraries
 dpkg-shlibdeps: warning: symbol log used by 
debian/libhts0/usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1 found in none 

No relro when building from inside a Git package ?

2013-11-19 Thread Charles Plessy
Dear all,

I am experience a strange variation when building package from a Git repository
or from the same source with the .git directory deleted.

In the first case I have the Lintian warning 'libhts0: hardening-no-relro
usr/lib/x86_64-linux-gnu/libhts.so.0.2.0~rc4-1', but not in the second case.

The only git-dependant code that I found is to create a package version, but
I override it in debian/rules by the Debian package's version.

In Makefile:

ifneq $(wildcard .git) 
original_version := $(PACKAGE_VERSION)
PACKAGE_VERSION := $(shell git describe --always --dirty)

In debian/rules:

override_dh_auto_build:
dh_auto_build -- \
  CFLAGS=$$(dpkg-buildflags --get CFLAGS) \
  CPPFLAGS=-I. -DSAMTOOLS=1 $$(dpkg-buildflags --get CPPFLAGS) \
  LDFLAGS=$$(dpkg-buildflags --get LDFLAGS) \
  PACKAGE_VERSION=$(DEB_VERSION)

override_dh_auto_install:
dh_auto_install -- prefix=/usr PACKAGE_VERSION=$(DEB_VERSION)

(Digression: I do this because after tagging a debian revision, for instance
'debian/0.2.0_rc3-1', the package will fail to build from the Git repository
since the tag becomes used for the soversion of the library, and the slash is
mistaken as a directory separator.  Is there a smart solution to this problem ?)

You can get the source with 'gbp clone https://github.com/Debian/htslib'.  Does
anybody see why the hardening-no-relro is triggered when building in presence
of the .git directory ?

Cheers,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20131120054439.gb16...@falafel.plessy.net