[PATCH] debian: package ruby bindings

classic Classic list List threaded Threaded
25 messages Options
12
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

[PATCH] debian: package ruby bindings

Signed-off-by: Felipe Contreras <[hidden email]>
---
 debian/control              | 14 ++++++++++++++
 debian/notmuch-ruby.install |  1 +
 debian/rules                |  9 +++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 debian/notmuch-ruby.install

diff --git a/debian/control b/debian/control
index 854a32a..620c5ce 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,7 @@ Build-Depends:
  libz-dev,
  python-all (>= 2.6.6-3~),
  python3-all (>= 3.1.2-7~),
+ ruby-dev,
  emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |
  emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
  gdb,
@@ -89,6 +90,19 @@ Description: Python 3 interface to the notmuch mail search and index library
  This package provides a Python 3 interface to the notmuch
  functionality, directly interfacing with a shared notmuch library.
 
+Package: notmuch-ruby
+Architecture: any
+Section: ruby
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Ruby interface to the notmuch mail search and index library
+ Notmuch is a system for indexing, searching, reading, and tagging
+ large collections of email messages in maildir or mh format. It uses
+ the Xapian library to provide fast, full-text search with a very
+ convenient search syntax.
+ .
+ This package provides a Ruby interface to the notmuch
+ functionality, directly interfacing with a shared notmuch library.
+
 Package: notmuch-emacs
 Architecture: all
 Section: mail
diff --git a/debian/notmuch-ruby.install b/debian/notmuch-ruby.install
new file mode 100644
index 0000000..f92f09c
--- /dev/null
+++ b/debian/notmuch-ruby.install
@@ -0,0 +1 @@
+usr/local/lib/site_ruby/*/*/notmuch.so
diff --git a/debian/rules b/debian/rules
index c4e3930..7c7247a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,15 +12,24 @@ override_dh_auto_build:
  dh_auto_build
  dh_auto_build --sourcedirectory bindings/python
  cd bindings/python && $(python3_all) setup.py build
+ dh_auto_build --sourcedirectory bindings/ruby
+ cd bindings/ruby && ruby extconf.rb && make
  $(MAKE) -C contrib/notmuch-mutt
 
 override_dh_auto_clean:
  dh_auto_clean
  dh_auto_clean --sourcedirectory bindings/python
  cd bindings/python && $(python3_all) setup.py clean -a
+ dh_auto_build --sourcedirectory bindings/ruby
+ cd bindings/ruby && test -f Makefile && make clean || true
  $(MAKE) -C contrib/notmuch-mutt clean
 
 override_dh_auto_install:
  dh_auto_install
  dh_auto_install --sourcedirectory bindings/python
  cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp
+ dh_auto_build --sourcedirectory bindings/ruby
+ cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp
+
+# ruby's site is configured in /usr/local
+override_dh_usrlocal:
--
1.8.2

_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Wed, Apr 3, 2013 at 5:27 PM, Felipe Contreras
<[hidden email]> wrote:
> Signed-off-by: Felipe Contreras <[hidden email]>
> ---
>  debian/control              | 14 ++++++++++++++
>  debian/notmuch-ruby.install |  1 +
>  debian/rules                |  9 +++++++++
>  3 files changed, 24 insertions(+)
>  create mode 100644 debian/notmuch-ruby.install

No comments? Should I push this?

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Sat, Apr 13 2013, Felipe Contreras <[hidden email]> wrote:

> On Wed, Apr 3, 2013 at 5:27 PM, Felipe Contreras
> <[hidden email]> wrote:
>> Signed-off-by: Felipe Contreras <[hidden email]>
>> ---
>>  debian/control              | 14 ++++++++++++++
>>  debian/notmuch-ruby.install |  1 +
>>  debian/rules                |  9 +++++++++
>>  3 files changed, 24 insertions(+)
>>  create mode 100644 debian/notmuch-ruby.install
>
> No comments? Should I push this?

How do we ensure that ruby package is working in every release;
there seems to be no tests for it ?

> --
> Felipe Contreras

Tomi
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Sat, Apr 13, 2013 at 1:14 AM, Tomi Ollila <[hidden email]> wrote:

