Skip to content

T8969: vyos-build failing to build, missing dependencies - #1220

Merged
jestabro merged 3 commits into
vyos:rollingfrom
asklymenko:rolling
Jun 8, 2026
Merged

T8969: vyos-build failing to build, missing dependencies#1220
jestabro merged 3 commits into
vyos:rollingfrom
asklymenko:rolling

Conversation

@asklymenko

Copy link
Copy Markdown
Contributor

Change summary

Build libhtp2 packages from sources.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe): changes to build system

Related Task(s)

Related PR(s)

How to test / Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 33c6321a-3d7f-4fce-a178-895bf66d8bf8

📥 Commits

Reviewing files that changed from the base of the PR and between 91a74fd and 4811386.

📒 Files selected for processing (1)
  • .github/workflows/trigger_rebuild_packages.yml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build_iso
  • GitHub Check: codeql-analysis-call / Analyze (python)
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**

⚙️ CodeRabbit configuration file

.github/workflows/**: Rollout 1c (Phorge T8943, 2026-05-30) renamed default branches fleet-wide: release-train repos current -> rolling; vyos/.github and other non-release-train repos current -> production. (1) Reusable-workflow refs of the form vyos/.github/.github/workflows/<name>.yml@production are CORRECT and canonical. Do NOT suggest changing @production to @current: current is the OLD name, retained only as a temporary bake-period alias and slated for removal. Any AGENTS.md still saying "reusables pinned to @current" or "current (rolling)" is stale post-1c and must not drive review suggestions. (2) In the mirror caller pr-mirror-repo-sync.yml, permissions: contents: read is INTENTIONAL: the central reusable workflow performs all push/PR writes with the vyos-bot GitHub App installation token (minted via the get-token action), not the inherited GITHUB_TOKEN. Do NOT suggest broadening the caller's permissions to contents: write / pull-requests: write.

Files:

  • .github/workflows/trigger_rebuild_packages.yml
🪛 zizmor (1.25.2)
.github/workflows/trigger_rebuild_packages.yml

[info] 184-184: code injection via template expansion (template-injection): may expand into attacker-controllable code

(template-injection)

🔍 Remote MCP Context7

Additional context relevant to reviewing PR #1220

  • Suricata is the upstream project being packaged here (Context7 library: Suricata).
  • Suricata’s official build/install documentation lists the canonical Debian/Ubuntu build dependencies (autoconf, automake, build-essential, libpcap-dev, libpcre2-dev, libyaml-dev, libjansson-dev, rustc/cargo, zlib1g-dev, etc.) and example build/install steps for Debian/Ubuntu and RHEL-family systems. The provided docs do not show libhtp/libhtp2 explicitly in those Debian install command lists returned by the documentation search.
  • Implication for this PR: Suricata commonly consumes the HTP library for HTTP parsing, but the Suricata doc excerpts returned do not declare libhtp2 in the canonical lists — this supports the PR approach of adding a local libhtp2 package build to ensure the vyos-build system supplies that dependency when distribution packages/backports are not used.

Sources used

  • Context7 resolve results for “Suricata” (library metadata).
  • Context7 Suricata documentation search (install/build dependency lists and build instructions).
🔇 Additional comments (1)
.github/workflows/trigger_rebuild_packages.yml (1)

56-57: LGTM!

Also applies to: 184-186


📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Refined APT pinning to target Suricata more precisely.
    • Organized package build layout for libhtp (cleaned ignore rules, unified build entry, added package metadata).
    • Updated CI build triggers to include libhtp so package builds run when related files change.

Walkthrough

PR 1220 adds libhtp2 package metadata and build wiring under scripts/package-build/libhtp/, updates the GitHub Actions paths filter and trigger to include libhtp, and removes libhtp2 from the combined Suricata backports pin (changes across files cited below).

Changes

libhtp2 Package Build Setup

Layer / File(s) Summary
libhtp2 package build configuration
scripts/package-build/libhtp/package.toml (lines 1-4), scripts/package-build/libhtp/build.py (line 1), scripts/package-build/libhtp/.gitignore (line 1), .github/workflows/trigger_rebuild_packages.yml (lines 56-57, 184-187), data/live-build-config/archives/bookworm-backports.pref.chroot (line 5)
package.toml (1-4) adds a [[packages]] entry for libhtp2 with commit_id and scm_url. build.py (1) is a symlink to ../build.py. .gitignore (1) ignores /libhtp/ artifacts. Workflow trigger_rebuild_packages.yml (56-57, 184-187) adds a libhtp paths-filter and a conditional trigger_build "libhtp". bookworm-backports.pref.chroot (5) changes Package: suricata libhtp2 to Package: suricata, removing libhtp2 from that pin.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive Title references T8969 task but describes generic 'missing dependencies' issue, while actual changes focus on building libhtp2 packages from source. Clarify title to reflect primary change: consider 'Add libhtp2 package build support' or similar to better represent the changeset's core purpose.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed Description relates to changeset—it identifies the change summary as 'Build libhtp2 packages from sources' and links to task T8969, aligning with modifications in build configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mergify mergify Bot added the rolling label Jun 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/package-build/libhtp/package.toml`:
- Line 3: The commit_id field in package.toml is pinned to an abbreviated SHA
("e851d98f"); replace it with the full 40-character Git commit SHA to ensure
deterministic source pinning (update the commit_id value to the repository's
full SHA for the intended commit). Ensure the new value preserves quotes and
TOML formatting and verify the full SHA corresponds to the exact upstream commit
referenced.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 1df63042-741c-48d4-857d-acf5cf6de1da

📥 Commits

Reviewing files that changed from the base of the PR and between 8c7bf1f and 91a74fd.

📒 Files selected for processing (4)
  • data/live-build-config/archives/bookworm-backports.pref.chroot
  • scripts/package-build/libhtp/.gitignore
  • scripts/package-build/libhtp/build.py
  • scripts/package-build/libhtp/package.toml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build_iso
  • GitHub Check: codeql-analysis-call / Analyze (python)
  • GitHub Check: Mergify Merge Protections
  • GitHub Check: Summary
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Run Pylint to check for unused-imports in Python files

Files:

  • scripts/package-build/libhtp/build.py
🔍 Remote MCP Context7

Summary of Additional Context Found

Based on the search results, here is the relevant context for reviewing this pull request:

libhtp2 and Suricata Relationship

LibHTP is a security-aware parser for the HTTP protocol designed primarily to support the Suricata use case. The HTP Library is an HTTP normalizer and parser that integrates and provides advanced processing of HTTP streams for Suricata, and while required by the engine, may also be used independently in other applications.

Package Versioning Context

The Ubuntu/Debian ecosystem has separate packages: libhtp-dev (development files), libhtp2 (runtime library), and libhtp2-dbgsym (debug symbols). This explains the PR's change to separate the APT pin entry for Suricata and libhtp2, as they are now treated as distinct packages.

APT Pin Significance

The removal of libhtp2 from the APT pin entry alongside suricata (changing the configuration to pin only suricata to bookworm-backports) suggests that libhtp2 is being built locally from source rather than pinned to backports. This aligns with the PR's objective to build libhtp2 packages from sources instead of relying on pre-built packages.

Build System Pattern

The PR's approach of creating symbolic links to shared build scripts (as seen with build.py) and adding package metadata to package.toml follows a consistent pattern for managing multiple related packages in the vyos-build system.


Sources Used:, [::web_search::]

🔇 Additional comments (3)
scripts/package-build/libhtp/.gitignore (1)

1-1: LGTM!

data/live-build-config/archives/bookworm-backports.pref.chroot (1)

5-7: LGTM!

scripts/package-build/libhtp/build.py (1)

1-1: Run Pylint unused-imports on the symlinked build.py
scripts/package-build/libhtp/build.py (symlink target ../build.py) and scripts/package-build/build.py pass pylint --disable=all --enable=unused-import (exit code 0; rated 10.00/10), satisfying the **/*.py unused-imports guideline.

