Update patches for 1.2.11: clfags, gcc5 dropped

Update the patches. The following patches were merged upstream:
* debian-cflags.patch
* gcc5.patch

The following patches had to be adjusted to the new build system:
* remove_dahdi_speed
* zaptel_perl
This commit is contained in:
Tzafrir Cohen 2016-06-26 11:45:01 +02:00
parent d36171a88f
commit 08e710ef27
5 changed files with 45 additions and 88 deletions

View File

@ -1,31 +0,0 @@
From: Tzafrir Cohen <tzafrir@debian.org>
Subject: Get hardening flags to some dahdi tools
--- a/Makefile
+++ b/Makefile
@@ -153,6 +153,7 @@ version.c: FORCE
tests: $(TEST_BINS)
$(UTILS): %: %.o
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
$(UTILS): version.o
@@ -163,7 +164,7 @@ $(UTILS): version.o
$(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
%: %.o
- $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
prereq: config.status
@@ -177,7 +178,7 @@ $(LTZ_A): $(LTZ_A_OBJS)
ranlib $@
$(LTZ_SO): $(LTZ_SO_OBJS)
- $(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
dahdi_cfg: $(LTZ_A)
dahdi_cfg: LIBS+=-lm -lpthread

View File

@ -1,33 +0,0 @@
From 5db44e215090e7d61602e206a09a4af394b022cb Mon Sep 17 00:00:00 2001
From: Russ Meyerriecks <rmeyerriecks@digium.com>
Date: Wed, 17 Jun 2015 11:36:16 -0500
Subject: [PATCH] xpp: Fix a logical not being applied to the wrong operand
gcc 5 found this with the new -Werror=logical-not-parenthesis warning. Since we
have -Wall by default, it would also fail the compile.
Internal-Issue-ID: DAHLIN-347
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
(cherry picked from commit 9a181ccfbcfa846aab20bd1dcbea8f83356e2705)
---
xpp/mpptalk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xpp/mpptalk.c b/xpp/mpptalk.c
index e49c3cd..9bab867 100644
--- a/xpp/mpptalk.c
+++ b/xpp/mpptalk.c
@@ -512,7 +512,7 @@ int mpp_send_seg(struct astribank_device *astribank, const uint8_t *data, uint16
assert(astribank != NULL);
xtalk_dev = astribank->xtalk_dev;
- if(!astribank->burn_state == BURN_STATE_STARTED) {
+ if(astribank->burn_state != BURN_STATE_STARTED) {
ERR("Tried to send a segment while burn_state=%d\n",
astribank->burn_state);
return -EINVAL;
--
2.1.4

View File

@ -3,14 +3,20 @@ Description: Remove the useless utility dahdi_speed
It was useful long ago, but pointless now.
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,7 @@ UTILS += patgen pattest patlooptest hdl
hdlcverify timertest dahdi_maint
diff --git a/Makefile.am b/Makefile.am
index d43ce91..09e4f12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,11 +35,11 @@ sbin_PROGRAMS = \
dahdi_maint \
dahdi_monitor \
dahdi_cfg \
- dahdi_speed \
dahdi_scan \
fxotune
-BINS:=fxotune dahdi_cfg dahdi_monitor dahdi_speed dahdi_test dahdi_scan dahdi_maint
+BINS:=fxotune dahdi_cfg dahdi_monitor dahdi_test dahdi_scan dahdi_maint
ifeq (1,$(PBX_NEWT))
BINS += dahdi_tool
endif
noinst_PROGRAMS = \
+ dahdi_speed \
fxstest \
patgen \
pattest \

View File

@ -2,5 +2,3 @@ zaptel_perl
echocan_oslec
init_unload_oslec
remove_dahdi_speed
debian-cflags.patch
gcc5.patch

41
debian/patches/zaptel_perl vendored Executable file → Normal file
View File

@ -2,21 +2,38 @@ Subject: Set perl installation path to vendorlib
Author: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Forwarded: no
Point Zaptel PERL modules to the right directory under which to install
Point DAHDI PERL modules to the right directory under which to install
perl modules.
(sitelib in Debian is under /usr/local. We don't want to install there)
Debian-specific configuration.
--- a/xpp/Makefile
+++ b/xpp/Makefile
@@ -30,7 +30,7 @@ SBINDIR = $(prefix)/sbin
DATADIR = $(datadir)/dahdi
MANDIR = $(mandir)/man8
HOTPLUG_USB_DIR = $(sysconfdir)/hotplug/usb
-PERLLIBDIR := $(shell eval `perl -V:sitelib`; echo "$$sitelib")
+PERLLIBDIR := $(shell eval `perl -V:vendorlib`; echo "$$vendorlib")
PERL_DIRS := $(shell cd perl_modules; find * -name '[A-Z]*' -type d| xargs)
PERL_MODS_PAT := *.pm $(PERL_DIRS:%=%/*.pm)
PERL_MODS := $(shell cd perl_modules; echo $(PERL_MODS_PAT))
--- a/configure.ac
+++ b/configure.ac
@@ -120,20 +120,22 @@ fi
# - The "$datadir/perl5" directory otherwise (e.g: during "make distcheck")
#
AC_MSG_CHECKING(for perl libdir)
+set -x
m4_define([_PERL_LIBDIR_DEFAULT], [${datadir}/perl5])dnl
AC_ARG_WITH(perllib,
[AS_HELP_STRING([--with-perllib=PATH],
- [Location of perl modules @<:@default=]_PERL_LIBDIR_DEFAULT[, or perl -V:sitelib@:>@])],
+ [Location of perl modules @<:@default=]_PERL_LIBDIR_DEFAULT[, or perl -V:vendorlib@:>@])],
[perllibdir=$withval],
[
if test "$prefix" = 'NONE' -o "$prefix" = '/usr'; then
- eval `"$PERL" -V:sitelib`
- perllibdir="$sitelib"
+ eval `"$PERL" -V:vendorlib`
+ perllibdir="$vendorlib"
else
perllibdir='_PERL_LIBDIR_DEFAULT'
fi
]
)
+set +x
AC_SUBST([perllibdir], "$perllibdir")
AC_MSG_RESULT([$perllibdir])
AM_CONDITIONAL([PERL], [test "$perllibdir" != ''])