Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: components opt-in mechanism for packages #1979

Merged
merged 5 commits into from
Apr 22, 2022
Merged

Conversation

leogr
Copy link
Member

@leogr leogr commented Apr 21, 2022

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area build

What this PR does / why we need it:

This PR allows for selectively declaring which components should be included in packages, using CPACK_INSTALL_CMAKE_PROJECTS.

It fixes the issue involuntarily introduced by falcosecurity/libs#247. All libs targets are now installing their artifacts in the installation location, so those files were caught by cpack and included in Falco packages. However, Falco does not need all those libraries and headers, since those dependencies are already bundled into the Falco executable. The new opt-in mechanism introduced in the Falco building system allows overcoming this issue.

All recent publish/docker-dev CI jobs were failing for that reason. For example, see
https://app.circleci.com/pipelines/github/falcosecurity/falco/2433/workflows/2d4d55c9-5528-4a0c-8fee-5b4ff168c484/jobs/22412
Note that the .deb installation failed because the package was trying to reinstall openssl files.

dpkg: error processing archive /var/cache/apt/archives/falco_0.31.1-81+8dd4bea_amd64.deb (--unpack):
 trying to overwrite '/usr/include/openssl/aes.h', which is also in package libssl-dev:amd64 1.1.1n-0+deb10u1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/falco_0.31.1-81+8dd4bea_amd64.deb

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Another small issue was present and has been fixed by this. The LIBS_PACKAGE_NAME is not propagated in Falco, so all files weren't installed under the falcosecurity folder.
Although that's irrelevant for packages (because we are not including those files anymore), it still applies for make install.

/milestone 0.32.0

Does this PR introduce a user-facing change?:

NONE

leogr added 5 commits April 21, 2022 18:56
…t names

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
@leogr leogr force-pushed the build/no-deps-for-cpack branch from c470d4b to beda44a Compare April 21, 2022 16:58
Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

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

/approve

Great fix Leo! 😍

@poiana
Copy link
Contributor

poiana commented Apr 22, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jasondellaluce, leogr

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:
  • OWNERS [jasondellaluce,leogr]

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

@poiana poiana merged commit 2c3c8b9 into master Apr 22, 2022
@poiana poiana deleted the build/no-deps-for-cpack branch April 22, 2022 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants