This commit is contained in:
Jiri Popelka 2014-09-01 10:19:28 +02:00
parent 519215e08c
commit 05114adeb2
6 changed files with 10 additions and 171 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/kea-0.9-beta1.tar.gz
/kea-0.9.tar.gz

View File

@ -1,27 +0,0 @@
From 6074b8696f4196fc0a88994ff9f210f54ae4cebf Mon Sep 17 00:00:00 2001
From: Jiri Popelka <jpopelka@redhat.com>
Date: Mon, 18 Aug 2014 12:30:24 +0200
Subject: [PATCH] configure.ac: AC_PROG_LIBTOOL is deprecated in favor of
LT_INIT
http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f0dbc4f..43d7b29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,7 +79,7 @@ CFLAGS_SAVED=$CFLAGS
CXXFLAGS_SAVED=$CXXFLAGS
CFLAGS="$CFLAGS $CXX_LIBTOOL_LDFLAGS"
CXXFLAGS="$CXXFLAGS $CXX_LIBTOOL_LDFLAGS"
-AC_PROG_LIBTOOL
+LT_INIT
CFLAGS=$CFLAGS_SAVED
CXXFLAGS=$CXXFLAGS_SAVED
--
1.9.3

View File

@ -1,64 +0,0 @@
From c278765bba1b6db3b3d0b82839b7f8e6813add1c Mon Sep 17 00:00:00 2001
From: Jiri Popelka <jpopelka@redhat.com>
Date: Thu, 21 Aug 2014 18:37:26 +0200
Subject: [PATCH] Fix building of PgSqlLeaseMgr on i686
pgsql_lease_mgr.cc: In member function 'isc::dhcp::Lease4Ptr isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(PGresult*&, int)':
pgsql_lease_mgr.cc:667:68: error: no matching function for call to 'isc::dhcp::PgSqlLease4Exchange::convertFromBytea(PGresult*&, int&, const size_t&, uint8_t [20], unsigned int, long unsigned int&)'
sizeof(hwaddr_buffer_), hwaddr_length_);
^
pgsql_lease_mgr.cc:667:68: note: candidate is:
pgsql_lease_mgr.cc:476:10: note: void isc::dhcp::PgSqlLeaseExchange::convertFromBytea(PGresult*&, int, size_t, uint8_t*, size_t, size_t&)
void convertFromBytea(PGresult*& r, const int row, const size_t col,
^
pgsql_lease_mgr.cc:476:10: note: no known conversion for argument 6 from 'long unsigned int' to 'size_t& {aka unsigned int&}'
pgsql_lease_mgr.cc:670:74: error: no matching function for call to 'isc::dhcp::PgSqlLease4Exchange::convertFromBytea(PGresult*&, int&, const size_t&, uint8_t [128], unsigned int, long unsigned int&)'
sizeof(client_id_buffer_), client_id_length_);
^
pgsql_lease_mgr.cc:670:74: note: candidate is:
pgsql_lease_mgr.cc:476:10: note: void isc::dhcp::PgSqlLeaseExchange::convertFromBytea(PGresult*&, int, size_t, uint8_t*, size_t, size_t&)
void convertFromBytea(PGresult*& r, const int row, const size_t col,
^
pgsql_lease_mgr.cc:476:10: note: no known conversion for argument 6 from 'long unsigned int' to 'size_t& {aka unsigned int&}'
pgsql_lease_mgr.cc: In member function 'isc::dhcp::Lease6Ptr isc::dhcp::PgSqlLease6Exchange::convertFromDatabase(PGresult*&, int)':
pgsql_lease_mgr.cc:843:64: error: no matching function for call to 'isc::dhcp::PgSqlLease6Exchange::convertFromBytea(PGresult*&, int&, const int&, uint8_t [128], unsigned int, long unsigned int&)'
sizeof(duid_buffer_), duid_length_);
^
pgsql_lease_mgr.cc:843:64: note: candidate is:
pgsql_lease_mgr.cc:476:10: note: void isc::dhcp::PgSqlLeaseExchange::convertFromBytea(PGresult*&, int, size_t, uint8_t*, size_t, size_t&)
void convertFromBytea(PGresult*& r, const int row, const size_t col,
^
pgsql_lease_mgr.cc:476:10: note: no known conversion for argument 6 from 'long unsigned int' to 'size_t& {aka unsigned int&}'
---
src/lib/dhcpsrv/pgsql_lease_mgr.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/dhcpsrv/pgsql_lease_mgr.cc b/src/lib/dhcpsrv/pgsql_lease_mgr.cc
index 430783c..6a060f0 100644
--- a/src/lib/dhcpsrv/pgsql_lease_mgr.cc
+++ b/src/lib/dhcpsrv/pgsql_lease_mgr.cc
@@ -703,10 +703,10 @@ private:
/// @Brief Lease4 specific members used for binding and conversion.
uint32_t addr4_;
- unsigned long hwaddr_length_;
+ size_t hwaddr_length_;
std::vector<uint8_t> hwaddr_;
uint8_t hwaddr_buffer_[HWAddr::MAX_HWADDR_LEN];
- unsigned long client_id_length_;
+ size_t client_id_length_;
uint8_t client_id_buffer_[ClientId::MAX_CLIENT_ID_LEN];
};
@@ -907,7 +907,7 @@ private:
/// @brief Lease6 specific members for binding and conversion.
//@{
- unsigned long duid_length_;
+ size_t duid_length_;
vector<uint8_t> duid_;
uint8_t duid_buffer_[DUID::MAX_DUID_LEN];
uint32_t iaid_;
--
1.9.3

