Add configs

Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
This commit is contained in:
Qiheng Lin
2023-02-28 13:16:27 +00:00
parent b9a1aecd37
commit a8b1a6ef6e
6 changed files with 239 additions and 1 deletions
-1
View File
@@ -17,7 +17,6 @@ Makefile.in
Makefile
*.m4
stamp-h*
config.*
/ltmain.sh
/configure
/install-sh
+83
View File
@@ -0,0 +1,83 @@
# Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
libfuse_source = [
"//third_party/libfuse/lib/fuse.c",
"//third_party/libfuse/lib/fuse_loop.c",
"//third_party/libfuse/lib/fuse_loop_mt.c",
"//third_party/libfuse/lib/fuse_lowlevel.c",
"//third_party/libfuse/lib/fuse_opt.c",
"//third_party/libfuse/lib/fuse_signals.c",
"//third_party/libfuse/lib/buffer.c",
"//third_party/libfuse/lib/cuse_lowlevel.c",
"//third_party/libfuse/lib/helper.c",
"//third_party/libfuse/lib/modules/subdir.c",
"//third_party/libfuse/lib/mount_util.c",
"//third_party/libfuse/lib/fuse_log.c",
"//third_party/libfuse/lib/mount.c",
"//third_party/libfuse/lib/modules/iconv.c",
]
import("//build/ohos.gni")
config("libfuse_config") {
visibility = [ ":*" ]
include_dirs = [
"//third_party/libfuse/include",
"//third_party/libfuse/lib",
"//third_party/libfuse",
]
cflags = [
"-fdiagnostics-color=always",
"-pipe",
"-D_FILE_OFFSET_BITS=64",
"-Winvalid-pch",
"-Wextra",
"-O2",
"-g",
"-D_REENTRANT",
"-Wno-sign-compare",
"-Wmissing-declarations",
"-Wwrite-strings",
"-Wno-unused-result",
"-DFUSE_USE_VERSION=35",
"-DFUSERMOUNT_DIR=\"/usr/local/bin\"",
"-U_GNU_SOURCE",
"-pthread"
]
}
ohos_shared_library("libfuse") {
configs = [ "//third_party/libfuse:libfuse_config" ]
sources = libfuse_source
ldflags = [
"-ldl",
"-Wl,--version-script",
rebase_path("//third_party/libfuse/lib/fuse_versionscript", root_build_dir),
"-Wl,-soname,libfuse3.so.3",
"-Wl,--no-undefined",
"-Wl,--as-needed",
"-shared",
"-fPIC",
]
external_deps = [ "c_utils:utils" ]
subsystem_name = "thirdparty"
part_name = "libfuse"
output_name = "libfuse"
install_enable = true
install_images = [ "system" ]
}
+52
View File
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2023 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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.
-->
<configuration>
<oatconfig>
<licensefile>LICENSE</licensefile>
<policylist>
<policy name="projectPolicy" desc="">
<policyitem type="compatibility" name="GPL-2.0+" path="example/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="example programs"/>
<policyitem type="compatibility" name="MIT" path="example/cxxopts.hpp" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="example programs"/>
<policyitem type="compatibility" name="BSD-2-Clause" path="example/passthrough_helpers.h" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="example programs"/>
<policyitem type="compatibility" name="LGPL-2.0" path="include/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="They are used in dynamic link mode."/>
<policyitem type="compatibility" name="GPL-2.0 WITH Linux-syscall-note" path="include/fuse_kernel.h" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="They are used in dynamic link mode."/>
<policyitem type="compatibility" name="LGPL-2.0" path="lib/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="They are used in dynamic link mode."/>
<policyitem type="compatibility" name="GPL-2.0+" path="test/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="test programs"/>
<policyitem type="compatibility" name="GPL-2.0+" path="util/.*" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="util programs"/>
</policy>
</policylist>
<filefilterlist>
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility, license header policies">
<filteritem type="filepath" name="doc/.*" desc="No License specified while permission to use, copy, modify, and distribute are granted"/>
</filefilter>
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
<filteritem type="filepath" name=".*" desc="Contains third party copyright"/>
</filefilter>
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
<filteritem type="filepath" name="doc/fast17-vangoor.pdf" desc="doc files, no License specified."/>
</filefilter>
</filefilterlist>
<licensematcherlist>
<licensematcher name="" desc="">
<licensetext name="" desc=""/>
</licensematcher>
</licensematcherlist>
</oatconfig>
</configuration>
+11
View File
@@ -0,0 +1,11 @@
[
{
"Name" : "libfuse",
"License" : "LGPL V2.0, BSD 3-Clause License, GPL V2.0, MIT License",
"License File" : "LICENSE",
"Version Number" : "3.10.5",
"Owner" : "maojingjing1@huawei.com",
"Upstream URL" : "https://github.com/libfuse/libfuse/releases/tag/fuse-3.10.5",
"Description" : "libfuse provides the reference implementation for communicating with the FUSE kernel module."
}
]
+34
View File
@@ -0,0 +1,34 @@
{
"name": "@ohos/libfuse",
"description": "libfuse provides the reference implementation for communicating with the FUSE kernel module.",
"version": "3.10.5",
"license": "LGPL V2.0, BSD 3-Clause License, GPL V2.0, MIT License",
"publishAs": "code-segment",
"segment": {
"destPath": "third_party/libfuse"
},
"dirs": {},
"scripts": {},
"licensePath": "LICENSE",
"readmePath": {
"en": "README"
},
"component": {
"name": "libfuse",
"subsystem": "thirdparty",
"syscap": [],
"features": [],
"adapted_system_type": [],
"rom": "",
"ram": "",
"deps": {
"components": [],
"third_party": []
},
"build": {
"sub_component": [],
"inner_kits": [],
"test": []
}
}
}
+59
View File
@@ -0,0 +1,59 @@
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef LIBFUSE_CONFIG_H
#define LIBFUSE_CONFIG_H
#define HAVE_COPY_FILE_RANGE
#define HAVE_FALLOCATE
#define HAVE_FDATASYNC
#define HAVE_FORK
#define HAVE_FSTATAT
#define HAVE_ICONV
#define HAVE_OPENAT
#define HAVE_PIPE2
#define HAVE_POSIX_FALLOCATE
#define HAVE_READLINKAT
#define HAVE_SETXATTR
#define HAVE_SPLICE
#define HAVE_STRUCT_STAT_ST_ATIM
#undef HAVE_STRUCT_STAT_ST_ATIMESPEC
#define HAVE_UTIMENSAT
#define HAVE_VMSPLICE
#define PACKAGE_VERSION "3.10.5"
#define pthread_setcancelstate(state, p)
#define pthread_cancel(thread)
#define PTHREAD_CANCEL_ENABLE 0
#define PTHREAD_CANCEL_DISABLE 0
#endif