> On Sat, Apr 13 2013, Felipe Contreras <[hidden email]> wrote:
>
>> On Wed, Apr 3, 2013 at 5:27 PM, Felipe Contreras
>> <[hidden email]> wrote:
>>> Signed-off-by: Felipe Contreras <[hidden email]>
>>> ---
>>>  debian/control              | 14 ++++++++++++++
>>>  debian/notmuch-ruby.install |  1 +
>>>  debian/rules                |  9 +++++++++
>>>  3 files changed, 24 insertions(+)
>>>  create mode 100644 debian/notmuch-ruby.install
>>
>> No comments? Should I push this?
>
> How do we ensure that ruby package is working in every release;
> there seems to be no tests for it ?

We probably should have tests, but how is that relevant to this patch?
The code is already there, and distributions are already shipping it:

https://projects.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/notmuch

If there's reason to be worried about shipping something that doesn't
work, too late, we are already shipping it. And that's orthogonal to
this patch, shouldn't prevent it to be merged.

Cheers.

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

In reply to this post by Felipe Contreras
Felipe Contreras <[hidden email]> writes:

> On Wed, Apr 3, 2013 at 5:27 PM, Felipe Contreras
> <[hidden email]> wrote:
>> Signed-off-by: Felipe Contreras <[hidden email]>
>> ---
>>  debian/control              | 14 ++++++++++++++
>>  debian/notmuch-ruby.install |  1 +
>>  debian/rules                |  9 +++++++++
>>  3 files changed, 24 insertions(+)
>>  create mode 100644 debian/notmuch-ruby.install
>
> No comments? Should I push this?
>

Hi Felipe;

Mainly I've been busy.  I need to double check the ruby packaging with
somebody else. So, please continue to be patient, and not modify the
stuff in ./debian.

Thanks

d
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Sat, Apr 13, 2013 at 6:35 AM, David Bremner <[hidden email]> wrote:
> Felipe Contreras <[hidden email]> writes:
> Mainly I've been busy.  I need to double check the ruby packaging with
> somebody else. So, please continue to be patient, and not modify the
> stuff in ./debian.

All right. I installed debian squeeze through debootstrap to test
this, and everything worked fine except for dh_python3 renaming .so
files, but that happened also for /usr/lib/libnotmuch.so, which makes
me think that dh_python3 is all buggy and nobody is really using it at
this point.

Cheers.

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

Felipe Contreras <[hidden email]> writes:

> On Sat, Apr 13, 2013 at 6:35 AM, David Bremner <[hidden email]> wrote:
>> Felipe Contreras <[hidden email]> writes:
>> Mainly I've been busy.  I need to double check the ruby packaging with
>> somebody else. So, please continue to be patient, and not modify the
>> stuff in ./debian.
>
> All right. I installed debian squeeze through debootstrap to test
> this, and everything worked fine except for dh_python3 renaming .so
> files, but that happened also for /usr/lib/libnotmuch.so, which makes
> me think that dh_python3 is all buggy and nobody is really using it at
> this point.

Hi Felipe;

Probably you should test in unstable (sid) since that's where the
official packages get built. It's also a newer version of python3 (and
hence dh_python3).

The current packages are multi-arch, so they actually install into
/usr/lib/$(arch_triple)/libnotmuch.so; I'm not sure if that is a typo on
your part, or something is wrong there as well.

d
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Sat, Apr 13, 2013 at 10:00 AM, David Bremner <[hidden email]> wrote:

> Probably you should test in unstable (sid) since that's where the
> official packages get built. It's also a newer version of python3 (and
> hence dh_python3).

I'll give that a try.

> The current packages are multi-arch, so they actually install into
> /usr/lib/$(arch_triple)/libnotmuch.so; I'm not sure if that is a typo on
> your part, or something is wrong there as well.

Not according to debian:
http://packages.debian.org/sid/amd64/libnotmuch-dev/filelist

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

Felipe Contreras <[hidden email]> writes:

>
> Not according to debian:
> http://packages.debian.org/sid/amd64/libnotmuch-dev/filelist
>

The latest is in experimental (because of the freeze)

  http://packages.debian.org/experimental/amd64/libnotmuch-dev/filelist

d

_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

In reply to this post by Felipe Contreras
Felipe Contreras <[hidden email]> writes:

>
> diff --git a/debian/control b/debian/control
> index 854a32a..620c5ce 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -15,6 +15,7 @@ Build-Depends:
>   libz-dev,
>   python-all (>= 2.6.6-3~),
>   python3-all (>= 3.1.2-7~),
> + ruby-dev,
>   emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |
>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
>   gdb,

This doesn't build in a clean sid chroot, because ruby-dev does not
depend on ruby, so you need to explicitly add it.

>  Package: notmuch-emacs
>  Architecture: all
>  Section: mail
> diff --git a/debian/notmuch-ruby.install b/debian/notmuch-ruby.install
> new file mode 100644
> index 0000000..f92f09c
> --- /dev/null
> +++ b/debian/notmuch-ruby.install
> @@ -0,0 +1 @@
> +usr/local/lib/site_ruby/*/*/notmuch.so
> diff --git a/debian/rules b/debian/rules
> index c4e3930..7c7247a 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -12,15 +12,24 @@ override_dh_auto_build:
>   dh_auto_build
>   dh_auto_build --sourcedirectory bindings/python
>   cd bindings/python && $(python3_all) setup.py build
> + dh_auto_build --sourcedirectory bindings/ruby
> + cd bindings/ruby && ruby extconf.rb && make

Why are both these lines needed? On a related note, is the ruby build
procedure documented somewhere?

>  override_dh_auto_clean:
>   dh_auto_clean
>   dh_auto_clean --sourcedirectory bindings/python
>   cd bindings/python && $(python3_all) setup.py clean -a
> + dh_auto_build --sourcedirectory bindings/ruby
> + cd bindings/ruby && test -f Makefile && make clean || true
>   $(MAKE) -C contrib/notmuch-mutt clean

This looks suspect, calling dh_auto_build from the clean target. The
clean target cannot assume that e.g. notmuch is already built.

>  override_dh_auto_install:
>   dh_auto_install
>   dh_auto_install --sourcedirectory bindings/python
>   cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp
> + dh_auto_build --sourcedirectory bindings/ruby
> + cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp

This call to dh_auto_build also confuses me. The top level sequencer
will ensure that the override_dh_auto_build is called before this one.

> +
> +# ruby's site is configured in /usr/local
> +override_dh_usrlocal:

The package is still installing files into /usr/local, which is a
violation of debian policy 9.1.2

It's a good idea to run "lintian" on the resulting debian packages;
that's how I caught the problem with /usr/local.

d


_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Sun, Apr 14, 2013 at 8:52 AM, David Bremner <[hidden email]> wrote:

> Felipe Contreras <[hidden email]> writes:
>
>>
>> diff --git a/debian/control b/debian/control
>> index 854a32a..620c5ce 100644
>> --- a/debian/control
>> +++ b/debian/control
>> @@ -15,6 +15,7 @@ Build-Depends:
>>   libz-dev,
>>   python-all (>= 2.6.6-3~),
>>   python3-all (>= 3.1.2-7~),
>> + ruby-dev,
>>   emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |
>>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
>>   gdb,
>
> This doesn't build in a clean sid chroot, because ruby-dev does not
> depend on ruby, so you need to explicitly add it.

Right, I just found that too.

>>  Package: notmuch-emacs
>>  Architecture: all
>>  Section: mail
>> diff --git a/debian/notmuch-ruby.install b/debian/notmuch-ruby.install
>> new file mode 100644
>> index 0000000..f92f09c
>> --- /dev/null
>> +++ b/debian/notmuch-ruby.install
>> @@ -0,0 +1 @@
>> +usr/local/lib/site_ruby/*/*/notmuch.so
>> diff --git a/debian/rules b/debian/rules
>> index c4e3930..7c7247a 100755
>> --- a/debian/rules
>> +++ b/debian/rules
>> @@ -12,15 +12,24 @@ override_dh_auto_build:
>>       dh_auto_build
>>       dh_auto_build --sourcedirectory bindings/python
>>       cd bindings/python && $(python3_all) setup.py build
>> +     dh_auto_build --sourcedirectory bindings/ruby
>> +     cd bindings/ruby && ruby extconf.rb && make
>
> Why are both these lines needed?

The first one isn't.

> On a related note, is the ruby build
> procedure documented somewhere?

Not really, it's just standard.

>>  override_dh_auto_clean:
>>       dh_auto_clean
>>       dh_auto_clean --sourcedirectory bindings/python
>>       cd bindings/python && $(python3_all) setup.py clean -a
>> +     dh_auto_build --sourcedirectory bindings/ruby
>> +     cd bindings/ruby && test -f Makefile && make clean || true
>>       $(MAKE) -C contrib/notmuch-mutt clean
>
> This looks suspect, calling dh_auto_build from the clean target.

A mistake, probably the first line is enough.

> The
> clean target cannot assume that e.g. notmuch is already built.

It doesn't, that's what the 'test -f Makefile' was for.

>>  override_dh_auto_install:
>>       dh_auto_install
>>       dh_auto_install --sourcedirectory bindings/python
>>       cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp
>> +     dh_auto_build --sourcedirectory bindings/ruby
>> +     cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp
>
> This call to dh_auto_build also confuses me. The top level sequencer
> will ensure that the override_dh_auto_build is called before this one.

A mistake.

>> +
>> +# ruby's site is configured in /usr/local
>> +override_dh_usrlocal:
>
> The package is still installing files into /usr/local, which is a
> violation of debian policy 9.1.2
>
> It's a good idea to run "lintian" on the resulting debian packages;
> that's how I caught the problem with /usr/local.

Tell that to debian maintainers who configure ruby that way:

require 'rbconfig'
RbConfig::CONFIG['sitelibdir']
=> "/usr/local/lib/site_ruby/1.9.1"
RbConfig::CONFIG['configure_args']
=> " '--build=x86_64-linux-gnu' '--prefix=/usr'
'--includedir=/usr/include' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var'
'--libexecdir=/usr/lib/ruby1.9.1' '--srcdir=.'
'--disable-maintainer-mode' '--disable-dependency-tracking'
'--disable-silent-rules' '--enable-pthread' '--enable-shared'
'--disable-rpath' '--disable-install-doc'
'--with-vendordir=/usr/lib/ruby/vendor_ruby'
'--with-sitedir=/usr/local/lib/site_ruby' '--program-suffix=1.9.1'
'--with-soname=ruby-1.9.1' '--with-baseruby=/usr/bin/ruby1.8'
'--enable-ipv6' '--with-dbm-type=gdbm_compat' '--with-tklib=tk8.5'
'--with-tcllib=tcl8.5' '--with-tcl-include=/usr/include/tcl8.5'
'--with-bundled-sha1' '--with-bundled-md5' '--with-bundled-rmd160'
'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall
-fno-strict-aliasing' 'LDFLAGS=-Wl,-z,relro'
'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall
-fno-strict-aliasing'"

So, the changes I propose are:

--- b/debian/control
+++ a/debian/control
@@ -15,7 +15,7 @@ Build-Depends:
  libz-dev,
  python-all (>= 2.6.6-3~),
  python3-all (>= 3.1.2-7~),
- ruby-dev,
+ ruby, ruby-dev,
  emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |
  emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),
  gdb,
diff --git b/debian/rules a/debian/rules
index 7c7247a..1dd59d2 100755
--- b/debian/rules
+++ a/debian/rules
@@ -12,7 +12,6 @@ override_dh_auto_build:
        dh_auto_build
        dh_auto_build --sourcedirectory bindings/python
        cd bindings/python && $(python3_all) setup.py build
-       dh_auto_build --sourcedirectory bindings/ruby
        cd bindings/ruby && ruby extconf.rb && make
        $(MAKE) -C contrib/notmuch-mutt

@@ -20,16 +19,14 @@ override_dh_auto_clean:
        dh_auto_clean
        dh_auto_clean --sourcedirectory bindings/python
        cd bindings/python && $(python3_all) setup.py clean -a
-       dh_auto_build --sourcedirectory bindings/ruby
-       cd bindings/ruby && test -f Makefile && make clean || true
+       dh_auto_clean --sourcedirectory bindings/ruby
        $(MAKE) -C contrib/notmuch-mutt clean

 override_dh_auto_install:
        dh_auto_install
        dh_auto_install --sourcedirectory bindings/python
        cd bindings/python && $(python3_all) setup.py install
