[kea] fix building with PostgreSQL on i686
Jiří Popelka
jpopelka at fedoraproject.org
Thu Aug 21 17:14:37 UTC 2014
commit 519215e08ce78b22eaa353136bc2b0b56ca013cf
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Thu Aug 21 19:14:17 2014 +0200
fix building with PostgreSQL on i686
kea-PgSqlLeaseMgr.patch | 64 +++++++++++++++++++++++++++++++++++++++++++++++
kea-data-dir.patch | 53 --------------------------------------
kea.spec | 15 +++++++---
3 files changed, 74 insertions(+), 58 deletions(-)
---
diff --git a/kea-PgSqlLeaseMgr.patch b/kea-PgSqlLeaseMgr.patch
new file mode 100644
index 0000000..f55e743
--- /dev/null
+++ b/kea-PgSqlLeaseMgr.patch
@@ -0,0 +1,64 @@
+From c278765bba1b6db3b3d0b82839b7f8e6813add1c Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka at 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
+
diff --git a/kea.spec b/kea.spec
index e1bdc2a..0261462 100644
--- a/kea.spec
+++ b/kea.spec
@@ -10,13 +10,13 @@
Summary: DHCPv4, DHCPv6 and DDNS server from ISC
Name: kea
Version: 0.9
-Release: 0.4.%{prever}%{?dist}
+Release: 0.5.%{prever}%{?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/3523
-Patch0: kea-data-dir.patch
+# 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
@@ -75,7 +75,7 @@ Header files and API documentation.
%prep
%setup -q -n kea-%{VERSION}
-%patch0 -p1 -b .data-dir
+%patch0 -p1 -b .i686
%patch1 -p1 -b .LT
%patch2 -p1 -b .narrowing
%patch3 -p1 -b .systemd
@@ -83,7 +83,9 @@ Header files and API documentation.
%build
autoreconf --verbose --force --install
+# --localstatedir=%%{_sharedstatedir} - http://kea.isc.org/ticket/3523
%configure \
+ --localstatedir=%{_sharedstatedir} \
--disable-silent-rules \
--disable-static \
--enable-systemd \
@@ -204,6 +206,10 @@ install -p -m 644 ext/LICENSE_1_0.txt %{buildroot}%{_defaultdocdir}/kea/
%{_libdir}/pkgconfig/dns++.pc
%changelog
+* Thu Aug 21 2014 Jiri Popelka <jpopelka at redhat.com> - 0.9-0.5.beta1
+- fix building with PostgreSQL on i686
+- redefine localstatedir to sharedstatedir (kea#3523)
+
* Wed Aug 20 2014 Jiri Popelka <jpopelka at redhat.com> - 0.9-0.4.beta1
- install systemd service units with a proper patch that we can send upstream
- build with MySQL & PostgreSQL & Google Test
@@ -213,7 +219,6 @@ install -p -m 644 ext/LICENSE_1_0.txt %{buildroot}%{_defaultdocdir}/kea/
- comment patches
- use --preserve-timestamps with install
-
* Mon Aug 18 2014 Jiri Popelka <jpopelka at redhat.com> - 0.9-0.2.beta1
- make it build on armv7
- BuildRequires procps-ng for %%check
More information about the scm-commits
mailing list