diff options
| author | Philippe Makowski <philippe.makowski@rtech.fr> | 2016-02-28 13:58:44 +0100 |
|---|---|---|
| committer | Philippe Makowski <philippe.makowski@rtech.fr> | 2016-02-28 13:58:44 +0100 |
| commit | fa714383a8835a4893d9dda71316db7d40903bb7 (patch) | |
| tree | d2cc57236c5e71756bef48f691b5f3dfbd121ffe | |
| parent | 7b1917d04f24abe389f233cdd9ff8372bd4de373 (diff) | |
| download | firebird3-fa714383a8835a4893d9dda71316db7d40903bb7.tar.gz firebird3-fa714383a8835a4893d9dda71316db7d40903bb7.tar.xz firebird3-fa714383a8835a4893d9dda71316db7d40903bb7.zip | |
fix build with Debian patches
| -rw-r--r-- | cloop-honour-build-flags.patch | 27 | ||||
| -rw-r--r-- | firebird.spec | 22 | ||||
| -rw-r--r-- | honour-buildflags.patch | 30 | ||||
| -rw-r--r-- | no-copy-from-icu.patch | 52 | ||||
| -rw-r--r-- | obsolete-syslogd.target.patch | 14 | ||||
| -rw-r--r-- | parallel-build.patch | 169 |
6 files changed, 309 insertions, 5 deletions
diff --git a/cloop-honour-build-flags.patch b/cloop-honour-build-flags.patch new file mode 100644 index 0000000..1f556e0 --- /dev/null +++ b/cloop-honour-build-flags.patch @@ -0,0 +1,27 @@ +Description: make cloop build honor compiler/linker flags from the environment +Author: Damyan Ivanov <dmn@debian.org> +Forwarded: no + +--- a/extern/cloop/Makefile ++++ b/extern/cloop/Makefile +@@ -6,7 +6,7 @@ TARGET := release + + CC := gcc + CXX := g++ +-LD := $(CXX) ++LD := $(CXX) $(LDFLAGS) + + SRC_DIR := src + BUILD_DIR := build +@@ -27,8 +27,9 @@ SRCS_CPP := $(foreach sdir,$(SRC_DIRS),$ + OBJS_C := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRCS_C)) + OBJS_CPP := $(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(SRCS_CPP)) + +-C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter +-CXX_FLAGS := $(C_FLAGS) ++COMMON_C_FLAGS := -ggdb -fPIC -MMD -MP -W -Wall -Wno-unused-parameter ++C_FLAGS := $(COMMON_C_FLAGS) $(CFLAGS) $(CPPFLAGS) ++CXX_FLAGS := $(COMMON_C_FLAGS) $(CXXFLAGS) $(CPPFLAGS) + FPC_FLAGS := -Mdelphi + + ifeq ($(TARGET),release) diff --git a/firebird.spec b/firebird.spec index 37b5cac..477b371 100644 --- a/firebird.spec +++ b/firebird.spec @@ -5,19 +5,24 @@ Summary: SQL relational database management system Name: firebird Version: 3.0 -Release: 1.20160226git6127d1e8%{?dist} +Release: 1.20160228git92718125%{?dist} Group: Applications/Databases License: Interbase URL: http://www.firebirdsql.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot -Source0: firebird-6127d1e8.tar.gz +Source0: firebird-92718125.tar.gz # from OpenSuse Patch101: allow-creating-buildRoot-as-non-root-user.patch Patch102: add-pkgconfig-files.patch -# from Debian +# from Debian to be sent upstream +Patch201: obsolete-syslogd.target.patch +Patch202: honour-buildflags.patch +Patch203: no-copy-from-icu.patch +Patch204: parallel-build.patch +Patch205: cloop-honour-build-flags.patch # from upstream @@ -34,6 +39,7 @@ BuildRequires: libstdc++-static BuildRequires: systemd-units BuildRequires: chrpath BuildRequires: zlib-devel +BuildRequires: procmail Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -113,6 +119,12 @@ in production systems, under a variety of names, since 1981. %setup -q -n %{name} %patch101 -p1 %patch102 -p1 +%patch201 -p1 +%patch202 -p1 +%patch203 -p1 +%patch204 -p1 +%patch205 -p1 + %build NOCONFIGURE=1 ./autogen.sh @@ -211,8 +223,8 @@ rm -Rf %{buildroot} %changelog -* Fri Feb 26 2016 Philippe Makowski <makowski@fedoraproject.org> - 3.0-1.20160226git6127d1e8 -- Update to git: 6127d1e8 +* Sun Feb 28 2016 Philippe Makowski <makowski@fedoraproject.org> - 3.0-1.20160228git92718125 +- Update to git: 92718125 * Wed Feb 24 2016 Philippe Makowski <makowski@fedoraproject.org> - - first version for Epel7 diff --git a/honour-buildflags.patch b/honour-buildflags.patch new file mode 100644 index 0000000..5333742 --- /dev/null +++ b/honour-buildflags.patch @@ -0,0 +1,30 @@ +Description: improved support for build flags + The first change makes linking makeHeader use the same CPP/CXX/LD flags as the + rest of the sources. + The second change stops btyacc/Makefile from ignoring CFLAGS from the + environment. + Both changes help compile/link with default hardening flags. +Author: Damyan Ivanov <dmn@debian.org> + +--- a/builds/posix/Makefile.in ++++ b/builds/posix/Makefile.in +@@ -572,7 +572,7 @@ MAKE_HEADER_Src = $(addprefix $(SRC_ROOT + MAKE_HEADER_Bin = ./makeHeader + + $(INCLUDE_DEST)/ibase.h: $(SRC_IBASE_ExtraFiles) +- $(STATICEXE_LINK) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src) ++ $(STATICEXE_LINK) $(EXE_LINK_OPTIONS) $(LINK_OPTS) $(CPPFLAGS) -o $(MAKE_HEADER_Bin) $(MAKE_HEADER_Src) + $(CP) $^ . + $(MAKE_HEADER_Bin) <ibase.h >$@ + $(RM) -f ibase.h +--- a/extern/btyacc/Makefile ++++ b/extern/btyacc/Makefile +@@ -12,7 +12,7 @@ HDRS = defs.h mstring.h + # across all of our supported compilers/platforms. + + # Vanilla CFLAGS +-CFLAGS= ++CFLAGS?= + + # No LDFLAGS + #LDFLAGS= diff --git a/no-copy-from-icu.patch b/no-copy-from-icu.patch new file mode 100644 index 0000000..2155d2d --- /dev/null +++ b/no-copy-from-icu.patch @@ -0,0 +1,52 @@ +Description: Link isql with ICU instead of embedding part of it in the source +Author: Damyan Ivanov <dmn@debian.org> + +--- a/src/isql/isql.epp ++++ b/src/isql/isql.epp +@@ -173,34 +173,6 @@ const char* UNKNOWN = "*unknown*"; + + namespace IcuUtil + { +- // Duplicate from ICU to not need to link ISQL with it. It's used by U8_NEXT_UNSAFE. +- static const uint8_t utf8_countTrailBytes[256] = { +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +- +- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 3, 3, 3, 3, 3, +- 3, 3, 3, /* illegal in Unicode */ +- 4, 4, 4, 4, /* illegal in Unicode */ +- 5, 5, /* illegal in Unicode */ +- 0, 0 /* illegal bytes 0xfe and 0xff */ +- }; +- + // Return the number of characters of a string. + static unsigned charLength(SSHORT charset, unsigned len, const char* str) + { +--- a/builds/posix/Makefile.in ++++ b/builds/posix/Makefile.in +@@ -425,7 +425,8 @@ $(GSTAT): $(GSTAT_Objects) $(COMMON_LIB + isql: $(ISQL) + + $(ISQL): $(ISQL_Objects) $(COMMON_LIB) +- $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LIBEDITLINE) $(LINK_LIBS) ++ $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) \ ++ $(LIBEDITLINE) $(LINK_LIBS) $(ICU_LIBS) + + nbackup: $(NBACKUP) + diff --git a/obsolete-syslogd.target.patch b/obsolete-syslogd.target.patch new file mode 100644 index 0000000..a08276c --- /dev/null +++ b/obsolete-syslogd.target.patch @@ -0,0 +1,14 @@ +Description: remove reference to obsolete syslog.target + Syslog is socket-activated, so no need to declare a dependency on it +Author: Damyan Ivanov <dmn@debian.org> + +--- a/builds/install/arch-specific/linux/firebird-superserver.service.in ++++ b/builds/install/arch-specific/linux/firebird-superserver.service.in +@@ -1,6 +1,6 @@ + [Unit] + Description=Firebird Database Server ( SuperServer ) +-After=syslog.target network.target ++After=network.target + Conflicts=firebird-classic.socket + + [Service] diff --git a/parallel-build.patch b/parallel-build.patch new file mode 100644 index 0000000..d6fa42d --- /dev/null +++ b/parallel-build.patch @@ -0,0 +1,169 @@ +Description: allow building with make -jN + without this there are sporadic segmentation faults + . + it seems that when gpre opens a database, it clashes with other gpre + processes that have the database open. perhaps this is because at + this stage of the build the compiled firebird engine lacks ability for + synchronisation. So, wrap all engine-using calls with a lock file +Author: Damyan Ivanov <dmn@debian.org> +Forwarded: no + +--- a/builds/posix/Makefile.in ++++ b/builds/posix/Makefile.in +@@ -300,8 +300,8 @@ yachts.lnk: metadata.fdb + + metadata.fdb: $(RUN_ISQL) $(SRC_ROOT)/dbs/metadata.sql + -$(RM) $@ +- $(RUN_ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql +- $(RUN_GFIX) -mode read_only $@ ++ $(call LOCK_RUN,$(RUN_ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql) ++ $(call LOCK_RUN,$(RUN_GFIX) -mode read_only $@) + $(CHMOD) 0444 $@ + + $(HELP_FDB): help.fdb +@@ -310,7 +310,7 @@ $(HELP_FDB): help.fdb + $(CHMOD) 0444 $@ + + help.fdb: $(BLD_ROOT)/misc/help.gbak +- $(RUN_GBAK) -MODE read_only -R $< $@ ++ $(call LOCK_RUN,$(RUN_GBAK) -MODE read_only -R $< $@) + $(CHMOD) 0444 $@ + + $(SECURITY_FDB): security.fdb +@@ -320,18 +320,18 @@ $(SECURITY_FDB): security.fdb + security.fdb: $(SRC_ROOT)/dbs/security.sql + -$(RM) $@ + -$(RM) $(SECURITY_TMP) +- echo create database \'$(SECURITY_TMP)\'\; | $(RUN_ISQL) +- $(RUN_GFIX) -write async $(SECURITY_TMP) +- $(RUN_ISQL) -i $^ $(SECURITY_TMP) ++ $(call LOCK_RUN,echo create database \'$(SECURITY_TMP)\'\; | $(RUN_ISQL)) ++ $(call LOCK_RUN,$(RUN_GFIX) -write async $(SECURITY_TMP)) ++ $(call LOCK_RUN,$(RUN_ISQL) -i $^ $(SECURITY_TMP)) + $(CHMOD) a=rw $(SECURITY_TMP) + $(CP) $(SECURITY_TMP) $@ +- $(RUN_GFIX) -write sync $@ ++ $(call LOCK_RUN,$(RUN_GFIX) -write sync $@) + + msg.timestamp: $(MSG_FILES) + -$(RM) msg.fdb +- echo create database \'msg.fdb\'\; | $(RUN_ISQL) +- $(RUN_GFIX) -write async msg.fdb +- for sql in $(MSG_FILES); do (echo $$sql; $(RUN_ISQL) -i $$sql msg.fdb) || exit; done ++ $(call LOCK_RUN,echo create database \'msg.fdb\'\; | $(RUN_ISQL)) ++ $(call LOCK_RUN,$(RUN_GFIX) -write async msg.fdb) ++ $(call LOCK_RUN,for sql in $(MSG_FILES); do (echo $$sql; $(RUN_ISQL) -i $$sql msg.fdb) || exit; done) + $(TOUCH) $@ + + +@@ -499,7 +499,7 @@ codes: gen_codes + ids: $(IDS) + + gen_codes: $(CODES) msg.timestamp +- $(CODES) $(SRC_ROOT)/include/gen $(LNG_ROOT) ++ $(call LOCK_RUN,$(CODES) $(SRC_ROOT)/include/gen $(LNG_ROOT)) + + $(CODES): $(CODES_Objects) $(COMMON_LIB) + $(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) +@@ -535,7 +535,7 @@ examples: include_generic + message_file: $(FIREBIRD_MSG) + + $(FIREBIRD_MSG): $(BUILD_FILE) msg.timestamp +- $(BUILD_FILE) -d msg.fdb -f $@ ++ $(call LOCK_RUN,$(BUILD_FILE) -d msg.fdb -f $@) + $(CHMOD_6) $@ + + $(BUILD_FILE): $(BUILD_Objects) $(COMMON_LIB) +--- a/builds/posix/make.defaults ++++ b/builds/posix/make.defaults +@@ -371,6 +371,7 @@ GPRE_BOOT = $(RBIN)/gpre_boot$(EXE + GPRE = $(BIN)/gpre$(EXEC_EXT) + RUN_GPRE = $(RBIN)/gpre$(EXEC_EXT) + GPRE_CURRENT = $(RBIN)/gpre_current$(EXEC_EXT) ++LOCK_RUN = sh -x -c "lockfile -1 $(BIN)/build-db.lock && $(subst $$,\$$,$(1)); res=\$$?; rm -f $(BIN)/build-db.lock; exit \$$res" + + + # From msgs +--- a/builds/posix/make.rules ++++ b/builds/posix/make.rules +@@ -68,17 +68,17 @@ ISQL_GPRE_FLAGS = -m -z -n -ocxx + .SUFFIXES: .c .e .epp .cpp + + .e.c: +- $(GPRE_CURRENT) $(GPRE_FLAGS) $< $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(GPRE_FLAGS) $< $@) + + + $(OBJ)/jrd/%.cpp: $(SRC_ROOT)/jrd/%.epp +- $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $(firstword $<) $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $(firstword $<) $@) + + $(OBJ)/isql/%.cpp: $(SRC_ROOT)/isql/%.epp +- $(GPRE_CURRENT) $(ISQL_GPRE_FLAGS) $< $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(ISQL_GPRE_FLAGS) $< $@) + + $(OBJ)/%.cpp: $(SRC_ROOT)/%.epp +- $(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(GPRE_FLAGS) $(firstword $<) $@) + + + .SUFFIXES: .lo .o .cpp .c +--- a/builds/posix/make.shared.targets ++++ b/builds/posix/make.shared.targets +@@ -65,13 +65,13 @@ $(OBJ)/dsql/Parser.o $(OBJ)/yvalve/keywo + + # Special cases for building cpp from epp + $(OBJ)/dsql/metd.cpp: $(SRC_ROOT)/dsql/metd.epp +- $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@) + + $(OBJ)/dsql/DdlNodes.cpp: $(SRC_ROOT)/dsql/DdlNodes.epp +- $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@) + + $(OBJ)/dsql/PackageNodes.cpp: $(SRC_ROOT)/dsql/PackageNodes.epp +- $(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@ ++ $(call LOCK_RUN,$(GPRE_CURRENT) $(JRD_GPRE_FLAGS) $< $@) + + # Adding resources as prerequisite for some files + +--- a/builds/posix/Makefile.in.examples ++++ b/builds/posix/Makefile.in.examples +@@ -123,8 +123,8 @@ $(EXAMPLES_DEST)% : $(EXAMPLES_SRC)% + + $(EMPLOYEE_DB): $(EXAMPLES_DEST)/empbuild$(EXEC_EXT) $(INPUT_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT) + -$(RM) $(EMPLOYEE_DB) +- ./empbuild $(EMPLOYEE_DB) +- $(GFIX) -write sync $(EMPLOYEE_DB) ++ $(call LOCK_RUN,./empbuild $(EMPLOYEE_DB)) ++ $(call LOCK_RUN,$(GFIX) -write sync $(EMPLOYEE_DB)) + -$(CHMOD_6) $(EMPLOYEE_DB) + + # To get past the fact isql is called from the programs, we create a local link in this directory +@@ -140,7 +140,7 @@ $(EXAMPLES_DEST)/empbuild.c: $(EXAMPLES_ + + $(EXAMPLES_DEST)/empbuild.fdb : $(EXAMPLES_DEST)/empddl.sql $(EXAMPLES_DEST)/empbld.sql $(EXAMPLES_DEST)/isql$(EXEC_EXT) + -$(RM) $(EXAMPLES_DEST)/empbuild.fdb +- $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i empbld.sql ++ $(call LOCK_RUN,$(EXAMPLES_DEST)/isql$(EXEC_EXT) -i empbld.sql) + + # The chain for intlemp.fdb is the same a script file to create an empty database + # to allow a .e program to be compiled, to then create and populate with data +@@ -148,7 +148,7 @@ $(EXAMPLES_DEST)/empbuild.fdb : $(EXAMPL + + $(EXAMPLES_DEST)/intlemp.fdb: $(EXAMPLES_DEST)/intlbld$(EXEC_EXT) $(INTL_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT) + -$(RM) intlemp.fdb +- ./intlbld intlemp.fdb ++ $(call LOCK_RUN,./intlbld intlemp.fdb) + -$(CHMOD_6) intlemp.fdb + + $(EXAMPLES_DEST)/intlbld$(EXEC_EXT): $(INTLBLD_Objects) $(COMMON_LIB) +@@ -158,7 +158,7 @@ $(EXAMPLES_DEST)/intlbld.c: $(EXAMPLES_D + + $(EXAMPLES_DEST)/intlbuild.fdb : $(EXAMPLES_DEST)/intlddl.sql $(EXAMPLES_DEST)/intlbld.sql $(EXAMPLES_DEST)/isql$(EXEC_EXT) + -$(RM) intlbuild.fdb +- $(EXAMPLES_DEST)/isql$(EXEC_EXT) -i intlbld.sql ++ $(call LOCK_RUN,$(EXAMPLES_DEST)/isql$(EXEC_EXT) -i intlbld.sql) + + + $(EXAMPLES_DEST)/%.sql: $(EXAMPLES_SRC)/empbuild/%.sql |
