diff options
| author | Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> | 2022-05-23 20:00:47 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2022-05-24 08:39:45 -0700 |
| commit | dfe77fc57f4ff6686dd5e668658a308853d18213 (patch) | |
| tree | 0f3c6594548899460c607107996460984ad847ca /meta-filesystems | |
| parent | 176eb22ba3e1bc8a3aa6874882730c5d04607bc4 (diff) | |
| download | meta-openembedded-dfe77fc57f4ff6686dd5e668658a308853d18213.tar.gz | |
overlayfs-tools: add new recipe
This package provides maintenance tools for OverlayFS, such as vacuum,
diff, merge, and deref
Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-filesystems')
3 files changed, 106 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch new file mode 100644 index 0000000000..f7490ebcec --- /dev/null +++ b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From 81b4fbb5f52044cb348534c23f10b3884972b09b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Beat Schaer <beat.schaer@wabtec.com> | ||
| 3 | Date: Fri, 19 Mar 2021 08:18:58 +0100 | ||
| 4 | Subject: [PATCH] Fixed includes so that it compiles on Ubuntu 20.04 | ||
| 5 | |||
| 6 | --- | ||
| 7 | logic.c | 3 +-- | ||
| 8 | main.c | 3 ++- | ||
| 9 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/logic.c b/logic.c | ||
| 12 | index 97767f5..47ebfaa 100644 | ||
| 13 | --- a/logic.c | ||
| 14 | +++ b/logic.c | ||
| 15 | @@ -7,8 +7,7 @@ | ||
| 16 | #include <string.h> | ||
| 17 | #include <errno.h> | ||
| 18 | #include <unistd.h> | ||
| 19 | -#include <attr/xattr.h> | ||
| 20 | -#include <attr/attributes.h> | ||
| 21 | +#include <sys/xattr.h> | ||
| 22 | #include <fts.h> | ||
| 23 | #include <libgen.h> | ||
| 24 | #include "logic.h" | ||
| 25 | diff --git a/main.c b/main.c | ||
| 26 | index aa11239..f462b98 100644 | ||
| 27 | --- a/main.c | ||
| 28 | +++ b/main.c | ||
| 29 | @@ -12,7 +12,8 @@ | ||
| 30 | #include <linux/limits.h> | ||
| 31 | #include <stdbool.h> | ||
| 32 | #include <sys/stat.h> | ||
| 33 | -#include <attr/xattr.h> | ||
| 34 | +#include <sys/xattr.h> | ||
| 35 | +#include <errno.h> | ||
| 36 | #ifndef _SYS_STAT_H | ||
| 37 | #include <linux/stat.h> | ||
| 38 | #endif | ||
| 39 | -- | ||
| 40 | 2.25.1 | ||
| 41 | |||
diff --git a/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-makefile-fix-linking-flags.patch b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-makefile-fix-linking-flags.patch new file mode 100644 index 0000000000..cf4de18a79 --- /dev/null +++ b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-makefile-fix-linking-flags.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From b4ff5886797e72d1c21da43261ca7648412f3186 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> | ||
| 3 | Date: Mon, 23 May 2022 19:53:21 +0200 | ||
| 4 | Subject: [PATCH] makefile: fix linking flags | ||
| 5 | |||
| 6 | LDLIBS should be placed at the end according to | ||
| 7 | https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html | ||
| 8 | |||
| 9 | Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> | ||
| 10 | --- | ||
| 11 | makefile | 4 ++-- | ||
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/makefile b/makefile | ||
| 15 | index fb1bed4..038c7ce 100644 | ||
| 16 | --- a/makefile | ||
| 17 | +++ b/makefile | ||
| 18 | @@ -1,11 +1,11 @@ | ||
| 19 | CFLAGS = -Wall -std=c99 | ||
| 20 | -LFLAGS = -lm | ||
| 21 | +LDLIBS = -lm | ||
| 22 | CC = gcc | ||
| 23 | |||
| 24 | all: overlay | ||
| 25 | |||
| 26 | overlay: main.o logic.o sh.o | ||
| 27 | - $(CC) $(LFLAGS) main.o logic.o sh.o -o overlay | ||
| 28 | + $(CC) main.o logic.o sh.o -o overlay $(LDLIBS) | ||
| 29 | |||
| 30 | main.o: main.c logic.h | ||
| 31 | $(CC) $(CFLAGS) -c main.c | ||
diff --git a/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb new file mode 100644 index 0000000000..eb6e4963a5 --- /dev/null +++ b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | DESCRIPTION = "Maintenance tools for OverlayFS" | ||
| 2 | HOMEPAGE = "https://github.com/kmxz/overlayfs-tools" | ||
| 3 | LICENSE = "WTFPL" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f312a7c4d02230e8f2b537295d375c69" | ||
| 5 | |||
| 6 | SRC_URI = "\ | ||
| 7 | git://github.com/kmxz/overlayfs-tools.git;protocol=https;branch=master \ | ||
| 8 | file://0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch \ | ||
| 9 | file://0002-makefile-fix-linking-flags.patch \ | ||
| 10 | " | ||
| 11 | |||
| 12 | PV = "1.0+git${SRCPV}" | ||
| 13 | SRCREV = "291c7f4a3fb548d06c572700650c2e3bccb0cd27" | ||
| 14 | |||
| 15 | S = "${WORKDIR}/git" | ||
| 16 | B = "${S}" | ||
| 17 | |||
| 18 | DEPENDS += "attr" | ||
| 19 | # Required to have the fts.h header for musl | ||
| 20 | DEPENDS:append:libc-musl = " fts" | ||
| 21 | |||
| 22 | EXTRA_OEMAKE += "'CC=${CC} -O2'" | ||
| 23 | # Fix the missing fts libs when using musl | ||
| 24 | EXTRA_OEMAKE:append:libc-musl = " LDLIBS=-lfts" | ||
| 25 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
| 26 | |||
| 27 | do_compile () { | ||
| 28 | oe_runmake | ||
| 29 | } | ||
| 30 | |||
| 31 | do_install () { | ||
| 32 | install -d ${D}${bindir} | ||
| 33 | install -m 0755 ${B}/overlay ${D}${bindir} | ||
| 34 | } | ||
