* [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) @ 2020-02-06 17:07 Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 2/3] debian: package liburing-0.4 and use a layout as the libaio package Stefan Metzmacher ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Stefan Metzmacher @ 2020-02-06 17:07 UTC (permalink / raw) To: io-uring; +Cc: Stefan Metzmacher This makes it possible to install runtime libraries to /lib/* and developement libraries to /usr/lib/* Signed-off-by: Stefan Metzmacher <[email protected]> --- Makefile | 7 +++++-- configure | 9 ++++++++- src/Makefile | 5 +++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 89b3f1d..3b582f1 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/configure b/configure index 54cf5f6..9fb43b3 100755 --- a/configure +++ b/configure @@ -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" diff --git a/src/Makefile b/src/Makefile index 47e0ba5..1466dd4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 2/3] debian: package liburing-0.4 and use a layout as the libaio package 2020-02-06 17:07 [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher @ 2020-02-06 17:07 ` Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 3/3] liburing.spec move to liburing-0.4 Stefan Metzmacher 2020-02-07 14:19 ` [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher 2 siblings, 0 replies; 6+ messages in thread From: Stefan Metzmacher @ 2020-02-06 17:07 UTC (permalink / raw) To: io-uring; +Cc: Stefan Metzmacher Hopefully this makes is easier to be picked up by the debian and ubuntu distributions. Cc: Liu Changcheng <[email protected]> Signed-off-by: Stefan Metzmacher <[email protected]> --- 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 diff --git a/debian/changelog b/debian/changelog index dfca8d2..b9ee85c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. diff --git a/debian/control b/debian/control index 391cd68..831a314 100644 --- a/debian/control +++ b/debian/control @@ -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. diff --git a/debian/liburing-dev.install b/debian/liburing-dev.install new file mode 100644 index 0000000..a00d956 --- /dev/null +++ b/debian/liburing-dev.install @@ -0,0 +1,4 @@ +usr/include +usr/lib/*/lib*.so +usr/lib/*/lib*.a +usr/lib/*/pkgconfig diff --git a/debian/liburing-dev.manpages b/debian/liburing-dev.manpages new file mode 100644 index 0000000..5683902 --- /dev/null +++ b/debian/liburing-dev.manpages @@ -0,0 +1,3 @@ +man/io_uring_setup.2 +man/io_uring_enter.2 +man/io_uring_register.2 diff --git a/debian/liburing1-udeb.install b/debian/liburing1-udeb.install new file mode 100644 index 0000000..622f9ef --- /dev/null +++ b/debian/liburing1-udeb.install @@ -0,0 +1 @@ +lib/*/lib*.so.* diff --git a/debian/liburing1.install b/debian/liburing1.install new file mode 100644 index 0000000..622f9ef --- /dev/null +++ b/debian/liburing1.install @@ -0,0 +1 @@ +lib/*/lib*.so.* diff --git a/debian/liburing1.symbols b/debian/liburing1.symbols new file mode 100644 index 0000000..cc4d504 --- /dev/null +++ b/debian/liburing1.symbols @@ -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 diff --git a/debian/rules b/debian/rules index fbc3942..283d464 100755 --- a/debian/rules +++ b/debian/rules @@ -1,16 +1,80 @@ #!/usr/bin/make -f -# You must remove unused comment lines for the released package. -export DH_VERBOSE = 1 -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -%: - dh $@ +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 -override_dh_auto_configure: - ./configure --mandir=/usr/share/man - rm -rf config.log +DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow +DEB_CFLAGS_MAINT_PREPEND = -Wall -override_dh_strip: - dh_strip --dbgsym-migration=liburing-dev +include /usr/share/dpkg/default.mk +include /usr/share/dpkg/buildtools.mk + +export CC + +lib := liburing1 +libdbg := $(lib)-dbg +libudeb := $(lib)-udeb +libdev := liburing-dev + +build-indep: + +build-arch: + dh_testdir + + $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + + $(MAKE) clean + + dh_clean + +check-arch: build-arch + dh_testdir + +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + partcheck +endif + +install-arch: check-arch + dh_testdir + dh_testroot + dh_clean + dh_installdirs + + $(MAKE) install \ + DESTDIR=$(CURDIR)/debian/tmp \ + libdir=/lib/$(DEB_HOST_MULTIARCH) \ + libdevdir=/usr/lib/$(DEB_HOST_MULTIARCH) + +binary: binary-indep binary-arch + +binary-indep: + # Nothing to do. + +binary-arch: install-arch + dh_testdir + dh_testroot + dh_install -a + dh_installdocs -a + dh_installexamples -a + dh_installman -a + dh_lintian -a + dh_link -a + dh_strip -a --ddeb-migration='$(libdbg) (<< 0.3)' + dh_compress -a + dh_fixperms -a + dh_makeshlibs -a --add-udeb '$(libudeb)' + dh_shlibdeps -a + dh_installdeb -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +.PHONY: clean build-indep build-arch build +.PHONY: install-arch binary-indep binary-arch binary diff --git a/debian/watch b/debian/watch index 76575dc..f0e30c4 100644 --- a/debian/watch +++ b/debian/watch @@ -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 -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v1 3/3] liburing.spec move to liburing-0.4 2020-02-06 17:07 [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 2/3] debian: package liburing-0.4 and use a layout as the libaio package Stefan Metzmacher @ 2020-02-06 17:07 ` Stefan Metzmacher 2020-02-07 14:19 ` [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher 2 siblings, 0 replies; 6+ messages in thread From: Stefan Metzmacher @ 2020-02-06 17:07 UTC (permalink / raw) To: io-uring; +Cc: Stefan Metzmacher Signed-off-by: Stefan Metzmacher <[email protected]> --- liburing.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liburing.spec b/liburing.spec index 9320b01..e8ed815 100644 --- a/liburing.spec +++ b/liburing.spec @@ -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 -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) 2020-02-06 17:07 [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 2/3] debian: package liburing-0.4 and use a layout as the libaio package Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 3/3] liburing.spec move to liburing-0.4 Stefan Metzmacher @ 2020-02-07 14:19 ` Stefan Metzmacher 2020-02-07 14:42 ` [PATCH v2] Fix liburing.so symlink source if libdir != libdevdir Stefan Metzmacher 2 siblings, 1 reply; 6+ messages in thread From: Stefan Metzmacher @ 2020-02-07 14:19 UTC (permalink / raw) To: Jens Axboe; +Cc: io-uring [-- Attachment #1.1: Type: text/plain, Size: 347 bytes --] Hi Jens, > 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 The source of this symlink is wrong if libdir != libdevdir. I'm working on a fix, sorry... metze [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] Fix liburing.so symlink source if libdir != libdevdir 2020-02-07 14:19 ` [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher @ 2020-02-07 14:42 ` Stefan Metzmacher 2020-02-07 16:24 ` Jens Axboe 0 siblings, 1 reply; 6+ messages in thread From: Stefan Metzmacher @ 2020-02-07 14:42 UTC (permalink / raw) To: io-uring; +Cc: 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(-) diff --git a/Makefile b/Makefile index 3b582f1..05d5879 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/configure b/configure index 9fb43b3..2fa393f 100755 --- a/configure +++ b/configure @@ -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" diff --git a/debian/changelog b/debian/changelog index b9ee85c..f01b3a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/src/Makefile b/src/Makefile index 1466dd4..5d13c09 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Fix liburing.so symlink source if libdir != libdevdir 2020-02-07 14:42 ` [PATCH v2] Fix liburing.so symlink source if libdir != libdevdir Stefan Metzmacher @ 2020-02-07 16:24 ` Jens Axboe 0 siblings, 0 replies; 6+ messages in thread From: Jens Axboe @ 2020-02-07 16:24 UTC (permalink / raw) To: Stefan Metzmacher, io-uring On 2/7/20 7:42 AM, Stefan Metzmacher wrote: > 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. -- Jens Axboe ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-02-07 16:24 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-02-06 17:07 [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 2/3] debian: package liburing-0.4 and use a layout as the libaio package Stefan Metzmacher 2020-02-06 17:07 ` [PATCH v1 3/3] liburing.spec move to liburing-0.4 Stefan Metzmacher 2020-02-07 14:19 ` [PATCH v1 1/3] configure/Makefile: introduce libdevdir defaults to $(libdir) Stefan Metzmacher 2020-02-07 14:42 ` [PATCH v2] Fix liburing.so symlink source if libdir != libdevdir Stefan Metzmacher 2020-02-07 16:24 ` Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox