Skip to content

CDRIVER-4044 consistent copyright date and license notice #1655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 27, 2024

Conversation

eramongodb
Copy link
Contributor

Resolves CDRIVER-4044.

The addition/removal of license notices in source files is deferred to CDRIVER-5613; this PR only ensures current license notices are all made consistent.

Consistency is enforced such that the copyright template within the license notice follows this exact pattern:

Copyright 2009-present MongoDB, Inc.

where 2009 is the MongoDB C Driver project inception date and MongoDB, Inc. is the name of the owner.

The list of files was obtained using the following pattern matcher (rg: ripgrep):

rg --no-filename --ignore-case --replace '$1' '.*(copyright.*mongo[^"]*).*$' | sort -u

Which produced this initial list of patterns:

Copyright (C) 2013-present MongoDB, Inc.
Copyright 2009-2013 MongoDB, Inc.
Copyright 2009-present MongoDB, Inc.
Copyright 2013 MongoDB Inc.
Copyright 2013 MongoDB, Inc.
Copyright 2013-2014 MongoDB, Inc.
Copyright 2013-present MongoDB Inc.
Copyright 2013-present MongoDB, Inc.
Copyright 2014 MongoDB, Inc.
Copyright 2015 MongoDB Inc.
Copyright 2015 MongoDB, Inc.
Copyright 2015-present MongoDB, Inc.
Copyright 2016 MongoDB, Inc.
Copyright 2016-present MongoDB, Inc.
Copyright 2017 MongoDB Inc.
Copyright 2017 MongoDB, Inc.
Copyright 2017-present MongoDB, Inc.
Copyright 2018-present MongoDB Inc.
Copyright 2018-present MongoDB, Inc.
Copyright 2019 MongoDB, Inc.
Copyright 2019-present MongoDB, Inc.
Copyright 2020 MongoDB, Inc.
Copyright 2020-present MongoDB, Inc.
Copyright 2021 MongoDB, Inc.
Copyright 2021-present MongoDB, Inc.
Copyright 2022 MongoDB, Inc.
Copyright 2023 MongoDB, Inc.
Copyright 2023-present MongoDB, Inc.
Copyright 2024 MongoDB, Inc.
Copyright 2024-present MongoDB, Inc.
copyright = "2017-present, MongoDB, Inc
copyright = "2024, MongoDB Inc
copyright = u'2017, MongoDB, Inc'

Separating these into three distinct groups:

  • Copyright (C) ...: in the libbson.rc.in and libmongoc.rc.in files.
  • Copyright <date><suffix> MongoDB, Inc.: in most source files currently containing a license notice.
  • "<date><suffix>, MongoDB Inc": in conf.py files under docs/dev/, src/libbson/doc/, and src/libmongoc/doc/. It is unclear if these should be updated (copyright of docs vs. source?), so are currently left unchanged, although the missing comma was added regardless.
  • u'2017, MongoDB, Inc': in conf.py under build/sphinx/homepage-config. Similar to the above, currently left unchanged (copyright of docs vs. source?).

Question: should the copyright templates in conf.py files be updated as well to use 2009-present?

@eramongodb eramongodb self-assigned this Jun 26, 2024
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

Question: should the copyright templates in conf.py files be updated as well to use 2009-present?

I expect "yes" based on this comment

@@ -1,5 +1,5 @@
/*
* Copyright 2018-present MongoDB, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Files in src/kms-message are copied from libmongocrypt. Suggest reverting changes in src/kms-message. Reverting may fix the kms-divergence-check task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor Author

@eramongodb eramongodb left a comment

Choose a reason for hiding this comment

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

Updated copyright strings in conf.py files. The comma after the date is preserved per Sphinx documentation:

A copyright statement in the style '2008, Author Name'.

@@ -1,5 +1,5 @@
/*
* Copyright 2018-present MongoDB, Inc.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@eramongodb eramongodb requested a review from kevinAlbs June 26, 2024 20:49
Copy link
Contributor

@rcsanchez97 rcsanchez97 left a comment

Choose a reason for hiding this comment

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

LGTM. I just made a few comments where it seemed like something might have been overlooked. Feel free to ignore if I wrongly flagged something that was intentional.

docs/dev/conf.py Outdated
@@ -19,7 +19,7 @@
REPO_ROOT = THIS_DIR.parent.parent

project = "MongoDB C Driver Development"
copyright = "2024, MongoDB Inc"
copyright = "2024, MongoDB, Inc"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any particular reason for leaving the year as 2024?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Updated.

@@ -34,7 +34,7 @@ BEGIN
VALUE "OriginalFilename", BSON_OUTPUT_BASENAME "-" BSON_API_VERSION ".dll"
VALUE "ProductName", "MongoDB C Driver"
VALUE "ProductVersion", BSON_VERSION_S
VALUE "LegalCopyright", "Copyright (C) 2013-present MongoDB, Inc."
VALUE "LegalCopyright", "Copyright 2013-present MongoDB, Inc."
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for leaving the start year as 2013?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I may have accidentally reverted the update to year in a local rebase. Fixed.

@@ -34,7 +34,7 @@ BEGIN
VALUE "OriginalFilename", MONGOC_OUTPUT_BASENAME "-" MONGOC_API_VERSION ".dll"
VALUE "ProductName", "MongoDB C Driver"
VALUE "ProductVersion", MONGOC_VERSION_S
VALUE "LegalCopyright", "Copyright (C) 2013-present MongoDB, Inc."
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for leaving the start year as 2013?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I may have accidentally reverted the update to year in a local rebase. Fixed.

Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM with pending comments addressed.

After merging, suggest creating a PR to the debian/unstable branch to apply the copyright update to the patch file: 0001_local_mathjax.diff. I expect that may fix the debian-package-build task.

@eramongodb eramongodb merged commit eb3f999 into mongodb:master Jun 27, 2024
1 check was pending
@eramongodb eramongodb deleted the cdriver-4044 branch June 27, 2024 16:49
eramongodb added a commit to eramongodb/mongo-c-driver that referenced this pull request Jun 27, 2024
* Consistent omission of redundant (C): Copyright <date> <name>

* Consistent comma placement: MongoDB, Inc.

* Consistent copyright date and format: 2009-present
eramongodb added a commit to eramongodb/mongo-c-driver that referenced this pull request Jun 27, 2024
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