Skip to content

Commit 9094963

Browse files
packages: add libaio 0.3.113
Add a libaio package (Linux asynchronous I/O library) from the canonical upstream release on releases.pagure.org, built via libaio's plain Makefile. Installs libaio.so/.so.1/.so.1.0.2 + libaio.h into the sysroot. Required by lvm2 >= 2.03 (its bcache I/O engine); included inside the LVM2_ENABLE block, ahead of lvm2. Signed-off-by: Brad House <bhouse@nexthop.ai>
1 parent f0c07f2 commit 9094963

3 files changed

Lines changed: 93 additions & 0 deletions

File tree

build-config/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ ifeq ($(GPT_ENABLE),yes)
398398
include make/gptfdisk.make
399399
endif
400400
ifeq ($(LVM2_ENABLE),yes)
401+
# lvm2 >= 2.03 requires libaio for its bcache I/O engine.
402+
include make/libaio.make
401403
include make/lvm2.make
402404
endif
403405
ifeq ($(PARTED_ENABLE),yes)

build-config/make/libaio.make

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#-------------------------------------------------------------------------------
2+
#
3+
# SPDX-License-Identifier: GPL-2.0
4+
#
5+
#-------------------------------------------------------------------------------
6+
#
7+
# This is a makefile fragment that defines the build of libaio
8+
#
9+
# libaio provides the Linux asynchronous I/O interface. It is required
10+
# by lvm2 (>= 2.03, which uses it for its bcache I/O engine).
11+
12+
LIBAIO_VERSION = 0.3.113
13+
LIBAIO_TARBALL = libaio-$(LIBAIO_VERSION).tar.gz
14+
LIBAIO_TARBALL_URLS += $(ONIE_MIRROR) https://releases.pagure.org/libaio
15+
LIBAIO_BUILD_DIR = $(USER_BUILDDIR)/libaio
16+
LIBAIO_DIR = $(LIBAIO_BUILD_DIR)/libaio-$(LIBAIO_VERSION)
17+
18+
LIBAIO_DOWNLOAD_STAMP = $(DOWNLOADDIR)/libaio-$(LIBAIO_VERSION)-download
19+
LIBAIO_SOURCE_STAMP = $(USER_STAMPDIR)/libaio-source
20+
LIBAIO_BUILD_STAMP = $(USER_STAMPDIR)/libaio-build
21+
LIBAIO_INSTALL_STAMP = $(STAMPDIR)/libaio-install
22+
LIBAIO_STAMP = $(LIBAIO_SOURCE_STAMP) \
23+
$(LIBAIO_BUILD_STAMP) \
24+
$(LIBAIO_INSTALL_STAMP)
25+
26+
PHONY += libaio libaio-download libaio-source \
27+
libaio-build libaio-install libaio-clean libaio-download-clean
28+
29+
# libaio builds via a plain Makefile (no ./configure); soname is
30+
# libaio.so.1, real lib libaio.so.1.$(minor).$(micro) = libaio.so.1.0.2.
31+
LIBAIO_LIBS = libaio.so libaio.so.1 libaio.so.1.0.2
32+
33+
libaio: $(LIBAIO_STAMP)
34+
35+
DOWNLOAD += $(LIBAIO_DOWNLOAD_STAMP)
36+
libaio-download: $(LIBAIO_DOWNLOAD_STAMP)
37+
$(LIBAIO_DOWNLOAD_STAMP): $(PROJECT_STAMP)
38+
$(Q) rm -f $@ && eval $(PROFILE_STAMP)
39+
$(Q) echo "==== Getting upstream libaio ===="
40+
$(Q) $(SCRIPTDIR)/fetch-package $(DOWNLOADDIR) $(UPSTREAMDIR) \
41+
$(LIBAIO_TARBALL) $(LIBAIO_TARBALL_URLS)
42+
$(Q) touch $@
43+
44+
SOURCE += $(LIBAIO_SOURCE_STAMP)
45+
libaio-source: $(LIBAIO_SOURCE_STAMP)
46+
$(LIBAIO_SOURCE_STAMP): $(USER_TREE_STAMP) | $(LIBAIO_DOWNLOAD_STAMP)
47+
$(Q) rm -f $@ && eval $(PROFILE_STAMP)
48+
$(Q) echo "==== Extracting upstream libaio ===="
49+
$(Q) $(SCRIPTDIR)/extract-package $(LIBAIO_BUILD_DIR) $(DOWNLOADDIR)/$(LIBAIO_TARBALL)
50+
$(Q) touch $@
51+
52+
ifndef MAKE_CLEAN
53+
LIBAIO_NEW_FILES = $(shell test -d $(LIBAIO_DIR) && test -f $(LIBAIO_BUILD_STAMP) && \
54+
find -L $(LIBAIO_DIR) -newer $(LIBAIO_BUILD_STAMP) -type f -print -quit)
55+
endif
56+
57+
libaio-build: $(LIBAIO_BUILD_STAMP)
58+
$(LIBAIO_BUILD_STAMP): $(LIBAIO_SOURCE_STAMP) $(LIBAIO_NEW_FILES) | $(DEV_SYSROOT_INIT_STAMP)
59+
$(Q) rm -f $@ && eval $(PROFILE_STAMP)
60+
$(Q) echo "==== Building libaio-$(LIBAIO_VERSION) ===="
61+
$(Q) PATH='$(CROSSBIN):$(PATH)' $(MAKE) -C $(LIBAIO_DIR) \
62+
CC=$(CROSSPREFIX)gcc prefix=/usr
63+
$(Q) PATH='$(CROSSBIN):$(PATH)' $(MAKE) -C $(LIBAIO_DIR) \
64+
CC=$(CROSSPREFIX)gcc prefix=/usr DESTDIR=$(DEV_SYSROOT) install
65+
$(Q) touch $@
66+
67+
libaio-install: $(LIBAIO_INSTALL_STAMP)
68+
$(LIBAIO_INSTALL_STAMP): $(SYSROOT_INIT_STAMP) $(LIBAIO_BUILD_STAMP)
69+
$(Q) rm -f $@ && eval $(PROFILE_STAMP)
70+
$(Q) echo "==== Installing libaio in $(SYSROOTDIR) ===="
71+
$(Q) for file in $(LIBAIO_LIBS) ; do \
72+
cp -a $(DEV_SYSROOT)/usr/lib/$$file $(SYSROOTDIR)/usr/lib/ ; \
73+
done
74+
$(Q) touch $@
75+
76+
USER_CLEAN += libaio-clean
77+
libaio-clean:
78+
$(Q) rm -rf $(LIBAIO_BUILD_DIR)
79+
$(Q) rm -f $(LIBAIO_STAMP)
80+
$(Q) echo "=== Finished making $@ for $(PLATFORM)"
81+
82+
DOWNLOAD_CLEAN += libaio-download-clean
83+
libaio-download-clean:
84+
$(Q) rm -f $(LIBAIO_DOWNLOAD_STAMP) $(DOWNLOADDIR)/$(LIBAIO_TARBALL)
85+
86+
#-------------------------------------------------------------------------------
87+
#
88+
# Local Variables:
89+
# mode: makefile-gmake
90+
# End:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
86727941e0d3084ce264b8a6878961812bc212b8 libaio-0.3.113.tar.gz

0 commit comments

Comments
 (0)