configure/Makefile: introduce libdevdir defaults to $(libdir)
PATCH 1/3 configure/Makefile: introduce libdevdir defaults to $(libdir)
This makes it possible to install runtime libraries to /lib/* and developement libraries to /usr/lib/*
--- Makefile | 7 +++++-- configure | 9 ++++++++- src/Makefile | 5 +++-- 3 files changed, 16 insertions(+), 5 deletions(-)
Makefile +5 -2
@@ -13,6 +13,9 @@ all: @$(MAKE) -C test @$(MAKE) -C examples +partcheck: all + @echo "make partcheck => TODO add tests with out kernel support" + runtests: all @$(MAKE) -C test runtests runtests-loop:
@@ -40,8 +43,8 @@ endif $< >$@ install: $(NAME).pc - @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) - $(INSTALL) -D -m 644 $(NAME).pc $(DESTDIR)$(libdir)/pkgconfig/$(NAME).pc + @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) libdevdir=$(DESTDIR)$(libdevdir) + $(INSTALL) -D -m 644 $(NAME).pc $(DESTDIR)$(libdevdir)/pkgconfig/$(NAME).pc $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man2 $(INSTALL) -m 644 man/*.2 $(DESTDIR)$(mandir)/man2
configure +8 -1
@@ -22,6 +22,8 @@ for opt do ;; --libdir=*) libdir="$optarg" ;; + --libdevdir=*) libdevdir="$optarg" + ;; --mandir=*) mandir="$optarg" ;; --datadir=*) datadir="$optarg"
@@ -45,6 +47,9 @@ fi if test -z "$libdir"; then libdir="$prefix/lib" fi +if test -z "$libdevdir"; then + libdevdir="$libdir" +fi if test -z "$mandir"; then mandir="$prefix/man" fi
@@ -61,7 +66,8 @@ Options: [defaults in brackets after descriptions] --help print this message --prefix=PATH install in PATH [$prefix] --includedir=PATH install headers in PATH [$includedir] - --libdir=PATH install libraries in PATH [$libdir] + --libdir=PATH install runtime libraries in PATH [$libdir] + --libdevdir=PATH install developement libraries in PATH [$libdevdir] --mandir=PATH install man pages in PATH [$mandir] --datadir=PATH install shared data in PATH [$datadir] EOF
@@ -171,6 +177,7 @@ print_and_output_mak() { print_and_output_mak "prefix" "$prefix" print_and_output_mak "includedir" "$includedir" print_and_output_mak "libdir" "$libdir" +print_and_output_mak "libdevdir" "$libdevdir" print_and_output_mak "mandir" "$mandir" print_and_output_mak "datadir" "$datadir"
src/Makefile +3 -2
@@ -1,6 +1,7 @@ prefix ?= /usr includedir ?= $(prefix)/include libdir ?= $(prefix)/lib +libdevdir ?= $(prefix)/lib CFLAGS ?= -g -fomit-frame-pointer -O2 override CFLAGS += -Wall -Iinclude/
@@ -56,11 +57,11 @@ install: $(all_targets) install -D -m 644 include/liburing.h $(includedir)/liburing.h install -D -m 644 include/liburing/compat.h $(includedir)/liburing/compat.h install -D -m 644 include/liburing/barrier.h $(includedir)/liburing/barrier.h - install -D -m 644 liburing.a $(libdir)/liburing.a + install -D -m 644 liburing.a $(libdevdir)/liburing.a ifeq ($(ENABLE_SHARED),1) install -D -m 755 $(libname) $(libdir)/$(libname) ln -sf $(libname) $(libdir)/$(soname) - ln -sf $(libname) $(libdir)/liburing.so + ln -sf $(libname) $(libdevdir)/liburing.so endif $(liburing_objs): include/liburing.h
Signature · 1 line
2.17.1
PATCH 2/3 debian: package liburing-0.4 and use a layout as the libaio package
Hopefully this makes is easier to be picked up by the debian and ubuntu distributions.
--- debian/changelog | 6 +++ debian/control | 33 ++++++++++++- debian/liburing-dev.install | 4 ++ debian/liburing-dev.manpages | 3 ++ debian/liburing1-udeb.install | 1 + debian/liburing1.install | 1 + debian/liburing1.symbols | 28 +++++++++++ debian/rules | 88 ++++++++++++++++++++++++++++++----- debian/watch | 5 +- 9 files changed, 153 insertions(+), 16 deletions(-) create mode 100644 debian/liburing-dev.install create mode 100644 debian/liburing-dev.manpages create mode 100644 debian/liburing1-udeb.install create mode 100644 debian/liburing1.install create mode 100644 debian/liburing1.symbols
debian/changelog +6 -0
@@ -1,3 +1,9 @@ +liburing (0.4-1) stable; urgency=low + + * Package liburing-0.4 using a packaging layout similar to libaio1 + + -- Stefan Metzmacher <[email protected]> Thu, 06 Feb 2020 11:30:00 +0100 + liburing (0.2-1ubuntu1) stable; urgency=low * Initial release.
debian/control +31 -2
@@ -4,12 +4,13 @@ Priority: optional Maintainer: Liu Changcheng <[email protected]> Build-Depends: debhelper (>=9) Standards-Version: 4.1.4 -Homepage: https://git.kernel.dk/liburing +Homepage: https://git.kernel.dk/cgit/liburing/tree/README Vcs-Git: https://git.kernel.dk/liburing -Vcs-Browser: https://git.kernel.dk/liburing +Vcs-Browser: https://git.kernel.dk/cgit/liburing/ Package: liburing1 Architecture: linux-any +Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Description: userspace library for using io_uring
@@ -17,3 +18,31 @@ Description: userspace library for using io_uring The newese Linux IO interface, io_uring could improve system performance a lot. liburing is the userpace library to use io_uring feature. + . + This package contains the shared library. + +Package: liburing1-udeb +Package-Type: udeb +Section: debian-installer +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends}, +Description: userspace library for using io_uring + io_uring is kernel feature to improve development + The newese Linux IO interface, io_uring could improve + system performance a lot. liburing is the userpace + library to use io_uring feature. + . + This package contains the udeb shared library. + +Package: liburing-dev +Section: libdevel +Architecture: linux-any +Multi-Arch: same +Depends: ${misc:Depends}, liburing1 (= ${binary:Version}), +Description: userspace library for using io_uring + io_uring is kernel feature to improve development + The newese Linux IO interface, io_uring could improve + system performance a lot. liburing is the userpace + library to use io_uring feature. + . + This package contains the static library and the header files.
debian/liburing-dev.install new file +4 -0
@@ -0,0 +1,4 @@ +usr/include +usr/lib/*/lib*.so +usr/lib/*/lib*.a +usr/lib/*/pkgconfig
debian/liburing-dev.manpages new file +3 -0
@@ -0,0 +1,3 @@ +man/io_uring_setup.2 +man/io_uring_enter.2 +man/io_uring_register.2
debian/liburing1-udeb.install new file +1 -0
@@ -0,0 +1 @@ +lib/*/lib*.so.*
debian/liburing1.install new file +1 -0
@@ -0,0 +1 @@ +lib/*/lib*.so.*
debian/liburing1.symbols new file +28 -0
@@ -0,0 +1,28 @@ +liburing.so.1 liburing1 #MINVER# + (symver)LIBURING_0.1 0.1-1 + io_uring_get_sqe@LIBURING_0.1 0.1-1 + io_uring_queue_exit@LIBURING_0.1 0.1-1 + io_uring_queue_init@LIBURING_0.1 0.1-1 + io_uring_queue_mmap@LIBURING_0.1 0.1-1 + io_uring_register_buffers@LIBURING_0.1 0.1-1 + io_uring_register_eventfd@LIBURING_0.1 0.1-1 + io_uring_register_files@LIBURING_0.1 0.1-1 + io_uring_submit@LIBURING_0.1 0.1-1 + io_uring_submit_and_wait@LIBURING_0.1 0.1-1 + io_uring_unregister_buffers@LIBURING_0.1 0.1-1 + io_uring_unregister_files@LIBURING_0.1 0.1-1 + (symver)LIBURING_0.2 0.2-1 + __io_uring_get_cqe@LIBURING_0.2 0.2-1 + io_uring_queue_init_params@LIBURING_0.2 0.2-1 + io_uring_register_files_update@LIBURING_0.2 0.2-1 + io_uring_peek_batch_cqe@LIBURING_0.2 0.2-1 + io_uring_wait_cqe_timeout@LIBURING_0.2 0.2-1 + io_uring_wait_cqes@LIBURING_0.2 0.2-1 + (symver)LIBURING_0.3 0.3-1 + (symver)LIBURING_0.4 0.4-1 + io_uring_get_probe@LIBURING_0.4 0.4-1 + io_uring_get_probe_ring@LIBURING_0.4 0.4-1 + io_uring_register_personality@LIBURING_0.4 0.4-1 + io_uring_register_probe@LIBURING_0.4 0.4-1 + io_uring_ring_dontfork@LIBURING_0.4 0.4-1 + io_uring_unregister_personality@LIBURING_0.4 0.4-1
debian/rules +76 -12
92 lines not on this page · raw message
debian/watch +3 -2
@@ -1,2 +1,3 @@ -# You must remove unused comment lines for the released package. -version=3 +# Site Directory Pattern Version Script +version=4 +https://git.kernel.dk/cgit/liburing/ snapshot\/liburing-([\d\.]+)\.tar\.(?:gz|xz) debian uupdate
Signature · 1 line
2.17.1
PATCH 3/3 liburing.spec move to liburing-0.4
In reply to Stefan Metzmacher--- liburing.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
liburing.spec +1 -1
@@ -1,5 +1,5 @@ Name: liburing -Version: 0.3 +Version: 0.4 Release: 1%{?dist} Summary: Linux-native io_uring I/O access library License: LGPLv2+ / MIT
Signature · 1 line
2.17.1
Hi Jens,
src/Makefile install: $(all_targets) · line 64
Quoted 5 lines
ifeq ($(ENABLE_SHARED),1)
src/Makefile +1
-1install -D -m 755 $(libname) $(libdir)/$(libname) ln -sf $(libname) $(libdir)/$(soname) - ln -sf $(libname) $(libdir)/liburing.so + ln -sf $(libname) $(libdevdir)/liburing.so
The source of this symlink is wrong if libdir != libdevdir.
I'm working on a fix, sorry...
metze
PATCH v2 1/1 Fix liburing.so symlink source if libdir != libdevdir
--- Makefile | 6 +++++- configure | 8 +++++++- debian/changelog | 6 ++++++ src/Makefile | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-)
Makefile +5 -1
@@ -43,7 +43,11 @@ endif $< >$@ install: $(NAME).pc - @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) libdevdir=$(DESTDIR)$(libdevdir) + @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) \ + includedir=$(DESTDIR)$(includedir) \ + libdir=$(DESTDIR)$(libdir) \ + libdevdir=$(DESTDIR)$(libdevdir) \ + relativelibdir=$(relativelibdir) $(INSTALL) -D -m 644 $(NAME).pc $(DESTDIR)$(libdevdir)/pkgconfig/$(NAME).pc $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man2 $(INSTALL) -m 644 man/*.2 $(DESTDIR)$(mandir)/man2
configure +7 -1
@@ -48,7 +48,7 @@ if test -z "$libdir"; then libdir="$prefix/lib" fi if test -z "$libdevdir"; then - libdevdir="$libdir" + libdevdir="$prefix/lib" fi if test -z "$mandir"; then mandir="$prefix/man"
@@ -57,6 +57,11 @@ if test -z "$datadir"; then datadir="$prefix/share" fi +if test x"$libdir" = x"$libdevdir"; then + relativelibdir="" +else + relativelibdir="$libdir/" +fi if test "$show_help" = "yes"; then cat <<EOF
@@ -178,6 +183,7 @@ print_and_output_mak "prefix" "$prefix" print_and_output_mak "includedir" "$includedir" print_and_output_mak "libdir" "$libdir" print_and_output_mak "libdevdir" "$libdevdir" +print_and_output_mak "relativelibdir" "$relativelibdir" print_and_output_mak "mandir" "$mandir" print_and_output_mak "datadir" "$datadir"
debian/changelog +6 -0
@@ -1,3 +1,9 @@ +liburing (0.4-2) stable; urgency=low + + * Fix /usr/lib/*/liburing.so symlink to /lib/*/liburing.so.1.0.4 + + -- Stefan Metzmacher <[email protected]> Fri, 07 Feb 2020 15:30:00 +0100 + liburing (0.4-1) stable; urgency=low * Package liburing-0.4 using a packaging layout similar to libaio1
src/Makefile +1 -1
@@ -61,7 +61,7 @@ install: $(all_targets) ifeq ($(ENABLE_SHARED),1) install -D -m 755 $(libname) $(libdir)/$(libname) ln -sf $(libname) $(libdir)/$(soname) - ln -sf $(libname) $(libdevdir)/liburing.so + ln -sf $(relativelibdir)$(libname) $(libdevdir)/liburing.so endif $(liburing_objs): include/liburing.h
Signature · 1 line
2.17.1
Jens Axboe
maintainerRe: [PATCH v2] Fix liburing.so symlink source if libdir != libdevdir
Quoted 7 lines · Stefan Metzmacher
Signed-off-by Stefan Metzmacher <[email protected]>--- Makefile | 6 +++++- configure | 8 +++++++- debian/changelog | 6 ++++++ src/Makefile | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-)
Thanks, applied on top.
Signature · 1 line
Jens Axboe