diff options
author | Bhupesh Sharma <bhupesh.sharma@linaro.org> | 2021-09-20 00:44:46 +0530 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2021-09-28 16:18:27 -0700 |
commit | 6a19cc9f003f3caf92a6ea7fbddc6660f3f815cb (patch) | |
tree | be8092b5dcff349e10a4ff55620629fc264e4ac3 /recipes-security | |
parent | 1bf7f30ca980b1ed0a030fdc28c3ae2ae1e90c0d (diff) | |
download | meta-security-6a19cc9f003f3caf92a6ea7fbddc6660f3f815cb.tar.gz |
recipes-security/fscrypt: Add fscrypt .bb file
fscrypt is a high-level tool for the management of Linux
filesystem encryption. fscrypt manages metadata, key generation,
key wrapping, PAM integration, and provides a uniform interface
for creating and modifying encrypted directories.
Add recipe for the same in 'recipes-security'.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security')
-rw-r--r-- | recipes-security/fscrypt/fscrypt_1.0.0.bb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-security/fscrypt/fscrypt_1.0.0.bb b/recipes-security/fscrypt/fscrypt_1.0.0.bb new file mode 100644 index 0000000..a70d310 --- /dev/null +++ b/recipes-security/fscrypt/fscrypt_1.0.0.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "fscrypt is a high-level tool for the management of Linux filesystem encryption" | ||
2 | DESCIPTION = "fscrypt manages metadata, key generation, key wrapping, PAM integration, \ | ||
3 | and provides a uniform interface for creating and modifying encrypted directories. For \ | ||
4 | a small, low-level tool that directly sets policies, see fscryptctl \ | ||
5 | (https://github.com/google/fscryptcl)." | ||
6 | HOMEPAGE = "https://github.com/google/fscrypt" | ||
7 | SECTION = "base" | ||
8 | LICENSE = "Apache-2.0" | ||
9 | LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
10 | |||
11 | BBCLASSEXTEND = "native nativesdk" | ||
12 | |||
13 | # fscrypt depends on go and libpam | ||
14 | DEPENDS += "go-dep-native libpam" | ||
15 | |||
16 | SRCREV = "92b1e9a8670ccd3916a7d24a06cab1e4c9815bc4" | ||
17 | SRC_URI = "git://github.com/google/fscrypt.git" | ||
18 | GO_IMPORT = "import" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | inherit go | ||
23 | inherit goarch | ||
24 | |||
25 | do_compile() { | ||
26 | export GOARCH=${TARGET_GOARCH} | ||
27 | export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" | ||
28 | export GOPATH="${WORKDIR}/git" | ||
29 | |||
30 | # Pass the needed cflags/ldflags so that cgo | ||
31 | # can find the needed headers files and libraries | ||
32 | export CGO_ENABLED="1" | ||
33 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
34 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
35 | |||
36 | cd ${S}/src/${GO_IMPORT} | ||
37 | oe_runmake | ||
38 | |||
39 | # Golang forces permissions to 0500 on directories and 0400 on files in | ||
40 | # the module cache which prevents us from easily cleaning up the build | ||
41 | # directory. Let's just fix the permissions here so we don't have to | ||
42 | # hack the clean tasks. | ||
43 | chmod -R u+w ${S}/pkg/mod | ||
44 | } | ||
45 | |||
46 | do_install() { | ||
47 | install -d ${D}/${bindir} | ||
48 | install ${S}/src/${GO_IMPORT}/bin/fscrypt ${D}/${bindir}/fscrypt | ||
49 | } | ||