1c72fcc34Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?>
2c72fcc34Sopenharmony_ci<!-- Copyright (c) 2022 Huawei Device Co., Ltd.
3c72fcc34Sopenharmony_ci
4c72fcc34Sopenharmony_ci    This program is free software; you can redistribute it and/or modify
5c72fcc34Sopenharmony_ci    it under the terms of the GNU General Public License as published by
6c72fcc34Sopenharmony_ci    the Free Software Foundation; either version 2 of the License, or
7c72fcc34Sopenharmony_ci    (at your option) any later version.
8c72fcc34Sopenharmony_ci    
9c72fcc34Sopenharmony_ci    This program is distributed in the hope that it will be useful,
10c72fcc34Sopenharmony_ci    but WITHOUT ANY WARRANTY; without even the implied warranty of
11c72fcc34Sopenharmony_ci    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12c72fcc34Sopenharmony_ci    GNU General Public License for more details.
13c72fcc34Sopenharmony_ci    
14c72fcc34Sopenharmony_ci    You should have received a copy of the GNU General Public License
15c72fcc34Sopenharmony_ci    along with this program; if not, write to the Free Software
16c72fcc34Sopenharmony_ci    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17c72fcc34Sopenharmony_ci
18c72fcc34Sopenharmony_ci    This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
19c72fcc34Sopenharmony_ci
20c72fcc34Sopenharmony_ci-->
21c72fcc34Sopenharmony_ci<!-- OAT(OSS Audit Tool) configuration guide:
22c72fcc34Sopenharmony_cibasedir: Root dir, the basedir + project path is the real source file location.
23c72fcc34Sopenharmony_cilicensefile: 
24c72fcc34Sopenharmony_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.
25c72fcc34Sopenharmony_ci
26c72fcc34Sopenharmony_citasklist(only for batch mode):
27c72fcc34Sopenharmony_ci1. task: Define oat check thread, each task will start a new thread.
28c72fcc34Sopenharmony_ci2. task name: Only an name, no practical effect.
29c72fcc34Sopenharmony_ci3. task policy: Default policy for projects under this task, this field is required and the specified policy must defined in policylist.
30c72fcc34Sopenharmony_ci4. task filter: Default filefilter for projects under this task, this field is required and the specified filefilter must defined in filefilterlist.
31c72fcc34Sopenharmony_ci5. task project: Projects to be checked, the path field define the source root dir of the project.
32c72fcc34Sopenharmony_ci
33c72fcc34Sopenharmony_ci
34c72fcc34Sopenharmony_cipolicyList:
35c72fcc34Sopenharmony_ci1. policy: All policyitems will be merged to default OAT.xml rules, the name of policy doesn't affect OAT check process.
36c72fcc34Sopenharmony_ci2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
37c72fcc34Sopenharmony_ci<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
38c72fcc34Sopenharmony_ci3. policyitem type:
39c72fcc34Sopenharmony_ci    "compatibility" is used to check license compatibility in the specified path; 
40c72fcc34Sopenharmony_ci    "license" is used to check source license header in the specified path;
41c72fcc34Sopenharmony_ci    "copyright" is used to check source copyright header in the specified path;
42c72fcc34Sopenharmony_ci    "import" is used to check source dependency in the specified path, such as import ... ,include ...
43c72fcc34Sopenharmony_ci    "filetype" is used to check file type in the specified path, supported file types: archive, binary
44c72fcc34Sopenharmony_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
45c72fcc34Sopenharmony_ci
46c72fcc34Sopenharmony_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. 
47c72fcc34Sopenharmony_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.
48c72fcc34Sopenharmony_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.
49c72fcc34Sopenharmony_ci7. policyitem filefilter: Used to bind filefilter which define filter rules.
50c72fcc34Sopenharmony_ci8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
51c72fcc34Sopenharmony_ci
52c72fcc34Sopenharmony_ciNote:If the text contains special characters, please escape them according to the following rules:
53c72fcc34Sopenharmony_ci" == &gt;
54c72fcc34Sopenharmony_ci& == &gt;
55c72fcc34Sopenharmony_ci' == &gt;
56c72fcc34Sopenharmony_ci< == &gt;
57c72fcc34Sopenharmony_ci> == &gt;
58c72fcc34Sopenharmony_ci-->
59c72fcc34Sopenharmony_ci<configuration>
60c72fcc34Sopenharmony_ci    <oatconfig>
61c72fcc34Sopenharmony_ci        <licensefile>COPYING</licensefile>
62c72fcc34Sopenharmony_ci        <policylist>
63c72fcc34Sopenharmony_ci            <policy name="projectPolicy" desc="">
64c72fcc34Sopenharmony_ci                <policyitem type="license" name="GPL" path=".*" desc="license"/>
65c72fcc34Sopenharmony_ci                <policyitem type="copyright" name="*" path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
66c72fcc34Sopenharmony_ci            </policy>
67c72fcc34Sopenharmony_ci        </policylist>
68c72fcc34Sopenharmony_ci        <filefilterlist>
69c72fcc34Sopenharmony_ci            <filefilter name="defaultFilter" desc="Files not to check">
70c72fcc34Sopenharmony_ci                <filteritem type="filename" name="*.am|*.po|*.1|*.m4|*.ac|*.sh|README.*|*.csv" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
71c72fcc34Sopenharmony_ci                <filteritem type="filename" name="*.rst|*Skylake|*.Broadwell|*.Haswell" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
72c72fcc34Sopenharmony_ci                <filteritem type="filename" name="TODO|INSTALL|go|LINGUAS|help|buildrpm|00main" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
73c72fcc34Sopenharmony_ci                <filteritem type="filename" name="ca0106|ChangeLog|gitcompile|Makevars|hda" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
74c72fcc34Sopenharmony_ci                <filteritem type="filename" name="map_test_case|default|test|info" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
75c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/.*.h" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
76c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/volume_mapping.c" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
77c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/configparser.c" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
78c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/curskey.c" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
79c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/menu_widget.c" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
80c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/mixer_clickable.c" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
81c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/bindings.c" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
82c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="include/gettext.h" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
83c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="speaker-test/*.*" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
84c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="include/gettext_curses.h" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
85c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsactl/alsactl.h" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
86c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="aplay/formats.h" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
87c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsactl/alsactl_init.xml" desc="三方开源,不需检测文件头是否遗漏版权声明"/>
88c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsactl/.*.c" desc="三方开源,不需检测license、copyright"/>
89c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsactl/.*.h" desc="三方开源,不需检测license、copyright"/>
90c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/.*.c" desc="三方开源,不需检测license、copyright"/>
91c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsaucm/.*.c" desc="三方开源,不需检测license、copyright"/>
92c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsaucm/.*.h" desc="三方开源,不需检测license、copyright"/>
93c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="axfer/.*.h" desc="三方开源,不需检测license、copyright"/>
94c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="axfer/.*.c" desc="三方开源,不需检测license、copyright"/>
95c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="bat/.*.h" desc="三方开源,不需检测license、copyright"/>
96c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="bat/.*.c" desc="三方开源,不需检测license、copyright"/>
97c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="include/.*.h" desc="三方开源,不需检测license、copyright"/>
98c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="topology/.*.h" desc="三方开源,不需检测license、copyright"/>
99c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="topology/.*.c" desc="三方开源,不需检测license、copyright"/>
100c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="amidi/amidi.c" desc="三方开源,不需检测license、copyright"/>
101c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="amixer/amixer.c" desc="三方开源,不需检测license、copyright"/>
102c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="amixer/amixer.h" desc="三方开源,不需检测license、copyright"/>
103c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="seq/*/.*.c" desc="三方开源,不需检测license、copyright"/>
104c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsaconf/.*.8" desc="三方开源,不需检测license、copyright"/>
105c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="topology/.*.h" desc="三方开源,不需检测license、copyright"/>
106c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="topology/.*.c" desc="三方开源,不需检测license、copyright"/>
107c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsaloop/.*.c" desc="三方开源,不需检测license、copyright"/>
108c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsaloop/alsaloop.h" desc="三方开源,不需检测license、copyright"/>
109c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="iecset/.*.c" desc="三方开源,不需检测license、copyright"/>
110c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="aplay/aplay.c" desc="三方开源,不需检测license、copyright"/>
111c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="nhlt/nhlt-dmic-info.c" desc="三方开源,不需检测license、copyright"/>
112c72fcc34Sopenharmony_ci                <filteritem type="filepath" name="alsamixer/alsamixer.rc.example" desc="三方开源,不需检测license、copyright"/>
113c72fcc34Sopenharmony_ci            </filefilter>
114c72fcc34Sopenharmony_ci            <filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies">
115c72fcc34Sopenharmony_ci            </filefilter>
116c72fcc34Sopenharmony_ci	        <filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
117c72fcc34Sopenharmony_ci            </filefilter>
118c72fcc34Sopenharmony_ci            <filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
119c72fcc34Sopenharmony_ci            </filefilter>
120c72fcc34Sopenharmony_ci            <filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
121c72fcc34Sopenharmony_ci            </filefilter>
122c72fcc34Sopenharmony_ci            <filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
123c72fcc34Sopenharmony_ci            </filefilter>
124c72fcc34Sopenharmony_ci            <filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
125c72fcc34Sopenharmony_ci            <filteritem type="filepath" name="speaker-test/samples/.*.wav" desc="binary files"/>
126c72fcc34Sopenharmony_ci            </filefilter>
127c72fcc34Sopenharmony_ci        </filefilterlist>
128c72fcc34Sopenharmony_ci    </oatconfig>
129c72fcc34Sopenharmony_ci</configuration>
130