• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
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" == &gt;
52& == &gt;
53' == &gt;
54< == &gt;
55> == &gt;
56-->
57<configuration>
58    <oatconfig>
59        <licensefile>docs/FTL.TXT</licensefile>
60        <policylist>
61            <policy name="projectPolicy" desc="">
62                <policyitem type="compatibility" name="FTL" path=".*" desc="The FreeType Project LICENSE"/>
63                <policyitem type="compatibility" name="The FreeType Project LICENSE" path=".*" desc="The FreeType Project LICENSE"/>
64                <policyitem type="compatibility" name="GPLStyleLicense" path="builds/unix/config.guess" desc="config file,, not license declare"/>
65                <policyitem type="compatibility" name="GPLStyleLicense" path="builds/unix/config.sub" desc="config file,, not license declare"/>
66                <policyitem type="compatibility" name="GPL-3.0-or-later" path="builds/unix/ax_pthread.m4" desc="config file,, not license declare"/>
67                <policyitem type="compatibility" name="GPL-2.0" path="builds/unix/pkg.m4" desc="config file,, not license declare"/>
68                <policyitem type="compatibility" name="GPLStyleLicense" path="LICENSE.TXT" desc="Freetype provide FTL and GPLv2 license, you can choose one of them."/>
69                <policyitem type="compatibility" name="LGPLStyleLicense" path="docs/GPLv2.TXT" desc="Freetype provide FTL and GPLv2 license, you can choose one of them."/>
70                <policyitem type="compatibility" name="zlib/libpng License" path="src/gzip/.*" desc="Zlib used by FreeType." filefilter="defaultFilter"/>
71                <policyitem type="compatibility" name="zlib-acknowledgement" path="src/gzip/zlib.h" desc="Zlib used by FreeType."/>
72                <policyitem type="compatibility" name="BSL-1.0" path="include/dlg/.*" desc="Freetype provide BSL license."/>
73                <policyitem type="compatibility" name="BSL-1.0" path="src/dlg/dlg.c" desc="Freetype provide BSL license."/>
74            </policy>
75        </policylist>
76        <filefilterlist>
77            <filefilter name="defaultFilter" desc="Files not to check">
78                <filteritem type="filepath" name="docs/CHANGES" desc="This is chenglog file, no need license"/>
79                <filteritem type="filepath" name="docs/PROBLEMS" desc="This is a problems file, no need license"/>
80                <filteritem type="fillname" name="ChangeLog" desc="This is chenglog file, no need license"/>
81                <filteritem type="fillname" name="ChangeLog.*" desc="This is chenglog file, no need license"/>
82                <filteritem type="filepath" name="src/base/md5.h" desc="This file is free software"/>
83                <filteritem type="filepath" name="src/pcf/pcfutil.c" desc="This file is free software"/>
84                <filteritem type="filepath" name="builds/unix/*.m4" desc="pkg-config file"/>
85                <filteritem type="filepath" name="src/gzip/README.freetype" desc="This is description file, no need license"/>
86            </filefilter>
87            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
88                <filteritem type="filepath" name="docs/reference/site/assets/fonts/specimen/.*.ttf|.*.woff|.*.woff2" desc="freetype file, not to check"/>
89                <filteritem type="filepath" name="builds/amiga/README" desc="freetype file, not to check"/>
90                <filteritem type="filepath" name="builds/amiga/README" desc="freetype file, not to check"/>
91                <filteritem type="filepath" name="docs/reference/site/images/favico.ico" desc="freetype file, not to check"/>
92                <filteritem type="filepath" name="builds/amiga/makefile.os4" desc="freetype file, not to check"/>
93                <filteritem type="filepath" name="builds/amiga/smakefile" desc="freetype file, not to check"/>
94                <filteritem type="filepath" name="builds/vms/vmslib.dat" desc="freetype file, not to check"/>
95                <filteritem type="filepath" name="src/autofit/afblue.dat" desc="freetype file, not to check"/>
96                <filteritem type="filepath" name="docs/reference/site/sitemap.xml.gz" desc="freetype file, not to check"/>
97                <filteritem type="filepath" name="docs/reference/site/assets/images/favicon.png" desc="freetype file, not to check"/>
98            </filefilter>
99        </filefilterlist>
100        <licensematcherlist>
101            <licensematcher name="zlib/libpng License" desc="zlib/png license">
102                <licensetext name="
103                     * For conditions of distribution and use, see copyright notice in zlib.h
104                 " desc=""/>
105                 <licensetext name="
106                      zlib.h -- interface of the 'zlib' general purpose compression library
107                      version 1.2.12, March 11th, 2022
108
109                      Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
110
111                      This software is provided 'as-is', without any express or implied
112                      warranty.  In no event will the authors be held liable for any damages
113                      arising from the use of this software.
114
115                      Permission is granted to anyone to use this software for any purpose,
116                      including commercial applications, and to alter it and redistribute it
117                      freely, subject to the following restrictions:
118
119                      1. The origin of this software must not be misrepresented; you must not
120                         claim that you wrote the original software. If you use this software
121                         in a product, an acknowledgment in the product documentation would be
122                         appreciated but is not required.
123                      2. Altered source versions must be plainly marked as such, and must not be
124                         misrepresented as being the original software.
125                      3. This notice may not be removed or altered from any source distribution.
126                 " desc=""/>
127            </licensematcher>
128        </licensematcherlist>
129    </oatconfig>
130</configuration>
131