Re: [PATCH] debian: package ruby bindings
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 15 Apr 2013 01:19:03 +0000 (20:19 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:54:22 +0000 (09:54 -0800)
64/f90df514d3ff5222c0105c9dd04fd273723bc5 [new file with mode: 0644]

diff --git a/64/f90df514d3ff5222c0105c9dd04fd273723bc5 b/64/f90df514d3ff5222c0105c9dd04fd273723bc5
new file mode 100644 (file)
index 0000000..7189e8c
--- /dev/null
@@ -0,0 +1,230 @@
+Return-Path: <felipe.contreras@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BC0BB431FB6\r
+       for <notmuch@notmuchmail.org>; Sun, 14 Apr 2013 18:19:06 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id B8IxPd-IofvC for <notmuch@notmuchmail.org>;\r
+       Sun, 14 Apr 2013 18:19:06 -0700 (PDT)\r
+Received: from mail-la0-f41.google.com (mail-la0-f41.google.com\r
+       [209.85.215.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id A9D23431FAF\r
+       for <notmuch@notmuchmail.org>; Sun, 14 Apr 2013 18:19:05 -0700 (PDT)\r
+Received: by mail-la0-f41.google.com with SMTP id er20so3953323lab.0\r
+       for <notmuch@notmuchmail.org>; Sun, 14 Apr 2013 18:19:04 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=mime-version:x-received:in-reply-to:references:date:message-id\r
+       :subject:from:to:cc:content-type;\r
+       bh=jIjU4PxLgaJ4TzQ1xQLu/gdNvzWAWDTwt6Yv/VADsg8=;\r
+       b=awOtLKUWkm5BmMTPP2lk6CfIgdyHiQpk+Ds+A03UNsO8FBEPoZUbcWwXiQBvs/R3W7\r
+       wv+1ZycTtmjWSPRuuZtllCkg4tGLa2dmUb1wBn1ArKR+mtnA8zs5XmE+gLAevOpLhuyH\r
+       InfDo2RMLjc7WuX7lpWEQtLHcN4kureZYY5TA9+ndq0M8AMZJT+z5BBoLcRf/T9/Kft7\r
+       mxodpshZTYbDA/jDjWuoKCgTibkNpERcV/SMkJtA42Jqgj44bCBChhMqBOjsnhA1Wdlq\r
+       L4+QxEFJ4R4vMsu0iLdshOzO/J71z4c0N6GjeEZh82u3RNxHJkT2yCKy2qHA+CRWU/rZ\r
+       LEYg==\r
+MIME-Version: 1.0\r
+X-Received: by 10.152.5.134 with SMTP id s6mr4492192las.24.1365988744109; Sun,\r
+       14 Apr 2013 18:19:04 -0700 (PDT)\r
+Received: by 10.114.59.210 with HTTP; Sun, 14 Apr 2013 18:19:03 -0700 (PDT)\r
+In-Reply-To: <87y5clte1j.fsf@zancas.localnet>\r
+References: <1365031678-25188-1-git-send-email-felipe.contreras@gmail.com>\r
+       <87y5clte1j.fsf@zancas.localnet>\r
+Date: Sun, 14 Apr 2013 20:19:03 -0500\r
+Message-ID:\r
+ <CAMP44s07KeL4uAChs3KFiqwcsCwWTvni6MzFGzXNeO7=sd6U6Q@mail.gmail.com>\r
+Subject: Re: [PATCH] debian: package ruby bindings\r
+From: Felipe Contreras <felipe.contreras@gmail.com>\r
+To: David Bremner <bremner@debian.org>\r
+Content-Type: text/plain; charset=UTF-8\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 15 Apr 2013 01:19:06 -0000\r
+\r
+On Sun, Apr 14, 2013 at 8:52 AM, David Bremner <bremner@debian.org> wrote:\r
+> Felipe Contreras <felipe.contreras@gmail.com> writes:\r
+>\r
+>>\r
+>> diff --git a/debian/control b/debian/control\r
+>> index 854a32a..620c5ce 100644\r
+>> --- a/debian/control\r
+>> +++ b/debian/control\r
+>> @@ -15,6 +15,7 @@ Build-Depends:\r
+>>   libz-dev,\r
+>>   python-all (>= 2.6.6-3~),\r
+>>   python3-all (>= 3.1.2-7~),\r
+>> + ruby-dev,\r
+>>   emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |\r
+>>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),\r
+>>   gdb,\r
+>\r
+> This doesn't build in a clean sid chroot, because ruby-dev does not\r
+> depend on ruby, so you need to explicitly add it.\r
+\r
+Right, I just found that too.\r
+\r
+>>  Package: notmuch-emacs\r
+>>  Architecture: all\r
+>>  Section: mail\r
+>> diff --git a/debian/notmuch-ruby.install b/debian/notmuch-ruby.install\r
+>> new file mode 100644\r
+>> index 0000000..f92f09c\r
+>> --- /dev/null\r
+>> +++ b/debian/notmuch-ruby.install\r
+>> @@ -0,0 +1 @@\r
+>> +usr/local/lib/site_ruby/*/*/notmuch.so\r
+>> diff --git a/debian/rules b/debian/rules\r
+>> index c4e3930..7c7247a 100755\r
+>> --- a/debian/rules\r
+>> +++ b/debian/rules\r
+>> @@ -12,15 +12,24 @@ override_dh_auto_build:\r
+>>       dh_auto_build\r
+>>       dh_auto_build --sourcedirectory bindings/python\r
+>>       cd bindings/python && $(python3_all) setup.py build\r
+>> +     dh_auto_build --sourcedirectory bindings/ruby\r
+>> +     cd bindings/ruby && ruby extconf.rb && make\r
+>\r
+> Why are both these lines needed?\r
+\r
+The first one isn't.\r
+\r
+> On a related note, is the ruby build\r
+> procedure documented somewhere?\r
+\r
+Not really, it's just standard.\r
+\r
+>>  override_dh_auto_clean:\r
+>>       dh_auto_clean\r
+>>       dh_auto_clean --sourcedirectory bindings/python\r
+>>       cd bindings/python && $(python3_all) setup.py clean -a\r
+>> +     dh_auto_build --sourcedirectory bindings/ruby\r
+>> +     cd bindings/ruby && test -f Makefile && make clean || true\r
+>>       $(MAKE) -C contrib/notmuch-mutt clean\r
+>\r
+> This looks suspect, calling dh_auto_build from the clean target.\r
+\r
+A mistake, probably the first line is enough.\r
+\r
+> The\r
+> clean target cannot assume that e.g. notmuch is already built.\r
+\r
+It doesn't, that's what the 'test -f Makefile' was for.\r
+\r
+>>  override_dh_auto_install:\r
+>>       dh_auto_install\r
+>>       dh_auto_install --sourcedirectory bindings/python\r
+>>       cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp\r
+>> +     dh_auto_build --sourcedirectory bindings/ruby\r
+>> +     cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp\r
+>\r
+> This call to dh_auto_build also confuses me. The top level sequencer\r
+> will ensure that the override_dh_auto_build is called before this one.\r
+\r
+A mistake.\r
+\r
+>> +\r
+>> +# ruby's site is configured in /usr/local\r
+>> +override_dh_usrlocal:\r
+>\r
+> The package is still installing files into /usr/local, which is a\r
+> violation of debian policy 9.1.2\r
+>\r
+> It's a good idea to run "lintian" on the resulting debian packages;\r
+> that's how I caught the problem with /usr/local.\r
+\r
+Tell that to debian maintainers who configure ruby that way:\r
+\r
+require 'rbconfig'\r
+RbConfig::CONFIG['sitelibdir']\r
+=> "/usr/local/lib/site_ruby/1.9.1"\r
+RbConfig::CONFIG['configure_args']\r
+=> " '--build=x86_64-linux-gnu' '--prefix=/usr'\r
+'--includedir=/usr/include' '--mandir=/usr/share/man'\r
+'--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var'\r
+'--libexecdir=/usr/lib/ruby1.9.1' '--srcdir=.'\r
+'--disable-maintainer-mode' '--disable-dependency-tracking'\r
+'--disable-silent-rules' '--enable-pthread' '--enable-shared'\r
+'--disable-rpath' '--disable-install-doc'\r
+'--with-vendordir=/usr/lib/ruby/vendor_ruby'\r
+'--with-sitedir=/usr/local/lib/site_ruby' '--program-suffix=1.9.1'\r
+'--with-soname=ruby-1.9.1' '--with-baseruby=/usr/bin/ruby1.8'\r
+'--enable-ipv6' '--with-dbm-type=gdbm_compat' '--with-tklib=tk8.5'\r
+'--with-tcllib=tcl8.5' '--with-tcl-include=/usr/include/tcl8.5'\r
+'--with-bundled-sha1' '--with-bundled-md5' '--with-bundled-rmd160'\r
+'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector\r
+--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall\r
+-fno-strict-aliasing' 'LDFLAGS=-Wl,-z,relro'\r
+'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector\r
+--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall\r
+-fno-strict-aliasing'"\r
+\r
+So, the changes I propose are:\r
+\r
+--- b/debian/control\r
++++ a/debian/control\r
+@@ -15,7 +15,7 @@ Build-Depends:\r
+  libz-dev,\r
+  python-all (>= 2.6.6-3~),\r
+  python3-all (>= 3.1.2-7~),\r
+- ruby-dev,\r
++ ruby, ruby-dev,\r
+  emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |\r
+  emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),\r
+  gdb,\r
+diff --git b/debian/rules a/debian/rules\r
+index 7c7247a..1dd59d2 100755\r
+--- b/debian/rules\r
++++ a/debian/rules\r
+@@ -12,7 +12,6 @@ override_dh_auto_build:\r
+        dh_auto_build\r
+        dh_auto_build --sourcedirectory bindings/python\r
+        cd bindings/python && $(python3_all) setup.py build\r
+-       dh_auto_build --sourcedirectory bindings/ruby\r
+        cd bindings/ruby && ruby extconf.rb && make\r
+        $(MAKE) -C contrib/notmuch-mutt\r
+\r
+@@ -20,16 +19,14 @@ override_dh_auto_clean:\r
+        dh_auto_clean\r
+        dh_auto_clean --sourcedirectory bindings/python\r
+        cd bindings/python && $(python3_all) setup.py clean -a\r
+-       dh_auto_build --sourcedirectory bindings/ruby\r
+-       cd bindings/ruby && test -f Makefile && make clean || true\r
++       dh_auto_clean --sourcedirectory bindings/ruby\r
+        $(MAKE) -C contrib/notmuch-mutt clean\r
+\r
+ override_dh_auto_install:\r
+        dh_auto_install\r
+        dh_auto_install --sourcedirectory bindings/python\r
+        cd bindings/python && $(python3_all) setup.py install\r
+--install-layout=deb --root=$(CURDIR)/debian/tmp\r
+-       dh_auto_build --sourcedirectory bindings/ruby\r
+-       cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp\r
++       dh_auto_install --sourcedirectory bindings/ruby\r
+\r
+ # ruby's site is configured in /usr/local\r
+ override_dh_usrlocal:\r
+\r
+Cheers.\r
+\r
+-- \r
+Felipe Contreras\r