Skip to content

Conversation

@zluudg
Copy link
Contributor

@zluudg zluudg commented Oct 21, 2025

Summary by CodeRabbit

  • New Features

    • Added CLI subcommands for API, filter lists, enrollment, and certificate renewal
    • Updated CLI command and flag descriptions for POP/DNS TAPIR interactions
  • Chores

    • Renamed the CLI tool from tapir-cli to dnstapir-cli across build and packaging
    • Added Debian packaging support and a Debian build target; updated RPM packaging, service and timer names
    • Added Debian maintainer scripts and control metadata
  • Removals

    • Removed the sample configuration file

@zluudg zluudg requested a review from a team as a code owner October 21, 2025 10:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Walkthrough

Renames project/artifacts from tapir-cli to dnstapir-cli across module/imports, build and packaging (Makefile, RPM spec, systemd units), adds Debian packaging (deb/DEBIAN), removes the sample YAML, and bumps the github.com/dnstapir/tapir dependency.

Changes

Cohort / File(s) Change Summary
VCS & build metadata
\.gitignore, Makefile
.gitignore adds dnstapir-cli, Debian ignores and RPM comments; Makefile updates PROGdnstapir-cli, SPECFILErpm/SPECS/dnstapir-cli.spec, adds a deb packaging target and expands clean.
Go module & deps
go.mod
Module path changed to dnstapir-cli; bumped github.com/dnstapir/tapir require version.
Binary entrypoint
main.go
Import path updated from tapir-cli/cmddnstapir-cli/cmd; cmd.Execute() remains.
CLI commands
cmd/root.go
Root command name/help updated; flag descriptions adjusted; new subcommands wired: ApiCmd, FilterlistsCmd, EnrollCmd, RenewCmd.
RPM spec & packaging
rpm/SPECS/dnstapir-cli.spec
Package name/summary/description and Source entries renamed to dnstapir-*; %attr paths and preinstall user/group handling updated (user renamed tapir-renewdnstapir-renew).
Systemd units
rpm/SOURCES/dnstapir-renew.service, rpm/SOURCES/dnstapir-renew.timer
Unit descriptions adjusted; service user set to dnstapir-renew; ExecStart uses /usr/bin/dnstapir-cli; timer wording updated.
Debian packaging
deb/DEBIAN/control, deb/DEBIAN/postinst
New Debian control metadata for dnstapir-cli and postinst script creating group/user and setting permissions for /etc/dnstapir.
Config samples
tapir-cli.sample.yaml
Sample configuration file removed.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant CLI as dnstapir-cli
  participant Root as cmd.Root
  participant Sub as Subcommand
  participant System as System (files/services)

  User->>CLI: run dnstapir-cli <args>
  CLI->>Root: cmd.Execute()
  Root->>Sub: dispatch selected subcommand
  alt enroll / renew flows
    Sub->>System: perform enroll/renew actions (keys, certs, systemd)
    note right of System #dff0d8: interacts with /usr/bin/dnstapir-cli, systemd units, packaging paths
  else api / filter operations
    Sub->>System: perform API/filterlist ops
    note right of System #f7f7d9: network/config interactions
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Check packaging scripts and user/group handling in rpm/SPECS/dnstapir-cli.spec and deb/DEBIAN/postinst.
  • Verify Makefile deb target paths and produced package metadata.
  • Confirm module/import rename in go.mod/main.go and the dependency bump correctness.

Possibly related PRs

Suggested reviewers

  • johanix
  • eest
  • morkrost

Poem

🐇 I hopped through code with nimble cheer,
Swapped names and specs and packaged gear.
Systemd, debs, and modules too,
A carrot patch — now fresh and new. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Leon/rename to dnstapir prefix" accurately conveys the main objective of the pull request. The meaningful portion of the title ("rename to dnstapir prefix") directly corresponds to the primary change across the changeset: a comprehensive renaming effort from "tapir-cli" to "dnstapir-cli" and updating related references throughout the codebase (module paths, package names, service files, configuration, etc.). The "Leon/" portion appears to be a branch name prefix that was included in the title, which adds minor noise but does not obscure the core message about the renaming to the dnstapir prefix.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch leon/rename-to-dnstapir-prefix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49bd44d and b15fefd.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

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.

@zluudg zluudg force-pushed the leon/rename-to-dnstapir-prefix branch from bcd307c to e2665cb Compare October 22, 2025 09:52
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcd307c and e2665cb.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • .gitignore (1 hunks)
  • Makefile (2 hunks)
  • go.mod (1 hunks)
  • main.go (1 hunks)
  • rpm/SPECS/dnstapir-cli.spec (2 hunks)
  • tapir-cli.sample.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • tapir-cli.sample.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .gitignore
  • main.go
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile

[warning] 1-1: Target "PROG" should be declared PHONY.

(phonydeclared)


[warning] 13-13: Target "SPECFILE" should be declared PHONY.

(phonydeclared)

🪛 RuboCop (1.81.1)
rpm/SPECS/dnstapir-cli.spec

[fatal] 1-1: unexpected token tCOLON
(Using Ruby 2.7 parser; configure using TargetRubyVersion parameter, under AllCops)

(Lint/Syntax)

🔇 Additional comments (6)
go.mod (1)

8-8: Dependency version updated.

The github.com/dnstapir/tapir dependency has been updated to a newer version. This appears to be a necessary companion change to the rename.

Makefile (2)

1-1: LGTM: Program name variable updated.

The PROG variable has been correctly renamed to dnstapir-cli, consistent with the project rename.


13-13: LGTM: Spec file path updated.

The SPECFILE variable has been correctly updated to reference the renamed spec file.

rpm/SPECS/dnstapir-cli.spec (3)

1-1: LGTM: Package name updated.

The RPM package name has been correctly renamed to dnstapir-cli.


45-45: Config file path updated consistently.

The configuration file path has been correctly updated to dnstapir-cli.yaml, maintaining consistency with the project rename.


10-11: No issues found. The renamed systemd unit files exist and are correctly referenced.

The verification confirms that both dnstapir-renew.service and dnstapir-renew.timer files exist at rpm/SOURCES/, and the old tapir-renew.* files have been properly removed. The spec file references at lines 10-11 and 46-47 are correct.

@zluudg zluudg force-pushed the leon/rename-to-dnstapir-prefix branch from e2665cb to 2512ea1 Compare October 22, 2025 10:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
rpm/SPECS/dnstapir-cli.spec (2)

6-6: Fix capitalization: "Cli" should be "CLI".

The Summary line uses "Cli" which should be "CLI" (all uppercase) as it's an acronym for "Command Line Interface".

Apply this diff:

-Summary:       DNS TAPIR EDGE Cli Tool
+Summary:       DNS TAPIR EDGE CLI Tool

16-16: Fix capitalization: "ClI" should be "CLI".

The Description line uses "ClI" which should be "CLI" (all uppercase) as it's an acronym.

Apply this diff:

-DNS TAPIR EDGE ClI Tool for managing an EDGE deployment
+DNS TAPIR EDGE CLI Tool for managing an EDGE deployment
🧹 Nitpick comments (1)
cmd/root.go (1)

151-151: Optional: Update commented reference for completeness.

The commented-out code on Line 151 still references the old name "tapir-cli". While this is low priority since it's commented out, you may want to update it to "dnstapir-cli" for consistency.

Apply this diff if you'd like to update the comment:

-	// GlobalCF.Caller = "tapir-cli"
+	// GlobalCF.Caller = "dnstapir-cli"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2665cb and 2512ea1.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (9)
  • .gitignore (1 hunks)
  • Makefile (2 hunks)
  • cmd/root.go (2 hunks)
  • go.mod (1 hunks)
  • main.go (1 hunks)
  • rpm/SOURCES/dnstapir-renew.service (1 hunks)
  • rpm/SOURCES/dnstapir-renew.timer (1 hunks)
  • rpm/SPECS/dnstapir-cli.spec (2 hunks)
  • tapir-cli.sample.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • tapir-cli.sample.yaml
✅ Files skipped from review due to trivial changes (1)
  • rpm/SOURCES/dnstapir-renew.service
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile

[warning] 1-1: Target "PROG" should be declared PHONY.

(phonydeclared)


[warning] 13-13: Target "SPECFILE" should be declared PHONY.

(phonydeclared)

🪛 RuboCop (1.81.1)
rpm/SPECS/dnstapir-cli.spec

[fatal] 1-1: unexpected token tCOLON
(Using Ruby 2.7 parser; configure using TargetRubyVersion parameter, under AllCops)

(Lint/Syntax)

🔇 Additional comments (14)
.gitignore (1)

29-29: LGTM! Binary name added to gitignore.

The new binary name dnstapir-cli has been correctly added to the ignore list, alongside the old name for backward compatibility.

go.mod (2)

1-1: LGTM! Module path renamed consistently.

The module path has been updated from tapir-cli to dnstapir-cli, aligning with the project rename.


8-8: LGTM! Dependency updated.