View File

@ -1,65 +0,0 @@
From df9dd617ad22c15bf80f6e651a977388b86674a6 Mon Sep 17 00:00:00 2001
From: Jiri Popelka <jpopelka@redhat.com>
Date: Mon, 18 Aug 2014 14:05:02 +0200
Subject: [PATCH] lib/util/encode/binary_from_base*.h: fix narrowing conversion
build log (arch=armv7):
/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -I../../../src/lib/util -I../../../src/lib/util -I../../../src/lib/exceptions -I../../../src/lib/exceptions -DOS_LINUX -I../../../ext/asio -I../../../ext/coroutine -DASIO_DISABLE_THREADS=1 -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -Werror -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -c -o base_n.lo ./encode/base_n.cc
In file included from encode/base_n.cc:16:0:
../../../src/lib/util/encode/binary_from_base32hex.h: In instantiation of 'CharType boost::archive::iterators::detail::to_5_bit<CharType>::operator()(CharType) const [with CharType = char]':
/usr/include/boost/iterator/transform_iterator.hpp:121:31: required from 'typename boost::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type::reference boost::transform_iterator<UnaryFunction, Iterator, Reference, Value>::dereference() const [with UnaryFunc = boost::archive::iterators::detail::to_5_bit<char>; Iterator = isc::util::encode::{anonymous}::DecodeNormalizer; Reference = boost::use_default; Value = boost::use_default; typename boost::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type::reference = char]'
encode/base_n.cc:376:9: required from 'static void isc::util::encode::{anonymous}::BaseNTransformer<BitsPerChunk, BaseZeroCode, Encoder, Decoder>::decode(const char*, const string&, std::vector<unsigned char>&) [with int BitsPerChunk = 5; char BaseZeroCode = '0'; Encoder = boost::archive::iterators::base32hex_from_binary<boost::archive::iterators::transform_width<isc::util::encode::{anonymous}::EncodeNormalizer, 5, 8> >; Decoder = boost::archive::iterators::transform_width<boost::archive::iterators::binary_from_base32hex<isc::util::encode::{anonymous}::DecodeNormalizer>, 8, 5>; std::string = std::basic_string<char>]'
encode/base_n.cc:463:27: required from here
../../../src/lib/util/encode/binary_from_base32hex.h:50:9: error: narrowing conversion of '-1' from 'int' to 'const char' inside { } is ill-formed in C++11 [-Werror=narrowing]
encode/base_n.cc:473:24: required from here
../../../src/lib/util/encode/binary_from_base16.h:47:9: error: narrowing conversion of '-1' from 'int' to 'const char' inside { } is ill-formed in C++11 [-Werror=narrowing]
name.cc:74:1: error: narrowing conversion of '-1' from 'int' to 'const char' inside { } is ill-formed in C++11 [-Werror=narrowing]
---
src/lib/dns/name.cc | 2 +-
src/lib/util/encode/binary_from_base16.h | 2 +-
src/lib/util/encode/binary_from_base32hex.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc
index ff00374..7d34a09 100644
--- a/src/lib/dns/name.cc
+++ b/src/lib/dns/name.cc
@@ -54,7 +54,7 @@ namespace {
/// improve the performance of message rendering (which internally uses the
/// array heavily) about 27%. Since we want to achieve very good performance
/// for message rendering in some cases, we'll keep using it.
-const char digitvalue[256] = {
+const signed char digitvalue[256] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 16
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 32
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 48
diff --git a/src/lib/util/encode/binary_from_base16.h b/src/lib/util/encode/binary_from_base16.h
index e9fdd27..307842a 100644
--- a/src/lib/util/encode/binary_from_base16.h
+++ b/src/lib/util/encode/binary_from_base16.h
@@ -36,7 +36,7 @@ template<class CharType>
struct to_4_bit {
typedef CharType result_type;
CharType operator()(CharType t) const{
- const char lookup_table[] = {
+ const signed char lookup_table[] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 00-0f
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 10-1f
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 20-2f
diff --git a/src/lib/util/encode/binary_from_base32hex.h b/src/lib/util/encode/binary_from_base32hex.h
index 43b7d64..457fa3c 100644
--- a/src/lib/util/encode/binary_from_base32hex.h
+++ b/src/lib/util/encode/binary_from_base32hex.h
@@ -38,7 +38,7 @@ template<class CharType>
struct to_5_bit {
typedef CharType result_type;
CharType operator()(CharType t) const{
- const char lookup_table[] = {
+ const signed char lookup_table[] = {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 00-0f
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 10-1f
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, // 20-2f
--
1.9.3

View File

@ -4,25 +4,19 @@
%global prever beta1
#%%global VERSION %{version}-%{patchver}
#%%global VERSION %{version}
%global VERSION %{version}-%{prever}
#%%global VERSION %{version}-%{prever}
%global VERSION %{version}
Summary: DHCPv4, DHCPv6 and DDNS server from ISC
Name: kea
Version: 0.9
Release: 0.5.%{prever}%{?dist}
Release: 1%{?dist}
License: ISC and Boost
URL: http://kea.isc.org
Source0: http://ftp.isc.org/isc/kea/%{VERSION}/kea-%{VERSION}.tar.gz
# http://kea.isc.org/ticket/3532
Patch0: kea-PgSqlLeaseMgr.patch
# http://kea.isc.org/ticket/3525
Patch1: kea-LT_INIT.patch
# http://kea.isc.org/ticket/3526
Patch2: kea-narrowing.patch
# http://kea.isc.org/ticket/3529
Patch3: kea-systemd.patch
Patch0: kea-systemd.patch
# autoreconf
BuildRequires: autoconf automake libtool
@ -75,10 +69,7 @@ Header files and API documentation.
%prep
%setup -q -n kea-%{VERSION}
%patch0 -p1 -b .i686
%patch1 -p1 -b .LT
%patch2 -p1 -b .narrowing
%patch3 -p1 -b .systemd
%patch0 -p1 -b .systemd
%build
autoreconf --verbose --force --install
@ -206,6 +197,9 @@ install -p -m 644 ext/LICENSE_1_0.txt %{buildroot}%{_defaultdocdir}/kea/
%{_libdir}/pkgconfig/dns++.pc
%changelog
* Mon Sep 01 2014 Jiri Popelka <jpopelka@redhat.com> - 0.9-1
- 0.9
* Thu Aug 21 2014 Jiri Popelka <jpopelka@redhat.com> - 0.9-0.5.beta1
- fix building with PostgreSQL on i686
- redefine localstatedir to sharedstatedir (kea#3523)

View File

@ -1 +1 @@
e31a24d75b941b5350673d29e664bd14 kea-0.9-beta1.tar.gz
75ffbbe457adf9f81f480f85ad3202f6 kea-0.9.tar.gz