[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting dh_install to do what we need

After looking at the bugs that are solved with this change, I don't think
it's an unreasonable solution. That said, I think it feels incomplete.

On Wed, Dec 07, 2011 at 11:47:49PM +0100, Josselin Mouette wrote:
> So, to sum it up. Before, you would do in debian/rules: 
>         sed s/@DEB_HOST_MULTIARCH@/${DEB_HOST_MULTIARCH}/ debian/libfoo.install.in > debian/libfoo.install
> Now, you will do in debian/foo.install:
>         #! /bin/sh 
>         sed s/@DEB_HOST_MULTIARCH@/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/ << EOF
>         …
>         EOF

This doesn't work with source-format-1 packages without adding "chmod"
lines for the scripted debhelper config files in the rules file. Perhaps
this isn't a big deal since we should all be using source-format-3 anyway.

The debhelper config scripts do not run in the same environment as the
rules file, so none of the environment variables available there are
available to the config scripts. This means either adding "export" lines to
the rules file (which means you can't have a nice 2-line rules file), or
it means manually re-establishing the environment in the config scripts,
which seems wasteful since dh has already done all the magic to establish
the environment.

I think it would make sense to support the common case, and that appears to
be environment variable replacements (235302, 477625, 614731, 642129), with
general filtering a close second (372310, 438601, 632860).

So, how about:

- Have debhelper do the executable marking in some way. (Yet another
  config to list the config scripts?) Or, I guess, just ignore this
  problem since it's only a problem in source-format-1.

- Export DEB_* environment variables to the script. This really feels
  like the missing piece to me.


Kees Cook                                            @debian.org

Reply to: