Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DC4E5200D17 for ; Sun, 8 Oct 2017 10:11:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DAD231609E6; Sun, 8 Oct 2017 08:11:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 04D651609CB for ; Sun, 8 Oct 2017 10:11:22 +0200 (CEST) Received: (qmail 69189 invoked by uid 500); 8 Oct 2017 08:11:22 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 69117 invoked by uid 99); 8 Oct 2017 08:11:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Oct 2017 08:11:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 964C71A20C2 for ; Sun, 8 Oct 2017 08:11:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.479 X-Spam-Level: ** X-Spam-Status: No, score=2.479 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=liferay-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id vSOjOK0ofzSL for ; Sun, 8 Oct 2017 08:11:18 +0000 (UTC) Received: from mail-ua0-f174.google.com (mail-ua0-f174.google.com [209.85.217.174]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 3E35B5FBED for ; Sun, 8 Oct 2017 08:11:18 +0000 (UTC) Received: by mail-ua0-f174.google.com with SMTP id b11so13208426uae.12 for ; Sun, 08 Oct 2017 01:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=liferay-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=MGG/G8jOzOgeddwXWgUPvMrlxEsWjEM2FBjq3MnqBus=; b=ZQtyyrOFHllLuNvvW7iza2gVc02N7Xf5ASXwFq0SnkmT9YYd3vrwDvqJciAhLXxJCQ f/tSivc7XY9GVn5qyW4q/ip7+bXWdjfjeXg/WWqGi0aEs397vOazwy5LKgogor5E50yb uDGIDG81OrPq+dM/EyQv3vo6hWQ39fuV8fE8rdbqL7EmuKh/VeCCXLy9Sh/Xj/uNERSM EfdojoBHVatpeZj68teDfxOkSSFulBAVmyCQ300i1hl6mVN+mzu2TdQo5c9C3feR2Qfx wKeUVWzU0ggV3w0yNCKEHG7RGsp9aKLvZskRYSqhNGM4/4V9DuKJVY2K5HQEw2svt01Y Yc6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=MGG/G8jOzOgeddwXWgUPvMrlxEsWjEM2FBjq3MnqBus=; b=iuZCsvZuK60gNpQSfPqRJq8iR4EOZjPy5yUTMl17EWesRe8vkJtoWVZf0EhSGEu/vt JAqVzW/JD0o8XCGxrA5CqzcDg00G1oskC+oDBrNYv8zGOs1TlZpS4IpKHmLVwHCKFplK K5WQeEkVI/dV5kK2tz84Kl9HZWGA1cgmWkTv067ZdYWpCgE5vKUqh98QWQig3AVKm6ul T2X+GDsYTqUx/nhqPcLZeyQ32dWLMXcCgvPy+Rb7C18Om3k2FRLnReX9zR5WEkAavP1Y JmsRQ5YyhE+paMpf4v4p9n1W9h6ade3rsWSe31Kq/U5k97+jI7EFEiP8j4vNR0q+B4IT mRxA== X-Gm-Message-State: AMCzsaVgL+wPdKPLzThTqB2mpjk6hy7RXoDs7w+K4eaxKhUavNU6LmgV XPXZKqxHufKW2dYQMM5rIENTd2yBpVebWEdowsVwg449 X-Google-Smtp-Source: AOwi7QDVmMq80YA6PZwYEQ3SS1z6s/J9ESKas4ZKhzzgkP17pn52dLPm11vAKEnYPdZ2yRVJfC5pllRZow/mPrEg4C4= X-Received: by 10.176.92.74 with SMTP id a10mr3469543uag.165.1507450277182; Sun, 08 Oct 2017 01:11:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.205.130 with HTTP; Sun, 8 Oct 2017 01:11:15 -0700 (PDT) Received: by 10.31.205.130 with HTTP; Sun, 8 Oct 2017 01:11:15 -0700 (PDT) In-Reply-To: References: <9F2D9F9C-0C17-4554-8D86-CC48DFF09C4F@paremus.com> From: Raymond Auge Date: Sun, 8 Oct 2017 10:11:15 +0200 Message-ID: Subject: Re: [DISCUSS] Contribution of Bundle ARchive (BAR) installer To: Apache Felix Developer List Content-Type: multipart/alternative; boundary="f403043ef16449d512055b049e0f" archived-at: Sun, 08 Oct 2017 08:11:24 -0000 --f403043ef16449d512055b049e0f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I would support this as @Liferay has implemented pretty much the same thing, used by our marketplace, called LPKGs (you can guess what that might mean). I'll point out the common functionality inline in support of your use case. On Oct 7, 2017 6:30 PM, "Neil Bartlett (Paremus)" wrote: Hello Felix developers, I would like to initiate a contribution of external code into Apache Felix. This code is being contributed on behalf of Intel Corporation, who funded development. The contribution is a plugin for File Install =E2=80=94 an implementation of the ArtifactInstaller service =E2=80=94 which handles Bun= dle ARchive (BAR) files. This is a proposed format for an aggregate of functionality represented as one or more OSGi bundles along with an OSGi index. It includes use of the OSGi resolver API to check consistency and permits overlapping resources from multiple installable units. A BAR file is physically a JAR file with some defined manifest headers to control the behaviour of the installer. It must contain an OSGi index (in the XML format specified by the Repository Service specification) and the index can reference bundles contained within the BAR LPKGs do this. , or optionally external bundles. Nice! This would be useful. > Additionally the BAR manifest contains a set of requirements (a Require-Bundle and/or Require-Capability header) that define the root requirements to be resolved against that index. We handle this effectively by enforcing that the index resolves against the current framework, but this would be nice for either augments-style behaviour or to support external resolution when BAR is referenced in an R5 index. Dropping a BAR file into the File Install monitored directory does not immediately install its contents. Instead a resolution process is initiated to ensure that the contents of the BAR are complete and consistent. Exactly what lpkg does. If that resolution process succeeds then the BAR contents become available for installation. The application or management agent is responsible for triggering the actual installation. Do you mean the referenced bundles or the BAR? If the bundles, how are they reached by the agent? Does it kind of become a repository visible to a repository service? What lpkg does is install and start (if not already done) all referenced bundles by default which we feel is the most common user expectation. Could this be a BAR feature configuration or flag? > Multiple BAR files can require the same resource transitively. We use a reference counting mechanism to ensure that BARs with overlapping requirements can be installed concurrently, and those resources are only uninstalled when the last BAR that references them is uninstalled. Does this mean that if the BAR itself is uninstalled that its referenced bundles are uninstalled at once, unless referenced by another BAR? This differs from existing approaches in the following ways: 1. The OSGi Deployment Admin specification defines a similar file format for aggregates of bundles, but the contents of a Deployment Package cannot overlap with previously installed Deployment Packages. This limitation makes the specification unworkable in many practical scenarios. Agreed! 2. Eclipse and Karaf both have a similar concept of =E2=80=9Cfeatures=E2=80= =9D, but these are simply listings of bundles. The BAR Installer uses the OSGi resolver to ensure that the contents of the BAR can actually be installed cleanly in the current OSGi framework, and will never attempt to reinstall a bundle that is already in use. Agreed and agreed! 3. The OSGi Subsystem Service specification has the ability to resolve the contents of a subsystem, but the resolved bundles are usually installed into an isolated =E2=80=9Cregion=E2=80=9D of the target OSGi framework. Thi= s creates a lot of complexity, and as a result the Subsystems chapter of the OSGi specification makes for a daunting read. BARs are installed into the flat OSGi framework without isolation, have a simpler lifecycle and are easier for developers to reason about. Agreement, much WOW! All sources are already Apache licensed, and were originally developed for the Open Security Controller project (https://www. opensecuritycontroller.org/ ). I just have one single use case that I'm not clear is covered (thought it may be implied or not mentioned): Is there a way to blacklist a particular referenced bundle such that it's capabilities can be satisfied by some other bundle not previously known to the bar? We've frequently observed that in order to support some maintenance scenarios we have to have more strict control of what gets installed particular when providing security and/or bug fixes. - Ray --f403043ef16449d512055b049e0f--