--install-layout=deb --root=$(CURDIR)/debian/tmp
-       dh_auto_build --sourcedirectory bindings/ruby
-       cd bindings/ruby && make install DESTDIR=$(CURDIR)/debian/tmp
+       dh_auto_install --sourcedirectory bindings/ruby

 # ruby's site is configured in /usr/local
 override_dh_usrlocal:

Cheers.

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

Felipe Contreras <[hidden email]> writes:
>> The package is still installing files into /usr/local, which is a
>> violation of debian policy 9.1.2
>>
>> It's a good idea to run "lintian" on the resulting debian packages;
>> that's how I caught the problem with /usr/local.
>
> Tell that to debian maintainers who configure ruby that way:

[ ruby config deleted ]

I don't know if there is a bug in the Debian ruby package or not, but
that does not change whether our package is allowed to install into
/usr/local.  I suspect the argument is that those defaults are sensible
for admins installing ruby packages on their own systems without using
the debian package system.


> So, the changes I propose are:

the changes look sensible, but I suppose it still installs into
/usr/local?

d
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

In reply to this post by Felipe Contreras
Felipe Contreras <[hidden email]> writes:


>> On a related note, is the ruby build
>> procedure documented somewhere?
>
> Not really, it's just standard.
>

OK, but that doesn't really help us deal with support requests e.g. on IRC.
Some "feature requests" for the bindings:

1. Add a short README describing how to build, and how to read the docs
(it looks like there is a public)

2. Add a couple tests at least reaching the (low) bar set by the python
   bindings

3. Build and install the docs locally as part of the (in-progress)
debian package


d
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Mon, Apr 15, 2013 at 5:34 AM, David Bremner <[hidden email]> wrote:

> Felipe Contreras <[hidden email]> writes:
>
>
>>> On a related note, is the ruby build
>>> procedure documented somewhere?
>>
>> Not really, it's just standard.
>>
>
> OK, but that doesn't really help us deal with support requests e.g. on IRC.
> Some "feature requests" for the bindings:

Can you point to some of these requests, or are they hypothetical?
Moreover, wouldn't making sure that the bindings are package mostly
solve this issue?

> 1. Add a short README describing how to build, and how to read the docs
> (it looks like there is a public)
>
> 2. Add a couple tests at least reaching the (low) bar set by the python
>    bindings
>
> 3. Build and install the docs locally as part of the (in-progress)
> debian package

That would be good, but it's out of scope for this patch.

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

In reply to this post by David Bremner-3
On Mon, Apr 15, 2013 at 5:24 AM, David Bremner <[hidden email]> wrote:

> Felipe Contreras <[hidden email]> writes:
>>> The package is still installing files into /usr/local, which is a
>>> violation of debian policy 9.1.2
>>>
>>> It's a good idea to run "lintian" on the resulting debian packages;
>>> that's how I caught the problem with /usr/local.
>>
>> Tell that to debian maintainers who configure ruby that way:
>
> [ ruby config deleted ]
>
> I don't know if there is a bug in the Debian ruby package or not, but
> that does not change whether our package is allowed to install into
> /usr/local.  I suspect the argument is that those defaults are sensible
> for admins installing ruby packages on their own systems without using
> the debian package system.

I asked the debian ruby packages and looked everywhere, but there was
no guidance at all. Nonetheless I think this does the trick:

--- a/debian/notmuch-ruby.install
+++ b/debian/notmuch-ruby.install
@@ -1 +1 @@
-usr/local/lib/site_ruby/*/*/notmuch.so
+usr/lib/ruby/vendor_ruby/*/*/notmuch.so
diff --git a/debian/rules b/debian/rules
index 1dd59d2..fed680b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ override_dh_auto_build:
        dh_auto_build
        dh_auto_build --sourcedirectory bindings/python
        cd bindings/python && $(python3_all) setup.py build
-       cd bindings/ruby && ruby extconf.rb && make
+       cd bindings/ruby && ruby extconf.rb --vendor && make
        $(MAKE) -C contrib/notmuch-mutt

 override_dh_auto_clean:

Cheers.

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

In reply to this post by Felipe Contreras
Felipe Contreras <[hidden email]> writes:

> On Mon, Apr 15, 2013 at 5:34 AM, David Bremner <[hidden email]> wrote:
>>
>> OK, but that doesn't really help us deal with support requests e.g. on IRC.
>> Some "feature requests" for the bindings:
>
> Can you point to some of these requests, or are they hypothetical?

