Skip to content

silent automake build - #895

Open
petrovr wants to merge 1 commit into
softhsm:mainfrom
petrovr:silent_am_build
Open

silent automake build#895
petrovr wants to merge 1 commit into
softhsm:mainfrom
petrovr:silent_am_build

Conversation

@petrovr

@petrovr petrovr commented Aug 1, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Build Experience
    • Enabled quieter build output by default when supported.
    • Added options to restore detailed build messages or override the default verbosity when needed.

@petrovr
petrovr requested a review from a team as a code owner August 1, 2026 15:08
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 44463149-8c63-47d4-a941-145f70bc95be

📥 Commits

Reviewing files that changed from the base of the PR and between bfee284 and 6f305dc.

📒 Files selected for processing (1)
  • configure.ac
🚧 Files skipped from review as they are similar to previous changes (1)
  • configure.ac

📝 Walkthrough

Walkthrough

The Automake configuration now enables silent build rules by default when supported. Users can disable them with --disable-silent-rules or override them with V=1.

Changes

Automake silent build rules

Layer / File(s) Summary
Silent rule configuration
configure.ac
Adds conditional AM_SILENT_RULES([yes]) support with documented command-line overrides.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the added silent Automake build support.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 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 `@src/bin/util/test/p11prov-test.sh`:
- Around line 127-129: Update the test cleanup flow around TOKEN_DIR so failures
from OpenSSL or SoftHSM commands also remove generated token objects and
private-key data before exiting. Register or invoke cleanup for both successful
and failed paths, covering the commands through the test completion logic near
lines 166 and 188-189, while preserving the existing TOKEN_DIR setup.
- Around line 89-97: Update the module-discovery loop in p11prov-test.sh to
consume find results without word splitting, preserving whitespace in each path
while retaining the existing *.so/*.dll filtering and P11MODULE assignment
behavior.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b171bddd-f89c-48a8-844c-eadd50bc92ac

📥 Commits

Reviewing files that changed from the base of the PR and between f12916e and bfee284.

📒 Files selected for processing (9)
  • .gitattributes
  • .github/workflows/ci.yml
  • configure.ac
  • src/bin/util/test/.gitignore
  • src/bin/util/test/CMakeLists.txt
  • src/bin/util/test/Makefile.am
  • src/bin/util/test/p11prov-test.sh
  • src/lib/SoftHSM.cpp
  • src/lib/SoftHSM.h

Comment thread src/bin/util/test/p11prov-test.sh Outdated
Comment on lines +89 to +97
for F in `find "$D" -name '*softhsm2.*'` ; do
case "$F" in
*.so|*.dll);;
*) continue;;
esac
test -f "$F" || continue
P11MODULE="$F"
break
done

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve module paths that contain whitespace.

Line 89 splits find output on whitespace. A build path with whitespace can set P11MODULE to an invalid path and fail the test.

Proposed fix
-P11MODULE=
-for F in `find "$D" -name '*softhsm2.*'` ; do
-  case "$F" in
-  *.so|*.dll);;
-  *) continue;;
-  esac
-  test -f "$F" || continue
-  P11MODULE="$F"
-  break
-done
+P11MODULE=$(
+  find "$D" -type f \( -name '*softhsm2.so' -o -name '*softhsm2.dll' \) -print |
+    sed -n '1p'
+)
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 89-89: For loops over find output are fragile. Use find -exec or a while read loop.

(SC2044)


[style] 89-89: Use $(...) notation instead of legacy backticks ....

(SC2006)

🤖 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 `@src/bin/util/test/p11prov-test.sh` around lines 89 - 97, Update the
module-discovery loop in p11prov-test.sh to consume find results without word
splitting, preserving whitespace in each path while retaining the existing
*.so/*.dll filtering and P11MODULE assignment behavior.

Source: Linters/SAST tools

Comment thread src/bin/util/test/p11prov-test.sh Outdated
Comment on lines +127 to +129
TOKEN_DIR="$CWD"/tokens
rm -rf "$TOKEN_DIR"
mkdir "$TOKEN_DIR"

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Clean up token data when a test command fails.

After line 166, a failed OpenSSL or SoftHSM command exits before line 189. The test then leaves token objects and the generated private key in tokens.

Proposed fix
 TOKEN_DIR="$CWD"/tokens
 rm -rf "$TOKEN_DIR"
 mkdir "$TOKEN_DIR"
+trap 'rm -rf "$TOKEN_DIR"' 0

Also applies to: 188-189

🤖 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 `@src/bin/util/test/p11prov-test.sh` around lines 127 - 129, Update the test
cleanup flow around TOKEN_DIR so failures from OpenSSL or SoftHSM commands also
remove generated token objects and private-key data before exiting. Register or
invoke cleanup for both successful and failed paths, covering the commands
through the test completion logic near lines 166 and 188-189, while preserving
the existing TOKEN_DIR setup.

@petrovr

petrovr commented Aug 1, 2026

Copy link
Copy Markdown
Author

pushed again without unrelated changes for #864

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.

1 participant