@@ -0,0 +1,4 @@
[[packages]]
name = "libhtp2"
commit_id = "e851d98f"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use full Git commit SHA for deterministic source pinning.

Line 3 pins commit_id to an abbreviated hash (e851d98f). For build reproducibility and long-term immutability, use the full 40-character SHA to avoid future ambiguity/collision in upstream history.

Suggested change
-commit_id = "e851d98f"
+commit_id = "<full-40-char-commit-sha>"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
commit_id = "e851d98f"
commit_id = "e851d98f1234567890abcdef1234567890abcdef"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/package-build/libhtp/package.toml` at line 3, The commit_id field in
package.toml is pinned to an abbreviated SHA ("e851d98f"); replace it with the
full 40-character Git commit SHA to ensure deterministic source pinning (update
the commit_id value to the repository's full SHA for the intended commit).
Ensure the new value preserves quotes and TOML formatting and verify the full
SHA corresponds to the exact upstream commit referenced.

@sever-sever sever-sever left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You also should add a trigger to rebuild the package

ethtool:
- 'scripts/package-build/ethtool/**'

if [ "${{ steps.changes.outputs.ethtool }}" == "true" ]; then

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

CI integration ❌ failed!

Details

CI logs

  • Config tests ❌ failed

@asklymenko
asklymenko requested a review from sever-sever June 8, 2026 15:03

@dmbaturin dmbaturin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need it to unbreak rolling release builds after Debian backports dropped one of Suricata's dependencies so let's merge it.

@jestabro jestabro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add package build of libhtp2. Build tested locally.

@jestabro
jestabro merged commit 0b27f39 into vyos:rolling Jun 8, 2026
12 of 14 checks passed
@vyos-bot vyos-bot Bot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants