Skip to content

Add missing SPDX-License tags#591

Merged
rsmarples merged 3 commits intoNetworkConfiguration:masterfrom
ColinMcInnes:570_spdx
Apr 30, 2026
Merged

Add missing SPDX-License tags#591
rsmarples merged 3 commits intoNetworkConfiguration:masterfrom
ColinMcInnes:570_spdx

Conversation

@ColinMcInnes
Copy link
Copy Markdown
Contributor

If copyright block is present, add missing SPDX-License tag

If copyright block is not present, add one. Use BSD-3-Clause and infer author list from git blame.

Resolves #570

If copyright block is present, add missing SPDX-License tag

If copyright block is not present, add one. Use BSD-3-Clause and infer author list from git blame.

Resolves NetworkConfiguration#570
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5ac5b98d-5bd8-4653-85e7-3c272143f206

📥 Commits

Reviewing files that changed from the base of the PR and between 9d66c8b and 33302c1.

📒 Files selected for processing (1)
  • compat/crypt/md5.h
✅ Files skipped from review due to trivial changes (1)
  • compat/crypt/md5.h

Walkthrough

Adds SPDX-License-Identifier lines and copyright header comments across many files (docs, build files, scripts, source headers/sources, tests, vendor). In files with existing SPDX markers the header lines were repositioned within the file prologue. No functional code, build logic, or public APIs were changed.

Changes

