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

datadog-agent/7.60.0 package update #37117

Closed
wants to merge 4 commits into from

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Dec 16, 2024

datadog-agent: various fixes to work with latest 7.60.0 update

Included:

  • add libpcap
  • symlink so build avoids downloading libpcap and uses system lib
  • regen dep bump patch
  • build with python 3.12 as integration dependencies require it
ERROR: Package 'datadog-slurm' requires a different Python: 3.11.11 not in '>=3.12'
  • compile datadog-agent-nvml with python 3.12

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr P1 This label indicates our scanning found High, Medium or Low CVEs for these packages. labels Dec 16, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 16, 2024

Gen AI suggestions to solve the build error:

• Detected Error:

/bin/bash: line 1: curl: command not found
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now

• Error Category: Build/Dependency

• Failure Point: Package build step attempting to download and extract libpcap dependency

• Root Cause Analysis:
The build environment is missing the curl package which is required to download libpcap source code. This is a missing build dependency.

• Suggested Fix:
Add curl to the environment.contents.packages section in the melange YAML:

environment:
  contents:
    packages:
      - curl
      # existing packages...

• Explanation:
The build script attempts to download libpcap using curl but fails because curl is not installed. Adding curl as a build dependency will allow the download step to complete successfully.

• Additional Notes:

  • This is a common build dependency issue where required tools are missing from the build environment
  • The error occurs during the package compilation phase when trying to fetch external dependencies
  • libpcap is likely needed for network packet capture functionality in the datadog agent
  • Consider also adding xz-utils if further xz extraction issues occur

• References:

The fix is simple and just requires adding the missing build tool to the environment section of the melange YAML file.

```
/bin/bash: line 1: curl: command not found
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
```

Signed-off-by: James Rawlings <[email protected]>
@rawlingsj rawlingsj force-pushed the wolfictl-e83b20bf-9753-44e3-89cb-92a77bd161a6 branch from a09d412 to df683b2 Compare December 16, 2024 12:36
@wolfi-dev wolfi-dev deleted a comment from octo-sts bot Dec 16, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 16, 2024

Gen AI suggestions to solve the build error:

• Detected Error:
"tar: libpcap-1.10.5/...: Cannot change ownership to uid 1000, gid 1000: Invalid argument"

• Error Category: Build Configuration

• Failure Point:
Unpacking libpcap source tarball during build process

• Root Cause Analysis:
The error occurs because tar is trying to set ownership of extracted files to uid/gid 1000, but this operation is failing in the build environment. This typically happens in containerized builds where user namespace mapping isn't properly configured.

• Suggested Fix:
Add --no-same-owner flag to the tar extract command in the pipeline. Modify the problematic line to:

- runs: |
    cd /home/build/dev/dist && curl -L https://www.tcpdump.org/release/libpcap-1.10.5.tar.xz | tar xJ --no-same-owner

• Explanation:
The --no-same-owner flag tells tar to extract files with the current user's ownership rather than trying to preserve the ownership from the archive. This avoids permission issues in containerized environments where user mapping may be restricted.

• Additional Notes:

  1. This is a common issue in container builds where user namespace isolation affects file ownership operations
  2. The fix preserves functionality while avoiding permission-related errors
  3. Alternative approach could be to use proper user namespace mapping, but the suggested fix is simpler and sufficient for most build scenarios

• References:

This fix aligns with Wolfi's principles of secure, reproducible builds while maintaining package functionality.

@rawlingsj
Copy link
Member

Hmm looks like the latest datadog agent update wants to use curl to fetch a dependency, wonder what's needed to use the package from wolfi https://github.com/wolfi-dev/os/blob/main/libpcap.yaml

@rawlingsj rawlingsj self-assigned this Dec 17, 2024
@rawlingsj rawlingsj force-pushed the wolfictl-e83b20bf-9753-44e3-89cb-92a77bd161a6 branch 2 times, most recently from d48f190 to 758194f Compare December 18, 2024 09:56
Included:
- add libpcap
- symlink so build avoids downloading libpcap and uses system lib
- build with python 3.12 as integration dependencies require it
```
ERROR: Package 'datadog-slurm' requires a different Python: 3.11.11 not in '>=3.12'
```

Signed-off-by: James Rawlings <[email protected]>
@octo-sts octo-sts bot added bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed labels Dec 18, 2024
@rawlingsj rawlingsj force-pushed the wolfictl-e83b20bf-9753-44e3-89cb-92a77bd161a6 branch 2 times, most recently from c3b1534 to 2f7f2a3 Compare December 18, 2024 14:17
@rawlingsj rawlingsj force-pushed the wolfictl-e83b20bf-9753-44e3-89cb-92a77bd161a6 branch from 2f7f2a3 to 8516c6d Compare December 18, 2024 14:19
@rawlingsj rawlingsj added the blocked indicates there are blocking issues that need to be addressed before progress can be made label Dec 18, 2024
@octo-sts octo-sts bot closed this Dec 19, 2024
Copy link
Contributor Author

octo-sts bot commented Dec 19, 2024

superseded by #37684

@octo-sts octo-sts bot deleted the wolfictl-e83b20bf-9753-44e3-89cb-92a77bd161a6 branch December 20, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. blocked indicates there are blocking issues that need to be addressed before progress can be made manual/review-needed P1 This label indicates our scanning found High, Medium or Low CVEs for these packages. request-version-update request for a newer version of a package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants