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

Re: Please help fix lintian hardening-no-relro problem



On 2014-09-11, at 00:37:11 +0000, T o n g wrote:
> On Sun, 07 Sep 2014 16:55:14 +0600, Andrey Rahmatullin wrote:
> > On Sat, Sep 06, 2014 at 08:56:50PM +0000, T o n g wrote:
> > > Yes, that's the first thing I tried, but still get the
> > > "hardening-no-relro" problem:
> > > https://github.com/suntong001/histring/blob/master/debian/rules
> > > https://github.com/suntong001/histring/archive/master.zip
> >
> > No, this version doesn't have this problem.
>
> hmm... here is my log, duplicated from http://paste.debian.net/120325/
> for your convenience:
>
>   [...]
>   $ debuild -i -us -uc -b
>   [...]
>   warning: the authors of lintian do not recommend running it with
>   root privileges!
>   W: histring: hardening-no-relro usr/bin/histring
>   Finished running lintian.
>
> Note the second last line -- "hardening-no-relro".
>
> > > > You are not using dh_auto_* commands nor exporting flags
> > > > manually, hence dpkg-buildflags isn't used in the build process.
> > > Would you mind telling me how to do it please? I'm reverting back
> > > to such unnecessarily long d/rules because I wasn't able to put
> > > back the auto- make rules back into the above short version.
> >
> > What "automake rules"?
>
> Oh, I meant using './configure' to generate Makefile from Makefile.in
> or Makefile.am. I don't know how to put the rules in to start from
> there.

Now that you've raised the debhelper compat level from 5 to 9, dh should
do the right thing.  Just revert the changes in which you ripped out the
auto-tooling, e.g.:

  $ git reset --hard master
  HEAD is now at 6708b10 - [*] bump up compat level to 9
  $ git format-patch --stdout -1 \
  > fe8008952483303bdd5e9a58ea64b380f7627fd3 | git apply -R
  <stdin>:184: trailing whitespace.
  CONFIG_CLEAN_FILES =
  <stdin>:193: trailing whitespace.
  histring_LDFLAGS =
  <stdin>:213: trailing whitespace.
  $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in
  $(ACLOCAL_M4)
  <stdin>:220: trailing whitespace.
  $(ACLOCAL_M4):  configure.in
  <stdin>:668: trailing whitespace.
  # Generated automatically using autoconf version 2.13
  warning: squelched 21 whitespace errors
  warning: 26 lines add whitespace errors.
  $ debuild -i -us -uc -b
  [...]
  Now running lintian...
  W: histring: new-package-should-close-itp-bug
  W: histring: binary-without-manpage usr/bin/histring
  Finished running lintian.

--
Az.

Attachment: signature.asc
Description: Digital signature


Reply to: