Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17967466ybl; Thu, 2 Jan 2020 15:51:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzcwNqFAibSd9Sc09tzxwF7DtqBvE73jrJS0h6Tk+UPxLfXkYjEVd9NxBCZN6f6HJKsnvdz X-Received: by 2002:a9d:369:: with SMTP id 96mr85897835otv.228.1578009072533; Thu, 02 Jan 2020 15:51:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578009072; cv=none; d=google.com; s=arc-20160816; b=KLVUEQm0WCGTNpGLR+zy7GMT0aqYNPwlsEIWHPzUWa1jZWcfXHxO88GQbo6r0T7hez 42mKajVfrWHNCNSHt0B5/O9XiITVNHI/9gmVlwe1xj3otsAAV8+dQQEwrhqLKU/teJ/N oUS17nAfwaAnE+6z0GFiGjGE5+P9oH7NFxDZoutEvSV06u19eoSoO5e+tbjYNEvDXz0Y LnY9Ud7EXJYvFTJfmSthrUBE26pjHVVxtmzFDGt585366r1SwdKtJvFt7fOO54Q9vgob lkBQ7KVjxGM0qg3g7irzEJHKs0CcKY/yBKbKVNkxiCanAGoR66z91mIRcEL0VUruDRXn v/lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Xcf0YP80Mto0kO83rbF2DzFh7h3JXBfJISRV5C5tT8E=; b=dhZT5hcqUo9aNU4aBXxNp74FEvS+/n7EuCRfIoWe4a8gM1Y+MTBQVNdCwREVfDFd1b Wnf3kMS3+bBBw1ZRKG+qSKKYGyN4TqdZ8cJW4pfHbLVd8jbVxlK8cJnotyE1YDPlf9bM FN9lVT/dIwc8vZDIrtYqIZcm0LNnSVv4BQvWxL9F7HlJL5OnHtm25JTn7kZN2h4X/2bf ljZLfTNvwak+ve9RN2CZ2HlO+zyF708wcUODZQbX8pHgY7gd5Af2ecmOvVjkuzIvNcU7 aH+rP98akRSn9jId87uvbB16gFMq2vRrIMEBcqnUrm660b7OiIsI1nZaJba6Zcva6a55 ulug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hp+747Sd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si26616670oig.199.2020.01.02.15.51.00; Thu, 02 Jan 2020 15:51:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Hp+747Sd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727339AbgABXuE (ORCPT + 99 others); Thu, 2 Jan 2020 18:50:04 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:28738 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725872AbgABXuE (ORCPT ); Thu, 2 Jan 2020 18:50:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578009002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xcf0YP80Mto0kO83rbF2DzFh7h3JXBfJISRV5C5tT8E=; b=Hp+747SdWGnwd808hqScoSDWanDwrd6CZbgLJiSblGoDH3gCjuMaWMOng9M7+GRm2k1Vv2 H0CcQF6F5wz/wTEyhphH/5UYsfrgS+cYL20DzRGz04xxqjLopWK+cfZVz+Je3cR55fiRJF ZGBogncoekp1qR0Oh2wzHOCMN3tAOC4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-121-_8idDAM8OMyvONYDDL_zvA-1; Thu, 02 Jan 2020 18:49:57 -0500 X-MC-Unique: _8idDAM8OMyvONYDDL_zvA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5FFD180124F; Thu, 2 Jan 2020 23:49:55 +0000 (UTC) Received: from krava (ovpn-204-83.brq.redhat.com [10.40.204.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C734C7A4F1; Thu, 2 Jan 2020 23:49:53 +0000 (UTC) Date: Fri, 3 Jan 2020 00:49:50 +0100 From: Jiri Olsa To: Steven Rostedt Cc: Sudip Mukherjee , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Masami Hiramatsu , Linux Trace Devel , LKML , Linus Torvalds Subject: Re: [RFC] tools lib traceevent: How to do library versioning being in the Linux kernel source? Message-ID: <20200102234950.GA14768@krava> References: <20200102122004.216c85da@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200102122004.216c85da@gandalf.local.home> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 02, 2020 at 12:20:04PM -0500, Steven Rostedt wrote: > First, I hope everyone had a Happy New Year! heya, Happy New Year! ;-) > > Next, Sudip has been working to get the libtraceevent library into > Debian. As this has been happening, I've been working at how to get all > the projects that use this, to use the library installed on the system > if it does exist. I'm hoping that once it's in Debian, the other > distros will follow suit. > > Currently, the home of libtraceevent lives in the Linux kernel source > tree under tools/lib/traceevent. This was because perf uses it to parse > the events, and it seemed logical (at the time) to use this location as > the main source tree for the distributions. > > The problem I'm now having is that I'm looking at fixing and updating > some of the code in this library, and since library versioning is > critical for applications that depend on it, we need to have a way to > update the versions, and this does not correspond with the Linux > versions. > > For example, we currently have: > > libtraceevent.so.1.1.0 > > If I make some bug fixes, I probably want to change it to: > > libtraceevent.so.1.1.1 or libtraceevent.so.1.2.0 > > But if I change the API, which I plan on doing soon, I would probably > need to update the major version. > > libtraceevent.so.2.0.0 > > The thing is, we shouldn't be making these changes for every update > that we send to the main kernel. I would like to have a minimum of tags > to state what the version should be, and perhaps even branches for > working on a development version. > > This is a problem with living in the Linux source tree as tags and > branches in Linus's tree are for only the Linux kernel source itself. > This may work fine for perf, as it's not a library and there's not > tools depending on the version of it. But it is a problem when it comes > to shared libraries. > > Should we move libtraceevent into a stand alone git repo (on > kernel.org), that can have tags and branches specifically for it? We > can keep a copy in the Linux source tree for perf to use till it so libbpf 'moved' for this reason to github repo, but keeping the kernel as the true/first source, and updating github repo when release is ready libbpf github repo is then source for fedora (and others) package > becomes something that is reliably in all distributions. It's not like > perf doesn't depend on other libraries today anyway. yep, we already have a way to link libbpf dynamicaly from package, will work the same for libtraceevent jirka