diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2017-05-09 11:44:01 +0300 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-05-11 20:22:50 +0200 |
commit | 0ef88e24df5950d1fcdd46c9d78f0a292a555dd8 (patch) | |
tree | fc8575b91b48b8a4f518c5b1279a3f05da85aa88 /dev-libs | |
parent | dev-libs/sway: version bump to 0.13.0 (diff) | |
download | gentoo-0ef88e24df5950d1fcdd46c9d78f0a292a555dd8.tar.gz gentoo-0ef88e24df5950d1fcdd46c9d78f0a292a555dd8.tar.bz2 gentoo-0ef88e24df5950d1fcdd46c9d78f0a292a555dd8.zip |
dev-libs/sway: drop old 0.11-r3
Closes: https://github.com/gentoo/gentoo/pull/4584
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/sway/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/sway/files/sway-0.11-r3-keep-cap.patch | 84 | ||||
-rw-r--r-- | dev-libs/sway/sway-0.11-r3.ebuild | 77 |
3 files changed, 0 insertions, 162 deletions
diff --git a/dev-libs/sway/Manifest b/dev-libs/sway/Manifest index 5bdb07101e0d..17baa3df35b1 100644 --- a/dev-libs/sway/Manifest +++ b/dev-libs/sway/Manifest @@ -1,3 +1,2 @@ -DIST sway-0.11.tar.gz 11027681 SHA256 3d4d18afc849db8704d8da9cb69eb121ea92b27d7fa556acdcc6708f05c84964 SHA512 4cd69c83a0c8815ddc1663b4cd4b69c8d99d6d9d2a030e575c544836e3dfba445bc6407f7eaf97c0d7fdefd62e3ceed4206195ad91701f840ec8686f3b75989c WHIRLPOOL 72b663418c848c4a989d3d277761399dfdca046ebeac972e523b7fe78caee030bf4bbb9e3dd068b712f1a931feedbd214005989aa5fd5b6f877e42fe1f9d0873 DIST sway-0.12.2.tar.gz 5348464 SHA256 134387d4da1b912f31c0b23f75722d3896cd2560ef5a37775f75e7057cd4a010 SHA512 dee93cc8e42e00589529ae413206593f2b1c67076aa6a27980f65ee7ad86ca80684e3cbbdad8c1cbd0741af7235364453257b855a5c722fc80fbad32a37dc4d4 WHIRLPOOL b104dd9eef80b3a836ae93232bf785da66409286ff09831c0f01207a47cbc6bb32fab02b876bc2f1e8cc91f7205879eaf6059355922d83fe697eab4da4d1cbc3 DIST sway-0.13.0.tar.gz 5355130 SHA256 56a20c9d28d92777bf99381edd09078f72bf39b8ac586242950d514456a77f7d SHA512 7f137e103bb278777ee3e36b40446156ee02bfbba3ce099b23b093751832a67155cd9519f7583364608d584d2d7c9206a8945f2114ae58220b47bd0f1ff362e8 WHIRLPOOL bff2fd4550334625533984c3bfaa1b479609b7b62cd62935fc5e96eae4a518242d69f553775f44368b76c87ed64fcd6011df785339bd71fb62e09eb426948b1f diff --git a/dev-libs/sway/files/sway-0.11-r3-keep-cap.patch b/dev-libs/sway/files/sway-0.11-r3-keep-cap.patch deleted file mode 100644 index da821e365beb..000000000000 --- a/dev-libs/sway/files/sway-0.11-r3-keep-cap.patch +++ /dev/null @@ -1,84 +0,0 @@ -From ea1313d80d5ee1623b00c8cdf6e7ff8a7e14c2ae Mon Sep 17 00:00:00 2001 -From: Mykyta Holubakha <hilobakho@gmail.com> -Date: Thu, 12 Jan 2017 04:25:03 +0200 -Subject: [PATCH 1/2] Keep CAP_SYS_PTRACE with suid binary - ---- - sway/main.c | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/sway/main.c b/sway/main.c -index e8a02e7..6c74aab 100644 ---- a/sway/main.c -+++ b/sway/main.c -@@ -10,6 +10,9 @@ - #include <unistd.h> - #include <getopt.h> - #include <sys/capability.h> -+#ifdef __linux__ -+#include <sys/prctl.h> -+#endif - #include "sway/extensions.h" - #include "sway/layout.h" - #include "sway/config.h" -@@ -289,6 +292,18 @@ int main(int argc, char **argv) { - return 0; - } - -+#ifdef __linux__ -+ bool suid = false; -+ if (getuid() != geteuid() || getgid() != getegid()) { -+ // Retain capabilities after setuid() -+ if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0)) { -+ sway_log(L_ERROR, "Cannot keep caps after setuid()"); -+ exit(EXIT_FAILURE); -+ } -+ suid = true; -+ } -+#endif -+ - // we need to setup logging before wlc_init in case it fails. - if (debug) { - init_log(L_DEBUG); -@@ -311,6 +326,19 @@ int main(int argc, char **argv) { - } - register_extensions(); - -+#ifdef __linux__ -+ if (suid) { -+ // Drop every cap except CAP_SYS_PTRACE -+ cap_t caps = cap_init(); -+ cap_value_t keep = CAP_SYS_PTRACE; -+ if (cap_set_flag(caps, CAP_PERMITTED, 1, &keep, CAP_SET) || -+ cap_set_flag(caps, CAP_EFFECTIVE, 1, &keep, CAP_SET) || -+ cap_set_proc(caps)) { -+ sway_log(L_ERROR, "Failed to drop extra capabilities"); -+ exit(EXIT_FAILURE); -+ } -+ } -+#endif - // handle SIGTERM signals - signal(SIGTERM, sig_handler); - - -From d9ba61d7e91c5aceef1a6a736dc65f0594b9be2a Mon Sep 17 00:00:00 2001 -From: Mykyta Holubakha <hilobakho@gmail.com> -Date: Thu, 12 Jan 2017 04:35:09 +0200 -Subject: [PATCH 2/2] Log capability dropping - ---- - sway/main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sway/main.c b/sway/main.c -index 6c74aab..7bf71b5 100644 ---- a/sway/main.c -+++ b/sway/main.c -@@ -331,6 +331,7 @@ int main(int argc, char **argv) { - // Drop every cap except CAP_SYS_PTRACE - cap_t caps = cap_init(); - cap_value_t keep = CAP_SYS_PTRACE; -+ sway_log(L_INFO, "Dropping extra capabilities"); - if (cap_set_flag(caps, CAP_PERMITTED, 1, &keep, CAP_SET) || - cap_set_flag(caps, CAP_EFFECTIVE, 1, &keep, CAP_SET) || - cap_set_proc(caps)) { diff --git a/dev-libs/sway/sway-0.11-r3.ebuild b/dev-libs/sway/sway-0.11-r3.ebuild deleted file mode 100644 index aa56d8f76baa..000000000000 --- a/dev-libs/sway/sway-0.11-r3.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils cmake-utils - -DESCRIPTION="i3-compatible Wayland window manager" -HOMEPAGE="http://swaywm.org/" - -SRC_URI="https://github.com/SirCmpwn/sway/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="+swaybg +swaybar +swaymsg swaygrab swaylock +gdk-pixbuf zsh-completion wallpapers systemd" - -RDEPEND=">=dev-libs/wlc-0.0.5[systemd=] - dev-libs/json-c - dev-libs/libpcre - dev-libs/libinput - x11-libs/libxkbcommon - dev-libs/wayland - sys-libs/libcap - x11-libs/pango - x11-libs/cairo - swaylock? ( virtual/pam ) - gdk-pixbuf? ( x11-libs/gdk-pixbuf[jpeg] )" - -DEPEND="${RDEPEND} - virtual/pkgconfig - app-text/asciidoc" - -PATCHES=( "${FILESDIR}/sway-0.11-r3-keep-cap.patch" ) - -src_prepare() { - cmake-utils_src_prepare - - # remove bad CFLAGS that upstream is trying to add - sed -i -e '/FLAGS.*-Werror/d' CMakeLists.txt || die -} - -src_configure() { - local mycmakeargs=( - -Denable-swaybar=$(usex swaybar) - -Denable-swaybg=$(usex swaybg) - -Denable-swaygrab=$(usex swaygrab) - -Denable-swaylock=$(usex swaylock) - -Denable-swaymsg=$(usex swaymsg) - - -Ddefault-wallpaper=$(usex wallpapers) - - -Denable-gdk-pixbuf=$(usex gdk-pixbuf) - -Dzsh-completions=$(usex zsh-completion) - - -DCMAKE_INSTALL_SYSCONFDIR="/etc" - -DLD_LIBRARY_PATH="${EPREFIX}/usr/lib" - -DGIT_COMMIT_HASH="${PVR}" # specify version info, may change in future - ) - - cmake-utils_src_configure -} - -src_install() { - cmake-utils_src_install - - use !systemd && fperms u+s /usr/bin/sway -} - -pkg_postinst() { - if use swaygrab - then - optfeature "swaygrab screenshot support" media-gfx/imagemagick[png] - optfeature "swaygrab video capture support" virtual/ffmpeg - fi - optfeature "X11 applications support" dev-libs/wlc[xwayland] x11-base/xorg-server[wayland] -} |