All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vyacheslav Yurkov <uvv.mail@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
Subject: [meta-filesystems][PATCH v2] overlayfs-tools: add new recipe
Date: Mon, 23 May 2022 20:00:47 +0200	[thread overview]
Message-ID: <20220523180047.2493863-1-uvv.mail@gmail.com> (raw)

From: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>

This package provides maintenance tools for OverlayFS, such as vacuum,
diff, merge, and deref

Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
---
 ...-so-that-it-compiles-on-Ubuntu-20.04.patch | 41 +++++++++++++++++++
 .../0002-makefile-fix-linking-flags.patch     | 31 ++++++++++++++
 .../overlayfs/overlayfs-tools_git.bb          | 34 +++++++++++++++
 3 files changed, 106 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch
 create mode 100644 meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-makefile-fix-linking-flags.patch
 create mode 100644 meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb

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 000000000..f7490ebce
--- /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 @@
+From 81b4fbb5f52044cb348534c23f10b3884972b09b Mon Sep 17 00:00:00 2001
+From: Beat Schaer <beat.schaer@wabtec.com>
+Date: Fri, 19 Mar 2021 08:18:58 +0100
+Subject: [PATCH] Fixed includes so that it compiles on Ubuntu 20.04
+
+---
+ logic.c | 3 +--
+ main.c  | 3 ++-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/logic.c b/logic.c
+index 97767f5..47ebfaa 100644
+--- a/logic.c
++++ b/logic.c
+@@ -7,8 +7,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <unistd.h>
+-#include <attr/xattr.h>
+-#include <attr/attributes.h>
++#include <sys/xattr.h>
+ #include <fts.h>
+ #include <libgen.h>
+ #include "logic.h"
+diff --git a/main.c b/main.c
+index aa11239..f462b98 100644
+--- a/main.c
++++ b/main.c
+@@ -12,7 +12,8 @@
+ #include <linux/limits.h>
+ #include <stdbool.h>
+ #include <sys/stat.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
++#include <errno.h>
+ #ifndef _SYS_STAT_H
+   #include <linux/stat.h>
+ #endif
+-- 
+2.25.1
+
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 000000000..cf4de18a7
--- /dev/null
+++ b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools/0002-makefile-fix-linking-flags.patch
@@ -0,0 +1,31 @@
+From b4ff5886797e72d1c21da43261ca7648412f3186 Mon Sep 17 00:00:00 2001
+From: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
+Date: Mon, 23 May 2022 19:53:21 +0200
+Subject: [PATCH] makefile: fix linking flags
+
+LDLIBS should be placed at the end according to
+https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html
+
+Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>
+---
+ makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makefile b/makefile
+index fb1bed4..038c7ce 100644
+--- a/makefile
++++ b/makefile
+@@ -1,11 +1,11 @@
+ CFLAGS = -Wall -std=c99
+-LFLAGS = -lm
++LDLIBS = -lm
+ CC = gcc
+ 
+ all: overlay
+ 
+ overlay: main.o logic.o sh.o
+-	$(CC) $(LFLAGS) main.o logic.o sh.o -o overlay
++	$(CC) main.o logic.o sh.o -o overlay $(LDLIBS) 
+ 
+ main.o: main.c logic.h
+ 	$(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 000000000..eb6e4963a
--- /dev/null
+++ b/meta-filesystems/recipes-utils/overlayfs/overlayfs-tools_git.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Maintenance tools for OverlayFS"
+HOMEPAGE = "https://github.com/kmxz/overlayfs-tools"
+LICENSE = "WTFPL"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f312a7c4d02230e8f2b537295d375c69"
+
+SRC_URI = "\
+    git://github.com/kmxz/overlayfs-tools.git;protocol=https;branch=master \
+    file://0001-Fixed-includes-so-that-it-compiles-on-Ubuntu-20.04.patch \
+    file://0002-makefile-fix-linking-flags.patch \
+"
+
+PV = "1.0+git${SRCPV}"
+SRCREV = "291c7f4a3fb548d06c572700650c2e3bccb0cd27"
+
+S = "${WORKDIR}/git"
+B = "${S}"
+
+DEPENDS += "attr"
+# Required to have the fts.h header for musl
+DEPENDS:append:libc-musl = " fts"
+
+EXTRA_OEMAKE += "'CC=${CC} -O2'"
+# Fix the missing fts libs when using musl
+EXTRA_OEMAKE:append:libc-musl = " LDLIBS=-lfts"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_compile () {
+    oe_runmake
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -m 0755 ${B}/overlay ${D}${bindir}
+}
-- 
2.25.1



                 reply	other threads:[~2022-05-23 18:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220523180047.2493863-1-uvv.mail@gmail.com \
    --to=uvv.mail@gmail.com \
    --cc=Vyacheslav.Yurkov@bruker.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.