The github.com/dnstapir/tapir dependency has been bumped to a newer version.

rpm/SOURCES/dnstapir-renew.timer (1)

2-2: LGTM! Timer description updated for clarity.

The description now uses "DNS TAPIR" with proper spacing, which aligns with the branding used elsewhere in the project.

main.go (1)

8-8: LGTM! Import path updated correctly.

The import path has been updated to dnstapir-cli/cmd, matching the new module name in go.mod.

Makefile (2)

1-1: LGTM! Program name updated.

The PROG variable has been correctly updated to dnstapir-cli, which will be used throughout the Makefile for build targets.


13-13: LGTM! Spec file path updated.

The SPECFILE variable now points to the renamed spec file at rpm/SPECS/dnstapir-cli.spec.

cmd/root.go (3)

32-33: LGTM! Command name and description updated correctly.

The Cobra command's Use field has been updated to dnstapir-cli and the description now references "POP, i.e. the DNS TAPIR Policy Processor", both aligning with the project rename.


49-49: LGTM! Flag description simplified.

The standalone flag description now references "POP process" instead of "TAPIR-POP", providing clearer terminology.


55-55: LGTM! TLS flag description updated.

The description now uses "POP process" for consistency with other flag descriptions.

rpm/SPECS/dnstapir-cli.spec (4)

1-1: LGTM! Package name updated.

The RPM package name has been correctly renamed to dnstapir-cli.


10-11: LGTM! Source files renamed correctly.

The systemd service and timer source files have been updated to use the dnstapir-renew prefix.


45-47: LGTM! File paths updated consistently.

The configuration file and systemd unit files now use the dnstapir prefix throughout.


51-51: LGTM! System user renamed correctly.

The system user has been appropriately renamed from tapir-renew to dnstapir-renew, consistent with the overall rename. Note that past review comments indicated the corresponding service file rpm/SOURCES/dnstapir-renew.service (not included in this review) may still need updates to reference this new user name and the correct binary path.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
deb/DEBIAN/postinst (1)

4-4: Create the daemon group as a system group

Without --system, addgroup may allocate a regular (high-GID) group, which is not ideal for service accounts. Please create dnstapir as a system group instead.

-getent group dnstapir || addgroup dnstapir
+getent group dnstapir || addgroup --system dnstapir
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2512ea1 and 248c1c6.

📒 Files selected for processing (4)
  • .gitignore (2 hunks)
  • Makefile (4 hunks)
  • deb/DEBIAN/control (1 hunks)
  • deb/DEBIAN/postinst (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • deb/DEBIAN/control
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitignore
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile

[warning] 1-1: Target "PROG" should be declared PHONY.

(phonydeclared)


[warning] 13-13: Target "SPECFILE" should be declared PHONY.

(phonydeclared)


[warning] 59-59: Target body for "deb" exceeds allowed length of 5 (7).

(maxbodylength)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Leon Fernandez <zluudg@zluudg.se>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
Makefile (1)

59-66: Add new deb target to .PHONY declaration.

The deb target does not produce a file named deb/, so it should be declared phony to prevent make from skipping it if such a directory exists. Additionally, other existing non-file-producing targets (linux, netbsd, test, install, tarball, srpm) are missing from the phony declaration.

Apply this diff to declare all phony targets:

-.PHONY: build clean
+.PHONY: build clean linux netbsd test install tarball srpm deb
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 248c1c6 and c7ed85f.

📒 Files selected for processing (1)
  • Makefile (4 hunks)
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile

[warning] 1-1: Target "PROG" should be declared PHONY.

(phonydeclared)


[warning] 13-13: Target "SPECFILE" should be declared PHONY.

(phonydeclared)


[warning] 59-59: Target body for "deb" exceeds allowed length of 5 (7).

(maxbodylength)

🔇 Additional comments (1)
Makefile (1)

43-43: ✓ Previous review comment addressed.

The clean target now uses @rm -f *.deb with the force flag, making artifact removal idempotent and resolving the failure on fresh trees.

make sure default cfg file path uses new prefix
@zluudg zluudg force-pushed the leon/rename-to-dnstapir-prefix branch from 49bd44d to b15fefd Compare October 29, 2025 12:17
@zluudg zluudg merged commit db001e3 into main Oct 29, 2025
3 checks passed
@zluudg zluudg deleted the leon/rename-to-dnstapir-prefix branch October 29, 2025 14:16
@zluudg
Copy link
Contributor Author

zluudg commented Oct 29, 2025

fix #48

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.

3 participants