1<?xml version="1.0" encoding="UTF-8"?> 2<!-- Copyright (c) 2021 Huawei Device Co., Ltd. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 16 Notes: 17 This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun@huawei.com. 18--> 19<!-- OAT(OSS Audit Tool) configuration guide: 20basedir: Root dir, the basedir + project path is the real source file location. 21licensefile: 221.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. 23 24tasklist(only for batch mode): 251. task: Define oat check thread, each task will start a new thread. 262. task name: Only an name, no practical effect. 273. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist. 284. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist. 295. task project: Projects to be checked, the path field define the source root dir of the project. 30 31 32policyList: 331. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process. 342. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is: 35<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/> 363. policyitem type: 37 "compatibility" is used to check license compatibility in the specified path; 38 "license" is used to check source license header in the specified path; 39 "copyright" is used to check source copyright header in the specified path; 40 "import" is used to check source dependency in the specified path, such as import ... ,include ... 41 "filetype" is used to check file type in the specified path, supported file types: archive, binary 42 "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 43 444. 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. 455. 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. 466. 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. 477. policyitem filefilter: Used to bind filefilter which define filter rules. 488. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path. 49 50Note:If the text contains special characters, please escape them according to the following rules: 51" == > 52& == > 53' == > 54< == > 55> == > 56--> 57<configuration> 58 <oatconfig> 59 <licensefile>COPYING</licensefile> 60 <licensematcherlist> 61 <licensematcher name="BSD-3-Clause" desc="License for BSD-3-Clause"> 62 <licensetext name=" 63 * This work is provided >as is>; redistribution and modification 64 * in whole or in part, in any medium, physical or electronic is 65 * permitted without restriction. 66 * 67 * This work is distributed in the hope that it will be useful, 68 * but WITHOUT ANY WARRANTY; without even the implied warranty of 69 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 70 * 71 * In no event shall the authors or contributors be liable for any 72 * direct, indirect, incidental, special, exemplary, or consequential 73 * damages (including, but not limited to, procurement of substitute 74 * goods or services; loss of use, data, or profits; or business 75 * interruption) however caused and on any theory of liability, whether 76 * in contract, strict liability, or tort (including negligence or 77 * otherwise) arising in any way out of the use of this software, even 78 * if advised of the possibility of such damage. 79 " desc=""/> 80 </licensematcher> 81 <licensematcher name="BSD-3-Clause" desc="License for BSD-3-Clause"> 82 <licensetext name=" 83 * This software is provided >as is> redistribution and modification 84 * is permitted, provided that the following disclaimer is retained. 85 * 86 * This software is distributed in the hope that it will be useful, 87 * but WITHOUT ANY WARRANTY; without even the implied warranty of 88 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 89 * In no event shall the authors or contributors be liable for any 90 * direct, indirect, incidental, special, exemplary, or consequential 91 * damages (including, but not limited to, procurement of substitute 92 * goods or services; loss of use, data, or profits; or business 93 * interruption) however caused and on any theory of liability, whether 94 * in contract, strict liability, or tort (including negligence or 95 * otherwise) arising in any way out of the use of this software, even 96 * if advised of the possibility of such damage. 97 " desc=""/> 98 </licensematcher> 99 <licensematcher name="LGPL" desc="License for LGPL"> 100 <licensetext name=" 101 * Licensed under the Academic Free License version 2.0 102 * Or under the following terms: 103 * 104 * This library is free software; you can redistribute it and/or 105 * modify it under the terms of the GNU Lesser General Public 106 * License as published by the Free Software Foundation; either 107 * version 2.1 of the License, or (at your option) any later version. 108 * 109 * This library is distributed in the hope that it will be useful, 110 * but WITHOUT ANY WARRANTY; without even the implied warranty of 111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 112 * Lesser General Public License for more details. 113 * 114 * You should have received a copy of the GNU Lesser General Public 115 * License along with this library; if not, see <http://www.gnu.org/licenses/>. 116 " desc=""/> 117 </licensematcher> 118 </licensematcherlist> 119 <policylist> 120 <policy name="projectPolicy" desc=""> 121 <policyitem type="compatibility" name="LGPL" path=".*" rule="may" group="defaultGroup" desc="The files involved in compilation are the LGPL protocol.They are used in dynamic link mode."/> 122 </policy> 123 </policylist> 124 <filefilterlist> 125 <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies"> 126 <filteritem type="filename" name="*.m4" desc="This file is distributed under the same license as the PACKAGE package."/> 127 <filteritem type="filename" name="*.po" desc="This file is distributed under the same license as the PACKAGE package."/> 128 <filteritem type="filename" name="*.doap" desc="This file is not used."/> 129 <filteritem type="filename" name="*.py" desc="This file is not used."/> 130 <filteritem type="filename" name="*.sh" desc="This file is not used."/> 131 <filteritem type="filename" name="*.xml" desc="This file is not used."/> 132 <filteritem type="filename" name="NEWS.pre-1-3" desc="This file is not used."/> 133 <filteritem type="filename" name="gen-unicode-tables.pl" desc="This file is not used."/> 134 <filteritem type="filepath" name="glib/pcre/pcre_chartables.c" desc="This file is not used"/> 135 <filteritem type="filepath" name="gobject/tests/closure-refcount.c" desc="This file is not used"/> 136 <filteritem type="filepath" name="gio/xdgmime/.*" desc="This file is not used"/> 137 <filteritem type="filepath" name="glib/valgrind.h" desc="This file is not used"/> 138 <filteritem type="filepath" name=".*COPYING" desc="License File"/> 139 <filteritem type="filepath" name="glib2.spec" desc="RPM description"/> 140 <filteritem type="filepath" name="README.OpenSource" desc="OpenSource README, not linked."/> 141 <filteritem type="filepath" name="glib-2.68.1.tar.xz" desc="OpenEuler:glib2 code. The files involved in compilation are the LGPL protocol.They are used in dynamic link mode."/> 142 </filefilter> 143 <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies"> 144 <filteritem type="filename" name="Amsterdam-fat" desc="This file is distributed under the same license as the PACKAGE package."/> 145 <filteritem type="filename" name="Amsterdam-slim" desc="This file is distributed under the same license as the PACKAGE package."/> 146 <filteritem type="filename" name="*.m4" desc="This file is distributed under the same license as the PACKAGE package."/> 147 <filteritem type="filename" name="*.expected" desc="This file is distributed under the same license as the PACKAGE package."/> 148 <filteritem type="filename" name="*.sxd" desc="This file is distributed under the same license as the PACKAGE package."/> 149 <filteritem type="filename" name="*.desktop" desc="This file is distributed under the same license as the PACKAGE package."/> 150 <filteritem type="filename" name="*.jpg" desc="This file is distributed under the same license as the PACKAGE package."/> 151 <filteritem type="filename" name="*.gif" desc="This file is distributed under the same license as the PACKAGE package."/> 152 <filteritem type="filename" name="*.pem" desc="This file is distributed under the same license as the PACKAGE package."/> 153 <filteritem type="filename" name="*.png" desc="This file is distributed under the same license as the PACKAGE package."/> 154 <filteritem type="filename" name="*.gmarkup" desc="This file is distributed under the same license as the PACKAGE package."/> 155 <filteritem type="filename" name="*.exe" desc="This file is distributed under the same license as the PACKAGE package."/> 156 <filteritem type="filename" name="*.odg" desc="This file is distributed under the same license as the PACKAGE package."/> 157 <filteritem type="filepath" name="BUILG.gn" desc="openEuler:glib2 build gn file."/> 158 <filteritem type="filepath" name="glib2.spec" desc="openEuler:glib2 spec."/> 159 <filteritem type="filepath" name="patch.tar.gz" desc="openEuler:glib2 origin patch."/> 160 <filteritem type="filepath" name="backport-patch.log" desc="openEuler:glib2 origin patch files name."/> 161 <filteritem type="filepath" name="glib-2.68.1.tar.xz" desc="openEuler:glib2 code."/> 162 </filefilter> 163 </filefilterlist> 164 </oatconfig> 165</configuration> 166 167 168