ctc-oss / fapolicy-analyzer

Tools to assist with the configuration and management of fapolicyd.
https://ctc-oss.github.io/fapolicy-analyzer
GNU General Public License v3.0
12 stars 5 forks source link

Include build info in About dialog #876

Closed egbicker closed 1 year ago

egbicker commented 1 year ago

Capture build information and display it in the about dialog

Closes #823

jw3 commented 1 year ago

Looking pretty good. What remains?

egbicker commented 1 year ago

I'm still not seeing the script outputs in my RPM build in fc38 even when putting the command up in source0

jw3 commented 1 year ago

I'm still not seeing the script outputs in my RPM build in fc38 even when putting the command up in source0

Ok, Ill work up an example.

jw3 commented 1 year ago

See this build and branch https://github.com/ctc-oss/fapolicy-analyzer/actions/runs/5358449384/jobs/9720893621#step:8:94

Treating your json as a resource is the key. I mentioned it in a comment above, should have elaborated a little more.

jw3 commented 1 year ago

It hit me a little late that the git archive call used to vendor the source is not going to package the patched file.

Moving the make build-info call into the spec will be a better way to handle this anyways.

jw3 commented 1 year ago

Took some time to think more on this and the build info can't be taken from just one place. It's an aggregation of steps along the way.

At a minimum it is two places

  1. Commit info while in GitHub CI
  2. Build platform info during rpm build (within spec)

So the build-info.json is going to have keys added to it along the way, the build-info.py script will need to accept args that it inserts to the existing file.

I pushed a few commits that move things in this direction. See how that looks.


From the build-info.json in the el8 rpm from the latest action on this PR

{
    "git_info": "9ddc0d0748b299feabfb57ca65acac3cfd010adc",
    "os_info": "c2c57e772156 5.15.0-1040-azure",
    "time_info": "Sat Jun 24 14:36:15 UTC 2023"
}
egbicker commented 1 year ago

@jw3 This looks good, I fixed the test/dev usage for it but its working on my fc38 rpm build

jw3 commented 1 year ago

I am going to run rc1 through fedora and see what the build info looks like over there before this merges.

jw3 commented 1 year ago

Restored the use of the original about dialog

image

Added the build info in the comment section.