From f69864460ab8e997c4615e00ddd6a11833e4d6b73e27477a55708cb8fd5286e5 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Mon, 28 Oct 2013 10:17:07 +0000 Subject: [PATCH] Accepting request 204854 from home:posophe:branches:network Update + systemd support. Build fail with 12.3 and 12.2 but I'm not a dev and can't fix it OBS-URL: https://build.opensuse.org/request/show/204854 OBS-URL: https://build.opensuse.org/package/show/network/boinc-client?expand=0&rev=32 --- ...> boinc-client-7.0.36-AM_CONDITIONAL.patch | 12 ++- ... boinc-client-7.0.36-dynamic_buffers.patch | 16 ++-- boinc-client-glib_h.patch | 13 --- boinc-client-systemd | 19 ++++ boinc-client.changes | 12 +++ boinc-client.spec | 88 ++++++++++++++----- boinc_core_release-7_0_36.tar.bz2 | 3 + boinc_core_release_6_12_43.tar.bz2 | 3 - 8 files changed, 115 insertions(+), 51 deletions(-) rename boinc-client-AM_CONDITIONAL.patch => boinc-client-7.0.36-AM_CONDITIONAL.patch (73%) rename boinc-client-dynamic_buffers.patch => boinc-client-7.0.36-dynamic_buffers.patch (74%) delete mode 100644 boinc-client-glib_h.patch create mode 100644 boinc-client-systemd create mode 100644 boinc_core_release-7_0_36.tar.bz2 delete mode 100644 boinc_core_release_6_12_43.tar.bz2 diff --git a/boinc-client-AM_CONDITIONAL.patch b/boinc-client-7.0.36-AM_CONDITIONAL.patch similarity index 73% rename from boinc-client-AM_CONDITIONAL.patch rename to boinc-client-7.0.36-AM_CONDITIONAL.patch index 86c5525..fa4aad1 100644 --- a/boinc-client-AM_CONDITIONAL.patch +++ b/boinc-client-7.0.36-AM_CONDITIONAL.patch @@ -2,7 +2,7 @@ Index: configure.ac =================================================================== --- configure.ac.orig +++ configure.ac -@@ -39,6 +39,7 @@ AC_PROG_CC +@@ -39,6 +39,7 @@ AC_PROG_CXX AC_PROG_F77 AC_PROG_CPP @@ -10,7 +10,7 @@ Index: configure.ac AC_PROG_MAKE_SET SAH_LINKS AC_LANG_PUSH(C) -@@ -737,6 +738,8 @@ AM_CONDITIONAL(ENABLE_LIBRARIES, [test " +@@ -744,6 +745,8 @@ AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes]) AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so]) @@ -19,19 +19,17 @@ Index: configure.ac dnl ====================================================================== dnl some more vodoo required for building portable client-binary (client, clientgui) dnl ====================================================================== -Index: clientgui/Makefile.am -=================================================================== --- clientgui/Makefile.am.orig +++ clientgui/Makefile.am -@@ -118,9 +118,8 @@ EXTRA_DIST = *.h \ +@@ -118,9 +118,8 @@ ../lib/error_numbers.h \ locale $(mac_headers) -boincmgr_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) `pkg-config --cflags gtk+-2.0` -boincmgr_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) `pkg-config --cflags gtk+-2.0` --boincmgr_LDADD = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) +-boincmgr_LDFLAGS = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) `pkg-config --libs gtk+-2.0` -lnotify +boincmgr_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(SQLITE3_CPPFLAGS) $(LIBNOTIFY_CFLAGS) $(CLIENTGUIFLAGS) $(GTK2_CFLAGS) -+boincmgr_LDADD = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) $(GTK2_LIBS) ++boincmgr_LDFLAGS = $(LIBBOINC) $(SQLITE3_LIBS) $(LIBNOTIFY_LIBS) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS) $(GTK2_LIBS) win_config.h: $(top_srcdir)/config.h grep '#define.*BOINC.*VERSION' $^ > $@ diff --git a/boinc-client-dynamic_buffers.patch b/boinc-client-7.0.36-dynamic_buffers.patch similarity index 74% rename from boinc-client-dynamic_buffers.patch rename to boinc-client-7.0.36-dynamic_buffers.patch index 90e9910..e5cf029 100644 --- a/boinc-client-dynamic_buffers.patch +++ b/boinc-client-7.0.36-dynamic_buffers.patch @@ -2,25 +2,25 @@ Index: lib/filesys.cpp =================================================================== --- lib/filesys.cpp.orig +++ lib/filesys.cpp -@@ -46,6 +46,7 @@ +@@ -47,6 +47,7 @@ #include #include #include +#include - #ifdef HAVE_SYS_RESOURCE_H + #if HAVE_SYS_RESOURCE_H #include -@@ -400,7 +401,8 @@ int dir_size(const char* dirpath, double +@@ -412,7 +413,8 @@ } while (FindNextFileA(hFind, &findData)); ::FindClose(hFind); #else -- char filename[256], subdir[256]; +- char filename[1024], subdir[1024]; + char filename[PATH_MAX]; -+ char *subdir; ++ char *subdir;; int retval=0; DIRREF dirp; double x; -@@ -411,7 +413,7 @@ int dir_size(const char* dirpath, double +@@ -423,7 +425,7 @@ while (1) { retval = dir_scan(filename, dirp, sizeof(filename)); if (retval) break; @@ -29,11 +29,11 @@ Index: lib/filesys.cpp if (is_dir(subdir)) { if (recurse) { -@@ -424,6 +426,9 @@ int dir_size(const char* dirpath, double +@@ -436,6 +438,9 @@ if (retval) continue; size += x; } -+ ++ + if(subdir != NULL) + free(subdir); } diff --git a/boinc-client-glib_h.patch b/boinc-client-glib_h.patch deleted file mode 100644 index 82afa1f..0000000 --- a/boinc-client-glib_h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: clientgui/gtk/taskbarex.cpp -=================================================================== ---- clientgui/gtk/taskbarex.cpp.orig -+++ clientgui/gtk/taskbarex.cpp -@@ -20,7 +20,7 @@ - #include "stdwx.h" - - #include --#include -+#include - #include - #include - diff --git a/boinc-client-systemd b/boinc-client-systemd new file mode 100644 index 0000000..4b6b0db --- /dev/null +++ b/boinc-client-systemd @@ -0,0 +1,19 @@ +[Unit] +Description=Berkeley Open Infrastructure Network Computing Client +After=network.target + +[Service] +Nice=10 +User=boinc +CPUShares=2 +ControlGroup=cpu:/background +PermissionsStartOnly=yes +ExecStartPre=/bin/sleep 1 +ExecStartPre=/usr/bin/touch /var/log/boinc.log /var/log/boincerr.log +ExecStartPre=/usr/bin/chown boinc:boinc /var/log/boinc.log /var/log/boincerr.log +ExecStart=/usr/bin/boinc --dir /var/lib/boinc +ExecReload=/usr/bin/boinccmd --read_cc_config +ExecStopPost=/bin/rm -f /var/lib/boinc/lockfile + +[Install] +WantedBy=multi-user.target diff --git a/boinc-client.changes b/boinc-client.changes index a387bd6..d1c3155 100644 --- a/boinc-client.changes +++ b/boinc-client.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sat Oct 26 09:45:58 UTC 2013 - p.drouand@gmail.com + +- Update to version 7.0.36 + + No changelog available +- Add systemd support +- Adapt patchs to upstream changes + * boinc-client-dynamic_buffers.patch + * boinc-client-AM_CONDITIONAL.patch +- Remove boinc-client-glib_h.patch; fixed on upstream +- Do not copy INSTALL in documentation + ------------------------------------------------------------------- Wed Apr 3 11:12:16 UTC 2013 - coolo@suse.com diff --git a/boinc-client.spec b/boinc-client.spec index f694351..08c5edf 100644 --- a/boinc-client.spec +++ b/boinc-client.spec @@ -22,18 +22,18 @@ %if 0%{?suse_version} >= 1140 %define __find_requires %wx_requires %endif -%define version_ 6_12_43 -%define soname 6 +%define version_ 7_0_36 +%define soname 7 %define boinc_dir %{_localstatedir}/lib/boinc Name: boinc-client -Version: 6.12.43 +Version: 7.0.36 Release: 0 Summary: The BOINC client core License: LGPL-3.0 Group: Productivity/Clustering/Computing Url: http://boinc.berkeley.edu/ -Source0: boinc_core_release_%{version_}.tar.bz2 +Source0: boinc_core_release-%{version_}.tar.bz2 Source1: boinc-icons.tar.bz2 Source2: boinc-gui.desktop Source3: README.SUSE @@ -48,6 +48,7 @@ Source6: boinc-manager # Trim all binaries and other unnecessary things. Source8: generate-tarball.sh Source10: %{name}.init +Source20: boinc-client-systemd Source100: %{name}-rpmlintrc # PATCH-FIX-OPENSUSE boinc-guirpcauth.patch @@ -65,17 +66,20 @@ Patch3: boinc-completion.patch # PATCH-FIX-OPENSUSE boinc-docbook2x.patch Patch4: boinc-docbook2x.patch # PATCH-FIX-OPENSUSE pth@suse.de use asprintf to fix buffer overflow -Patch5: boinc-client-dynamic_buffers.patch -# PATCH-FIX-OPENSUSE computersalat - #error "Only can be included directly. -Patch6: %{name}-glib_h.patch +Patch5: boinc-client-7.0.36-dynamic_buffers.patch # PATCH-FIX-OPENSUSE coolo - #error: am__fastdepOBJCXX does not appear in AM_CONDITIONAL -Patch7: %{name}-AM_CONDITIONAL.patch +Patch7: boinc-client-7.0.36-AM_CONDITIONAL.patch # BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(pre): pwdutils +%if 0%{?suse_version} < 1230 Requires(pre): %insserv_prereq Requires(pre): %fillup_prereq +%else +BuildRequires: pkgconfig(systemd) +%{?systemd_requires} +%endif BuildRequires: Mesa-devel #BuildRequires: autoconf @@ -190,7 +194,6 @@ This package contains documentation files for %{name}. %patch4 %patch5 %if 0%{?suse_version} >= 1220 -%patch6 %patch7 %endif @@ -212,11 +215,32 @@ pushd clientgui/res/skins/default/graphic/ %{__sed} -i 's/static char/static const char/g' *.xpm popd +# fix utf8 +iconv -f ISO88591 -t UTF8 < checkin_notes > checkin_notes.utf8 +touch -r checkin_notes checkin_notes.utf8 +mv checkin_notes.utf8 checkin_notes + +iconv -f ISO88591 -t UTF8 < checkin_notes_2004 > checkin_notes_2004.utf8 +touch -r checkin_notes_2004 checkin_notes_2004.utf8 +mv checkin_notes_2004.utf8 checkin_notes_2004 + +iconv -f ISO88591 -t UTF8 < checkin_notes_2005 > checkin_notes_2005.utf8 +touch -r checkin_notes_2005 checkin_notes_2005.utf8 +mv checkin_notes_2005.utf8 checkin_notes_2005 + +iconv -f ISO88591 -t UTF8 < checkin_notes_2006 > checkin_notes_2006.utf8 +touch -r checkin_notes_2006 checkin_notes_2006.utf8 +mv checkin_notes_2006.utf8 checkin_notes_2006 + +# fix permissions and newlines on source files +chmod 644 clientgui/{DlgItemProperties.h,AsyncRPC.cpp,DlgItemProperties.cpp} +sed -i 's/\r//' clientgui/DlgItemProperties.cpp + ### bnc#745656 ## remove files with questionable licenses # removing NVIDIA owned file that does not clearly allow redistribution or # modification -%{__rm} coprocs/CUDA/include/nvapi.h +%{__rm} coprocs/NVIDIA/include/nvapi.h # removing unnecessary APSL licensed files %{__rm} client/app_stats_mac.cpp @@ -305,19 +329,26 @@ popd %{__rm} -f %{buildroot}%{_sysconfdir}/sysconfig/%{name} # Install init and create symlink to /etc/init.d/boinc-client +%if 0%{?suse_version} >=1230 +chmod -x %{S:20} +%{__install} -Dm0755 %{S:20} %{buildroot}%{_unitdir}/%{name}.service +# And remove sysvinit script installed by boinc +rm -r %{buildroot}/%{_initrddir} +%else %{__install} -Dm0755 %{S:10} %{buildroot}%{_initrddir}/%{name} %{__install} -dm0755 %{buildroot}%{_sbindir} /bin/ln -sf %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} +# Install template for sysconfig +%{__install} -Dm0644 %{S:4} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} +%endif + # Install logrotate %{__install} -Dm0644 %{S:5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # Install bash completion %{__install} -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc -# Install template for sysconfig -%{__install} -Dm0644 %{S:4} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} - # Install desktop-file and icons %{__install} -Dm0644 boinc-gui-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/boinc-gui.png %{__install} -Dm0644 boinc-gui-64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/boinc-gui.png @@ -336,7 +367,8 @@ popd # Remove libtool archives %{__rm} %{buildroot}%{_libdir}/*.la - +# Remove static libraries +%{__rm} %{buildroot}%{_libdir}/*.a # Relinking Manpages %{__ln_s} -f boincmgr.1.gz %{buildroot}%{_mandir}/man1/boinc-manager.1.gz %{__ln_s} -f boinccmd.1.gz %{buildroot}%{_mandir}/man1/boinccmd.1.gz @@ -345,6 +377,9 @@ popd # Fix spurious-executable-perm %{__chmod} 0644 doc/*.php +# Don't pick INSTALL file in %doc macro + + # Install fake /var/lib/boinc %{__install} -dm0755 %{buildroot}%{_var}/lib/boinc @@ -354,9 +389,6 @@ popd %fdupes -s %{buildroot} -%clean -%{__rm} -rf '%{buildroot}' - %pre # add group %{_sbindir}/groupadd -r boinc 2>/dev/null || : @@ -370,15 +402,27 @@ if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then fi %preun +%if 0%{?suse_version} >=1230 +%service_del_preun %{name}.service +%else %stop_on_removal %{name} +%endif %post +%if 0%{?suse_version} >=1230 +%service_add_post %{name}.service +%else %fillup_and_insserv %{name} +%endif %{_sbindir}/usermod -c "BOINC Client" -s /sbin/nologin boinc 2>/dev/null || : %postun +%if 0%{?suse_version} >=1230 +%service_del_postun +%else %restart_on_update %{name} %insserv_cleanup +%endif %post -n boinc-manager /usr/bin/touch --no-create %{_datadir}/icons/hicolor || : @@ -402,16 +446,20 @@ fi %files %defattr(-,root,root,-) -%doc COPYING* COPYRIGHT INSTALL notes todo TODO_OLD README.SUSE +%doc COPYING* COPYRIGHT notes todo TODO_OLD README.SUSE %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/bash_completion.d/* +%if 0%{?suse_version} >=1230 +%{_unitdir}/%{name}.service +%else /var/adm/fillup-templates/sysconfig.%{name} +%{_sbindir}/rc%{name} +%{_initrddir}/%{name} +%endif %{_bindir}/boinc %{_bindir}/%{name} -%{_sbindir}/rc%{name} %{_bindir}/boinccmd %{_bindir}/switcher -%{_initrddir}/%{name} %{_mandir}/man1/boinccmd.1.gz %{_mandir}/man1/boinc.1.gz %defattr(-,boinc,boinc,-) diff --git a/boinc_core_release-7_0_36.tar.bz2 b/boinc_core_release-7_0_36.tar.bz2 new file mode 100644 index 0000000..1df9bc4 --- /dev/null +++ b/boinc_core_release-7_0_36.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:061700382a0bdedb182e501f8ce51d5e84831a010bdc322c03820cc5bab0291e +size 39793308 diff --git a/boinc_core_release_6_12_43.tar.bz2 b/boinc_core_release_6_12_43.tar.bz2 deleted file mode 100644 index 76c2522..0000000 --- a/boinc_core_release_6_12_43.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:16f1bb32459fc12178dd1e6f69e5398d1c0952f861eea5548877ae4393d39133 -size 18792133