Cohort / File(s) Summary
Top-level docs & build files
BUILDING.md, README.md, Makefile, Makefile.inc, config-null.mk, configure, iconfig.mk
Prepended SPDX and copyright header comments; no changes to content or build logic.
Makefiles in trees
src/GNUmakefile, src/Makefile, dev/Makefile, hooks/Makefile, tests/Makefile, tests/crypt/GNUmakefile, tests/crypt/Makefile
Added header comments only; build rules/targets unchanged.
Hook scripts & manpage sources
hooks/*, hooks/*.in, hooks/*.8.in, hooks/*.in
Added SPDX/copyright comments; removed a few stray blank troff comment lines; no script logic changed.
Compatibility library files
compat/*, compat/crypt/*
Inserted SPDX identifiers (various licenses: BSD-2/3-Clause, ISC, MIT, CC0-1.0) and adjusted comment formatting; no functional changes.
Core source files & headers
src/*.c, src/*.h, src/*/*.c, src/*/*.h (e.g., src/arp.*, src/dhcp*.{c,h}, src/if*.{c,h}, src/privsep*.{c,h}, src/eloop.*, src/queue.h, etc.)
Added or repositioned SPDX header lines inside file prologues for consistency; no code, declarations, or control flow modified.
Configuration & generated sources
src/dhcpcd.conf, src/dhcpcd-definitions*.conf, src/dhcpcd-embedded.*, src/dhcpcd.8.in, src/dhcpcd.conf.5.in
Added/adjusted SPDX comment lines; removed a small number of extraneous comment markers; no functional/config changes.
Tests & samples
tests/*, tests/eloop-bench/*, tests/crypt/*, tests/crypt/*.c, tests/crypt/*.h
Added SPDX and copyright headers to test sources, README, .gitignore; test logic unchanged.
Vendor files
vendor/README.md, vendor/queue.h, vendor/rbtree.*
Added appropriate SPDX identifiers (BSD variants) in headers; vendor code unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add missing SPDX-License tags' accurately and directly describes the primary purpose of the changeset, which is adding SPDX-License-Identifier headers to files lacking them.
Description check ✅ Passed The description clearly explains the approach: adding SPDX-License tags where copyright blocks exist, and adding both copyright and SPDX tags where missing. It references issue #570, making it relevant to the changeset.
Linked Issues check ✅ Passed The PR substantially addresses issue #570 by adding SPDX-License-Identifier headers to 94+ files that lacked them, including all major file categories mentioned (root, compat, hooks, src, tests, vendor). However, the PR uses mixed licenses instead of the initially planned approach.
Out of Scope Changes check ✅ Passed All changes are within scope: adding SPDX-License-Identifier headers, copyright comments, and fixing comment formatting to accommodate these additions. No unrelated functionality changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ 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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@ColinMcInnes ColinMcInnes marked this pull request as ready for review March 27, 2026 18:37
@perkelix
Copy link
Copy Markdown
Contributor

@rsmarples can we merge this?

@rsmarples
Copy link
Copy Markdown
Member

@perkelix no, sorry I missed reviewing this

@ColinMcInnes why BSD-3? My default license, is BSD-2 which covers the whole project.

@ColinMcInnes
Copy link
Copy Markdown
Contributor Author

@ColinMcInnes why BSD-3? My default license, is BSD-2 which covers the whole project.

That was a misread on my part, for some reason I saw BSD-3 in a few files and assumed it was the universal license, but that was just for a few items, I will fix that.

@ColinMcInnes
Copy link
Copy Markdown
Contributor Author

Now the only BSD-3 is the 3 files from University of California (Berkley)

Overall project is BSD-2, not 3, so ensure any new license header was BSD-2.

General formatting cleanup.
Copy link
Copy Markdown

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@hooks/dhcpcd-run-hooks.8.in`:
- Line 1: The SPDX header string is inconsistent with the license body; update
the SPDX identifier or the license prose so they match: either change the SPDX
tag from "BSD-2-Clause" to "BSD-2-Clause-NetBSD" to reflect the NetBSD-style
“author and contributors” wording, or replace the embedded license text with the
canonical BSD-2-Clause wording; ensure the value in the header (the string on
the first line) exactly matches the variant used in the license block below so
scanners and legal tooling stay accurate.

In `@hooks/dhcpcd-run-hooks.in`:
- Around line 2-3: Update the file header comments: replace the outdated
copyright line ("# Copyright (c) 2017-2022 Roy Marples <roy@marples.name>") with
the correct year range and author attribution found in the repo history (e.g. "#
Copyright (c) 2017-2026 Colin McInnes <...>") or otherwise adjust the
range/author to match contribution history; keep the existing SPDX line intact
and, if unsure about retaining Roy Marples as co-author, add a note or consult
maintainers to decide whether to list both authors or only Colin McInnes.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c62882f8-9d25-4d1a-ad65-e6452e4423c1

📥 Commits

Reviewing files that changed from the base of the PR and between 0edb765 and 9d66c8b.

📒 Files selected for processing (148)
  • BUILDING.md
  • Makefile
  • Makefile.inc
  • README.md
  • compat/_strtoi.h
  • compat/arc4random.c
  • compat/arc4random.h
  • compat/arc4random_uniform.c
  • compat/arc4random_uniform.h
  • compat/bitops.h
  • compat/chacha_private.h
  • compat/closefrom.h
  • compat/consttime_memequal.h
  • compat/crypt/hmac.c
  • compat/crypt/hmac.h
  • compat/crypt/md5.c
  • compat/crypt/md5.h
  • compat/crypt/sha256.c
  • compat/crypt/sha256.h
  • compat/crypt_openssl/hmac.c
  • compat/crypt_openssl/hmac.h
  • compat/crypt_openssl/sha256.c
  • compat/crypt_openssl/sha256.h
  • compat/dprintf.c
  • compat/dprintf.h
  • compat/endian.h
  • compat/pidfile.c
  • compat/pidfile.h
  • compat/queue.h
  • compat/reallocarray.c
  • compat/reallocarray.h
  • compat/setproctitle.c
  • compat/setproctitle.h
  • compat/strlcpy.c
  • compat/strlcpy.h
  • compat/strtoi.c
  • compat/strtoi.h
  • compat/strtou.c
  • config-null.mk
  • configure
  • hooks/01-test
  • hooks/10-wpa_supplicant
  • hooks/15-timezone
  • hooks/20-resolv.conf
  • hooks/29-lookup-hostname
  • hooks/30-hostname.in
  • hooks/50-dhcpcd-compat
  • hooks/50-ntp.conf
  • hooks/50-timesyncd.conf
  • hooks/50-yp.conf
  • hooks/50-ypbind.in
  • hooks/Makefile
  • hooks/dhcpcd-run-hooks.8.in
  • hooks/dhcpcd-run-hooks.in
  • iconfig.mk
  • src/GNUmakefile
  • src/Makefile
  • src/arp.c
  • src/arp.h
  • src/auth.c
  • src/auth.h
  • src/bpf.c
  • src/bpf.h
  • src/common.c
  • src/common.h
  • src/control.c
  • src/control.h
  • src/defs.h
  • src/dev.c
  • src/dev.h
  • src/dev/Makefile
  • src/dev/udev.c
  • src/dhcp-common.c
  • src/dhcp-common.h
  • src/dhcp.c
  • src/dhcp.h
  • src/dhcp6.c
  • src/dhcp6.h
  • src/dhcpcd-definitions-small.conf
  • src/dhcpcd-definitions.conf
  • src/dhcpcd-embedded.c.in
  • src/dhcpcd-embedded.h.in
  • src/dhcpcd.8.in
  • src/dhcpcd.c
  • src/dhcpcd.conf
  • src/dhcpcd.conf.5.in
  • src/dhcpcd.h
  • src/duid.c
  • src/duid.h
  • src/eloop.c
  • src/eloop.h
  • src/genembedc
  • src/genembedh
  • src/if-bsd.c
  • src/if-linux-wext.c
  • src/if-linux.c
  • src/if-options.c
  • src/if-options.h
  • src/if-sun.c
  • src/if.c
  • src/if.h
  • src/ipv4.c
  • src/ipv4.h
  • src/ipv4ll.c
  • src/ipv4ll.h
  • src/ipv6.c
  • src/ipv6.h
  • src/ipv6nd.c
  • src/ipv6nd.h
  • src/logerr.c
  • src/logerr.h
  • src/privsep-bpf.c
  • src/privsep-bpf.h
  • src/privsep-bsd.c
  • src/privsep-control.c
  • src/privsep-control.h
  • src/privsep-inet.c
  • src/privsep-inet.h
  • src/privsep-linux.c
  • src/privsep-root.c
  • src/privsep-root.h
  • src/privsep-sun.c
  • src/privsep.c
  • src/privsep.h
  • src/queue.h
  • src/route.c
  • src/route.h
  • src/sa.c
  • src/sa.h
  • src/script.c
  • src/script.h
  • tests/Makefile
  • tests/crypt/.gitignore
  • tests/crypt/GNUmakefile
  • tests/crypt/Makefile
  • tests/crypt/README.md
  • tests/crypt/run-test.c
  • tests/crypt/test.h
  • tests/crypt/test_hmac_md5.c
  • tests/crypt/test_sha256.c
  • tests/eloop-bench/.gitignore
  • tests/eloop-bench/Makefile
  • tests/eloop-bench/README.md
  • tests/eloop-bench/eloop-bench.c
  • vendor/README.md
  • vendor/queue.h
  • vendor/rbtree.c
  • vendor/rbtree.h
💤 Files with no reviewable changes (3)
  • compat/closefrom.h
  • src/dhcpcd.conf.5.in
  • src/dhcpcd.8.in

Comment thread hooks/dhcpcd-run-hooks.8.in
Comment thread hooks/dhcpcd-run-hooks.in
@perkelix
Copy link
Copy Markdown
Contributor

@rsmarples are we good to go now?

Comment thread compat/crypt/md5.h
Brain fart, I put it right before the line containing "copyright" but that was in the middle of a sentence.
@rsmarples rsmarples merged commit 5524da4 into NetworkConfiguration:master Apr 30, 2026
3 of 17 checks passed
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.

some files have unspecified License and Copyright

3 participants