use correct Section: libs rather than misc

compatiblity with dh_dwz / dwz - https://github.com/GrapheneOS/hardened_malloc/issues/85

move to sub folder /usr/lib/libhardened_malloc.so so lintian will not complain
about non-versioned shared objects and missing symlinks. That extra complexity
is not needed here since this lib aims to be compatible with what it replaces.

full path is now /usr/lib/libhardened_malloc.so/libhardened_malloc.so

deprecate no longer needed make_all_hook_post as this was improved in genmkfile
This commit is contained in:
Patrick Schleizer 2019-07-28 19:20:03 +00:00
parent ccfb42c5b4
commit b3b5e5d21d
No known key found for this signature in database
GPG key ID: CB8D50BB77BB3C48
4 changed files with 4 additions and 11 deletions

View file

@ -33,7 +33,7 @@ endif
CFLAGS := $(CFLAGS) -std=c11 $(SHARED_FLAGS) -Wmissing-prototypes
CXXFLAGS := $(call safe_flag,-std=c++17,-std=c++14) $(SHARED_FLAGS)
LDFLAGS := $(LDFLAGS) -Wl,--as-needed,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text
LDFLAGS := $(LDFLAGS) -Wl,-soname=libhardened_malloc.so,--as-needed,-z,defs,-z,relro,-z,now,-z,nodlopen,-z,text
TIDY_CHECKS := -checks=bugprone-*,-bugprone-macro-parentheses,cert-*,clang-analyzer-*,readability-*,-readability-inconsistent-declaration-parameter-name,-readability-magic-numbers,-readability-named-parameter,-bugprone-too-small-loop-variable
SOURCES := chacha.c h_malloc.c memory.c pages.c random.c util.c

2
debian/control vendored
View file

@ -2,7 +2,7 @@
## See the file COPYING for copying conditions.
Source: hardened-malloc
Section: misc
Section: libs
Priority: optional
Maintainer: Patrick Schleizer <adrelanos@riseup.net>
Build-Depends: debhelper (>= 12), genmkfile

4
debian/rules vendored
View file

@ -15,9 +15,5 @@ include /usr/share/dpkg/buildflags.mk
override_dh_installchangelogs:
dh_installchangelogs changelog.upstream upstream
## https://github.com/GrapheneOS/hardened_malloc/issues/85
override_dh_dwz:
/bin/true
override_dh_auto_build:
dh_auto_build -- CONFIG_NATIVE=false

View file

@ -5,11 +5,8 @@
make_install_hook_post() {
if [ ! -d "$DESTDIR/usr/lib" ]; then
mkdir --parents "$DESTDIR/usr/lib"
mkdir --parents "$DESTDIR/usr/lib/libhardened_malloc.so"
fi
cp libhardened_malloc.so "$DESTDIR/usr/lib/libhardened_malloc.so"
cp libhardened_malloc.so "$DESTDIR/usr/lib/libhardened_malloc.so/libhardened_malloc.so"
}
make_all_hook_post() {
make libhardened_malloc.so
}