Skip to content

License register missing for main - #2063

Merged
tuhaihe merged 2 commits into
apache:mainfrom
tuhaihe:license-register-missing
Oct 1, 2026
Merged

tuhaihe merged 2 commits into
apache:mainfrom
tuhaihe:license-register-missing

Conversation

@tuhaihe

@tuhaihe tuhaihe commented Sep 30, 2026

Copy link
Copy Markdown
Member

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


pg_cron's bitstring.h carries the pre-4.4BSD form of the University of
California license, which asks that documentation and advertising
materials acknowledge UC Berkeley.  Replace it with FreeBSD's
sys/sys/bitstring.h from stable/10, the same Berkeley code after UC
Berkeley deleted the advertising clause (FreeBSD commit 82c6e8799148).
That leaves it under the plain 3-clause BSD license, which RAT
recognizes, so drop its exclude.

The macros pg_cron uses (bit_decl, bit_set, bit_test, bit_nset and
bit_nclear) behave the same; the multi-statement ones are now wrapped
in do { } while (0).

Assisted-by: Claude Code
Add LICENSE entries, with the license texts under licenses/, for
bundled code that LICENSE did not list:

- pg_cron's copy of Vixie cron (entry.c, misc.c, cron.h) and
  Berkeley's bitstring.h (BSD-3).
- From PostgreSQL: the Snowball stemmers and stop words (BSD-3),
  strftime.c (BSD-3), pg_bsd_indent (BSD-3, BSD-2 for indent.h),
  HyperLogLog (MIT), LLVM's SectionMemoryManager (Apache-2.0 with LLVM
  Exceptions), the IANA time zone code and data (public domain), and
  the Project X0213 and ICU mapping tables.
- From Greenplum: cmockery (Apache-2.0).

Exclude the two license texts that RAT does not recognize.

Assisted-by: Claude Code
@tuhaihe

tuhaihe commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

What

Two commits:

  1. Replace pg_cron's bitstring.h with the BSD-3 version. pg_cron's copy
    carries the pre-4.4BSD form of the University of California license, which
    asks that documentation and advertising materials acknowledge UC Berkeley.
    It is replaced verbatim with FreeBSD's sys/sys/bitstring.h from stable/10:
    the same Berkeley code after UC Berkeley deleted the advertising clause
    (FreeBSD commit 82c6e8799148). RAT recognizes the new header, so its exclude
    is dropped.
  2. Register third-party code missing from LICENSE, with the license texts
    under licenses/ (each copied verbatim from the source files or upstream):
Component License
pg_cron's Vixie cron parts: src/backend/task/entry.c, misc.c, src/include/task/cron.h Paul Vixie's license
src/include/task/bitstring.h BSD-3 (from FreeBSD stable/10)
Snowball stemmers and stop words BSD-3
src/timezone/strftime.c BSD-3 (UC Regents)
pg_bsd_indent (src/tools/pg_bsd_indent) BSD-3; indent.h is BSD-2
HyperLogLog (src/backend/lib/hyperloglog.c, .h) MIT
LLVM's SectionMemoryManager (src/backend/jit/llvm/SectionMemoryManager.cpp, src/include/jit/SectionMemoryManager.h) Apache-2.0 with LLVM Exceptions
IANA time zone code and data Public domain
Project X0213 mapping tables Project X0213 license
gb-18030-2000.xml (from unicode-org/icu-data) ICU license
cmockery (src/test/unit/cmockery) Apache-2.0

pom.xml excludes the two license texts that RAT does not recognize
(Vixie cron, Project X0213).

REL_2_STABLE

The REL_2_STABLE version is #2059. It has the same bitstring.h commit, but its
LICENSE commit leaves out pg_bsd_indent and SectionMemoryManager, which do not
exist on that branch. The LICENSE layout differs between the branches, so these
are separate commits rather than cherry-picks.

Verification

  • bitstring.h: an exhaustive comparison of the old and new macros (137,664
    checks, 0 mismatches): bitstr_size, plus bit_nset/bit_nclear for every
    (start, stop) in 64 bits, and bit_set/bit_clear/bit_test for every bit.
  • Full build on the rocky9 CI image with no warnings from the task files; the
    test_setup and task regress tests pass on a demo cluster.
  • All paths added to LICENSE exist.
  • RAT on a clean export with submodules: no unapproved files apart from the 36
    submodule docs that Rat: prune dead excludes and more updates #2058 fixes.

@leborchuk leborchuk 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.

LGTM, the same PR as for REL_2_STABLE

@tuhaihe
tuhaihe merged commit 784d4d1 into apache:main Oct 1, 2026
188 of 191 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.

3 participants