Re: `Unix-domain socket path "..." is too long (maximum 107 bytes)` can we change that?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08-08-2024 10:31, Tomi Lähteenmäki wrote:
"Hijacking" this thread I stumbled up on this also some months ago in one of my packages when I was doing builds locally with "mock". The tests were failing so I had to create a patch [1] to make sure the Unix-socket is created in a path which does not exceed the limit.


You are probably seeing this due to the added intermediate directory[2] since RPM 4.20 (aka 4.19.92). I suppose this made the socket path long enough to trigger the error. The intermediate directory is named %{name}-%{version}-build. So the added bytes depend on the package name.

I'm not sure what would be proper way to do this with meson so if someone has suggestions please feel free to contact me off-list or not.


I believe your patch is adequate in addressing the issue. Using `meson.current_build_dir()` could fail with the same error outside mock, depending on where that directory is located.

Alternatively, you could use `run_command()` and have meson create the directory for you, instead of creating it yourself in `%prep`:

-  test_env_phoc.set('XDG_RUNTIME_DIR', meson.current_build_dir())
+  mktemp = run_command('mktemp', '-d', check: true)
+  test_env_phoc.set('XDG_RUNTIME_DIR', mktemp.stdout().strip())

-Tomi

[1] <https://src.fedoraproject.org/rpms/phosh-mobile-settings/blob/1b3a50af727651e16a33b2de2e43790462dd9324/f/shorter-xdg_runtime_dir-path.patch>


[2] https://github.com/rpm-software-management/rpm/issues/2078

-- Sandro

--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux