From 1b36b5fa1b8dbd76aec7ddd4ffe72f8515c29038 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Jun 2015 19:34:45 +0200 Subject: apt manpage is built from xml nowadays like the rest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It used be a handwritten manpage, but that is gone and this artifact is the cause for the message: ../../buildlib/manpage.mak:23: target '../../build/docs/apt.de.8' given more than once in the same rule [ … repeated for all translations … ] So lets get right of it. Git-Dch: Ignore --- buildlib/po4a_manpage.mak | 1 - 1 file changed, 1 deletion(-) (limited to 'buildlib') diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak index 0f53a8600..2e98652a5 100644 --- a/buildlib/po4a_manpage.mak +++ b/buildlib/po4a_manpage.mak @@ -57,7 +57,6 @@ HAVE_PO4A=yes endif # take care of the rest -SOURCE := $(SOURCE) $(wildcard apt.$(LC).8) INCLUDES := ifndef HAVE_PO4A -- cgit v1.2.3 From c3392a9fccc04129816057b1184c651171034376 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 17 Jun 2015 22:15:01 +0200 Subject: some CXXFLAGS housekeeping More warnings are always better. Git-Dch: Ignore --- buildlib/environment.mak.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'buildlib') diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index b0a8d9d35..0dff02e69 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -11,7 +11,11 @@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2 CXX = @CXX@ CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations -CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn +CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef +# suggests methods which already have such an attribute +#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn +# gcc reports currently lots of them at the end of file - unknown reason +CXXFLAGS+= -Wno-deprecated-declarations # a bit too pedantic to be run by default #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros NUM_PROCS = @NUM_PROCS@ -- cgit v1.2.3 From 3d8232bf97ce11818fb07813a71136484ea1a44a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 18 Jun 2015 17:33:15 +0200 Subject: fix memory leaks reported by -fsanitize Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore --- buildlib/environment.mak.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'buildlib') diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index 0dff02e69..8ea7a05ba 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -16,6 +16,8 @@ CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-inc #CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn # gcc reports currently lots of them at the end of file - unknown reason CXXFLAGS+= -Wno-deprecated-declarations +# sanitize options to be enabled for testing +#CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr # a bit too pedantic to be run by default #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros NUM_PROCS = @NUM_PROCS@ -- cgit v1.2.3 From b17d75804566ced55109b4b0498b7ed0faad389b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 11 Jul 2015 20:21:45 +0200 Subject: enforce GCC5 C++11 ABI and usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The library(s) make an API break anyhow, so lets ensure we use gcc5 for this break and enable c++11 as standard as gcc6 will use it as default and should provide some API parts for c++11 – beside that it can't hurt to use c++11 itself. We just have to keep our headers c++03 compatible to not enforce a standrd bump in our reverse dependencies. --- buildlib/environment.mak.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'buildlib') diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index 8ea7a05ba..287205181 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -9,7 +9,7 @@ PACKAGE_MAIL = @PACKAGE_MAIL@ CC = @CC@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2 CXX = @CXX@ -CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra +CXXFLAGS+= @CXXFLAGS@ -std=c++11 -Wall -Wextra CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef # suggests methods which already have such an attribute -- cgit v1.2.3 From ae97af1fdf726a0e7e553b2fb5734b6e09a088d0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 10 Aug 2015 11:08:35 +0200 Subject: change to libapt-pkg abi 5.0 with versioned symbols We changed an aweful lot of stuff, so 5.0 is properly better than 4.X as a semantic version and as we are at it lets add some trivial symbol versioning as well: We just mark all exported symbols with the same version for now. This isn't really the proper thing to do as if we add symbols in later versions (with the same abi) they will get the same symbols version, but our .symbols file will protect us from the problems arising from this as it will ensure that a package acutally depends on a version of the abi high enough to include the symbol. --- buildlib/library.mak | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'buildlib') diff --git a/buildlib/library.mak b/buildlib/library.mak index cc0286d7e..03f868116 100644 --- a/buildlib/library.mak +++ b/buildlib/library.mak @@ -21,6 +21,7 @@ $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOU $(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE))))) $(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS)) $(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR) +$(LOCAL)-VERSIONSCRIPT := $(LIB)/lib$(LIBRARY)-$(MAJOR)-$(MINOR).symver $(LOCAL)-SLIBS := $(SLIBS) $(LOCAL)-LIBRARY := $(LIBRARY) @@ -39,7 +40,7 @@ MKDIRS += $(OBJ) $(DEP) $(LIB) $(dir $($(LOCAL)-HEADERS)) # The clean rules .PHONY: clean/$(LOCAL) veryclean/$(LOCAL) clean/$(LOCAL): - -rm -f $($(@F)-OBJS) $($(@F)-DEP) + -rm -f $($(@F)-OBJS) $($(@F)-DEP) $($(@F)-VERSIONSCRIPT) veryclean/$(LOCAL): clean/$(LOCAL) -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so* @@ -50,11 +51,14 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR): $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR) $(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR) ln -sf $( $@ + # The binary build rule -$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS) +$(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS) $(LIBRARYDEPENDS) $($(LOCAL)-VERSIONSCRIPT) -rm -f $(LIB)/lib$($(@F)-LIBRARY)*.so* 2> /dev/null echo Building shared library $@ - $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -Wl,--version-script=$($(@F)-VERSIONSCRIPT) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \ $(filter %.opic,$^) \ $($(@F)-SLIBS) -- cgit v1.2.3 From ad42ed4698c88e04bc242fb579f5b3e6fd9a0ee4 Mon Sep 17 00:00:00 2001 From: Daniel Hartwig Date: Tue, 11 Aug 2015 19:56:31 +0200 Subject: replace direct calls to egrep with grep -E MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rest of the initial patch is not needed or incorrect in our usage. Big changes for the dselect scripts seem unneeded as well as those are hardly used by anyone anymore… [commit message written by commiter] Closes: 255577 Thanks: David Weinehall for initial patch --- buildlib/libversion.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'buildlib') diff --git a/buildlib/libversion.mak b/buildlib/libversion.mak index deb3da377..1b1855be3 100644 --- a/buildlib/libversion.mak +++ b/buildlib/libversion.mak @@ -4,11 +4,11 @@ # with each non-ABI break to the lib, please increase RELEASE. # The versionnumber is extracted from apt-pkg/macros.h - see also there. LIBAPTPKG_MAJOR=$(shell awk -v ORS='.' '/^\#define APT_PKG_M/ {print $$3}' $(BASE)/apt-pkg/contrib/macros.h | sed 's/\.$$//') -LIBAPTPKG_RELEASE=$(shell grep -E '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/contrib/macros.h | cut -d ' ' -f 3) +LIBAPTPKG_RELEASE=$(shell grep '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/contrib/macros.h | cut -d ' ' -f 3) # Version number of libapt-inst # Please increase MAJOR with each ABI break, # with each non-ABI break to the lib, please increase MINOR. # The versionnumber is extracted from apt-inst/makefile - see also there. -LIBAPTINST_MAJOR=$(shell egrep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) -LIBAPTINST_MINOR=$(shell egrep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) +LIBAPTINST_MAJOR=$(shell grep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) +LIBAPTINST_MINOR=$(shell grep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) -- cgit v1.2.3 From 5a3264396f9b167fa99fb6e375ae8b978d829a39 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 24 Sep 2014 22:18:16 +0200 Subject: Use setresuid() and setresgid() where available --- buildlib/config.h.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'buildlib') diff --git a/buildlib/config.h.in b/buildlib/config.h.in index 66ab33c2b..c6b1ee669 100644 --- a/buildlib/config.h.in +++ b/buildlib/config.h.in @@ -28,9 +28,11 @@ /* If there is no socklen_t, define this for the netdb shim */ #undef NEED_SOCKLEN_T_DEFINE -/* We need the getresuid() function */ +/* Check for getresuid() function and similar ones */ #undef HAVE_GETRESUID #undef HAVE_GETRESGID +#undef HAVE_SETRESUID +#undef HAVE_SETRESGID /* Define to the size of the filesize containing structures */ #undef _FILE_OFFSET_BITS -- cgit v1.2.3