Page MenuHomeFreeBSD

devel/qt5-core: Add a patch that fixes QLockFilePrivate::processNameByPid() function to return non-truncated name.
ClosedPublic

Authored by arrowd on Jun 6 2018, 10:02 AM.

Details

Summary

String returned from sysctl() can't be longer than COMMLEN (19) symbols, so it returns bogus data for processes with long file name.
Use kvm and procstat librarires to obtain correct name and only use sysctl as a fallback.

Test Plan

make check for qlockfile passes.

Diff Detail

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17032
Build 16899: arc lint + arc unit

Event Timeline

You need to bump the PORTTREVISION too.

devel/qt5-core/files/patch-src_corelib_io_qlockfile__unix.cpp
16

^ shouldn't there be some chekc on the return value of kvm_open?

59

^ name is already defined on line 49.

  • Error handling
  • Bump PORTREVISION
rakuco added inline comments.
devel/qt5-core/files/patch-src_corelib_io_qlockfile__unix.cpp
11

Isn't it easier to just add a freebsd condition in the else block below?

} else {
  SOURCES += ...
  freebsd {
    LIBS += lkvm -lprocstat
  }
}
34

Style: the * needs to be next to kp (this applies to the other pointer declarations below too).

50

Style: this should've been part of the previous line.

68

Same here.

arrowd marked 4 inline comments as done.
  • Address rakuco's comments.

If @rakuco has nothing more to add, it looks fine to me.

Looks OK to me. It'd be good to clean this up and submit the patch upstream later.

This revision is now accepted and ready to land.Jun 12 2018, 5:43 AM
This revision was automatically updated to reflect the committed changes.

The patch file (148 lines) contains the same 74 line patch twice, thus the build doesn't even start because of "patch failed".