talatuyarer opened a new pull request, #13220:
URL: https://github.com/apache/iceberg/pull/13220

   This pull request enhances the functionality originally introduced in PR 
#11977 for generating LICENSE and NOTICE files. The primary goals of this 
update are to improve accuracy, simplify maintenance, and provide clearer 
compliance feedback by aligning with Apache Software Foundation (ASF) license 
policies. 
   
   I implement it based on @jbonofre 's comment on here: 
https://github.com/apache/iceberg/pull/11977#issuecomment-2931565362
   
   ### Key Enhancements:
   
   * **Centralized License Categorization**: A new `LICENSE_TO_CATEGORY_MAP` 
provides a single, comprehensive mapping of license name variations to their 
corresponding ASF license category (`A`, `B`, or `X`). This simplifies the 
process of adding or modifying license aliases and ensures consistent 
categorization.
   
   * **Automated ASF Policy Compliance Checks**:
       * Dependencies with **Category X** licenses now trigger a build error, 
immediately flagging critical policy violations.
       * Dependencies with **Category B** licenses generate a warning, 
prompting developers to review the specific ASF conditions for their use.
       * Any unrecognized or uncategorized licenses also produce a warning, 
ensuring that all dependencies are reviewed.
   
   * **Robust `NOTICE` File Handling**: The script now correctly identifies and 
aggregates `NOTICE` files from dependencies. The content is grouped by shared 
`NOTICE` text, reducing redundancy and creating a cleaner, more organized final 
`NOTICE` file.
   
   * **Refined Report Generation**:
       * The `LICENSE` report now includes the ASF category for each group of 
dependencies and a direct link to the license URL, improving clarity.
       * MIT, BSD-3-Clause are now embedded directly into the `LICENSE` file, 
making the report self-contained.
   
   ### How to Use the New Functionality:
   
   1.  **Generate Reports**: Run the `gradle generateLicenseReport` task to 
create the `LICENSE` and `NOTICE` files in the 
`build/reports/dependency-license/` directory.
   2.  **Update Root Files**: Run `gradle updateLicenseReport` to copy the 
generated files to the project's root directory.
   3.  **Verify Changes**: The `check` task automatically runs 
`compareLicenseReport`, which will fail if the root `LICENSE` or `NOTICE` files 
are out of sync with the generated reports, ensuring that all changes are 
committed.
   
   This updated automation will help the project maintain compliance with 
licensing requirements more effectively and with greater confidence.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to