15bec5421Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 25bec5421Sopenharmony_ci<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 35bec5421Sopenharmony_ci 45bec5421Sopenharmony_ci Licensed under the Apache License, Version 2.0 (the "License"); 55bec5421Sopenharmony_ci you may not use this file except in compliance with the License. 65bec5421Sopenharmony_ci You may obtain a copy of the License at 75bec5421Sopenharmony_ci 85bec5421Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 95bec5421Sopenharmony_ci 105bec5421Sopenharmony_ci Unless required by applicable law or agreed to in writing, software 115bec5421Sopenharmony_ci distributed under the License is distributed on an "AS IS" BASIS, 125bec5421Sopenharmony_ci WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135bec5421Sopenharmony_ci See the License for the specific language governing permissions and 145bec5421Sopenharmony_ci limitations under the License. 155bec5421Sopenharmony_ci 165bec5421Sopenharmony_ci Notes: 175bec5421Sopenharmony_ci This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun. 185bec5421Sopenharmony_ci--> 195bec5421Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide: 205bec5421Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location. 215bec5421Sopenharmony_cilicensefile: 225bec5421Sopenharmony_ci1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule. 235bec5421Sopenharmony_ci 245bec5421Sopenharmony_citasklist(only for batch mode): 255bec5421Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread. 265bec5421Sopenharmony_ci2. task name: Only an name, no practical effect. 275bec5421Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 285bec5421Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 295bec5421Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project. 305bec5421Sopenharmony_ci 315bec5421Sopenharmony_ci 325bec5421Sopenharmony_cipolicyList: 335bec5421Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 345bec5421Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 355bec5421Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 365bec5421Sopenharmony_ci3. policyitem type: 375bec5421Sopenharmony_ci "compatibility" is used to check license compatibility in the specified path; 385bec5421Sopenharmony_ci "license" is used to check source license header in the specified path; 395bec5421Sopenharmony_ci "copyright" is used to check source copyright header in the specified path; 405bec5421Sopenharmony_ci "import" is used to check source dependency in the specified path, such as import ... ,include ... 415bec5421Sopenharmony_ci "filetype" is used to check file type in the specified path, supported file types: archive, binary 425bec5421Sopenharmony_ci "filename" is used to check whether the specified file exists in the specified path(support projectroot in default OAT.xml), supported file names: LICENSE, README, README.OpenSource 435bec5421Sopenharmony_ci 445bec5421Sopenharmony_ci4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license. 455bec5421Sopenharmony_ci5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem. 465bec5421Sopenharmony_ci6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed. 475bec5421Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules. 485bec5421Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 495bec5421Sopenharmony_ci 505bec5421Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules: 515bec5421Sopenharmony_ci" == > 525bec5421Sopenharmony_ci& == > 535bec5421Sopenharmony_ci' == > 545bec5421Sopenharmony_ci< == > 555bec5421Sopenharmony_ci> == > 565bec5421Sopenharmony_ci--> 575bec5421Sopenharmony_ci<configuration> 585bec5421Sopenharmony_ci <oatconfig> 595bec5421Sopenharmony_ci <licensefile></licensefile> 605bec5421Sopenharmony_ci <policylist> 615bec5421Sopenharmony_ci <policy name="projectPolicy" desc=""> 625bec5421Sopenharmony_ci <policyitem type="compatibility" name="Libpng" path="*.*" desc="libpng license."/> 635bec5421Sopenharmony_ci <policyitem type="compatibility" name="GPLStyleLicense" path="config.guess" desc="config file, not license declare"/> 645bec5421Sopenharmony_ci <policyitem type="compatibility" name="GPLStyleLicense" path="config.sub" desc="config file, not license declare"/> 655bec5421Sopenharmony_ci <policyitem type="compatibility" name="GPLStyleLicense" path="missing" desc="wrapper for missing GNU programs, not license declare"/> 665bec5421Sopenharmony_ci <policyitem type="compatibility" name="GPLStyleLicense" path="compile" desc="Automake file, not license declare"/> 675bec5421Sopenharmony_ci <policyitem type="compatibility" name="InvalidLicense" path="LICENSE" desc=""/> 685bec5421Sopenharmony_ci <policyitem type="compatibility" name="GPL-2.0+" path="contrib/gregbook/*.*" desc="BSD-like with advertising clause or GNU GPL v2 or later"/> 695bec5421Sopenharmony_ci <policyitem type="compatibility" name="zlib" path="libpng.spec" desc="They are used in dynamic link mode."/> 705bec5421Sopenharmony_ci </policy> 715bec5421Sopenharmony_ci </policylist> 725bec5421Sopenharmony_ci <filefilterlist> 735bec5421Sopenharmony_ci <filefilter name="defaultFilter" desc="Files not to check"> 745bec5421Sopenharmony_ci <filteritem type="filename" name="depcomp" desc="Automatic dependency tracking file"/> 755bec5421Sopenharmony_ci <filteritem type="filename" name="ANNOUNCE" desc="release file, not need license declare"/> 765bec5421Sopenharmony_ci <filteritem type="filepath" name="scripts/libtool.m4" desc="auto config file"/> 775bec5421Sopenharmony_ci <filteritem type="filename" name="test-driver" desc="Automake file"/> 785bec5421Sopenharmony_ci <filteritem type="filename" name="autogen.sh" desc="auto gen file"/> 795bec5421Sopenharmony_ci <filteritem type="filename" name="TRADEMARK" desc="trademark file"/> 805bec5421Sopenharmony_ci <filteritem type="filename" name="INSTALL" desc="install intro file"/> 815bec5421Sopenharmony_ci <filteritem type="filename" name="example.c" desc="example file, not license declare"/> 825bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/pngminim/preader/makefile" desc="makefile"/> 835bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/gregbook/makevms.com" desc="config file"/> 845bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/gregbook/LICENSE" desc="License file"/> 855bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/gregbook/Makefile.unx" desc="sample makefile, not license declare"/> 865bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/gregbook/Makefile.sgi" desc="sample makefile, not license declare"/> 875bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/visupng/cexcept.h" desc="An interface for exception-handling in ANSI C"/> 885bec5421Sopenharmony_ci </filefilter> 895bec5421Sopenharmony_ci <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 905bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/pngsuite/.*.png" desc="libpng file, not to check"/> 915bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/testpngs/.*.png" desc="libpng file, not to check"/> 925bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/visupng/.*.png|.*.ico" desc="libpng file, not to check"/> 935bec5421Sopenharmony_ci <filteritem type="filepath" name="contrib/gregbook/.*.png" desc="libpng file, not to check"/> 945bec5421Sopenharmony_ci <filteritem type="filename" name="png*.png|png*.jpg" desc="libpng file, not to check"/> 955bec5421Sopenharmony_ci </filefilter> 965bec5421Sopenharmony_ci </filefilterlist> 975bec5421Sopenharmony_ci <licensematcherlist> 985bec5421Sopenharmony_ci <licensematcher name="zlib" desc=""> 995bec5421Sopenharmony_ci <licensetext name="License: zlib" desc=""/> 1005bec5421Sopenharmony_ci </licensematcher> 1015bec5421Sopenharmony_ci </licensematcherlist> 1025bec5421Sopenharmony_ci </oatconfig> 1035bec5421Sopenharmony_ci</configuration>