Skip to content
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

Add OpenMage Contributors Copyright #2295

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

justinbeaty
Copy link
Contributor

@justinbeaty justinbeaty commented Jul 8, 2022

Description (*)

From discussion #2276

Added @copyright header to 4,687 files that have been modified by the OpenMage project since 2015. The OpenMage project has done great work and deserves its copyright notice.

Instead of a generic 2015-2022 year range, each file has its own specific year, or year range, based on the git history of that file. I've included the script that I used to generate this commit.

The script has comments explaining what it does, but here's an overview:

  1. Read all the entire commit history of the repo using git log --pretty='%H %cs %s'
  2. Loop through each commit and try and determine if this was upstream changes from Magento, LLC or if it was a commit from OpenMage contributors. To do this, the script looks for commit messages such as:
    • "Import Magento"
    • "Merge ... magento-1.*"
    • "SUPEE"
    • Also, some hardcoded commit hashes that don't fit a pattern
  3. Loop through each file in the entire repo that contains @copyright and find the first and last commit hash from our results in step 2
  4. Add or update the @copyright The OpenMage Contributors line in each file

To see a list of commits attributed to either Magento or OpenMage, run php shell/update-copyright.php dump. I will post the results of that in the next comment so you can see the output here, too.

The rationale behind not using a generic date range is for ease of git diff between versions as suggested by @fballiano. Instead, if the script is run before a version is tagged, then it will only be modifying files that were already changed by a commit in that version.

Here is the output from when I ran the script:

$ time php shell/update-copyright.php 
Updated 4687 file(s)

real    3m13.286s
user    2m31.269s
sys     0m48.590s

It did take a few minutes, maybe the reading of git log on each of the 4,000+ files can be optimized.

Also, this PR is made to 1.9.4.x. I can also make a smaller PR to 20.0 since there will be discrepencies. This could create some merge conflicts in the future, but I don't think it will be too bad. For example assume some file has '2015-2019' in 1.9.4.x and '2015-2020' in 20.0 (because there was a 20.0 branch only commit in 2020 to that file). If the file was then changed in 1.9.4.x in 2022, it would conflict I think when v19 is merged into v20. I ask the maintainers to weigh in on that.

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

Check out this branch and run:

git diff -U0 HEAD~1 | grep '^[+-]' | grep -Ev '^(--- a/|\+\+\+ b/)' | sort -u

That will print all unique changes made in the second commit of this PR. You should only see copyright changes. I will post the output in a follow up comment.

Questions or comments

I have intentionally made two commits in this PR. I think it is best to not squash them.

Other changes from #2276 will be made in a second PR.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added Component: AdminNotification Relates to Mage_AdminNotification Component: Adminhtml Relates to Mage_Adminhtml Component: Admin Relates to Mage_Admin Component: Api PageRelates to Mage_Api Component: Api2 Relates to Mage_Api2 Component: Authorizenet Relates to Mage_Authorizenet Component: Backup Relates to Mage_Backup Component: Bundle Relates to Mage_Bundle Component: Captcha Relates to Mage_Captcha Component: Catalog Relates to Mage_Catalog Component: CatalogInventory Relates to Mage_CatalogInventory Component: CatalogRule Relates to Mage_CatalogRule Component: CatalogIndex Relates to Mage_CatalogIndex Component: CatalogSearch Relates to Mage_CatalogSearch Component: Centinel Relates to Mage_Centinel Component: Checkout Relates to Mage_Checkout Component: Cms Relates to Mage_Cms Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Cron Relates to Mage_Cron Component: CurrencySymbol Relates to Mage_CurrencySymbol Component: Customer Relates to Mage_Customer Component: Dataflow Relates to Mage_Dataflow Component: Directory Relates to Mage_Directory Component: Downloadable Relates to Mage_Downloadable Component: Eav Relates to Mage_Eav Component: GoogleAnalytics Relates to Mage_GoogleAnalytics Component: GoogleCheckout Relates to Mage_GoogleCheckout Component: ImportExport Relates to Mage_ImportExport labels Jul 8, 2022
fballiano
fballiano previously approved these changes Aug 25, 2022
@fballiano
Copy link
Contributor

