Bug 277763 - x11/xfce4-screensaver: with PAM-option off build fails due to missing crypt.h
Summary: x11/xfce4-screensaver: with PAM-option off build fails due to missing crypt.h
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-xfce (Nobody)
URL: https://gitlab.xfce.org/apps/xfce4-sc...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-17 15:27 UTC by Mikhail T.
Modified: 2024-03-17 23:49 UTC (History)
2 users (show)

See Also:
madpilot: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2024-03-17 15:27:12 UTC
The PAM-option is on by default. Turning it off, however, breaks the port:

gs-auth-pwent.c:41:11: fatal error: 'crypt.h' file not found
   41 | # include <crypt.h>
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2024-03-17 21:19:54 UTC
Hi!

Thanks for reporting this. I never noticed.

I can reproduce it, but I have no idea what is causing this right away.

I'm looking into it.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2024-03-17 21:24:28 UTC
But it looks like it was triggered by this upstream commit (part of the latest version only):

https://gitlab.xfce.org/apps/xfce4-screensaver/-/commit/e9e6e7ea238c9f1b3de2bd1df594e23ce73e400e
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2024-03-17 22:58:58 UTC
I've identified the issue.

I've send a merge request upstream at [1]

Will commit the fix shortly to the ports tree.


[1] https://gitlab.xfce.org/apps/xfce4-screensaver/-/merge_requests/29
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-03-17 23:06:07 UTC
A commit in branch main references this bug:

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

commit be487aebb9446495178c06f525a2e77987ae4352
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2024-03-17 23:02:05 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2024-03-17 23:05:18 +0000

    x11/xfce4-screensaver: Fix build when PAM option is off

    When PAM option is off a different file is compiled, which, since
    version 4.18.3, tries to include crypt.h. Such file is not present in
    FreeBSD. The relevant definitions are in unistd.h.

    Fix by adding ifdef to skip such problematic include.

    Reported upstream: https://gitlab.xfce.org/apps/xfce4-screensaver/-/merge_requests/29

    PR:             277763

 .../files/patch-src_gs-auth-pwent.c (new)             | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2024-03-17 23:12:09 UTC
Patch committed.

Can you please report back and confirm it fixes the issue? SO the bug report can be closed.

I'll followup with upstream to include this fix or an equivalent one in upstream code.

Thanks again for reporting it!
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-03-17 23:49:13 UTC
A commit in branch main references this bug:

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

commit fdb5363efcb59716c000abd59f66692ec4244d8d
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2024-03-17 23:46:34 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2024-03-17 23:46:34 +0000

    x11/xfce4-screensaver: UPdate patch to match upstreamed one

    PR:             277763
    Obtained from:  https://gitlab.xfce.org/apps/xfce4-screensaver/-/commit/cd212e0e964af794eb98c6a0c1108204cee9ef32

 x11/xfce4-screensaver/files/patch-src_gs-auth-pwent.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)