From 4f24c883e91ba732f7870a9779c27dc5d5ad1a49ae9838ba5fd887e0ce1c389a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Mon, 11 Jun 2012 14:40:09 +0000 Subject: [PATCH 1/3] - fix build with gcc47 ("taking address of temporary array") OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm:svn/subversion?expand=0&rev=96 --- subversion.changes | 5 +++++ subversion.kwallet.patch | 38 ++++++++++++++++++++++++++++++++++++++ subversion.spec | 3 ++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 subversion.kwallet.patch diff --git a/subversion.changes b/subversion.changes index 57d43fe..56239f4 100644 --- a/subversion.changes +++ b/subversion.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 11 16:03:57 CEST 2012 - mls@suse.de + +- fix build with gcc47 ("taking address of temporary array") + ------------------------------------------------------------------- Mon May 21 19:58:48 UTC 2012 - andreas.stieger@gmx.de diff --git a/subversion.kwallet.patch b/subversion.kwallet.patch new file mode 100644 index 0000000..f8a3743 --- /dev/null +++ b/subversion.kwallet.patch @@ -0,0 +1,38 @@ +--- ./subversion/libsvn_auth_kwallet/kwallet.cpp.orig 2012-06-11 13:53:19.000000000 +0000 ++++ ./subversion/libsvn_auth_kwallet/kwallet.cpp 2012-06-11 14:00:58.000000000 +0000 +@@ -60,6 +60,7 @@ + /* KWallet simple provider, puts passwords in KWallet */ + /*-----------------------------------------------------------------------*/ + ++static char *svn_argv[] = { "svn" }; + + static const char * + get_application_name(apr_hash_t *parameters, +@@ -204,11 +205,11 @@ kwallet_password_get(const char **passwo + if (! qApp) + { + int argc = 1; +- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); ++ app = new QCoreApplication(argc, svn_argv); + } + + KCmdLineArgs::init(1, +- (char *[1]) {(char *) "svn"}, ++ svn_argv, + get_application_name(parameters, pool), + "subversion", + ki18n(get_application_name(parameters, pool)), +@@ -274,11 +275,11 @@ kwallet_password_set(apr_hash_t *creds, + if (! qApp) + { + int argc = 1; +- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); ++ app = new QCoreApplication(argc, svn_argv); + } + + KCmdLineArgs::init(1, +- (char *[1]) {(char *) "svn"}, ++ svn_argv, + get_application_name(parameters, pool), + "subversion", + ki18n(get_application_name(parameters, pool)), diff --git a/subversion.spec b/subversion.spec index 3d90e34..a2e3c93 100644 --- a/subversion.spec +++ b/subversion.spec @@ -16,7 +16,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - # Subversion as of 1.7.4 does not work with ruby 1.9 in Factory %define with_ruby 0%{?suse_version} > 1110 && 0%{?suse_version} < 1220 %define with_intree_swig 0%{?suse_version} != 1110 @@ -165,6 +164,7 @@ Patch37: subversion-no-build-date.patch Patch38: subversion-neon-systemproxy.patch # PATCH-FIX-UPSTREAM subversion-1.7.4-ruby-1.9-RbConfig.patch andreas.stieger@gmx.de -- Fixes warning/error in ruby 1.9 "Use RbConfig instead of obsolete and deprecated Config" Patch39: subversion-1.7.4-ruby-1.9-RbConfig.patch +Patch40: subversion.kwallet.patch # %if %with_ruby %if %{!?rb_arch:1}0 @@ -338,6 +338,7 @@ popd #./sqlite-amalgamation %patch37 %patch38 %patch39 +%patch40 SQLITE_RECOMMENDED_VER=$(grep -E '^SQLITE_RECOMMENDED_VER=' configure.ac|cut -f2 -d=|cut -f2 -d\") #" From a52a5628f5d13b7d74e332513675d51c262da17374cca40478159337a3f7ac53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Mon, 11 Jun 2012 17:40:43 +0000 Subject: [PATCH 2/3] revert for now OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm:svn/subversion?expand=0&rev=97 --- subversion.changes | 5 ----- subversion.kwallet.patch | 38 -------------------------------------- subversion.spec | 3 +-- 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 subversion.kwallet.patch diff --git a/subversion.changes b/subversion.changes index 56239f4..57d43fe 100644 --- a/subversion.changes +++ b/subversion.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Jun 11 16:03:57 CEST 2012 - mls@suse.de - -- fix build with gcc47 ("taking address of temporary array") - ------------------------------------------------------------------- Mon May 21 19:58:48 UTC 2012 - andreas.stieger@gmx.de diff --git a/subversion.kwallet.patch b/subversion.kwallet.patch deleted file mode 100644 index f8a3743..0000000 --- a/subversion.kwallet.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- ./subversion/libsvn_auth_kwallet/kwallet.cpp.orig 2012-06-11 13:53:19.000000000 +0000 -+++ ./subversion/libsvn_auth_kwallet/kwallet.cpp 2012-06-11 14:00:58.000000000 +0000 -@@ -60,6 +60,7 @@ - /* KWallet simple provider, puts passwords in KWallet */ - /*-----------------------------------------------------------------------*/ - -+static char *svn_argv[] = { "svn" }; - - static const char * - get_application_name(apr_hash_t *parameters, -@@ -204,11 +205,11 @@ kwallet_password_get(const char **passwo - if (! qApp) - { - int argc = 1; -- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); -+ app = new QCoreApplication(argc, svn_argv); - } - - KCmdLineArgs::init(1, -- (char *[1]) {(char *) "svn"}, -+ svn_argv, - get_application_name(parameters, pool), - "subversion", - ki18n(get_application_name(parameters, pool)), -@@ -274,11 +275,11 @@ kwallet_password_set(apr_hash_t *creds, - if (! qApp) - { - int argc = 1; -- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); -+ app = new QCoreApplication(argc, svn_argv); - } - - KCmdLineArgs::init(1, -- (char *[1]) {(char *) "svn"}, -+ svn_argv, - get_application_name(parameters, pool), - "subversion", - ki18n(get_application_name(parameters, pool)), diff --git a/subversion.spec b/subversion.spec index a2e3c93..3d90e34 100644 --- a/subversion.spec +++ b/subversion.spec @@ -16,6 +16,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + # Subversion as of 1.7.4 does not work with ruby 1.9 in Factory %define with_ruby 0%{?suse_version} > 1110 && 0%{?suse_version} < 1220 %define with_intree_swig 0%{?suse_version} != 1110 @@ -164,7 +165,6 @@ Patch37: subversion-no-build-date.patch Patch38: subversion-neon-systemproxy.patch # PATCH-FIX-UPSTREAM subversion-1.7.4-ruby-1.9-RbConfig.patch andreas.stieger@gmx.de -- Fixes warning/error in ruby 1.9 "Use RbConfig instead of obsolete and deprecated Config" Patch39: subversion-1.7.4-ruby-1.9-RbConfig.patch -Patch40: subversion.kwallet.patch # %if %with_ruby %if %{!?rb_arch:1}0 @@ -338,7 +338,6 @@ popd #./sqlite-amalgamation %patch37 %patch38 %patch39 -%patch40 SQLITE_RECOMMENDED_VER=$(grep -E '^SQLITE_RECOMMENDED_VER=' configure.ac|cut -f2 -d=|cut -f2 -d\") #" From a4350a867ee5b97201948e0e988b805ab25278d90964fc10e8587cc6d50ec834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Mon, 11 Jun 2012 17:42:50 +0000 Subject: [PATCH 3/3] Accepting request 124109 from home:AndreasStieger:branches:devel:tools:scm:svn - add subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch from trunk to fix build with gcc 4.7 in openSUSE Factory - move checks for schemes handled by ra modules into %check section - do not run regression tests by default: * too many failed builds * doesn't include http tests - only require iproute2 when running regression tests OBS-URL: https://build.opensuse.org/request/show/124109 OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm:svn/subversion?expand=0&rev=98 --- ...n-1.7.5-libsvn_auth_kwallet-r1345740.patch | 59 +++++++++++++++++++ subversion.changes | 11 ++++ subversion.spec | 57 +++++++++--------- 3 files changed, 99 insertions(+), 28 deletions(-) create mode 100644 subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch diff --git a/subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch b/subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch new file mode 100644 index 0000000..351b853 --- /dev/null +++ b/subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch @@ -0,0 +1,59 @@ +svn diff -c1345740 https://svn.apache.org/repos/asf/subversion/trunk + +r1345740 | peters | 2012-06-03 19:54:26 +0100 (Sun, 03 Jun 2012) | 7 lines +Changed paths: + M /subversion/trunk/subversion/libsvn_auth_kwallet/kwallet.cpp + +Remove a cast that is both ugly, and apparently illegal in g++ 4.7. + +* subversion/libsvn_auth_kwallet/kwallet.cpp + (q_argc, q_argv): New. + (kwallet_password_get, kwallet_password_set): + Use q_argc and q_argv instead of trying to open-code them. + +Index: subversion/libsvn_auth_kwallet/kwallet.cpp +=================================================================== +--- subversion/libsvn_auth_kwallet/kwallet.cpp.orig 2010-12-30 20:46:50.000000000 +0000 ++++ subversion/libsvn_auth_kwallet/kwallet.cpp 2012-06-07 18:01:02.000000000 +0100 +@@ -60,6 +60,9 @@ + /* KWallet simple provider, puts passwords in KWallet */ + /*-----------------------------------------------------------------------*/ + ++static int q_argc = 1; ++static char q_argv0[] = "svn"; // Build non-const char * from string constant ++static char *q_argv[] = { q_argv0 }; + + static const char * + get_application_name(apr_hash_t *parameters, +@@ -203,12 +206,11 @@ kwallet_password_get(const char **passwo + QCoreApplication *app; + if (! qApp) + { +- int argc = 1; +- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); ++ int argc = q_argc; ++ app = new QCoreApplication(argc, q_argv); + } + +- KCmdLineArgs::init(1, +- (char *[1]) {(char *) "svn"}, ++ KCmdLineArgs::init(q_argc, q_argv, + get_application_name(parameters, pool), + "subversion", + ki18n(get_application_name(parameters, pool)), +@@ -273,12 +275,11 @@ kwallet_password_set(apr_hash_t *creds, + QCoreApplication *app; + if (! qApp) + { +- int argc = 1; +- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); ++ int argc = q_argc; ++ app = new QCoreApplication(argc, q_argv); + } + +- KCmdLineArgs::init(1, +- (char *[1]) {(char *) "svn"}, ++ KCmdLineArgs::init(q_argc, q_argv, + get_application_name(parameters, pool), + "subversion", + ki18n(get_application_name(parameters, pool)), diff --git a/subversion.changes b/subversion.changes index 57d43fe..7baded1 100644 --- a/subversion.changes +++ b/subversion.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Jun 7 17:08:01 UTC 2012 - andreas.stieger@gmx.de + +- add subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch from trunk + to fix build with gcc 4.7 +- move checks for schemes handled by ra modules into %check section +- do not run regression tests by default: + * too many failed builds + * doesn't include http tests +- only require iproute2 when running regression tests + ------------------------------------------------------------------- Mon May 21 19:58:48 UTC 2012 - andreas.stieger@gmx.de diff --git a/subversion.spec b/subversion.spec index 3d90e34..4193fc5 100644 --- a/subversion.spec +++ b/subversion.spec @@ -35,13 +35,8 @@ %bcond_without serf -# do not run regression tests for Factory, unless --with=regression_tests -%if 0%{?suse_version} > 1210 +# run build --with=regression_tests to run test suite %bcond_with regression_tests -%else -# run regression tests for previous releases, unless --without=regression_tests -%bcond_without regression_tests -%endif # suse_version %if 0%{?sles_version} > 10 && 0%{?sles_version} < 12 %define with_bashcomp 0 @@ -109,8 +104,10 @@ BuildRequires: libneon-devel BuildRequires: neon-devel BuildRequires: openldap2-devel %endif # suse_version > 1030 -# for %check section, to find a free port: +%if %{with regression_tests} +# for check section, to find a free port: BuildRequires: iproute2 +%endif # with regression_tests # %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services # @@ -165,6 +162,8 @@ Patch37: subversion-no-build-date.patch Patch38: subversion-neon-systemproxy.patch # PATCH-FIX-UPSTREAM subversion-1.7.4-ruby-1.9-RbConfig.patch andreas.stieger@gmx.de -- Fixes warning/error in ruby 1.9 "Use RbConfig instead of obsolete and deprecated Config" Patch39: subversion-1.7.4-ruby-1.9-RbConfig.patch +# PATCH-FIX-UPSTREAM subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch peters@apache.org -- Remove a cast that is both ugly, and apparently illegal in g++ 4.7. +Patch40: subversion-1.7.5-libsvn_auth_kwallet-r1345740.patch # %if %with_ruby %if %{!?rb_arch:1}0 @@ -338,6 +337,7 @@ popd #./sqlite-amalgamation %patch37 %patch38 %patch39 +%patch40 SQLITE_RECOMMENDED_VER=$(grep -E '^SQLITE_RECOMMENDED_VER=' configure.ac|cut -f2 -d=|cut -f2 -d\") #" @@ -530,27 +530,6 @@ python_ctypes_target= find "%{buildroot}%{py_prefix}/lib/python%{py_ver}/site-packages/csvn/" -name "*.pyc" | xargs %__rm -f %__python "%{py_libdir}/compileall.py" -f -d "%{py_prefix}/lib/python%{py_ver}/site-packages/csvn" "%{buildroot}/%{py_prefix}/lib/python%{py_ver}/csvn" %endif # with_python_ctypes -# -# double check that the essential repository access schemes have been compiled in -# -schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep "'" | cut -d\' -f2 | sort -u) -# reset vim syntax: ' -test "$schemes" = "file -http -https -svn" -# -%if %{with serf} -# -# double check that when building with serf support, ra_serf is actually available and handles http and https schemes -# -serf_schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep -A2 "ra_serf" | %__grep "'" | cut -d\' -f2 ) -# reset vim syntax: ' -test "$serf_schemes" = "http -https" -# -%endif # with serf -# %perl_process_packlist %find_lang %name @@ -602,6 +581,28 @@ rm -f %{buildroot}/var/adm/perl-modules/subversion %check +# +# double check that the essential repository access schemes have been compiled in +# +schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep "'" | cut -d\' -f2 | sort -u) +# reset vim syntax: ' +test "$schemes" = "file +http +https +svn" +# +%if %{with serf} +# +# double check that when building with serf support, ra_serf is actually available and handles http and https schemes +# +serf_schemes=$(LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}" "${RPM_BUILD_ROOT}%{_bindir}/svn" --version | %__grep -A2 "ra_serf" | %__grep "'" | cut -d\' -f2 ) +# reset vim syntax: ' +test "$serf_schemes" = "http +https" +# +%endif # with serf +# + %if %{with regression_tests} ulimit -a