summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch41
-rw-r--r--meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-makefile-fix-linking-flags.patch31
-rw-r--r--meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb34
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 @@
1From 81b4fbb5f52044cb348534c23f10b3884972b09b Mon Sep 17 00:00:00 2001
2From: Beat Schaer <beat.schaer@wabtec.com>
3Date: Fri, 19 Mar 2021 08:18:58 +0100
4Subject: [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
11diff --git a/logic.c b/logic.c
12index 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"
25diff --git a/main.c b/main.c
26index 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--
402.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 @@
1From b4ff5886797e72d1c21da43261ca7648412f3186 Mon Sep 17 00:00:00 2001
2From: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
3Date: Mon, 23 May 2022 19:53:21 +0200
4Subject: [PATCH] makefile: fix linking flags
5
6LDLIBS should be placed at the end according to
7https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html
8
9Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
10---
11 makefile | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/makefile b/makefile
15index 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 @@
1DESCRIPTION = "Maintenance tools for OverlayFS"
2HOMEPAGE = "https://github.com/kmxz/overlayfs-tools"
3LICENSE = "WTFPL"
4LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f312a7c4d02230e8f2b537295d375c69"
5
6SRC_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
12PV = "1.0+git${SRCPV}"
13SRCREV = "291c7f4a3fb548d06c572700650c2e3bccb0cd27"
14
15S = "${WORKDIR}/git"
16B = "${S}"
17
18DEPENDS += "attr"
19# Required to have the fts.h header for musl
20DEPENDS:append:libc-musl = " fts"
21
22EXTRA_OEMAKE += "'CC=${CC} -O2'"
23# Fix the missing fts libs when using musl
24EXTRA_OEMAKE:append:libc-musl = " LDLIBS=-lfts"
25TARGET_CC_ARCH += "${LDFLAGS}"
26
27do_compile () {
28 oe_runmake
29}
30
31do_install () {
32 install -d ${D}${bindir}
33 install -m 0755 ${B}/overlay ${D}${bindir}
34}