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

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



On Sun, Aug 24, 2014 at 10:17:18PM +0000, T o n g wrote:
> hi, 
> 
> Please help me fix the lintian "hardening-no-relro" problem. My code is at
> https://github.com/suntong001/histring (it is *very* small).
The proper way is just to bump debian/compat to 9.

> I tried to fix it myself, using the method from 
> https://wiki.debian.org/Hardening
> and https://groups.google.com/forum/#!msg/debian-bollin/
> Ixk9usNsbKw/0eaJLbT142kJ
> 
> but neither method works. Details below. 
> Please help. Thanks!
> 
>   $ diff --git a/Makefile b/Makefile
>   index 386aebd..e084f58 100644
>   --- a/Makefile
>   +++ b/Makefile
>   @@ -6,6 +6,10 @@ mandir = ${prefix}/share/man/man1
>    exec_prefix = ${prefix}
>    bindir = ${exec_prefix}/bin
> 
>   +DPKG_EXPORT_BUILDFLAGS = 1
>   +include /usr/share/dpkg/buildflags.mk
>   +CFLAGS += -Wextra
>   +
>    all: histring
> 
>    histring: histring.c getopt.c getopt1.c getopt.h
These lines are for debian/rules, not for the upstream Makefile (they are
unnecessary when using dh(1) with compat 9 though).

>   diff --git a/debian/rules b/debian/rules
>   index 1485ba0..e6655fb 100755
>   --- a/debian/rules
>   +++ b/debian/rules
>   @@ -2,5 +2,8 @@
> 
>    #export DH_VERBOSE=1
> 
>   +DPKG_EXPORT_BUILDFLAGS = 1 
>   +LDFLAGS += -Wl,--as-needed 
>   +
>    %:
> 	  dh $@ 
You shouldn't blindly copy code from commits to some other projects found
on the Internet without understanding what those changes do.

-- 
WBR, wRAR


Reply to: