aboutsummaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authormid-kid <esteve.varela@gmail.com>2017-08-05 11:57:16 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-08-12 06:57:20 +0700
commitc77a9aa92802b46f3be80151192aeb0683aeeb57 (patch)
tree0672c6c300dc67acdb7b3025b18c51720f2b3d2c /desktop
parent622b84a27cd8e1cd74d6eb7fef30d3b4d40f3ffe (diff)
desktop/i3lock: Updated for version 2.9.1.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/i3lock/README4
-rw-r--r--desktop/i3lock/i3lock-2.9-revert-composite.patch71
-rw-r--r--desktop/i3lock/i3lock-2.9.1-no-pam.patch (renamed from desktop/i3lock/i3lock-2.9-no-pam.patch)30
-rw-r--r--desktop/i3lock/i3lock.SlackBuild15
-rw-r--r--desktop/i3lock/i3lock.info6
5 files changed, 24 insertions, 102 deletions
diff --git a/desktop/i3lock/README b/desktop/i3lock/README
index edb2337c8c4a8..adf8e935d1701 100644
--- a/desktop/i3lock/README
+++ b/desktop/i3lock/README
@@ -5,7 +5,3 @@ Slackware.
For verifying the password it uses shadow instead. Because of that, it needs
suid permissions, but those privileges are dropped as soon as possible.
The code for this was taken from slock. See the patch and LICENSE-slock.
-
-NOTE: Version 2.9-1_SBo is patched to revert this commit:
-https://github.com/i3/i3lock/commit/80d4452ec680bcb0e57418f69d44d88ded82047c
-See the SlackBuild for more info.
diff --git a/desktop/i3lock/i3lock-2.9-revert-composite.patch b/desktop/i3lock/i3lock-2.9-revert-composite.patch
deleted file mode 100644
index 58ef56b05359a..0000000000000
--- a/desktop/i3lock/i3lock-2.9-revert-composite.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-+++ Makefile
-@@ -15,8 +15,8 @@
- CFLAGS += -pipe
- CFLAGS += -Wall
- CPPFLAGS += -D_GNU_SOURCE
--CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
--LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
-+CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
-+LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
- LIBS += -lev
- LIBS += -lm
-
-+++ README.md
-@@ -25,7 +25,6 @@
- - libxcb-util
- - libpam-dev
- - libcairo-dev
--- libxcb-composite0
- - libxcb-xinerama
- - libev
- - libx11-dev
-+++ xcb.c
-@@ -11,7 +11,6 @@
- #include <xcb/xcb_image.h>
- #include <xcb/xcb_atom.h>
- #include <xcb/xcb_aux.h>
--#include <xcb/composite.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdbool.h>
-@@ -107,29 +106,6 @@
- uint32_t mask = 0;
- uint32_t values[3];
- xcb_window_t win = xcb_generate_id(conn);
-- xcb_window_t parent_win = scr->root;
--
-- /* Check whether the composite extension is available */
-- const xcb_query_extension_reply_t *extension_query = NULL;
-- xcb_generic_error_t *error = NULL;
-- xcb_composite_get_overlay_window_cookie_t cookie;
-- xcb_composite_get_overlay_window_reply_t *composite_reply = NULL;
--
-- extension_query = xcb_get_extension_data(conn, &xcb_composite_id);
-- if (extension_query && extension_query->present) {
-- /* When composition is used, we need to use the composite overlay
-- * window instead of the normal root window to be able to cover
-- * composited windows */
-- cookie = xcb_composite_get_overlay_window(conn, scr->root);
-- composite_reply = xcb_composite_get_overlay_window_reply(conn, cookie, &error);
--
-- if (!error && composite_reply) {
-- parent_win = composite_reply->overlay_win;
-- }
--
-- free(composite_reply);
-- free(error);
-- }
-
- if (pixmap == XCB_NONE) {
- mask |= XCB_CW_BACK_PIXEL;
-@@ -151,8 +127,8 @@
-
- xcb_create_window(conn,
- XCB_COPY_FROM_PARENT,
-- win, /* the window id */
-- parent_win,
-+ win, /* the window id */
-+ scr->root, /* parent == root */
- 0, 0,
- scr->width_in_pixels,
- scr->height_in_pixels, /* dimensions */
diff --git a/desktop/i3lock/i3lock-2.9-no-pam.patch b/desktop/i3lock/i3lock-2.9.1-no-pam.patch
index 8fd5a30b7e282..fc3562776d03a 100644
--- a/desktop/i3lock/i3lock-2.9-no-pam.patch
+++ b/desktop/i3lock/i3lock-2.9.1-no-pam.patch
@@ -25,7 +25,11 @@
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+++ Makefile
-@@ -20,9 +20,9 @@
+@@ -17,13 +17,12 @@
+ CPPFLAGS += -D_GNU_SOURCE
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+-LIBS += -lpam
LIBS += -lev
LIBS += -lm
@@ -37,7 +41,7 @@
endif
FILES:=$(wildcard *.c)
-@@ -50,9 +50,7 @@
+@@ -51,9 +50,7 @@
install: all
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
@@ -47,13 +51,13 @@
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/i3lock
-@@ -61,7 +59,7 @@
+@@ -62,7 +59,7 @@
[ ! -d i3lock-${VERSION} ] || rm -rf i3lock-${VERSION}
[ ! -e i3lock-${VERSION}.tar.bz2 ] || rm i3lock-${VERSION}.tar.bz2
mkdir i3lock-${VERSION}
- cp *.c *.h i3lock.1 i3lock.pam Makefile LICENSE README.md CHANGELOG i3lock-${VERSION}
+ cp *.c *.h i3lock.1 Makefile LICENSE README.md CHANGELOG i3lock-${VERSION}
- sed -e 's/^I3LOCK_VERSION:=\(.*\)/I3LOCK_VERSION:=$(shell /bin/echo '${I3LOCK_VERSION}' | sed 's/\\/\\\\/g')/g;s/^VERSION:=\(.*\)/VERSION:=${VERSION}/g' Makefile > i3lock-${VERSION}/Makefile
+ sed -e 's/^\s*I3LOCK_VERSION:=\(.*\)/I3LOCK_VERSION:=$(shell /bin/echo '${I3LOCK_VERSION}' | sed 's/\\/\\\\/g')/g;s/^VERSION:=\(.*\)/VERSION:=${VERSION}/g' Makefile > i3lock-${VERSION}/Makefile
tar cfj i3lock-${VERSION}.tar.bz2 i3lock-${VERSION}
rm -rf i3lock-${VERSION}
+++ i3lock.1
@@ -128,15 +132,15 @@
+ if (!(f = fopen(oomfile, "w"))) {
+ if (errno == ENOENT)
+ return;
-+ errx(EXIT_FAILURE, "i3lock: fopen %s: %s", oomfile, strerror(errno));
++ errx(EXIT_FAILURE, "fopen %s: %s", oomfile, strerror(errno));
+ }
+ fprintf(f, "%d", OOM_SCORE_ADJ_MIN);
+ if (fclose(f)) {
+ if (errno == EACCES)
-+ errx(EXIT_FAILURE, "i3lock: unable to disable OOM killer. "
++ errx(EXIT_FAILURE, "unable to disable OOM killer. "
+ "Make sure to suid or sgid i3lock.");
+ else
-+ errx(EXIT_FAILURE, "i3lock: fclose %s: %s", oomfile, strerror(errno));
++ errx(EXIT_FAILURE, "fclose %s: %s", oomfile, strerror(errno));
+ }
+}
+#endif
@@ -163,7 +167,7 @@
- pam_setcred(pam_handle, PAM_REFRESH_CRED);
- pam_end(pam_handle, PAM_SUCCESS);
+ if (!(inputhash = crypt(password, hash)))
-+ fprintf(stderr, "i3lock: crypt: %s", strerror(errno));
++ fprintf(stderr, "crypt: %s", strerror(errno));
+ else if (!strcmp(inputhash, hash)) {
+ DEBUG("successfully authenticated");
+ clear_password_memory();
@@ -249,22 +253,22 @@
+ if (!strcmp(hash, "x")) {
+ struct spwd *sp;
+ if (!(sp = getspnam(pw->pw_name)))
-+ errx(EXIT_FAILURE, "i3lock: getspnam: cannot retrieve shadow entry. "
++ errx(EXIT_FAILURE, "getspnam: cannot retrieve shadow entry. "
+ "Make sure to suid or sgid i3lock.");
+ hash = sp->sp_pwdp;
+ }
+
+ errno = 0;
+ if (!crypt("", hash))
-+ errx(EXIT_FAILURE, "i3lock: crypt: %s", strerror(errno));
++ errx(EXIT_FAILURE, "crypt: %s", strerror(errno));
+
+ /* drop privileges */
+ if (setgroups(0, NULL) < 0)
-+ errx(EXIT_FAILURE, "i3lock: setgroups: %s", strerror(errno));
++ errx(EXIT_FAILURE, "setgroups: %s", strerror(errno));
+ if (setgid(pw->pw_gid) < 0)
-+ errx(EXIT_FAILURE, "i3lock: setgid: %s", strerror(errno));
++ errx(EXIT_FAILURE, "setgid: %s", strerror(errno));
+ if (setuid(pw->pw_uid) < 0)
-+ errx(EXIT_FAILURE, "i3lock: setuid: %s", strerror(errno));
++ errx(EXIT_FAILURE, "setuid: %s", strerror(errno));
+#endif
+
char *optstring = "hvnbdc:p:ui:teI:f";
diff --git a/desktop/i3lock/i3lock.SlackBuild b/desktop/i3lock/i3lock.SlackBuild
index 2493ae5a9db8c..5fa35477e646d 100644
--- a/desktop/i3lock/i3lock.SlackBuild
+++ b/desktop/i3lock/i3lock.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=i3lock
-VERSION=${VERSION:-2.9}
+VERSION=${VERSION:-2.9.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,23 +69,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# This patch reverts a commit that prevents the leakage of information through
-# composited notifications.
-# That commit causes issues (lag, most notably) on certain compositors.
-# See the upstream issue: https://github.com/i3/i3lock/issues/128
-# You're welcome to try to comment this patch out and see whether it just works for you,
-# or just leave this as is.
-patch -p0 -i $CWD/i3lock-2.9-revert-composite.patch
-
# This patch removes all the PAM-related code,
# and checks the password against shadow instead.
-patch -p0 -i $CWD/i3lock-2.9-no-pam.patch
+patch -p0 -i $CWD/i3lock-2.9.1-no-pam.patch
make install DESTDIR=$PKG
-# i3lock needs suid to make sure it isn't killed and to read shadow.
+# i3lock needs setuid to make sure it isn't killed by the kernel and to read shadow.
# Don't worry, the privileges are dropped really soon after starting
# and everything else runs as your user.
+chown root:shadow $PKG/usr/bin/i3lock
chmod 4755 $PKG/usr/bin/i3lock
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
diff --git a/desktop/i3lock/i3lock.info b/desktop/i3lock/i3lock.info
index bc123d274f579..7c1ec8ee420d7 100644
--- a/desktop/i3lock/i3lock.info
+++ b/desktop/i3lock/i3lock.info
@@ -1,8 +1,8 @@
PRGNAM="i3lock"
-VERSION="2.9"
+VERSION="2.9.1"
HOMEPAGE="https://i3wm.org/i3lock/"
-DOWNLOAD="https://i3wm.org/i3lock/i3lock-2.9.tar.bz2"
-MD5SUM="3d0038021778f3178192f566dc87a931"
+DOWNLOAD="https://i3wm.org/i3lock/i3lock-2.9.1.tar.bz2"
+MD5SUM="2983fff62236d54687dc7d51a6895edb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libev libxkbcommon"