Message ID | 20171029093756.23671-1-marcus.folkesson@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [RESEND,v4] libostree: new package | expand |
Hi Marcus, Am Sun, 29 Oct 2017 10:37:56 +0100 schrieb Marcus Folkesson: you need to propagate some dependencies from packages libostree depends on. > diff --git a/package/libostree/Config.in b/package/libostree/Config.in > new file mode 100644 > index 0000000000..520e76ce6a > --- /dev/null > +++ b/package/libostree/Config.in > @@ -0,0 +1,12 @@ > +config BR2_PACKAGE_LIBOSTREE > + bool "libostree" > + select BR2_PACKAGE_LIBGLIB2 libglib2 contains: depends on BR2_USE_WCHAR # gettext depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU # fork() > + select BR2_PACKAGE_PKGCONF Is pkgconf really needed for the target? > + select BR2_PACKAGE_XZ > + select BR2_PACKAGE_E2FSPROGS e2fsprogs contains: depends on BR2_USE_MMU # util-linux/libblkid > + select BR2_PACKAGE_LIBFUSE libfuse contains: depends on !BR2_STATIC_LIBS depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_MMU # fork() > + select BR2_PACKAGE_LIBGPGME libgpgme contains: depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgpg-error depends on BR2_USE_MMU # libassuan > + help > + OSTree is an upgrade system for Linux-based operating systems. > + > + https://ostree.readthedocs.io/en/latest/ > diff --git a/package/libostree/libostree.mk b/package/libostree/ libostree.mk > new file mode 100644 > index 0000000000..5d0483665c > --- /dev/null > +++ b/package/libostree/libostree.mk > @@ -0,0 +1,22 @@ > +################################################################################ > +# > +# libostree > +# > +################################################################################ > + > +LIBOSTREE_VERSION = v2017.12 > +LIBOSTREE_SITE = https://github.com/ostreedev/ostree.git > +LIBOSTREE_SITE_METHOD = git > +LIBOSTREE_GIT_SUBMODULES = yes What about using the tarball provided by upstream? LIBOSTREE_VERSION = 2017.12 LIBOSTREE_SOURCE = libostree-$(LIBOSTREE_VERSION).tar.xz LIBOSTREE_SITE = https://github.com/ostreedev/ostree/releases/download/v $(LIBOSTREE_VERSION) It contains the git submodules as well so you can drop autoreconf and patch 0001. Please also add a hash file. > +LIBOSTREE_LICENSE = GPLv2 > +LIBOSTREE_LICENSE_FILES = COPYING > +LIBOSTREE_AUTORECONF = YES > +LIBOSTREE_DEPENDENCIES = libgpgme libglib2 xz libfuse pkgconf e2fsprogs Please sort this list alphabetically and add host-pkgconf as it is used by configure. > +# Use their special autogen.sh script to workaround automake bug with subdir-objects and computed paths Please wrap this line to 72 chars. > +define LIBOSTREE_RUN_AUTOGEN > + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh > +endef > +LIBOSTREE_PRE_CONFIGURE_HOOKS += LIBOSTREE_RUN_AUTOGEN > + > +$(eval $(autotools-package)) Please add openssl as optional dependency: ifeq ($(BR2_PACKAGE_OPENSSL),y) LIBOSTREE_CONF_OPTS += --with-openssl LIBOSTREE_DEPENDENCIES += openssl else LIBOSTREE_CONF_OPTS += --without-openssl endif Same for avahi, libarchive, libcurl, libsoup and systemd. Please note that curl support also needs libsoup configure: error: Curl enabled, but libsoup is not; libsoup is needed for tests To solve this configure error: checking for gpgme-config... no checking for OT_DEP_GPGME... no checking for GPGME pthread - version >= 1.1.8... no configure: error: Need GPGME_PTHREAD version 1.1.8 or later I needed to add LIBOSTREE_CONF_OPTS += --with-gpgme-prefix=$(STAGING_DIR)/usr Regards, Bernd
Am Sun, 29 Oct 2017 10:37:56 +0100 schrieb Marcus Folkesson: > OSTree is an upgrade system for Linux-based operating systems > > Signed-off-by: Marcus Folkesson > <marcus.folkesson@gmail.com> Hi, an additional note: The package is broken when used with musl: CC src/libostree/libostree_1_la-ostree-async-progress.lo In file included from ./libglnx/libglnx.h:33:0, from src/libostree/ostree-async-progress.c:24: ./libglnx/glnx-dirfd.h: In function 'glnx_ensure_dir': ./libglnx/glnx-dirfd.h:108:7: error: implicit declaration of function 'TEMP_FAILURE_RETRY' [-Werror=implicit-function-declaration] if (TEMP_FAILURE_RETRY (mkdirat (dfd, path, mode)) != 0) ^~~~~~~~~~~~~~~~~~ Regards, Bernd
Hello, On Sun, 29 Oct 2017 12:03:53 +0100, Bernd Kuhls wrote: > Hi Marcus, First of all Bernd, thanks a lot for your detailed review! Everything is obviously correct in your review, and needs to be addressed by Marcus. However, there is just one point that needs clarification. > Please add openssl as optional dependency: > > ifeq ($(BR2_PACKAGE_OPENSSL),y) > LIBOSTREE_CONF_OPTS += --with-openssl > LIBOSTREE_DEPENDENCIES += openssl > else > LIBOSTREE_CONF_OPTS += --without-openssl > endif > > Same for avahi, libarchive, libcurl, libsoup and systemd. Adding support for optional dependencies is not a strict requirement, as long as the corresponding features are explicitly disabled. I.e, for each optional dependency, Marcus has the choice of: - Supporting it, by enabling the dependency if it's available in Buildroot - Disabling explicitly the optional dependency by passing the appropriate --disable-<foo> Indeed, we don't want to ask our contributors to support all possible optional dependencies. It might be a lot of work, and the contributor may not necessarily care about such optional dependencies. Hence, disabling a dependency explicitly is acceptable. Thanks! Thomas
Hi Bernd, Thank you for your comments, really, that was helpful. On Sun, Oct 29, 2017 at 12:03:53PM +0100, Bernd Kuhls wrote: > Hi Marcus, > > Am Sun, 29 Oct 2017 10:37:56 +0100 schrieb Marcus Folkesson: > > you need to propagate some dependencies from packages libostree depends > on. > > > diff --git a/package/libostree/Config.in b/package/libostree/Config.in > > new file mode 100644 > > index 0000000000..520e76ce6a > > --- /dev/null > > +++ b/package/libostree/Config.in > > @@ -0,0 +1,12 @@ > > +config BR2_PACKAGE_LIBOSTREE > > + bool "libostree" > > + select BR2_PACKAGE_LIBGLIB2 > > libglib2 contains: > > depends on BR2_USE_WCHAR # gettext > depends on BR2_TOOLCHAIN_HAS_THREADS > depends on BR2_USE_MMU # fork() > Will do. Actually, I thought Buildroot would handle this. How about dependencies in the next step and so on? > > + > > +LIBOSTREE_VERSION = v2017.12 > > +LIBOSTREE_SITE = https://github.com/ostreedev/ostree.git > > +LIBOSTREE_SITE_METHOD = git > > +LIBOSTREE_GIT_SUBMODULES = yes > > What about using the tarball provided by upstream? > > LIBOSTREE_VERSION = 2017.12 > LIBOSTREE_SOURCE = libostree-$(LIBOSTREE_VERSION).tar.xz > LIBOSTREE_SITE = https://github.com/ostreedev/ostree/releases/download/v > $(LIBOSTREE_VERSION) > > It contains the git submodules as well so you can drop autoreconf and > patch 0001. Please also add a hash file. > Tarball is a much better approach. I was looking at this first but dropped it since I did not saw the submodules. Guess I was looking at https://github.com/ostreedev/ostree/archive/v2017.12.tar.gz then, not the actual releases. > > +LIBOSTREE_LICENSE = GPLv2 > > +LIBOSTREE_LICENSE_FILES = COPYING > > +LIBOSTREE_AUTORECONF = YES > > +LIBOSTREE_DEPENDENCIES = libgpgme libglib2 xz libfuse pkgconf e2fsprogs > > Please sort this list alphabetically and add host-pkgconf as it is used > by configure. > Ok. > > +# Use their special autogen.sh script to workaround automake bug with > subdir-objects and computed paths > > Please wrap this line to 72 chars. > Ok. > > +define LIBOSTREE_RUN_AUTOGEN > > + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh > > +endef > > +LIBOSTREE_PRE_CONFIGURE_HOOKS += LIBOSTREE_RUN_AUTOGEN > > + > > +$(eval $(autotools-package)) > > Please add openssl as optional dependency: > > ifeq ($(BR2_PACKAGE_OPENSSL),y) > LIBOSTREE_CONF_OPTS += --with-openssl > LIBOSTREE_DEPENDENCIES += openssl > else > LIBOSTREE_CONF_OPTS += --without-openssl > endif > > Same for avahi, libarchive, libcurl, libsoup and systemd. Will do. > > Please note that curl support also needs libsoup > > configure: error: Curl enabled, but libsoup is not; libsoup is needed for > tests > > To solve this configure error: > > checking for gpgme-config... no > checking for OT_DEP_GPGME... no > checking for GPGME pthread - version >= 1.1.8... no > configure: error: Need GPGME_PTHREAD version 1.1.8 or later > > I needed to add > > LIBOSTREE_CONF_OPTS += --with-gpgme-prefix=$(STAGING_DIR)/usr > > Regards, Bernd > Best regards Marcus Folkesson
diff --git a/DEVELOPERS b/DEVELOPERS index 942abcf836..602122cfed 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1129,6 +1129,9 @@ F: package/turbolua/ N: Marcin Nowakowski <marcin.nowakowski@imgtec.com> F: package/libkcapi/ +N: Marcus Folkesson <marcus.folkesson@gmail.com> +F: package/libostree/ + N: Marek Belisko <marek.belisko@open-nandra.com> F: package/libatasmart/ F: package/polkit/ diff --git a/package/Config.in b/package/Config.in index d4cf62708a..8fbc213610 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1913,6 +1913,7 @@ menu "System tools" source "package/keyutils/Config.in" source "package/kmod/Config.in" source "package/kvmtool/Config.in" + source "package/libostree/Config.in" source "package/lxc/Config.in" source "package/monit/Config.in" source "package/ncdu/Config.in" diff --git a/package/libostree/0001-Use-autoreconf-from-the-build-environment.patch b/package/libostree/0001-Use-autoreconf-from-the-build-environment.patch new file mode 100644 index 0000000000..36d9b3f15e --- /dev/null +++ b/package/libostree/0001-Use-autoreconf-from-the-build-environment.patch @@ -0,0 +1,42 @@ +From e4b940cc02776edee63c5a706746dc237862151d Mon Sep 17 00:00:00 2001 +From: Marcus Folkesson <marcus.folkesson@gmail.com> +Date: Wed, 30 Aug 2017 19:20:35 +0200 +Subject: [PATCH] Use autoreconf from the build environment + +OSTree workarounds a bug in automake in their autogen.sh file. +Use the script but do not call autoreconf from it. + +Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> +--- + autogen.sh | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/autogen.sh b/autogen.sh +index 17f6abf4..0dfbb15a 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -6,12 +6,6 @@ test -n "$srcdir" || srcdir=. + olddir=`pwd` + cd $srcdir + +-AUTORECONF=`which autoreconf` +-if test -z $AUTORECONF; then +- echo "*** No autoreconf found, please install it ***" +- exit 1 +-fi +- + set -e + + mkdir -p m4 +@@ -37,8 +31,3 @@ sed -e 's,$(libbsdiff_srcpath),bsdiff,g' < bsdiff/Makefile-bsdiff.am >bsdiff/Mak + + # FIXME - figure out how to get aclocal to find this by default + ln -sf ../libglnx/libglnx.m4 buildutil/libglnx.m4 +- +-autoreconf --force --install --verbose +- +-cd $olddir +-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" +-- +2.13.1 + diff --git a/package/libostree/Config.in b/package/libostree/Config.in new file mode 100644 index 0000000000..520e76ce6a --- /dev/null +++ b/package/libostree/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBOSTREE + bool "libostree" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PKGCONF + select BR2_PACKAGE_XZ + select BR2_PACKAGE_E2FSPROGS + select BR2_PACKAGE_LIBFUSE + select BR2_PACKAGE_LIBGPGME + help + OSTree is an upgrade system for Linux-based operating systems. + + https://ostree.readthedocs.io/en/latest/ diff --git a/package/libostree/libostree.mk b/package/libostree/libostree.mk new file mode 100644 index 0000000000..5d0483665c --- /dev/null +++ b/package/libostree/libostree.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libostree +# +################################################################################ + +LIBOSTREE_VERSION = v2017.12 +LIBOSTREE_SITE = https://github.com/ostreedev/ostree.git +LIBOSTREE_SITE_METHOD = git +LIBOSTREE_GIT_SUBMODULES = yes +LIBOSTREE_LICENSE = GPLv2 +LIBOSTREE_LICENSE_FILES = COPYING +LIBOSTREE_AUTORECONF = YES +LIBOSTREE_DEPENDENCIES = libgpgme libglib2 xz libfuse pkgconf e2fsprogs + +# Use their special autogen.sh script to workaround automake bug with subdir-objects and computed paths +define LIBOSTREE_RUN_AUTOGEN + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh +endef +LIBOSTREE_PRE_CONFIGURE_HOOKS += LIBOSTREE_RUN_AUTOGEN + +$(eval $(autotools-package))
OSTree is an upgrade system for Linux-based operating systems Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> --- v4: - bump version to 2017.12 v3: - move with the package within Config.in to match the chronological order (the former name was just 'ostree') v2: - add e2fsprogs as dependency DEVELOPERS | 3 ++ package/Config.in | 1 + ...Use-autoreconf-from-the-build-environment.patch | 42 ++++++++++++++++++++++ package/libostree/Config.in | 12 +++++++ package/libostree/libostree.mk | 22 ++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 package/libostree/0001-Use-autoreconf-from-the-build-environment.patch create mode 100644 package/libostree/Config.in create mode 100644 package/libostree/libostree.mk