View | Details | Raw Unified | Return to bug 269320 | Differences between
and this patch

Collapse All | Expand All

(-)b/x11/Makefile (+1 lines)
Lines 407-412 Link Here
407
    SUBDIR += way-displays
407
    SUBDIR += way-displays
408
    SUBDIR += waybar
408
    SUBDIR += waybar
409
    SUBDIR += wayland-logout
409
    SUBDIR += wayland-logout
410
    SUBDIR += waylock
410
    SUBDIR += wayout
411
    SUBDIR += wayout
411
    SUBDIR += wbar
412
    SUBDIR += wbar
412
    SUBDIR += wcm
413
    SUBDIR += wcm
(-)b/x11/waylock/Makefile (+54 lines)
Added Link Here
1
PORTNAME=	waylock
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	0.6.0
4
CATEGORIES=	x11 wayland
5
6
MAINTAINER=	ports@FreeBSD.org
7
COMMENT=	Small screenlocker for Wayland compositors
8
WWW=		https://github.com/ifreund/waylock
9
10
LICENSE=	ISCL
11
LICENSE_FILE=	${WRKSRC}/LICENSE
12
13
BUILD_DEPENDS=	wayland-protocols>0:graphics/wayland-protocols \
14
		zig>=0.10.0:lang/zig
15
LIB_DEPENDS=	libwayland-client.so:graphics/wayland \
16
		libxkbcommon.so:x11/libxkbcommon
17
RUN_DEPENDS=	unix-selfauth-helper>0:security/unix-selfauth-helper
18
19
USES=		pkgconfig
20
USE_GITHUB=	yes
21
GH_ACCOUNT=	ifreund
22
GH_TUPLE=	ifreund:zig-wayland:ace6aee:zig_wayland/deps/zig-wayland \
23
		ifreund:zig-xkbcommon:bfd1f97:zig_xkbcommon/deps/zig-xkbcommon
24
MAKE_ENV=	DESTDIR="${STAGEDIR}"
25
CONFIGURE_ARGS=	--prefix "${PREFIX}" \
26
		${WITH_DEBUG:D:U-Drelease-fast} \
27
		${WITH_PIE:D-Dpie} \
28
		${STRIP:C/.+/-Dstrip/} \
29
		-Dcpu=${CPUTYPE:Ubaseline} \
30
		--verbose
31
NO_INSTALL=	yes # strip(1) breaks runtime
32
PLIST_FILES=	bin/${PORTNAME} \
33
		etc/pam.d/${PORTNAME}
34
35
OPTIONS_DEFINE=	MANPAGES
36
OPTIONS_DEFAULT=MANPAGES
37
38
MANPAGES_BUILD_DEPENDS=	scdoc:textproc/scdoc
39
MANPAGES_CONFIGURE_ON=	-Dman-pages=true
40
MANPAGES_CONFIGURE_OFF=	-Dman-pages=false
41
MANPAGES_PLIST_FILES=	share/man/man1/${PORTNAME}.1.gz
42
43
post-patch:
44
# Respect LOCALBASE for unix-selfauth-helper
45
	@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},' \
46
		${WRKSRC}/pam.d/${PORTNAME}
47
48
do-build:
49
	@(cd ${WRKSRC} && ${MAKE_ENV} zig build ${CONFIGURE_ARGS})
50
51
do-test:
52
	@(cd ${WRKSRC} && ${TEST_ENV} zig build test ${CONFIGURE_ARGS})
53
54
.include <bsd.port.mk>
(-)b/x11/waylock/distinfo (+9 lines)
Added Link Here
1
TIMESTAMP = 1673204372
2
SHA256 (ifreund-waylock-v0.6.0_GH0.tar.gz) = 28bb2136712f175e19ba9cfde24e226c1ec982a9aa94a18c76cb48ceda499dbb
3
SIZE (ifreund-waylock-v0.6.0_GH0.tar.gz) = 18258
4
SHA256 (ifreund-zig-wayland-ace6aee_GH0.tar.gz) = c6ebbf0d56db36a732d2e58deff090503b68928ceed538737de7cd4ea36681c6
5
SIZE (ifreund-zig-wayland-ace6aee_GH0.tar.gz) = 55916
6
SHA256 (ifreund-zig-xkbcommon-bfd1f97_GH0.tar.gz) = 0a5835a5eb216c1a59e20e59277270fc5ce5f440becadf6487965286ba4c1ce8
7
SIZE (ifreund-zig-xkbcommon-bfd1f97_GH0.tar.gz) = 20467
8
SHA256 (e8ba2a976fc5.patch) = 94824df6ff7a37852ad22f68a327eb38b0a2eb6493f82294bff11f5a36214432
9
SIZE (e8ba2a976fc5.patch) = 3071
(-)b/x11/waylock/files/patch-pam.d_waylock (+11 lines)
Added Link Here
1
"system-auth" doesn't exist on non-Linux.
2
3
pam_unix(8) requires root priveleges to access master.passwd(5),
4
so try authenticating via setuid helper first.
5
6
--- pam.d/waylock.orig	2023-01-08 18:59:32 UTC
7
+++ pam.d/waylock
8
@@ -1 +1,2 @@
9
-auth include system-auth
10
+auth sufficient pam_exec.so return_prog_exit_status expose_authtok /usr/local/libexec/unix-selfauth-helper
11
+auth include system
(-)b/x11/waylock/files/patch-zig-0.10 (+55 lines)
Added Link Here
1
https://github.com/ifreund/waylock/commit/e8ba2a976fc5
2
3
--- README.md.orig	2023-01-08 18:59:32 UTC
4
+++ README.md
5
@@ -27,7 +27,7 @@ installed:
6
 To compile waylock first ensure that you have the following dependencies
7
 installed:
8
 
9
-- [zig](https://ziglang.org/download/) 0.9
10
+- [zig](https://ziglang.org/download/) 0.10
11
 - wayland
12
 - wayland-protocols
13
 - xkbcommon
14
--- build.zig.orig	2023-01-08 18:59:32 UTC
15
+++ build.zig
16
@@ -92,7 +92,7 @@ pub fn build(b: *zbs.Builder) !void {
17
 
18
     waylock.addPackage(.{
19
         .name = "wayland",
20
-        .path = .{ .generated = &scanner.result },
21
+        .source = .{ .generated = &scanner.result },
22
     });
23
     waylock.step.dependOn(&scanner.step);
24
     waylock.addPackagePath("xkbcommon", "deps/zig-xkbcommon/src/xkbcommon.zig");
25
--- src/auth.zig.orig	2023-01-08 18:59:32 UTC
26
+++ src/auth.zig
27
@@ -103,7 +103,7 @@ pub fn run(conn: Connection) noreturn {
28
 
29
             const end_result = pamh.end(setcred_result);
30
             if (end_result != .success) {
31
-                log.err("PAM deinitialization failed: {s}", .{end_result});
32
+                log.err("PAM deinitialization failed: {s}", .{end_result.description()});
33
             }
34
 
35
             os.exit(0);
36
@@ -118,7 +118,7 @@ pub fn run(conn: Connection) noreturn {
37
             if (auth_result == .abort) {
38
                 const end_result = pamh.end(auth_result);
39
                 if (end_result != .success) {
40
-                    log.err("PAM deinitialization failed: {s}", .{end_result});
41
+                    log.err("PAM deinitialization failed: {s}", .{end_result.description()});
42
                 }
43
                 os.exit(1);
44
             }
45
--- src/pam.zig.orig	2023-01-08 18:59:32 UTC
46
+++ src/pam.zig
47
@@ -41,7 +41,7 @@ pub const Conv = extern struct {
48
 };
49
 
50
 pub const Conv = extern struct {
51
-    conv: fn (
52
+    conv: *const fn (
53
         num_msg: c_int,
54
         /// Note: This matches the Linux-PAM API, apparently Solaris PAM differs
55
         /// in how the msg argument is used.
(-)b/x11/waylock/pkg-descr (+5 lines)
Added Link Here
1
Waylock is a small screenlocker for Wayland compositors implementing
2
ext-session-lock-v1. The ext-session-lock-v1 protocol is significantly
3
more robust than previous client-side Wayland screen locking approaches.
4
Importantly, the screenlocker crashing does not cause the session to be
5
unlocked.

Return to bug 269320