Created attachment 241529 [details] Patch to update sysutils/accountsservice - Update to 23.13.9 - Switch to the desktop@ team (as others freedesktop.org projects) - Update dependencies - Remove unneeded patches
bug #270838 (update of sysutils/consolekit2 to 1.2.5) must be resolved, because we use sd_* shim functions.
I thought we agreed on creating a repository containing all our patches and pointing the port to it? Or with consolekit update there is no point in doing it?
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=dce7c84bbbee09a7d97c60af6aa11eb90e4c0aaa commit dce7c84bbbee09a7d97c60af6aa11eb90e4c0aaa Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2023-08-12 18:19:00 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2023-08-13 11:34:55 +0000 sysutils/accountsservice: Switch to my fork and update to 23.13.9 My fork incorporates adapted patches from Olivier Duchateau. PR: 270881 Sponsored by: Serenity Cybersecurity, LLC sysutils/accountsservice/Makefile | 26 +- sysutils/accountsservice/distinfo | 8 +- .../files/patch-generate-version.sh (new) | 11 + sysutils/accountsservice/files/patch-meson.build | 16 +- .../files/patch-meson__post__install.py | 6 +- .../files/patch-src_daemon.c (gone) | 294 --------------------- ...rc_libaccountsservice_act-user-manager.c (gone) | 24 -- .../patch-src_libaccountsservice_act-user.c (gone) | 11 - .../accountsservice/files/patch-src_meson.build | 6 +- .../files/patch-src_user-classify.c (gone) | 18 -- .../accountsservice/files/patch-src_user.c (gone) | 248 ----------------- .../accountsservice/files/patch-src_user.h (gone) | 27 -- .../accountsservice/files/patch-src_util.c (gone) | 11 - .../files/patch-src_wtmp-helper.h (gone) | 10 - sysutils/accountsservice/pkg-plist | 4 +- 15 files changed, 44 insertions(+), 676 deletions(-)
Pushed in, thanks!
This fails to build if security/libxcrypt is installed... . . cc -Isrc/libaccountsservice/libaccountsservice.so.0.0.0.p -Isrc/libaccountsservice -I../src/libaccountsservice -I. -I.. -Isrc -I../src -I/usr/local/include -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/ConsoleKit/ -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -pthread '-DG_LOG_DOMAIN="accountsservice"' -MD -MQ src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o -MF src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o.d -o src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o -c ../src/libaccountsservice/act-user.c FAILED: src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o cc -Isrc/libaccountsservice/libaccountsservice.so.0.0.0.p -Isrc/libaccountsservice -I../src/libaccountsservice -I. -I.. -Isrc -I../src -I/usr/local/include -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/ConsoleKit/ -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -pthread '-DG_LOG_DOMAIN="accountsservice"' -MD -MQ src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o -MF src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o.d -o src/libaccountsservice/libaccountsservice.so.0.0.0.p/act-user.c.o -c ../src/libaccountsservice/act-user.c In file included from ../src/libaccountsservice/act-user.c:30: /usr/local/include/crypt.h:73:8: error: redefinition of 'crypt_data' struct crypt_data ^ /usr/include/unistd.h:489:8: note: previous definition is here struct crypt_data { ^ 1 error generated. ninja: build stopped: subcommand failed. + [ -n '' ] + false *** Error code 1
Ugh. I will try fix this, thanks for the heads-up.
(In reply to Gleb Popov from comment #6) That was on stable/12, by the way. I haven't checked 13/14 yet.
(In reply to John Hein from comment #7) But I don't expect 13/14 to be any different - unistd.h is nearly identical on those branches compared to stable/12.
Created attachment 244100 [details] [patch] work around namespace collision for crypt_data (In reply to Gleb Popov from comment #6) I tried the attached patch, and it seems to work. It defines _C11_SOURCE just for act-user.c if crypt.h is found. That, in turn, sets __BSD_VISIBLE to 0 (in sys/cdefs.h) which avoids defining crypt_data in unistd.h. Defining _C11_SOURCE for all of accountsservice source files is too much - things like S_IFMT are left undefined (because __XSI_VISIBLE is 0 due to _C11_SOURCE). Nothing in act-user.c (currently) needs any of that.
Created attachment 244103 [details] [patch] work around namespace collision for crypt_data (v2) Fix malformed patch.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=fa08ed068803ea89d2d1b88e2cdc82eedb51aef9 commit fa08ed068803ea89d2d1b88e2cdc82eedb51aef9 Author: Gleb Popov <arrowd@FreeBSD.org> AuthorDate: 2023-08-17 18:47:17 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2023-08-17 18:48:37 +0000 sysutils/accountsservice: Fix build in presence of security/libxcrypt PR: 270881 Reported by: John Hein <jcfyecrayz@liamekaens.com> Sponsored by: Serenity Cybersecurity, LLC sysutils/accountsservice/Makefile | 3 ++- sysutils/accountsservice/files/patch-meson.build | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-)