From patchwork Mon Nov 4 12:05:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 11225653 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65E8D1515 for ; Mon, 4 Nov 2019 12:05:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40CB021D81 for ; Mon, 4 Nov 2019 12:05:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Uqv89YlC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727553AbfKDMFv (ORCPT ); Mon, 4 Nov 2019 07:05:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:58548 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726441AbfKDMFv (ORCPT ); Mon, 4 Nov 2019 07:05:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572869151; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oDcQMMMn2Ou9SSLJFTCCAcAa+uzHLXJu4Rft8/2r9bQ=; b=Uqv89YlCF4aP0xECI7uB9zLJqvO24qZgIyog+HPrHATasow6DsV6Z08jKUj4X+kSgKIRHK tgxit1y0xVz9LHoYcjTnw+3gi5Jtx3ewpBMVqh3Jy+yx8qenq9exe59gXg2VQFM1x3FfYk Uk8vU8KH/UUPAW5SHSM2PMWDmjBjsq0= 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-379-6VbfGIh3N9-qKhIlf_i9lg-1; Mon, 04 Nov 2019 07:05:47 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 77FFF1800D53; Mon, 4 Nov 2019 12:05:46 +0000 (UTC) Received: from localhost (ovpn-116-49.ams2.redhat.com [10.36.116.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 751D15C28C; Mon, 4 Nov 2019 12:05:40 +0000 (UTC) From: Stefan Hajnoczi To: Jens Axboe Cc: Aarushi Mehta , linux-block@vger.kernel.org, Julia Suvorova , Jeff Moyer , Stefan Hajnoczi Subject: [PATCH liburing 1/3] spec: update RPM version number to 0.2 Date: Mon, 4 Nov 2019 13:05:30 +0100 Message-Id: <20191104120532.32839-2-stefanha@redhat.com> In-Reply-To: <20191104120532.32839-1-stefanha@redhat.com> References: <20191104120532.32839-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 6VbfGIh3N9-qKhIlf_i9lg-1 X-Mimecast-Spam-Score: 0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Signed-off-by: Stefan Hajnoczi --- liburing.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liburing.spec b/liburing.spec index 1337034..f9e9262 100644 --- a/liburing.spec +++ b/liburing.spec @@ -1,5 +1,5 @@ Name: liburing -Version: 0.1 +Version: 0.2 Release: 1 Summary: Linux-native io_uring I/O access library License: LGPLv2+ From patchwork Mon Nov 4 12:05:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 11225655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41E28913 for ; Mon, 4 Nov 2019 12:06:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D85C21E6F for ; Mon, 4 Nov 2019 12:06:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HC1axhRV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726441AbfKDMF7 (ORCPT ); Mon, 4 Nov 2019 07:05:59 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55537 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726100AbfKDMF7 (ORCPT ); Mon, 4 Nov 2019 07:05:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572869158; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TX3MENt9H948tvZRMkm6vUw7B2bDTuG4mimG9EWlwJE=; b=HC1axhRVCRfQjdzlifnrc0y1pLpIGK+KGbQliTfbjc+7LpNJ6633eBokjzFdopPfylHkwE V8Xky8T4RlYJDuosdFMRlGt4yiUVTX7EqQFEg39BnetgnASJWqiVBeKg0/Q7XjrUI3lZKn 2hS7r1IzvO0oro7tte5CQvYnhOVhvSs= 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-30-E_HpD_zePZ2GeI_pAOtNMw-1; Mon, 04 Nov 2019 07:05:55 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 30F302AD; Mon, 4 Nov 2019 12:05:54 +0000 (UTC) Received: from localhost (ovpn-116-49.ams2.redhat.com [10.36.116.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82FC160F8A; Mon, 4 Nov 2019 12:05:47 +0000 (UTC) From: Stefan Hajnoczi To: Jens Axboe Cc: Aarushi Mehta , linux-block@vger.kernel.org, Julia Suvorova , Jeff Moyer , Stefan Hajnoczi Subject: [PATCH liburing 2/3] Makefile: add missing .pc dependency on .spec file Date: Mon, 4 Nov 2019 13:05:31 +0100 Message-Id: <20191104120532.32839-3-stefanha@redhat.com> In-Reply-To: <20191104120532.32839-1-stefanha@redhat.com> References: <20191104120532.32839-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: E_HpD_zePZ2GeI_pAOtNMw-1 X-Mimecast-Spam-Score: 0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org The version number is extracted from the .spec file. Make .pc depend on .spec so that VERSION variable substitutions are always up-to-date. Signed-off-by: Stefan Hajnoczi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc457bb..8af1c3a 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ ifneq ($(MAKECMDGOALS),clean) include config-host.mak endif -%.pc: %.pc.in config-host.mak +%.pc: %.pc.in config-host.mak $(SPECFILE) sed -e "s%@prefix@%$(prefix)%g" \ -e "s%@libdir@%$(libdir)%g" \ -e "s%@includedir@%$(includedir)%g" \ From patchwork Mon Nov 4 12:05:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 11225657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BF82913 for ; Mon, 4 Nov 2019 12:06:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 777C621D81 for ; Mon, 4 Nov 2019 12:06:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AYGtE/uB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727838AbfKDMGH (ORCPT ); Mon, 4 Nov 2019 07:06:07 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49484 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726100AbfKDMGG (ORCPT ); Mon, 4 Nov 2019 07:06:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572869165; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TQlTkYiEnk72oeer/A7iyRQHuIL3KuImRtIzh4DmmV4=; b=AYGtE/uBJ5toCyfeDJD4BL0HRBOFMBmdo9cKZmJwY/9XQiaoEJEFZhdn75ERvRiZNsqJ8I qy/S9jXejP+cABqHyveNuywmdaNujI6OPmf8NRHHrwnw4s+w5fnpBNamhDsfFAIyz4yXFK p5gU+27emgycyKgIB+jPcb2DZ4aaZSQ= 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-246-hI9PPT2kM2usK7j9OnY7-A-1; Mon, 04 Nov 2019 07:06:02 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CCDD38017DD; Mon, 4 Nov 2019 12:06:01 +0000 (UTC) Received: from localhost (ovpn-116-49.ams2.redhat.com [10.36.116.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DA7119C4F; Mon, 4 Nov 2019 12:05:55 +0000 (UTC) From: Stefan Hajnoczi To: Jens Axboe Cc: Aarushi Mehta , linux-block@vger.kernel.org, Julia Suvorova , Jeff Moyer , Stefan Hajnoczi Subject: [PATCH liburing 3/3] spec: Fedora RPM cleanups Date: Mon, 4 Nov 2019 13:05:32 +0100 Message-Id: <20191104120532.32839-4-stefanha@redhat.com> In-Reply-To: <20191104120532.32839-1-stefanha@redhat.com> References: <20191104120532.32839-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: hI9PPT2kM2usK7j9OnY7-A-1 X-Mimecast-Spam-Score: 0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Jeff Moyer Cole Robinson and Fabio Valenti made a number of suggestions for the .spec file: https://bugzilla.redhat.com/show_bug.cgi?id=1766157 * Release should be Release: 1%{?dist} so the .fcXX bits get appended to the version string * Source: should be a pointer to the upstream URL that hosts the release. In this case I think it should be https://github.com/axboe/liburing/archive/%{name}-%{version}.tar.gz#%{name}-%{name}-%{version}.tar.gz, the ending weirdness is due to github renaming the archive strangely. You might need to pass '-n %{name}-%{name}-%{version}' to %setup/%autosetup to tell it what the extracted archive name is * The %defattr lines should be removed: https://pagure.io/packaging-committee/issue/77 * The Group: lines should be removed * All the BuildRoot and RPM_BUILD_ROOT lines should be removed. %clean should be removed * The ./configure line should be replaced with just %configure * The 'make' call should be %make_build * The 'make install' call should be %make_install * The %pre and %post sections can be entirely removed, ldconfig is done automatically: https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets * The devel package 'Requires: liburing' should instead be: Requires: %{name} = %{version}-%{release} * The devel package should also have Requires: pkgconfig * I think all the %attr usage can be entirely removed, unless they are doing something that the build system isn't doing. * The Provides: liburing.so.1 shouldn't be necessary, I'm pretty sure RPM automatically adds annotations like this * Replace %setup with %autosetup, which will automatically apply any listed Patch: in the spec if anything is backported in the future. It's a small maintenace optimization These changes work on Fedora 31 and openSUSE Leap 15.1. Therefore they are likely to work on other rpm-based distributions too. Tested-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- liburing.spec | 47 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/liburing.spec b/liburing.spec index f9e9262..08d46f4 100644 --- a/liburing.spec +++ b/liburing.spec @@ -1,12 +1,11 @@ Name: liburing Version: 0.2 -Release: 1 +Release: 1%{?dist} Summary: Linux-native io_uring I/O access library License: LGPLv2+ -Group: System Environment/Libraries Source: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-root -URL: http://git.kernel.dk/cgit/liburing/ +URL: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz +BuildRequires: gcc %description Provides native async IO for the Linux kernel, in a fast and efficient @@ -14,47 +13,39 @@ manner, for both buffered and O_DIRECT. %package devel Summary: Development files for Linux-native io_uring I/O access library -Group: Development/System -Requires: liburing -Provides: liburing.so.1 +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig %description devel This package provides header files to include and libraries to link with for the Linux-native io_uring. %prep -%setup +%autosetup %build -./configure --prefix=/usr --libdir=/%{_libdir} --mandir=/usr/share/man -make +./configure --prefix=%{_prefix} --libdir=/%{_libdir} --mandir=%{_mandir} --includedir=%{_includedir} -%install -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -make install DESTDIR=$RPM_BUILD_ROOT - -%clean -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT +%make_build -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%install +%make_install %files -%defattr(-,root,root) %attr(0755,root,root) %{_libdir}/liburing.so.* %doc COPYING %files devel -%defattr(-,root,root) -%attr(-,root,root) %{_includedir}/liburing/ -%attr(0644,root,root) %{_includedir}/liburing.h -%attr(0755,root,root) %{_libdir}/liburing.so -%attr(0644,root,root) %{_libdir}/liburing.a -%attr(0644,root,root) %{_libdir}/pkgconfig/* -%attr(0644,root,root) %{_mandir}/man2/* +%{_includedir}/liburing/ +%{_includedir}/liburing.h +%{_libdir}/liburing.so +%{_libdir}/liburing.a +%{_libdir}/pkgconfig/* +%{_mandir}/man2/* %changelog +* Thu Oct 31 2019 Jeff Moyer - 0.2-1 +- Initial fedora package. + * Tue Jan 8 2019 Jens Axboe - 0.1 - Initial version