From 0dc14c54b1580534b5bc55599101fe90cde5b377 Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Fri, 5 Oct 2018 15:21:15 +0200 Subject: sci-misc/boinc: 7.12.1 → 7.14.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use package provided systemd unit. Try to fix installation of sandboxing tools. Add X init script to allow boinc user to detect idle in X sessions. Use eapi7-ver eclass to simplify maintenance. Inherit desktop eclass explicitely for make_desktop_entry calls. Package-Manager: Portage-2.3.50, Repoman-2.3.10 Manifest-Sign-Key: 0x5A56C8CD0C13248A --- sci-misc/boinc/Manifest | 29 +-- sci-misc/boinc/boinc-7.14.0.ebuild | 200 +++++++++++++++++++++ ...01-Install-switcher-tool-to-FHS-directory.patch | 60 +++++++ .../0002-Install-missing-tool-for-sandboxing.patch | 36 ++++ ...ing-config.h-include-in-setprojectgrp.cpp.patch | 25 +++ sci-misc/boinc/files/90-boincxss | 13 ++ 6 files changed, 349 insertions(+), 14 deletions(-) create mode 100644 sci-misc/boinc/boinc-7.14.0.ebuild create mode 100644 sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch create mode 100644 sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch create mode 100644 sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch create mode 100644 sci-misc/boinc/files/90-boincxss diff --git a/sci-misc/boinc/Manifest b/sci-misc/boinc/Manifest index 22eb3c1..c4576e7 100644 --- a/sci-misc/boinc/Manifest +++ b/sci-misc/boinc/Manifest @@ -1,24 +1,25 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 +Hash: SHA256 DIST boinc-7.12.1.tar.gz 50378728 BLAKE2B efc903129fdf3dbc734afc7bf566e017d116b2b0a2673b07917d21300e20f5da4facc40c6c963062a3624553932149f22b7673513e4790375ce9239d9c55bd3f SHA512 7e96a3f7929c153b0001d0b0d2f626256bde9278e56fe9d10985292bd38646ac8a7ff572b8757a3f72cd8481fd893deb111a8c7a572beaec2881dd354651564c +DIST boinc-7.14.0.tar.gz 52228832 BLAKE2B 87f48325d7183108dc80520228d91030037f2de472bd55ec3eb1d56a8b45dd6af46ad37616a0b94e9969578a4eeb9874be376ca706c183819a5518cbba3ffc73 SHA512 cac985814b15b7252411e25acee5f5a8a0d470536f5e15ca42e5524fa6780568b96ffcd1ba27abff083a5e63aa8de86ead5896ca90d41575a56208e4992ca37c DIST boinc.tif 288208 BLAKE2B 156a99f08dcabc62a46874830600b9d237e64b650b8edf35db67b82006a67039a3965707194e8f0b25cfd65138b8700c0bfb877507418393b9cd3df32e94d260 SHA512 548e19b87fd70dbeb05687320b86aad39981c161b5b5b7e02fc3ce886d4c464c9bb763d5652d9895dd505ce247c7ff4490caa3d407e28f54ce889ffbab22d046 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQKTBAEBCgB9FiEEX+aBqe7MmoWBwzA1lSmjXZiBxnkFAluWLRpfFIAAAAAALgAo +iQKTBAEBCAB9FiEEX+aBqe7MmoWBwzA1lSmjXZiBxnkFAlu3ZUhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDVG RTY4MUE5RUVDQzlBODU4MUMzMzAzNTk1MjlBMzVEOTg4MUM2NzkACgkQlSmjXZiB -xnnZDBAAiFpftaPUf9eYvo+4qD04GrS5oWYmTr61mz2qZUdQftkUOKQC6UrgPaSX -GHsE9aw5zMRrLNa0QloTMZ3tDHLjxyKrcBR7KjVNBUM/Up8AfM2sElDfAWKe8W/A -DECL6rF6DFkV3qkIec958DodA+GDE1Dok1ljHAB/K8jzX2/HM4iOHY0cs7+DII+M -vSEw6aIvA3DsJM5n00TESRXS03exH48OqBZtuAUWSIWmjdCu6ZoyChmHH+aoUJ4V -qtPyRR/I2YNt6V6BMQb5SOtRK3gpeeorZEUk1iiCTr2k2MvvK6UiZsJjYSaOIxSQ -L+WZOj5xicr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NeHd7FtG4= +=i8bo -----END PGP SIGNATURE----- diff --git a/sci-misc/boinc/boinc-7.14.0.ebuild b/sci-misc/boinc/boinc-7.14.0.ebuild new file mode 100644 index 0000000..89a6103 --- /dev/null +++ b/sci-misc/boinc/boinc-7.14.0.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +WX_GTK_VER=3.0-gtk3 + +inherit autotools desktop eapi7-ver gnome2-utils linux-info user wxwidgets + +MY_PV=$(ver_cut 1-2) + +DESCRIPTION="The Berkeley Open Infrastructure for Network Computing" +HOMEPAGE="http://boinc.ssl.berkeley.edu/" +SRC_URI="https://github.com/BOINC/boinc/archive/client_release/${MY_PV}/${PV}.tar.gz -> ${P}.tar.gz + X? ( https://boinc.berkeley.edu/logo/boinc_glossy2_512_F.tif -> ${PN}.tif )" +RESTRICT="mirror" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="X cuda curl_ssl_gnutls curl_ssl_libressl +curl_ssl_openssl" + +REQUIRED_USE="^^ ( curl_ssl_gnutls curl_ssl_libressl curl_ssl_openssl ) " + +# libcurl must not be using an ssl backend boinc does not support. +# If the libcurl ssl backend changes, boinc should be recompiled. +RDEPEND=" + >=app-misc/ca-certificates-20080809 + cuda? ( + >=dev-util/nvidia-cuda-toolkit-2.1 + >=x11-drivers/nvidia-drivers-180.22 + ) + net-misc/curl[curl_ssl_gnutls(-)=,curl_ssl_libressl(-)=,-curl_ssl_nss(-),curl_ssl_openssl(-)=,-curl_ssl_axtls(-),-curl_ssl_cyassl(-)] + sys-apps/util-linux + sys-libs/zlib + X? ( + dev-db/sqlite:3 + media-libs/freeglut + virtual/jpeg:0= + x11-libs/gtk+:3 + >=x11-libs/libnotify-0.7 + x11-libs/wxGTK:${WX_GTK_VER}[X,opengl,webkit] + ) +" +DEPEND="${RDEPEND} + app-text/docbook-xml-dtd:4.4 + app-text/docbook2X + sys-devel/gettext + X? ( virtual/imagemagick-tools[png,tiff] ) +" + +PATCHES=( + # >=x11-libs/wxGTK-3.0.2.0-r3 has webview removed, bug 587462 + "${FILESDIR}"/fix_webview.patch + # fix sandboxing tools installation + "${FILESDIR}"/0001-Install-switcher-tool-to-FHS-directory.patch + "${FILESDIR}"/0002-Install-missing-tool-for-sandboxing.patch + "${FILESDIR}"/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch +) + +S="${WORKDIR}/${PN}-client_release-${MY_PV}-${PV}" + +pkg_setup() { + # Bug 578750 + if use kernel_linux; then + linux-info_pkg_setup + if ! linux_config_exists; then + ewarn "Can't check the linux kernel configuration." + ewarn "You might be missing vsyscall support." + elif kernel_is -ge 4 4 \ + && linux_chkconfig_present LEGACY_VSYSCALL_NONE; then + ewarn "You do not have vsyscall emulation enabled." + ewarn "This will prevent some boinc projects from running." + ewarn "Please enable vsyscall emulation:" + ewarn " CONFIG_LEGACY_VSYSCALL_EMULATE=y" + ewarn "in /usr/src/linux/.config, to be found at" + ewarn " Processor type and features --->" + ewarn " vsyscall table for legacy applications (None) --->" + ewarn " (X) Emulate" + ewarn "Alternatively, you can enable CONFIG_LEGACY_VSYSCALL_NATIVE." + ewarn "However, this has security implications and is not recommended." + fi + fi +} + +src_prepare() { + default + + # prevent bad changes in compile flags, bug 286701 + sed -i -e "s:BOINC_SET_COMPILE_FLAGS::" configure.ac || die "sed failed" + + # fix systemd unit installation path + sed -i -e "s:usr/lib:lib:" client/scripts/Makefile.am || die + + eautoreconf + + use X && need-wxwidgets unicode +} + +src_configure() { + # TODO Xss is automagic on --enable-client. + econf --disable-server \ + --enable-client \ + --enable-dynamic-client-linkage \ + --disable-static \ + --enable-unicode \ + --with-ssl \ + $(use_with X x) \ + $(use_enable X manager) \ + $(usex X --with-wx-config="${WX_CONFIG}" --without-wxdir) +} + +src_install() { + default + + keepdir /var/lib/${PN} + + if use X; then + # Create new icons. bug 593362 + local s SIZES=(16 22 24 32 36 48 64 72 96 128 192 256) + for s in "${SIZES[@]}"; do + convert "${DISTDIR}"/${PN}.tif -resize ${s}x${s} "${WORKDIR}"/boinc_${s}.png || die + newicon -s $s "${WORKDIR}"/boinc_${s}.png boinc.png + done + make_desktop_entry boincmgr "${PN}" "${PN}" "Math;Science" "Path=/var/lib/${PN}" + + # Rename the desktop file to boincmgr.desktop to (hot)fix bug 599910 + mv "${ED%/}"/usr/share/applications/boincmgr{-${PN},}.desktop || \ + die "Failed to rename desktop file" + fi + + # cleanup cruft + rm -r "${ED%/}"/etc || die "rm failed" + find "${D}" -name '*.la' -delete || die "Removing .la files failed" + + sed -e "s/@libdir@/$(get_libdir)/" "${FILESDIR}"/${PN}.init.in > ${PN}.init || die + newinitd ${PN}.init ${PN} + newconfd "${FILESDIR}"/${PN}.conf ${PN} + + # Give X access to boinc for idle detection + exeinto /etc/X11/xinit/xinitrc.d + newexe "${FILESDIR}"/90-boincxss 90-boincxss +} + +pkg_preinst() { + enewgroup ${PN} + # note this works only for first install so we have to + # elog user about the need of being in video group + local groups="${PN}" + if use cuda; then + groups+=",video" + fi + enewuser ${PN} -1 -1 /var/lib/${PN} "${groups}" +} + +pkg_postinst() { + if use X; then + gnome2_icon_cache_update + fi + + elog + elog "You are using the source compiled version of boinc." + use X && elog "The graphical manager can be found at /usr/bin/boincmgr" + elog + elog "You need to attach to a project to do anything useful with boinc." + elog "You can do this by running /etc/init.d/boinc attach" + elog "The howto for configuration is located at:" + elog "http://boinc.berkeley.edu/wiki/Anonymous_platform" + elog + # Add warning about the new password for the client, bug 121896. + if use X; then + elog "If you need to use the graphical manager the password is in:" + elog "/var/lib/boinc/gui_rpc_auth.cfg" + elog "Where /var/lib/ is default RUNTIMEDIR, that can be changed in:" + elog "/etc/conf.d/boinc" + elog "You should change this password to something more memorable (can be even blank)." + elog "Remember to launch init script before using manager. Or changing the password." + elog + fi + if use cuda; then + elog "To be able to use CUDA you should add boinc user to video group." + elog "Run as root:" + elog "gpasswd -a boinc video" + elog + fi + # Add information about BOINC supporting OpenCL + elog "BOINC supports OpenCL. To use it you have to eselect" + if use cuda; then + elog "nvidia as the OpenCL implementation, as you are using CUDA." + else + elog "the correct OpenCL implementation for your graphic card." + fi + elog +} + +pkg_postrm() { + if use X; then + gnome2_icon_cache_update + fi +} diff --git a/sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch b/sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch new file mode 100644 index 0000000..456b804 --- /dev/null +++ b/sci-misc/boinc/files/0001-Install-switcher-tool-to-FHS-directory.patch @@ -0,0 +1,60 @@ +From 3746e1367fe5dc430c431b349ed6a40ee7156e74 Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Thu, 4 Oct 2018 10:30:03 +0200 +Subject: [PATCH 1/3] Install switcher tool to FHS directory + +--- + client/Makefile.am | 2 +- + client/{file_names.h => file_names.h.in} | 2 +- + configure.ac | 1 + + 3 files changed, 3 insertions(+), 2 deletions(-) + rename client/{file_names.h => file_names.h.in} (98%) + +diff --git a/client/Makefile.am b/client/Makefile.am +index f39c45f..0fb91d3 100644 +--- a/client/Makefile.am ++++ b/client/Makefile.am +@@ -24,7 +24,15 @@ endif + + bin_PROGRAMS = boinc_client boinccmd + if !OS_WIN32 +-bin_PROGRAMS += switcher ++pkglibexec_PROGRAMS = switcher + endif + ++edit = $(SED) -e 's|@pkglibexecdir[@]|$(pkglibexecdir)|g' ++ ++file_names.h: file_names.h.in Makefile ++ $(AM_V_GEN)$(edit) $@.in > $@ ++ ++BUILT_SOURCES = file_names.h ++CLEANFILES = file_names.h ++ + boinccmd_SOURCES = boinc_cmd.cpp +@@ -67,6 +67,7 @@ boinc_client_SOURCES = \ + current_version.cpp \ + dhrystone.cpp \ + dhrystone2.cpp \ ++ file_names.h \ + file_names.cpp \ + file_xfer.cpp \ + gpu_amd.cpp \ +diff --git a/client/file_names.h b/client/file_name.h.in +similarity index 98% +rename from client/file_names.h +rename to client/file_name.h.in +index 37f9b29..67874e5 100644 +--- a/client/file_names.h ++++ b/client/file_names.h.in +@@ -97,7 +97,7 @@ extern void send_log_after(const char* filename, double t, MIOFILE& mf); + #define STATE_FILE_PREV "client_state_prev.xml" + #define STDERR_FILE_NAME "stderr.txt" + #define STDOUT_FILE_NAME "stdout.txt" +-#define SWITCHER_DIR "switcher" ++#define SWITCHER_DIR "@pkglibexecdir@" + #define SWITCHER_FILE_NAME "switcher" + #define TASK_STATE_FILENAME "boinc_task_state.xml" + #define TEMP_ACCT_FILE_NAME "temp_acct.xml" +-- +2.18.0 + diff --git a/sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch b/sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch new file mode 100644 index 0000000..fa05160 --- /dev/null +++ b/sci-misc/boinc/files/0002-Install-missing-tool-for-sandboxing.patch @@ -0,0 +1,36 @@ +From 6a337de43686989fe3db07aed3fd5317b9754a8a Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Thu, 4 Oct 2018 10:31:42 +0200 +Subject: [PATCH 2/3] Install missing tool for sandboxing + +--- + client/Makefile.am | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/client/Makefile.am b/client/Makefile.am +index 0fb91d3..06b48df 100644 +--- a/client/Makefile.am ++++ b/client/Makefile.am +@@ -24,7 +24,7 @@ endif + + bin_PROGRAMS = boinc_client boinccmd + if !OS_WIN32 +-pkglibexec_PROGRAMS = switcher ++pkglibexec_PROGRAMS = switcher setprojectgrp + endif + + boinccmd_SOURCES = boinc_cmd.cpp +@@ -127,6 +127,10 @@ switcher_SOURCES = switcher.cpp + switcher_LDFLAGS = $(AM_LDFLAGS) -L../lib + switcher_LDADD = $(LIBBOINC) + ++setprojectgrp_SOURCES = setprojectgrp.cpp ++setprojectgrp_LDFLAGS = $(AM_LDFLAGS) -L../lib ++setprojectgrp_LDADD = $(LIBBOINC) ++ + ## since we are using libtool we need some magic to get boinc and boinc_client + ## to both be installed properly. The next two rules do that... + all-local: boinc$(EXEEXT) +-- +2.18.0 + diff --git a/sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch b/sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch new file mode 100644 index 0000000..29fd579 --- /dev/null +++ b/sci-misc/boinc/files/0003-Add-missing-config.h-include-in-setprojectgrp.cpp.patch @@ -0,0 +1,25 @@ +From 5b979fa7f75557b7e246a58290f70601e31db9b9 Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Thu, 4 Oct 2018 11:13:35 +0200 +Subject: [PATCH 3/3] Add missing config.h include in setprojectgrp.cpp + +--- + client/setprojectgrp.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/client/setprojectgrp.cpp b/client/setprojectgrp.cpp +index 608410d..fcf64d2 100644 +--- a/client/setprojectgrp.cpp ++++ b/client/setprojectgrp.cpp +@@ -23,6 +23,8 @@ + // + // setprojectgrp runs setuid boinc_master and setgid boinc_project + ++#include "config.h" ++ + #include + #include + #include +-- +2.18.0 + diff --git a/sci-misc/boinc/files/90-boincxss b/sci-misc/boinc/files/90-boincxss new file mode 100644 index 0000000..0c0af5e --- /dev/null +++ b/sci-misc/boinc/files/90-boincxss @@ -0,0 +1,13 @@ +#!/bin/sh +# +# This file is sourced by Xsession(5), not executed. +BOINC_USER=boinc +# +# If xhost installed, use it to give access to the X server to any +# process from the same user on the local host. +# Unlike other uses of xhost, this is safe since the kernel can check +# the actual owner of the calling process. + +if type xhost >/dev/null 2>&1; then + id -u $BOINC_USER >/dev/null 2>&1 && xhost +SI:localuser:$BOINC_USER || : +fi -- cgit v1.2.3-65-gdbad