Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Mar 2024 00:07:13 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: edc1fa32671f - main - x11/hyprlock: adapt to upstream PAM config
Message-ID:  <202403020007.42207DpP042925@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=edc1fa32671fc8016b166a3b227a2ed3c95e99f7

commit edc1fa32671fc8016b166a3b227a2ed3c95e99f7
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-03-01 23:54:46 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-03-02 00:06:36 +0000

    x11/hyprlock: adapt to upstream PAM config
---
 x11/hyprlock/Makefile                 |  7 +++----
 x11/hyprlock/distinfo                 |  2 ++
 x11/hyprlock/files/patch-pam          | 21 ---------------------
 x11/hyprlock/files/patch-pam_hyprlock | 16 ++++++++++++++++
 4 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/x11/hyprlock/Makefile b/x11/hyprlock/Makefile
index 44c4ca38cdd5..44cc0508700c 100644
--- a/x11/hyprlock/Makefile
+++ b/x11/hyprlock/Makefile
@@ -3,6 +3,9 @@ DISTVERSIONPREFIX=	v
 DISTVERSION=	0.1.0
 CATEGORIES=	x11 wayland
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	fa2a875e339a.patch:-p1 # https://github.com/hyprwm/hyprlock/pull/115
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Hyprland's GPU-accelerated screen locking utility #'
 WWW=		https://github.com/hyprwm/hyprlock
@@ -37,10 +40,6 @@ LIB_DEPENDS+=	libdate-tz.so:devel/date
 USES+=		localbase:ldflags
 .endif
 
-post-install:
-	${INSTALL_DATA} ${WRKSRC}/pam/${PORTNAME} \
-		${STAGEDIR}${PREFIX}/etc/pam.d/${PORTNAME}
-
 # XXX Drop after FreeBSD 13.2 EOL around 2024-05-01 (don't forget distinfo)
 .if ${CXX} == c++ && exists(/usr/lib/libc++.so)
 .if !exists(/usr/include/c++/v1/expected) || make(makesum) || make(fetch)
diff --git a/x11/hyprlock/distinfo b/x11/hyprlock/distinfo
index 573354f71dc6..fe97d431fc32 100644
--- a/x11/hyprlock/distinfo
+++ b/x11/hyprlock/distinfo
@@ -3,3 +3,5 @@ SHA256 (hyprwm-hyprlock-v0.1.0_GH0.tar.gz) = 5d0e6547ac073c78e95d4f086a258e1e571
 SIZE (hyprwm-hyprlock-v0.1.0_GH0.tar.gz) = 49582
 SHA256 (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = b5a9ff1793b1e2d388a3819bf35797002b1d2e40bb35a10c65605e0ea1435271
 SIZE (llvm-llvm-project-llvmorg-16.0.1_GH0.tar.gz) = 179289803
+SHA256 (fa2a875e339a.patch) = 51dea8716b4b2b0371b0380e904f9fd0d7b0a35d5527dbe52c0fb86831ea0871
+SIZE (fa2a875e339a.patch) = 1973
diff --git a/x11/hyprlock/files/patch-pam b/x11/hyprlock/files/patch-pam
deleted file mode 100644
index 044b0af3a847..000000000000
--- a/x11/hyprlock/files/patch-pam
+++ /dev/null
@@ -1,21 +0,0 @@
-"su" has "auth sufficient pam_self.so" but a screen locker is
-supposed to ask for password regardless.
-
-pam_unix(8) requires root priveleges to access master.passwd(5),
-so try authenticating via setuid helper first.
-
---- pam/hyprlock.orig	1970-01-01 00:00:00 UTC
-+++ pam/hyprlock
-@@ -0,0 +1 @@
-+auth include unix-selfauth
---- src/core/Password.cpp.orig	2024-02-23 21:29:08 UTC
-+++ src/core/Password.cpp
-@@ -30,7 +30,7 @@ std::shared_ptr<CPassword::SVerificationResult> CPassw
-         const pam_conv localConv = {conv, NULL};
-         pam_handle_t*  handle    = NULL;
- 
--        int            ret = pam_start("su", getlogin(), &localConv, &handle);
-+        int            ret = pam_start("hyprlock", getlogin(), &localConv, &handle);
- 
-         if (ret != PAM_SUCCESS) {
-             result->success    = false;
diff --git a/x11/hyprlock/files/patch-pam_hyprlock b/x11/hyprlock/files/patch-pam_hyprlock
new file mode 100644
index 000000000000..a3e78966d632
--- /dev/null
+++ b/x11/hyprlock/files/patch-pam_hyprlock
@@ -0,0 +1,16 @@
+"login" has "auth sufficient pam_self.so" but a screen locker is
+supposed to ask for password regardless.
+
+pam_unix(8) requires root priveleges to access master.passwd(5),
+so try authenticating via setuid helper first.
+
+--- pam/hyprlock.orig	2024-03-01 23:49:44 UTC
++++ pam/hyprlock
+@@ -1,5 +1,4 @@
+-# PAM configuration file for hyprlock
+-# the 'login' configuration file (see /etc/pam.d/login)
++# PAM configuration for hyprlock. Only uses auth facilities.
+ 
+-auth        include     login
++auth        include     unix-selfauth
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403020007.42207DpP042925>