Page MenuHomeFreeBSD

devel/buildkite_agent: Add logfile
ClosedPublic

Authored by aokblast on Fri, Jun 26, 2:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 15, 8:57 AM
Unknown Object (File)
Tue, Jul 14, 6:23 PM
Unknown Object (File)
Wed, Jul 1, 12:27 AM
Unknown Object (File)
Wed, Jul 1, 12:27 AM
Unknown Object (File)
Mon, Jun 29, 10:12 PM
Unknown Object (File)
Mon, Jun 29, 6:33 AM
Unknown Object (File)
Mon, Jun 29, 6:18 AM
Unknown Object (File)
Sun, Jun 28, 2:52 PM
Subscribers
None

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

aokblast created this revision.
This revision is now accepted and ready to land.Sun, Jul 12, 7:16 AM
dch requested changes to this revision.Sun, Jul 12, 7:19 AM
  • needs a PORTREVISION bump
  • what happens in the default case where buildkit_logfile is not set?
This revision now requires changes to proceed.Sun, Jul 12, 7:19 AM
In D57885#1334350, @dch wrote:
  • needs a PORTREVISION bump

Oh ok. I will bump before pushed. Thanks!

  • what happens in the default case where buildkit_logfile is not set?

buildkite_logfile:=/var/log/buildkite.log

Wouldn't mean it is /var/log/buildkite.log by default?

Sigh, it's already set in L28... but if the file isn't present, it needs to be created with correct permissions, otherwise it won't be set. Can you add that please?

In D57885#1334360, @dch wrote:

Sigh, it's already set in L28... but if the file isn't present, it needs to be created with correct permissions, otherwise it won't be set. Can you add that please?

My understanding is that /usr/sbin/daemon will automatically create the file with correct permission as its permission is decided by buildkite_account and can be changed later.
I also check some other ports that set the logfile and they also don't ship the file in plist or create the logfile.

By default this is the permissions the log file is created with:

-rw-------  1 root wheel  153B Jul 13 23:35 buildkite.log

If this is what you intend to happen then let's commit this as is. If you're expecting it to be created readable by buildkite_account then it would need changing to have a precmd script.

This revision is now accepted and ready to land.Mon, Jul 13, 11:42 PM
In D57885#1335409, @dch wrote:

By default this is the permissions the log file is created with:

-rw-------  1 root wheel  153B Jul 13 23:35 buildkite.log

If this is what you intend to happen then let's commit this as is. If you're expecting it to be created readable by buildkite_account then it would need changing to have a precmd script.

I just check the daemon implementation. It pipe the file from parent to the child. So root access is fine. And allowing only root to access the log from daemon only instead of the running user is also our convention I think.