I don't know how many support requests we've got, but yes, I remember at
least one.

> Moreover, wouldn't making sure that the bindings are package mostly
> solve this issue?

Well, people wouldn't have to build and install the bindings, _if_ they
happened to be using an OS with packages available. But not everyone
uses binary packages. I guess for me it's just a software quality issue
to have some minimal level of documentation.

>> 1. Add a short README describing how to build, and how to read the docs
>> (it looks like there is a public)
>>
>> 2. Add a couple tests at least reaching the (low) bar set by the python
>>    bindings
>>
>> 3. Build and install the docs locally as part of the (in-progress)
>> debian package
>
> That would be good, but it's out of scope for this patch.

That's why they're feature requests.  

On the other hand, there is some time to clean things up since I won't
upload new packages to Debian before the next notmuch release. And I do
consider uploading a package to Debian to be an extra personal
responsibility, especially when it is part of notmuch that I am not
maintaining.

all the best,

d


_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Tue, Apr 23, 2013 at 6:35 PM, David Bremner <[hidden email]> wrote:

> Felipe Contreras <[hidden email]> writes:
>
>> On Mon, Apr 15, 2013 at 5:34 AM, David Bremner <[hidden email]> wrote:
>>>
>>> OK, but that doesn't really help us deal with support requests e.g. on IRC.
>>> Some "feature requests" for the bindings:
>>
>> Can you point to some of these requests, or are they hypothetical?
>
> I don't know how many support requests we've got, but yes, I remember at
> least one.

That's not a huge motivation.

>> Moreover, wouldn't making sure that the bindings are package mostly
>> solve this issue?
>
> Well, people wouldn't have to build and install the bindings, _if_ they
> happened to be using an OS with packages available. But not everyone
> uses binary packages. I guess for me it's just a software quality issue
> to have some minimal level of documentation.

If somebody needs that information it's very easy find, just googling
'notmuch ruby bindings', or looking at the way packages do it, which
this patch actually helps to solve.

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

In reply to this post by David Bremner-3
On Tue, Apr 23, 2013 at 6:35 PM, David Bremner <[hidden email]> wrote:

> On the other hand, there is some time to clean things up since I won't
> upload new packages to Debian before the next notmuch release. And I do
> consider uploading a package to Debian to be an extra personal
> responsibility, especially when it is part of notmuch that I am not
> maintaining.

I understand that you are not going to work on the Debian packages for
some time, but what prevents this patch from being merged to notmuch
'master'? Is there any problems with the patch? Shall I just push it?

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-3 David Bremner-3
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

Felipe Contreras <[hidden email]> writes:
>
> I understand that you are not going to work on the Debian packages for
> some time, but what prevents this patch from being merged to notmuch
> 'master'? Is there any problems with the patch? Shall I just push it?

The Debian packaging in master is the `live' packaging that generates
the packages that are uploaded to Debian. So effectively you are asking
me "Are you willing to upload this package to Debian". I'm not sure
about that yet.  Don't take it personally, there are currently 71
patches in the review queue. More reviews are always welcome ;).

d
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
Felipe Contreras Felipe Contreras
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] debian: package ruby bindings

On Sun, Apr 28, 2013 at 8:22 PM, David Bremner <[hidden email]> wrote:

> Felipe Contreras <[hidden email]> writes:
>>
>> I understand that you are not going to work on the Debian packages for
>> some time, but what prevents this patch from being merged to notmuch
>> 'master'? Is there any problems with the patch? Shall I just push it?
>
> The Debian packaging in master is the `live' packaging that generates
> the packages that are uploaded to Debian. So effectively you are asking
> me "Are you willing to upload this package to Debian". I'm not sure
> about that yet.  Don't take it personally, there are currently 71
> patches in the review queue. More reviews are always welcome ;).

I don't take it personally, I just don't see why a part of the project
has to be treated differently because you (the debian packager), don't
want to setup a separate git repo where to have this 'live' packaging
(or even a separate branch).

--
Felipe Contreras
_______________________________________________
notmuch mailing list
[hidden email]
http://notmuchmail.org/mailman/listinfo/notmuch
12