Skip to content

Manpages contain build-time paths and the home directory of build user #8525

Description

@ykasap

Project

Deskflow

Deskflow version info

Deskflow 1.21.2

Build type

Local developer build (built it myself)

Operating systems (OS)

  • Windows
  • macOS
  • Linux (X11)
  • Linux (Wayland)
  • BSD-derived
  • Other (please specify)

Wayland on Linux

  • I have reviewed the Wayland known issues and my issue is new
  • I am not using Wayland on Linux

Signing on macOS

  • I have authorized the app to run on my Mac
  • I am not using macOS

Continuous build

  • I have tried the latest continuous build and the issue persists
  • I am unable to try the latest continuous build

OS versions/distros

  • FreeBSD 14.2-STABLE

Deskflow configuration

No response

What steps will reproduce the problem?

  1. Build (and install) Deskflow
  2. Check deskflow-server(1) and deskflow-client(1) manpages

Log output

Additional information

These manpages are generated by help2man. The help message of deskflow-client and deskflow-server contains argv[0], and help2man calls these executables under the build directory, so the generated manpages contain the full path of the build directory. Also, the help message of deskflow-server contains paths of configuration files, and one of them contains the caller's home directory. These are fine for interactive help messages, but unsuitable for the static manpages.

% man deskflow-server
(omit)
DESCRIPTION
       Keyboard and mouse sharing utility

       /home/myname/src/deskflow/build/bin/deskflow-server [OPTIONS]
(omit)
       If  no  configuration  file  pathname is provided then the first of the
       following to load successfully sets the configuration:

              settings/Deskflow  /home/myname/.config/Deskflow/Deskflow.conf
              /etc/Deskflow/Deskflow.conf

I made a crude patch to amend these outputs. It removes the absolute path of the build directory from the description and replaces the home directory path with "$HOME". There may be a better way to handle them.

--- src/apps/CMakeLists.txt.orig        2025-04-07 12:24:27 UTC
+++ src/apps/CMakeLists.txt
@@ -19,6 +19,9 @@ function(generate_app_man TARGET)
           --no-info
           $<TARGET_FILE:${target}>
           -o $<TARGET_FILE_DIR:${target}>/${target}.1
+        COMMAND sed -i.bak -e \'s|$<TARGET_FILE_DIR:${target}>/||\' 
+         -e \'s|$ENV{HOME}|$$HOME|\'
+          $<TARGET_FILE_DIR:${target}>/${target}.1
     )
     install(
       FILES $<TARGET_FILE_DIR:${target}>/${target}.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions