Skip to content

Conversation

@geraldcombs
Copy link
Contributor

Remove "-I${includedir}/libscap -I${includedir}/driver" from libscap.pc and libsinsp.pc. This means that consumers must use prefixed include paths, such as "#include <libscap/scap.h>" instead of "#include <scap.h>". However, those include directories contain several generic filenames such as settings.h, logger.h, plugin.h, user.h, and utils.h, and this reduces the risk of someone inadvertently including the wrong file.

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

This hopefully helps us avoid a situation like the following: https://gitlab.com/wireshark/wireshark/-/issues/17192

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@geraldcombs
Copy link
Contributor Author

Hi @apteryks, this partially reverts 0ef229d. Will that impact anything on your end?

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.91%. Comparing base (0376a8f) to head (aeff7a0).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2691   +/-   ##
=======================================
  Coverage   76.91%   76.91%           
=======================================
  Files         294      294           
  Lines       30862    30862           
  Branches     4689     4689           
=======================================
  Hits        23739    23739           
  Misses       7123     7123           
Flag Coverage Δ
libsinsp 76.91% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@geraldcombs geraldcombs force-pushed the pkg-config-strict-includes branch 2 times, most recently from bb8d87c to 46cd00d Compare October 14, 2025 23:53
@apteryks
Copy link
Contributor

Hi @apteryks, this partially reverts 0ef229d. Will that impact anything on your end?

$ LANG=C guix refresh --list-dependent falcosecurity-libs
A single dependent package: [email protected]

If it breaks anything, that'd be sysdig. Has it been adjusted for this change already?

@geraldcombs
Copy link
Contributor Author

If it breaks anything, that'd be sysdig. Has it been adjusted for this change already?

Thanks for catching that. Corresponding PR in draios/sysdig#2166.

@terror96
Copy link
Contributor

/milestone 0.23.0

@poiana poiana added this to the 0.23.0 milestone Oct 16, 2025
@ekoops
Copy link
Contributor

ekoops commented Oct 23, 2025

Hey @geraldcombs , thank you for the contribution! Changes look good, but could you please adjust the commit heading to match the conventional commit style? I guess it would be something like refactor(userspace): make cflags in our .pc files more strict, right?

@geraldcombs geraldcombs force-pushed the pkg-config-strict-includes branch from 46cd00d to 0336274 Compare October 23, 2025 15:54
@geraldcombs
Copy link
Contributor Author

I guess it would be something like refactor(userspace): make cflags in our .pc files more strict, right?

Done!

@ekoops
Copy link
Contributor

ekoops commented Oct 24, 2025

Sorry, but I guess we need a rebase on top the changes introduced by #2702. Same here: #2692

Remove "-I${includedir}/libscap -I${includedir}/driver" from libscap.pc
and libsinsp.pc. This means that consumers must use prefixed include
paths, such as "#include <libscap/scap.h>" instead of "#include
<scap.h>". However, those include directories contain several generic
filenames such as settings.h, logger.h, plugin.h, user.h, and utils.h,
and this reduces the risk of someone inadvertently including the wrong
file.

Signed-off-by: Gerald Combs <[email protected]>
@geraldcombs geraldcombs force-pushed the pkg-config-strict-includes branch from 0336274 to be37a1c Compare October 24, 2025 14:57
pkgconf supports a License property, which seems like a useful thing to
have.

Signed-off-by: Gerald Combs <[email protected]>
@poiana poiana added size/S and removed size/XS labels Oct 24, 2025
Copy link
Contributor

@ekoops ekoops left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Oct 27, 2025

LGTM label has been added.

Git tree hash: 81c2031fe945303180385d5f5269e41204915927

Copy link
Contributor

@terror96 terror96 left a comment

Choose a reason for hiding this comment

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

/lgtm

@github-project-automation github-project-automation bot moved this from Todo to In progress in Falco Roadmap Oct 28, 2025
@poiana poiana merged commit 04eaffe into falcosecurity:master Oct 28, 2025
46 of 47 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Falco Roadmap Oct 28, 2025
@poiana
Copy link
Contributor

poiana commented Oct 28, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, geraldcombs, terror96

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants