fix building with PostgreSQL on i686
This commit is contained in:
parent
5fc4ba04f1
commit
519215e08c
|
@ -0,0 +1,64 @@
|
|||
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
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From 6ea5ca336d9ea548c0a0fdb78d7db4f8f91b1670 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Popelka <jpopelka@redhat.com>
|
||||
Date: Fri, 15 Aug 2014 15:15:32 +0200
|
||||
Subject: [PATCH] lib/dhcpsrv Makefile.am: move dhcp_data_dir @localstatedir@
|
||||
-> @sharedstatedir@
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On Fedora @localstatedir@ resolves to /var/ and @sharedstatedir@ to /var/lib/.
|
||||
|
||||
FHS says [1] that:
|
||||
"Applications must generally not add directories to the top level of /var.
|
||||
Such directories should only be added if they have some system-wide implication,
|
||||
and in consultation with the FHS mailing list."
|
||||
|
||||
From GNU Coding Standards [2]:
|
||||
‘sharedstatedir’
|
||||
The directory for installing architecture-independent data files
|
||||
which the programs modify while they run. This should normally be
|
||||
/usr/local/com, but write it as $(prefix)/com. (If you are using
|
||||
Autoconf, write it as ‘@sharedstatedir@’.)
|
||||
|
||||
‘localstatedir’
|
||||
The directory for installing data files which the programs modify
|
||||
while they run, and that pertain to one specific machine. Users should
|
||||
never need to modify files in this directory to configure the package’s
|
||||
operation; put such configuration information in separate files that go
|
||||
in $(datadir) or $(sysconfdir). $(localstatedir) should normally be
|
||||
/usr/local/var, but write it as $(prefix)/var. (If you are using
|
||||
Autoconf, write it as ‘@localstatedir@’.)
|
||||
|
||||
[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#THEVARHIERARCHY
|
||||
[2] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
---
|
||||
src/lib/dhcpsrv/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am
|
||||
index b10d269..0adc408 100644
|
||||
--- a/src/lib/dhcpsrv/Makefile.am
|
||||
+++ b/src/lib/dhcpsrv/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
SUBDIRS = . testutils tests
|
||||
|
||||
-dhcp_data_dir = @localstatedir@/@PACKAGE@
|
||||
+dhcp_data_dir = @sharedstatedir@/@PACKAGE@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib -DDHCP_DATA_DIR="\"$(dhcp_data_dir)\""
|
||||
AM_CPPFLAGS += -DTOP_BUILDDIR="\"$(top_builddir)\""
|
||||
--
|
||||
1.9.3
|
||||
|
15
kea.spec
15
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@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@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@redhat.com> - 0.9-0.2.beta1
|
||||
- make it build on armv7
|
||||
- BuildRequires procps-ng for %%check
|
||||
|
|
Loading…
Reference in New Issue