import soci-4.0.3-1.el9

i9ce changed/i9ce/soci-4.0.3-1.el9
Sergey Cherevko 8 months ago
commit 90e383cb27
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/soci-4.0.3.tar.gz

@ -0,0 +1 @@
6751e5159d11b020239603ff6a408bef68df99aa SOURCES/soci-4.0.3.tar.gz

@ -0,0 +1,80 @@
diff -Naur soci-3.2.3.org/CMakeLists.txt soci-3.2.3/CMakeLists.txt
--- soci-3.2.3.org/CMakeLists.txt 2015-04-09 00:39:00.000000000 +0200
+++ soci-3.2.3/CMakeLists.txt 2017-01-14 01:02:20.417016971 +0100
@@ -39,6 +39,10 @@
include(SociSystemInfo)
include(SociConfig)
+if(CMAKE_COMPILER_IS_GNUCXX)
+ add_definitions(-std=gnu++0x)
+endif()
+
boost_report_value(SOCI_PLATFORM_NAME)
boost_report_value(SOCI_COMPILER_NAME)
diff -Naur soci-3.2.3.org/core/rowset.h soci-3.2.3/core/rowset.h
--- soci-3.2.3.org/core/rowset.h 2015-04-08 22:32:00.000000000 +0200
+++ soci-3.2.3/core/rowset.h 2017-01-14 01:02:20.418016969 +0100
@@ -154,8 +154,8 @@
unsigned int refs_;
- const std::auto_ptr<statement> st_;
- const std::auto_ptr<T> define_;
+ const std::unique_ptr<statement> st_;
+ const std::unique_ptr<T> define_;
// Non-copyable
rowset_impl(rowset_impl const &);
diff -Naur soci-3.2.3.org/core/session.cpp soci-3.2.3/core/session.cpp
--- soci-3.2.3.org/core/session.cpp 2015-04-08 22:28:14.000000000 +0200
+++ soci-3.2.3/core/session.cpp 2017-01-14 01:02:20.419016966 +0100
@@ -235,11 +235,11 @@
}
void session::set_query_transformation_(
- std::auto_ptr<details::query_transformation_function> qtf)
+ std::unique_ptr<details::query_transformation_function> qtf)
{
if (isFromPool_)
{
- pool_->at(poolPosition_).set_query_transformation_(qtf);
+ pool_->at(poolPosition_).set_query_transformation_(std::move(qtf));
}
else
{
diff -Naur soci-3.2.3.org/core/session.h soci-3.2.3/core/session.h
--- soci-3.2.3.org/core/session.h 2015-04-08 22:32:00.000000000 +0200
+++ soci-3.2.3/core/session.h 2017-01-14 01:05:19.044639113 +0100
@@ -40,7 +40,7 @@
{
private:
- void set_query_transformation_(std::auto_ptr<details::query_transformation_function> qtf);
+ void set_query_transformation_(std::unique_ptr<details::query_transformation_function> qtf);
public:
session();
@@ -77,8 +77,8 @@
template <typename T>
void set_query_transformation(T callback)
{
- std::auto_ptr<details::query_transformation_function> qtf(new details::query_transformation<T>(callback));
- set_query_transformation_(qtf);
+ std::unique_ptr<details::query_transformation_function> qtf(new details::query_transformation<T>(callback));
+ set_query_transformation_(std::move(qtf));
assert(qtf.get() == NULL);
}
diff -Naur soci-3.2.3.org/core/test/common-tests.h soci-3.2.3/core/test/common-tests.h
--- soci-3.2.3.org/core/test/common-tests.h 2015-04-09 00:39:01.000000000 +0200
+++ soci-3.2.3/core/test/common-tests.h 2017-01-14 01:02:20.421016962 +0100
@@ -350,7 +350,7 @@
backend_factory const &backEndFactory_;
std::string const connectString_;
-typedef std::auto_ptr<table_creator_base> auto_table_creator;
+typedef std::unique_ptr<table_creator_base> auto_table_creator;
void test0()
{

@ -0,0 +1,21 @@
--- a/tests/catch.hpp.old 2021-05-17 23:58:05.610815253 +0200
+++ b/tests/catch.hpp 2021-05-17 23:59:08.753674174 +0200
@@ -6489,7 +6489,7 @@
static bool isSet;
static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)];
static stack_t oldSigStack;
- static char altStackMem[SIGSTKSZ];
+ static char altStackMem[8192];
static void handleSignal( int sig ) {
std::string name = "<unknown signal>";
@@ -6540,7 +6540,7 @@
bool FatalConditionHandler::isSet = false;
struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {};
stack_t FatalConditionHandler::oldSigStack = {};
- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
+ char FatalConditionHandler::altStackMem[8192] = {};
} // namespace Catch

@ -0,0 +1,16 @@
diff -Naur soci-4.0.3.orig/src/backends/mysql/session.cpp soci-4.0.3/src/backends/mysql/session.cpp
--- soci-4.0.3.orig/src/backends/mysql/session.cpp 2022-02-10 20:13:13.000000000 +0100
+++ soci-4.0.3/src/backends/mysql/session.cpp 2022-07-10 21:20:40.846760279 +0200
@@ -207,10 +207,12 @@
*password_p = false;
*db_p = false;
*unix_socket_p = false;
+ *port = 0;
*port_p = false;
*ssl_ca_p = false;
*ssl_cert_p = false;
*ssl_key_p = false;
+ *local_infile = 0;
*local_infile_p = false;
*charset_p = false;
*reconnect_p = false;

@ -0,0 +1,22 @@
diff --git a/cmake/SociConfig.cmake b/cmake/SociConfig.cmake
index 8a74330d..2bce264d 100644
--- a/cmake/SociConfig.cmake
+++ b/cmake/SociConfig.cmake
@@ -63,8 +63,15 @@ if (MSVC)
else()
+ # Set the -Werror compilation flag (where all the compilation warnings are
+ # considered as errors) only when building in Debug mode
+ set(SOCI_WERROR_OPTION "")
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(SOCI_WERROR_OPTION "-Werror")
+ endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+
set(SOCI_GCC_CLANG_COMMON_FLAGS
- "-pedantic -Werror -Wno-error=parentheses -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Woverloaded-virtual -Wredundant-decls -Wno-long-long")
+ "-pedantic ${SOCI_WERROR_OPTION} -Wno-error=parentheses -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Woverloaded-virtual -Wredundant-decls -Wno-long-long")
if (SOCI_CXX11)

@ -0,0 +1,15 @@
diff --git a/backends/sqlite3/standard-use-type.cpp b/backends/sqlite3/standard-use-type.cpp
index 43ed4f0..123c075 100644
--- a/backends/sqlite3/standard-use-type.cpp
+++ b/backends/sqlite3/standard-use-type.cpp
@@ -74,7 +74,9 @@ void sqlite3_standard_use_type_backend::pre_use(indicator const * ind)
if (statement_.useData_[0].size() < static_cast<std::size_t>(position_))
{
- statement_.useData_[0].resize(position_);
+ sqlite3_column empty;
+ empty.isNull_ = true;
+ statement_.useData_[0].resize(position_, empty);
}
if (ind != NULL && *ind == i_null)

@ -0,0 +1,391 @@
#
##
# Default values are --with empty --with sqlite3 --with mysql --with postgresql
# --with odbc --without oracle --without db2 --without firebird
# Note that, for Oracle, when enabled, the following options should
# also be given:
# --with-oracle-include=/opt/oracle/app/oracle/product/11.1.0/db_1/rdbms/public
# --with-oracle-lib=/opt/oracle/app/oracle/product/11.1.0/db_1/lib
# If the macros are defined, redefine them with the correct compilation flags.
%bcond_without empty
%bcond_without sqlite3
%bcond_without mysql
%bcond_without postgresql
%bcond_without odbc
%bcond_with oracle
%bcond_with db2
%bcond_with firebird
%bcond_without tests
%global _default_oracle_dir /opt/oracle/app/oracle/product/11.1.0/db_1
%{!?_with_oracle_incdir: %define _with_oracle_incdir --with-oracle-include=%{_default_oracle_dir}/rdbms/public}
%{!?_with_oracle_libdir: %define _with_oracle_libdir --with-oracle-lib=%{_default_oracle_dir}/lib}
#
##
#
Name: soci
Version: 4.0.3
%global ups_ver 4.0.3
Release: 1%{?dist}
Summary: The database access library for C++ programmers
License: Boost
URL: https://github.com/SOCI/%{name}
Source0: %{url}/archive/%{ups_ver}.tar.gz#/%{name}-%{version}.tar.gz
# Works around a false positive -Wuninitialized error exposed by LTO
Patch0: soci-uninit.patch
BuildRequires: dos2unix
BuildRequires: gcc gcc-c++
BuildRequires: cmake
BuildRequires: boost-devel
%description
%{name} is a C++ database access library that provides the
illusion of embedding SQL in regular C++ code, staying entirely within
the C++ standard.
%{?with_sqlite3:%package sqlite3
Summary: SQLite3 back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: sqlite-devel
%description sqlite3
This package contains the SQLite3 back-end for %{name}, i.e.,
dynamic library specific to the SQLite3 database. If you would like to
use %{name} in your programs with SQLite3, you will need to
install %{name}-sqlite3.}
%{?with_mysql:%package mysql
Summary: MySQL back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: mysql-devel
%description mysql
This package contains the MySQL back-end for %{name}, i.e.,
dynamic library specific to the MySQL database. If you would like to
use %{name} in your programs with MySQL, you will need to
install %{name}-mysql.}
%{?with_postgresql:%package postgresql
Summary: PostGreSQL back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: libpq-devel
%description postgresql
This package contains the PostGreSQL back-end for %{name}, i.e.,
dynamic library specific to the PostGreSQL database. If you would like
to use %{name} in your programs with PostGreSQL, you will need to
install %{name}-postgresql.}
%{?with_odbc:%package odbc
Summary: ODBC back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: unixODBC-devel
%description odbc
This package contains the ODBC back-end for %{name}, i.e.,
dynamic library specific to the ODBC connectors. If you would like to
use %{name} in your programs with ODBC, you will need to
install %{name}-odbc.}
%{?with_firebird:%package firebird
Summary: Firebird back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: firebird-devel
%description firebird
This package contains the Firebird back-end for %{name}, i.e.,
dynamic library specific to the Firebird connectors. If you would like to
use %{name} in your programs with Firebird, you will need to
install %{name}-firebird.}
%{?with_db2:%package db2
Summary: DB2 back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: db2-devel
%description db2
This package contains the DB2 back-end for %{name}, i.e.,
dynamic library specific to the DB2 connectors. If you would like to
use %{name} in your programs with DB2, you will need to
install %{name}-db2.}
%{?with_oracle:%package oracle
Summary: Oracle back-end for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description oracle
This package contains the Oracle back-end for %{name}, i.e.,
dynamic library specific to the Oracle database. If you would like to
use %{name} in your programs with Oracle, you will need to install
%{name}-oracle.}
%package devel
Summary: Header files, libraries and development documentation for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
This package contains the header files, dynamic libraries and
development documentation for %{name}. If you would like to develop
programs using %{name}, you will need to install %{name}-devel.
%{?with_sqlite3:%package sqlite3-devel
Summary: SQLite3 back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-sqlite3 = %{version}-%{release}
Requires: sqlite-devel
%description sqlite3-devel
This package contains the SQLite3 back-end for %{name}, i.e., header
files and dynamic libraries specific to the SQLite3 database. If you
would like to develop programs using %{name} and SQLite3, you will need
to install %{name}-sqlite3.}
%{?with_mysql:%package mysql-devel
Summary: MySQL back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-mysql = %{version}-%{release}
Requires: mysql-devel
%description mysql-devel
This package contains the MySQL back-end for %{name}, i.e., header
files and dynamic libraries specific to the MySQL database. If you
would like to develop programs using %{name} and MySQL, you will need
to install %{name}-mysql.}
%{?with_postgresql:%package postgresql-devel
Summary: PostGreSQL back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-postgresql = %{version}-%{release}
Requires: libpq-devel
%description postgresql-devel
This package contains the PostGreSQL back-end for %{name}, i.e., header
files and dynamic libraries specific to the PostGreSQL database. If
you would like to develop programs using %{name} and PostGreSQL, you
will need to install %{name}-postgresql.}
%{?with_odbc:%package odbc-devel
Summary: ODBC back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-odbc = %{version}-%{release}
Requires: unixODBC-devel
%description odbc-devel
This package contains the ODBC back-end for %{name}, i.e., header
files and dynamic libraries specific to the ODBC database. If you
would like to develop programs using %{name} and ODBC, you will need
to install %{name}-odbc.}
%{?with_firebird:%package firebird-devel
Summary: Firebird back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-firebird = %{version}-%{release}
Requires: firebird-devel
%description firebird-devel
This package contains the Firebird back-end for %{name}, i.e., header
files and dynamic libraries specific to the Firebird database. If you
would like to develop programs using %{name} and Firebird, you will need
to install %{name}-firebird.}
%{?with_db2:%package db2-devel
Summary: DB2 back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-db2 = %{version}-%{release}
Requires: db2-devel
%description db2-devel
This package contains the DB2 back-end for %{name}, i.e., header
files and dynamic libraries specific to the DB2 database. If you
would like to develop programs using %{name} and DB2, you will need
to install %{name}-db2.}
%{?with_oracle:%package oracle-devel
Summary: Oracle back-end for %{name}
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-oracle = %{version}-%{release}
%description oracle-devel
This package contains the Oracle back-end for %{name}, i.e., header
files and dynamic libraries specific to the Oracle database. If you
would like to develop programs using %{name} and Oracle, you will need
to install %{name}-oracle.}
%package doc
Summary: HTML documentation for the %{name} library
BuildArch: noarch
#BuildRequires: tex(latex)
#BuildRequires: doxygen, ghostscript
%description doc
This package contains the documentation in the HTML format of the %{name}
library. The documentation is the same as at the %{name} web page.
%prep
%setup -q -n %{name}-%{ups_ver}
%patch0 -p1
# Rename change-log and license file, so that they comply with
# packaging standard
mv README.md README
mv CHANGES ChangeLog
mv LICENSE_1_0.txt COPYING
echo "2019-11-09:" > NEWS
echo "- Version 4.0.0" >> NEWS
echo "- See the ChangeLog file for more details." >> NEWS
# Remove the spurious executable permission
chmod a-x AUTHORS README ChangeLog COPYING NEWS
find docs -type f -exec chmod a-x {} \;
# Unix ends of line
dos2unix AUTHORS README ChangeLog COPYING NEWS
%build
# Support for building tests.
%define soci_testflags -DBUILD_TESTS="NONE"
%if %{with tests}
%define soci_testflags -DSOCI_TEST=ON -DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" -DSOCI_TEST_MYSQL_CONNSTR:STRING="db=soci_test user=mloskot password=pantera"
%endif
%cmake \
-DSOCI_CXX11=ON \
-DSOCI_EMPTY=%{?with_empty:ON}%{?without_empty:OFF} \
-DSOCI_SQLITE3=%{?with_sqlite3:ON}%{?without_sqlite3:OFF} \
-DSOCI_POSTGRESQL=%{?with_postgresql:ON}%{?without_postgresql:OFF} \
-DSOCI_MYSQL=%{?with_mysql:ON}%{?without_mysql:OFF} \
-DSOCI_ODBC=%{?with_odbc:ON}%{?without_odbc:OFF} \
-DSOCI_FIREBIRD=%{?with_firebird:ON}%{?without_firebird:OFF} \
-DSOCI_DB2=%{?with_db2:ON}%{?without_db2:OFF} \
-DSOCI_ORACLE=%{?with_oracle:ON %{?_with_oracle_incdir} %{?_with_oracle_libdir}}%{?without_oracle:OFF} \
%{soci_testflags}
%cmake_build
%install
%cmake_install
# CMake helpers
mkdir -p %{buildroot}%{_datadir}/%{name}
mv -f %{buildroot}%{_libdir}/cmake %{buildroot}%{_datadir}/%{name}/CMake
# Remove unpackaged files from the buildroot
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_includedir}/%{name}/db2/soci-db2.h
rm -f %{buildroot}%{_includedir}/%{name}/firebird/soci-firebird.h
rm -f %{buildroot}%{_includedir}/%{name}/oracle/soci-oracle.h
rm -f %{buildroot}%{_includedir}/%{name}/soci-config.h.in
%if %{with tests}
%check
%{ctest --exclude-regex 'soci_(odbc|mysql|postgresql)_test'}
%endif
%files
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_core.so.*
%{?with_empty:%{_libdir}/lib%{name}_empty.so.*}
%{?with_sqlite3:%files sqlite3
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_sqlite3.so.*}
%{?with_mysql:%files mysql
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_mysql.so.*}
%{?with_postgresql:%files postgresql
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_postgresql.so.*}
%{?with_odbc:%files odbc
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_odbc.so.*}
%{?with_firebird:%files firebird
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_firebird.so.*}
%{?with_db2:%files db2
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_db2.so.*}
%{?with_oracle:%files oracle
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_oracle.so.*}
%files devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/*.h
%{?with_empty:%{_includedir}/%{name}/empty/}
%{_libdir}/lib%{name}_core.so
%{?with_empty:%{_libdir}/lib%{name}_empty.so}
%{_datadir}/%{name}/CMake
%{?with_sqlite3:%files sqlite3-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/sqlite3/
%{_libdir}/lib%{name}_sqlite3.so}
%{?with_mysql:%files mysql-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/mysql
%{_libdir}/lib%{name}_mysql.so}
%{?with_postgresql:%files postgresql-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/postgresql
%{_libdir}/lib%{name}_postgresql.so}
%{?with_odbc:%files odbc-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/odbc/
%{_libdir}/lib%{name}_odbc.so}
%{?with_firebird:%files firebird-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/firebird/
%{_libdir}/lib%{name}_firebird.so}
%{?with_db2:%files db2-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/db2/
%{_libdir}/lib%{name}_db2.so}
%{?with_oracle:%files oracle-devel
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/oracle
%{_libdir}/lib%{name}_oracle.so}
%files doc
%doc AUTHORS ChangeLog COPYING NEWS README docs
%changelog
* Wed May 29 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 4.0.3-1
- Rebuilt for MSVSphere 9.4
* Fri Jun 03 2022 Denis Arnaud <denis.arnaud_fedora@m4x.org> 4.0.3-1
- Update to upstream release 4.0.3
Loading…
Cancel
Save