Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flock -w option not supported on busybox #475

Closed
nero opened this issue Feb 23, 2020 · 3 comments
Closed

flock -w option not supported on busybox #475

nero opened this issue Feb 23, 2020 · 3 comments

Comments

@nero
Copy link

nero commented Feb 23, 2020

[x] I've read and accepted the Bug Reporting Howto

Describe the bug

tlp-func-base uses the -w option of flock, which is not supported by busybox.

To Reproduce

Start tlp on Alpine Linux (without GNU coreutils as replacement for busybox). This spews the help text for the flock applet onto stderr, continuing without having acquired the lock.

Solution ideas:

  • Declare an dependency on GNU coreutils
  • Wrap around that line of code, checking whether -w is supported
  • Downstream patch to remove that option completely
@dywisor
Copy link
Contributor

dywisor commented Feb 23, 2020

Note: proper busybox support requires careful inspection of the entire codebase as there will be more cases like logger not accepting --id.

@linrunner
Copy link
Owner

linrunner commented Feb 23, 2020

I don't consider this an upstream problem. Please solve it downstream in the Alpine package.

I'll document the dependency on GNU coreutils in the developer docs. And to be clear: busybox is not supported as a replacement.

@linrunner
Copy link
Owner

Btw: the dependency is not GNU coreutils but util-linux: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/sys-utils/flock.c

Anyway i added a 'Busybox not supported' disclaimer: https://linrunner.de/tlp/developers/dependencies.html

algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 29, 2020
Coreutils is at least needed as build dependency (install --target-directory)
and util-linux is needed for flock at runtime.

linrunner/TLP#475 (comment)
algitbot pushed a commit to alpinelinux/aports that referenced this issue Sep 21, 2023
Upstream is only testing their code against GNU grep, including using
ERE expressions that are not POSIX conformat and fail with busybox grep.
Upstream made clear in linrunner/TLP#475 that busybox is not supported,
so i didn't patch the regexes against upstreams decisions.

Bogus ERE: RE_ATA_ERROR in func.d/tlp-func-stat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants