From patchwork Wed Apr 20 18:50:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 66246 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2619002qge; Wed, 20 Apr 2016 11:52:57 -0700 (PDT) X-Received: by 10.140.130.14 with SMTP id 14mr13690567qhc.85.1461178377861; Wed, 20 Apr 2016 11:52:57 -0700 (PDT) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id 81si56511480qhg.9.2016.04.20.11.52.56 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Apr 2016 11:52:57 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3KIo9Ui020862; Wed, 20 Apr 2016 14:50:10 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3KIo8Qg001674 for ; Wed, 20 Apr 2016 14:50:08 -0400 Received: from colepc.redhat.com (ovpn-113-99.phx2.redhat.com [10.3.113.99]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3KIo7LL011246; Wed, 20 Apr 2016 14:50:08 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 20 Apr 2016 14:50:05 -0400 Message-Id: <8067f0bed0242302145f7f31c88af4552466b42e.1461178194.git.crobinso@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH python] spec: Don't pull in dependencies for example scripts X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com If the scripts are marked as executable, RPM magic will scan them for dependencies, which can pull in python2 for the python3 package --- Taken from this commit by a fedora packager: http://pkgs.fedoraproject.org/cgit/rpms/libvirt-python.git/commit/?id=78763e0bdbc081609519c02a2289fd54bea4d14f libvirt-python.spec.in | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in index 8a21003..3021ebd 100644 --- a/libvirt-python.spec.in +++ b/libvirt-python.spec.in @@ -49,6 +49,11 @@ of recent versions of Linux (and other OSes). %prep %setup -q +# Unset execute bit for example scripts; it can introduce spurious +# RPM dependencies, like /usr/bin/python which can pull in python2 +# for the -python3 package +find examples -type f -exec chmod 0644 \{\} \; + %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %if %{with_python3}