Skip to content

[fleetctl] fix deb package build#23796

Merged
lucasmrod merged 1 commit intofleetdm:mainfrom
ilpianista:bugfix/create-build-dir
Nov 18, 2024
Merged

[fleetctl] fix deb package build#23796
lucasmrod merged 1 commit intofleetdm:mainfrom
ilpianista:bugfix/create-build-dir

Conversation

@ilpianista
Copy link
Copy Markdown
Contributor

@ilpianista ilpianista commented Nov 14, 2024

I'm trying to setup a GitLab CI job to build the deb packages, but it fails with:

Error: open output file: open build/fleet-osquery_1.35.0_amd64.deb: no such file or directory

It happens because I can't mount the build volume as I would do on my local pc. To reproduce:

docker run -it fleetdm/fleetctl package --type=deb --fleet-url=my.url --enroll-secret=mysecret

pkg and msi works fine. I can workaround it by creating the build dir first, but I think that's also fleetctl job to create it.

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added support on fleet's osquery simulator cmd/osquery-perf for new osquery data ingestion features.
  • Added/updated tests
  • If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes
  • If database migrations are included, checked table schema to confirm autoupdate
  • For database migrations:
    • Checked schema for all modified table for columns that will auto-update timestamps during migration.
    • Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects.
    • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).
  • Manual QA for all new/changed functionality
  • For Orbit and Fleet Desktop changes:
    • Orbit runs on macOS, Linux and Windows. Check if the orbit feature/bugfix should only apply to one platform (runtime.GOOS).
    • Manual QA must be performed in the three main OSs, macOS, Windows and Linux.
    • Auto-update manual QA, from released version of component to new version (see tools/tuf/test).

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.12%. Comparing base (ded196d) to head (b0bc5ab).
Report is 65 commits behind head on main.

Files with missing lines Patch % Lines
orbit/pkg/packaging/linux_shared.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23796      +/-   ##
==========================================
- Coverage   63.12%   63.12%   -0.01%     
==========================================
  Files        1557     1558       +1     
  Lines      147693   147866     +173     
  Branches     3687     3687              
==========================================
+ Hits        93236    93336     +100     
- Misses      47073    47138      +65     
- Partials     7384     7392       +8     
Flag Coverage Δ
backend 63.98% <25.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lukeheath
Copy link
Copy Markdown
Member

@ilpianista Thank you for the contribution! We will review soon.

Copy link
Copy Markdown
Member

@lucasmrod lucasmrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ilpianista! I was able to reproduce. I'll merge and make some changes on top of it (use opt.NativeTooling to distinguish between fleetctl executable run mode vs. docker mode)

I've created #23893 to track this bug.

@lucasmrod
Copy link
Copy Markdown
Member

PR: #23894 with the changes on top of these changes. Thanks again @ilpianista! (will be released in v4.61.0)

@ilpianista ilpianista deleted the bugfix/create-build-dir branch November 18, 2024 14:13
lucasmrod added a commit that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants