Bug 270881 - sysutils/accountsservice: update to 23.13.9
Summary: sysutils/accountsservice: update to 23.13.9
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Koop Mast
URL: https://gitlab.freedesktop.org/accoun...
Keywords:
Depends on: 270838
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-16 14:48 UTC by Olivier Duchateau
Modified: 2023-08-17 18:49 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kwm)


Attachments
Patch to update sysutils/accountsservice (46.13 KB, patch)
2023-04-16 14:48 UTC, Olivier Duchateau
no flags Details | Diff
[patch] work around namespace collision for crypt_data (1.74 KB, patch)
2023-08-14 18:00 UTC, John Hein
no flags Details | Diff
[patch] work around namespace collision for crypt_data (v2) (1.74 KB, patch)
2023-08-14 18:08 UTC, John Hein
jcfyecrayz: maintainer-approval? (arrowd)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Duchateau 2023-04-16 14:48:50 UTC
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
Comment 1 Olivier Duchateau 2023-04-16 14:50:37 UTC
bug #270838 (update of sysutils/consolekit2 to 1.2.5) must be resolved, because we use sd_* shim functions.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2023-04-20 07:23:53 UTC
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?
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-08-13 11:37:14 UTC
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(-)
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2023-08-13 11:37:34 UTC
Pushed in, thanks!
Comment 5 John Hein 2023-08-14 15:06:13 UTC
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
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2023-08-14 15:07:41 UTC
Ugh. I will try fix this, thanks for the heads-up.
Comment 7 John Hein 2023-08-14 16:08:07 UTC
(In reply to Gleb Popov from comment #6)
That was on stable/12, by the way.  I haven't checked 13/14 yet.
Comment 8 John Hein 2023-08-14 16:12:24 UTC
(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.
Comment 9 John Hein 2023-08-14 18:00:01 UTC
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.
Comment 10 John Hein 2023-08-14 18:08:28 UTC
Created attachment 244103 [details]
[patch] work around namespace collision for crypt_data (v2)

Fix malformed patch.
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-08-17 18:49:19 UTC
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(-)