Skip to content

Commit eae0c2f

Browse files
Time0otrimpim
authored andcommitted
libuuid: create depot recipes
Issue: genodelabs#384
1 parent ca99e72 commit eae0c2f

File tree

10 files changed

+69
-6
lines changed

10 files changed

+69
-6
lines changed

Diff for: ports/util-linux.hash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d966a1c6d9be4183945e9d985a61970ea4f1045c
1+
9ff438b922e2b12b60b56540cb80ccde8dfd2697

Diff for: ports/util-linux.port

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ URL(util-linux) := https://git.kernel.org/pub/scm/utils/util-linux/util-linux.gi
66
REV(util-linux) := v$(VERSION)
77
DIR(util-linux) := src/lib/util-linux
88

9-
PATCHES := src/lib/libuuid/patches/*.patch
9+
PATCH_OPT := -p1 -d src/lib/util-linux/
10+
PATCHES := src/lib/libuuid/patches/*.patch
11+
12+
DIRS := include/libuuid
13+
DIR_CONTENT(include/libuuid) := src/lib/util-linux/libuuid/src/*.h

Diff for: recipes/api/libuuid/content.mk

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
MIRROR_FROM_REP_DIR = lib/import/import-libuuid.mk lib/symbols/libuuid
2+
3+
content: $(MIRROR_FROM_REP_DIR) include LICENSE
4+
5+
$(MIRROR_FROM_REP_DIR):
6+
$(mirror_from_rep_dir)
7+
8+
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/util-linux)
9+
10+
include:
11+
mkdir -p $@
12+
cp -r $(PORT_DIR)/include/libuuid/* $@
13+
14+
LICENSE:
15+
cp $(PORT_DIR)/src/lib/util-linux/COPYING $@

Diff for: recipes/api/libuuid/hash

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-11-21T0914 88b32b815a1398363b4b5929fe59b0f963e98b51

Diff for: recipes/src/libuuid/api

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libuuid

Diff for: recipes/src/libuuid/content.mk

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIRROR_FROM_REP_DIR = lib/import/import-libuuid.mk lib/mk/libuuid.mk
2+
3+
content: $(MIRROR_FROM_REP_DIR) src/lib/util-linux/libuuid/ src/lib/util-linux/lib/ src/lib/util-linux/include/
4+
5+
$(MIRROR_FROM_REP_DIR):
6+
$(mirror_from_rep_dir)
7+
8+
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/util-linux)
9+
10+
src/lib/util-linux/libuuid/:
11+
mkdir -p $@
12+
cp -r $(PORT_DIR)/src/lib/util-linux/libuuid/* $@
13+
echo "LIBS := libuuid" > $@/target.mk
14+
15+
src/lib/util-linux/lib/:
16+
mkdir -p $@
17+
cp -r $(PORT_DIR)/src/lib/util-linux/lib/* $@
18+
19+
src/lib/util-linux/include/:
20+
mkdir -p $@
21+
cp -r $(PORT_DIR)/src/lib/util-linux/include/* $@

Diff for: recipes/src/libuuid/hash

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-11-21T0919 4dd6e1f7ea2e31e32a2a39034b3074010b37c865

Diff for: recipes/src/libuuid/used_apis

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
base
2+
libc

Diff for: src/lib/libuuid/patches/open_random.patch

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/lib/randutils.c b/lib/randutils.c
2+
index 2ffe9b4f0..c57b7abcb 100644
3+
--- a/lib/randutils.c
4+
+++ b/lib/randutils.c
5+
@@ -82,9 +82,9 @@ int random_get_fd(void)
6+
{
7+
int i, fd;
8+
9+
- fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
10+
+ fd = open("/dev/urandom", O_RDONLY);
11+
if (fd == -1)
12+
- fd = open("/dev/random", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
13+
+ fd = open("/dev/random", O_RDONLY);
14+
if (fd >= 0) {
15+
i = fcntl(fd, F_GETFD);
16+
if (i >= 0)

Diff for: src/lib/libuuid/patches/usleep_detection.patch

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
--- src/lib/util-linux/include/c.h 2019-05-10 11:50:31.659841756 +0200
2-
+++ src/lib/util-linux/include/c.h 2019-05-10 11:22:31.466975561 +0200
3-
@@ -308,6 +308,7 @@
1+
diff --git a/include/c.h b/include/c.h
2+
index cbc99669f..32fbb1bc3 100644
3+
--- a/include/c.h
4+
+++ b/include/c.h
5+
@@ -390,6 +390,7 @@ fail:
46

57
static inline int xusleep(useconds_t usec)
68
{
79
+/*
810
#ifdef HAVE_NANOSLEEP
911
struct timespec waittime = {
1012
.tv_sec = usec / 1000000L,
11-
@@ -315,10 +316,13 @@
13+
@@ -397,10 +398,13 @@ static inline int xusleep(useconds_t usec)
1214
};
1315
return nanosleep(&waittime, NULL);
1416
#elif defined(HAVE_USLEEP)

0 commit comments

Comments
 (0)