Bug 269461 - net/tigervnc-server: build fails [1] "cannot open /usr/ports/net/tigervnc-server/files/xserver211.patch: No such file or directory", [2] "don't know how to make install-strip"
Summary: net/tigervnc-server: build fails [1] "cannot open /usr/ports/net/tigervnc-ser...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koichiro Iwao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-10 14:35 UTC by Vladimir Druzenko
Modified: 2023-02-14 11:52 UTC (History)
2 users (show)

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


Attachments
[patch] remove reference to deleted patch from post-patch (891 bytes, patch)
2023-02-12 16:54 UTC, John Hein
no flags Details | Diff
[patch] v2: replace reference to deleted patch in post-patch with correct patch (10.36 KB, patch)
2023-02-12 23:05 UTC, John Hein
jcfyecrayz: maintainer-approval? (meta)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2023-02-10 14:35:56 UTC
13.1-p6 amd64.

[1] make patch
> cannot open /usr/ports/net/tigervnc-server/files/xserver211.patch: No such file or directory

Error in post-patch.of the net/tigervnc-server/Makefile.

Workaround is comment in net/tigervnc-server/Makefile line:
#        @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${FILESDIR}/xserver$$(${TIGERVNC_XORG_PATCH_VER}).patch

[2] make install
> don't know how to make install-strip

Error in net/tigervnc-server/Makefile in lines:
post-install:
        cd ${WRKSRC}/unix/xserver/hw/vnc/ && \
            ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-strip
        ${INSTALL_SCRIPT} ${FILESDIR}/vncserver.ports ${STAGEDIR}${PREFIX}/bin/vncserver

Don't now how to fix it.
Comment 1 John Hein 2023-02-12 16:54:34 UTC
Created attachment 240108 [details]
[patch] remove reference to deleted patch from post-patch

For 1.13.0, the xorg-server patch to be used is the stock one in the distribution (tigervnc-1.13.0/unix/xserver21.1.1.patch), and it is applied by the tigervnc build process.  The patch that was in files was deleted with the update to 1.13.0, but the post-patch command removal was missed it appears.
Comment 2 John Hein 2023-02-12 17:01:53 UTC
(In reply to John Hein from comment #1)
I un-silenced some commands in the patch (attachment 240108 [details]) while here.  They are useful to see and only add a couple lines.

Note: files/patch-release_CMakeLists.txt could be regenerated (make makepatch) as it is a little stale.  It's not critical because patch(1) is tolerant of the line differences so I didn't include the change in the patch here, but patch(1) does whine about it:

===>  Applying FreeBSD patches for tigervnc-server-1.13.0 from /usr/ports/net/tigervnc-server/files
No such line 85 in input file, ignoring
Comment 3 John Hein 2023-02-12 23:05:28 UTC
Created attachment 240120 [details]
[patch] v2: replace reference to deleted patch in post-patch with correct patch

patch v2:

I was wrong about the stock patch getting applied.  It isn't.  Attached is an updated patch that does that.  This solves case [2] for the OP (see comment 0).  The vnc server software wasn't even getting built because the xorg-server tree was not getting patched for vnc.

While here:
 - regen stale CMakeLists.txt patch
 - add a correct man page for vncserver (that matches the old vncserver script we still use), taken from 1.10.1 before vncserver was "broken" [[1]].  The current vncserver man page just points to vncsession, which does not match how FreeBSD is packaging the vncserver port.

This now builds and installs (and runs) correctly.  VVD, please verify when you have an opportunity.

p.s. I even tested against the xorg-server 21.1.7 (latest upstream) distribution (since the current ports tree version - 21.1.4 - has CVEs).  tigervnc-server builds and runs fine with both 21.1.4 and 21.1.7 xorg-server distributions.

[[1]]
Regarding the "broken" vncserver script, I opened an upstream discussion to see if the vncserver use case can be salvaged.  Since ca. March 2020, it has been retooled, and the changes now require things like an X session.  I don't understand fully why the simple use case has been forgotten (e.g., just Xvnc + xterm without requiring all the session / display manager / display environment stuff).

https://github.com/TigerVNC/tigervnc/issues/1597

But that issue is not important for fixing this bug.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2023-02-13 21:18:28 UTC
(In reply to John Hein from comment #3)
Both errors fixed with patch, but install failed:
===>   Registering installation for tigervnc-server-1.13.0
pkg-static: Unable to access file /tmp/work/usr/ports/net/tigervnc-server/work/stage/usr/local/bin/Xvnc:No such file or directory
pkg-static: Unable to access file /tmp/work/usr/ports/net/tigervnc-server/work/stage/usr/local/lib/xorg/modules/extensions/libvnc.so:No such file or directory
pkg-static: Unable to access file /tmp/work/usr/ports/net/tigervnc-server/work/stage/usr/local/share/man/man1/Xvnc.1.gz:No such file or directory
*** Error code 1
Comment 5 Koichiro Iwao freebsd_committer freebsd_triage 2023-02-14 01:09:57 UTC
Thank you for the report and sorry for the breakage. I'll have a look.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-02-14 05:21:35 UTC
A commit in branch main references this bug:

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

commit 22f51621a5e5b598daefb3191e61b17503eedd36
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2023-02-14 04:59:21 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-02-14 05:15:36 +0000

    net/tigervnc-server: Fix build and some housekeeping

    - Add missing LIB_DEPENDS on security/nettle and math/gmp
    - Regenerate CMakeLists.txt patch
    - Replace vncserver manpage with v1.10.0 as we're using v1.10.0 script
    - Quit suppressing output

    PR:             269461
    Reported by:    VVD, Konstantin Belousov, John Hein

 net/tigervnc-server/Makefile                       |  26 ++-
 .../files/patch-release_CMakeLists.txt             |   4 +-
 .../files/{vncserver.ports => v1.10.0-vncserver}   |   0
 .../files/v1.10.0-vncserver.man (new)              | 204 +++++++++++++++++++++
 4 files changed, 224 insertions(+), 10 deletions(-)
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2023-02-14 11:52:51 UTC
Build fine for me.
Thanks!