we'll have to run the script every once in a while, on all the active branches, but that's kind of expected for this tasks

@justinbeaty
Copy link
Contributor Author

@justinbeaty - what you showed in the examples I consider it represents the best legal explanation that I received. If we can make these changes without effort it is fine for me.

That is how this PR already is -- no changes needed.

we'll have to run the script every once in a while, on all the active branches, but that's kind of expected for this tasks

Yes, ideally before each release I suppose. That makes the diff between versions more clear. But even if it is less often, I still think it's a good idea to have these in the code.

@ADDISON74
Copy link
Contributor

My appreciation for the effort.

If I sit and analyze better it was quite simple to understand legal aspects. If I create a version in 2014, then update it in 2015 and 2016 and someone takes over the version from 2015, I best protect myself by mentioning the copyright in the 2014-2016 time range. If I specified only 2014 I would omit the variants from 2015 or 2016.

We are now talking as if we were selling the products of the largest software corporation in the world, but I understand that at any time someone can either come to take over our work or accuse us of illegalities and that is why good to protect ourselves. It's like taking a commercial extension and integrating it into OpenMage, obviously the developer will ask us for explanations and compensation.

@ADDISON74
Copy link
Contributor

I don't want to cause panic or be misunderstood but being a project in which everyone can bring something we have to be careful with what we contribute. The work must be our own creation not taken from someone else who has been protected by copyright.

@justinbeaty
Copy link
Contributor Author

I don't want to cause panic or be misunderstood but being a project in which everyone can bring something we have to be careful with what we contribute. The work must be our own creation not taken from someone else who has been protected by copyright.

We should definitely have thorough discussions about this topic.

I would say lets wait for a second approval and also wait some days in case anyone else has feedback to this change.

@justinbeaty
Copy link
Contributor Author

Fixed conflicts from #2514

@ADDISON74
Copy link
Contributor

I would make a change as follows:

* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @license Open Software License (OSL 3.0) http://opensource.org/licenses/osl-3.0.php

It looks much better.

@sreichel
Copy link
Contributor

But it is not correct;)

https://docs.phpdoc.org/3.0/guide/references/phpdoc/tags/license.html

@fballiano
Copy link
Contributor

also le's add the https while we're at it ;-)

@ADDISON74
Copy link
Contributor

@sreichel - that argument is clear, I didn't check it before because I was more interested in the visual aspect in relation to the other lines.

@justinbeaty
Copy link
Contributor Author

Rebased. Verification command below:

$ git diff -U0 HEAD~2 | grep '^[+-]' | grep -Ev '^(--- a/|\+\+\+ b/)' | sort -u
+ * @copyright   Copyright (c) 2006-2018 Magento, Inc. (https://www.magento.com)
- * @copyright   Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
+ * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
+ * @copyright  Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
+# @copyright  Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
+// @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
- * @copyright   Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
- * @copyright  Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
-# @copyright  Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
-// @copyright   Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
+ * @copyright   Copyright (c) 2015-2019 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2015-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2016-2020 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2016-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2016-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2016-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2016 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2017-2018 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2017-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2017-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2017-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2017 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2017 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2018-2019 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2018-2020 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2018-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2018-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2018-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2018-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2018 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2018 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2019-2020 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2019-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2019-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2020-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2020-2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
+// @copyright   Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright   Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
+ * @copyright  Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
+# @copyright  Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
+// @copyright   Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
- * http://opensource.org/licenses/afl-3.0.php
-// http://opensource.org/licenses/afl-3.0.php
- * http://opensource.org/licenses/osl-3.0.php
-# http://opensource.org/licenses/osl-3.0.php
+ * https://opensource.org/licenses/afl-3.0.php
+// https://opensource.org/licenses/afl-3.0.php
+ * https://opensource.org/licenses/osl-3.0.php
+# https://opensource.org/licenses/osl-3.0.php
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
-// @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
-# @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+// @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ * @license    https://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+# @license    https://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

@fballiano
Copy link
Contributor

@justinbeaty do you need to rerun the scripts or can we merge it as it is (as it's been waiting for a while)?

@justinbeaty
Copy link
Contributor Author

@fballiano It's okay to merge now. Maybe there were a few more copyright changes it would pick up if I ran it again, but they will be picked up next time the script is run.

@fballiano fballiano merged commit ee46ff9 into OpenMage:1.9.4.x Oct 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2022

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit ee46ff9. ± Comparison against base commit 71a2751.

sreichel added a commit that referenced this pull request Oct 17, 2022
* Fixed "should return string but returns false"

* Fixed "should return XYZ but returns false"

* Fixed "should return array but returns null"

* Fixed "should return string but returns null"

* Fixed "should return int but returns null"

* Fixed "should return bool but returns"

* Fixed docs (see comments)

* Fixed "should return array"

* Update app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>

* Update app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>

* Update app/code/core/Mage/Tag/Model/Resource/Tag.php

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>

* Update app/code/core/Mage/Customer/Block/Form/Register.php

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>

* Added module names to helper(#2617)

* Get catalog search result collection from engine (#2634)

* Add PHP dependencies security check workflow (#2639)

* [security-workflow] Fixed cron syntax (#2640)

* Added OpenMage Contributors Copyright (#2295)

* Added ddev snippets to docs (#2575)

* Improve dev/openmage/install.sh script for newer versions of Docker - no longer requires separate compose.

* Only run workflows when relevant files change (#2641)

* Add back notification popup severity icons URL (#2633)

* Reduce reprocessed jpeg file size by defaulting quality to 85% (#2629)

* Fixed issue #475.

* Removed <frontend_type>text</frontend_type> as it is the default.

* Fixed bug on users not able to modify image quality in backend if deprecated config exists.

* Fixed bug on incorrect check if image quality was not set in backend.

* Improved note in system.xml.

* Prevented editing of a non-editable order (#2632)

* Fix dev/openmage/install.sh script setting permissions on var directory.

* Allowed automatic full invoice from API (#2393)

* Add check if array key isset before using it (#2649)

* Fixed phpstan-baseline.neon

* Fixed phpstan-baseline.neon (updated dev tools)

* Revert "Fixed phpstan-baseline.neon"

This reverts commit 3c82e76.

* Fixed getRegion()

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
Co-authored-by: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com>
Co-authored-by: Justin Beaty <51970393+justinbeaty@users.noreply.github.com>
Co-authored-by: Colin Mollenhour <colin@mollenhour.com>
Co-authored-by: luigifab <31816829+luigifab@users.noreply.github.com>
Co-authored-by: Przemysław Piotrowski <przemyslaw.p@deligo.pl>
seifer7 added a commit to seifer7/magento-lts that referenced this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Admin Relates to Mage_Admin Component: Adminhtml Relates to Mage_Adminhtml Component: AdminNotification Relates to Mage_AdminNotification Component: Api PageRelates to Mage_Api Component: Api2 Relates to Mage_Api2 Component: Authorizenet Relates to Mage_Authorizenet Component: Backup Relates to Mage_Backup Component: Bundle Relates to Mage_Bundle Component: Captcha Relates to Mage_Captcha Component: Catalog Relates to Mage_Catalog Component: CatalogIndex Relates to Mage_CatalogIndex Component: CatalogInventory Relates to Mage_CatalogInventory Component: CatalogRule Relates to Mage_CatalogRule Component: CatalogSearch Relates to Mage_CatalogSearch Component: Centinel Relates to Mage_Centinel Component: Checkout Relates to Mage_Checkout Component: Cms Relates to Mage_Cms Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Contacts Relates to Mage_Contacts Component: Core Relates to Mage_Core Component: Cron Relates to Mage_Cron Component: CurrencySymbol Relates to Mage_CurrencySymbol Component: Customer Relates to Mage_Customer Component: Dataflow Relates to Mage_Dataflow Component: Directory Relates to Mage_Directory Component: Downloadable Relates to Mage_Downloadable Component: PayPal Relates to Mage_Paypal Mage.php Relates to app/Mage.php
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants