public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Jim Davis <jim.epost@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Ben Hutchings <ben.hutchings@codethink.co.uk>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Konrad Schwarz <konrad.schwarz@siemens.com>
Subject: Re: [PATCH] builddeb: introduce variables for control-file customization
Date: Tue, 28 Nov 2017 09:41:56 +0100	[thread overview]
Message-ID: <20171128094156.4f2f1cf9@md1em3qc> (raw)
In-Reply-To: <CA+r1Zhho-mqtM6Z76pCPFOvxO3n0KR_2Q6fLXJvtBZv5YSU24Q@mail.gmail.com>

Am Mon, 27 Nov 2017 16:57:58 -0700
schrieb Jim Davis <jim.epost@gmail.com>:

> On Mon, Nov 27, 2017 at 9:13 AM, Henning Schild
> <henning.schild@siemens.com> wrote:
> > The debian packages coming out of "make *deb-pkg" lack some critical
> > information in the control-files e.g. the "Depends:" field. If one
> > tries to install a fresh system with such a "linux-image"
> > debootstrap or multistrap might try to install the kernel before
> > its deps and the package hooks will fail.  
> 
> Has that shown up in practice?  The builddeb script goes back some
> years now...

Yes it has, i came across this issue with a multistrap-based installer.
The kernel got picked as one of the first packages. Without explicit
deps i can only assume that deboostrap should be affected as well.
Maybe it processes the package-tree in another order and happens to
work by chance.
My guess is that most people use the builddeb script to install
additional kernels on a running system, so the missing deps never
showed.

That said, the patch would allow for much more customization than just
adding deps. But others might want to customize the other fields as
well.

> > +       eval 'create_package "$kernel_headers_packagename" \
> > +               "$kernel_headers_dir"' "$KDEB_OPTS_IMAGE_HEADERS"  
> 
> eval in a shell script with arbitrary input can lead to shenanigans
> like
> 
> make bindeb-pkg KDEB_OPTS_IMAGE_HEADERS="; echo All your base"
> 
> and other potentially nastier things.  Probably not an issue for a
> typical kernel developer sitting in front of his or her laptop, but if
> I ran a big automated unattended build farm I might prefer a non-eval
> alternative.

True. As you said, that might not be an issue for most people. Let us
discuss the general approach first. If we agree on applying such a
patch and others also raise this issue we might find an implementation
without the eval.
That is a first shot that can handle the kinds of strings one might
want to pass to dpkg-gencontrol. (spaces, pipes and multiple options).

Henning


  reply	other threads:[~2017-11-28  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 16:13 [PATCH] builddeb: introduce variables for control-file customization Henning Schild
2017-11-27 23:57 ` Jim Davis
2017-11-28  8:41   ` Henning Schild [this message]
2017-12-01 16:51 ` Ben Hutchings
2017-12-01 18:34   ` Henning Schild
2017-12-01 18:47     ` Ben Hutchings
2017-12-04  9:01       ` Henning Schild
2017-12-04 13:15         ` Riku Voipio
2017-12-04 14:35         ` Ben Hutchings
2017-12-04 16:48 ` [PATCH v2] scripts: builddeb: allow customization of "Depends:" fields Henning Schild
2017-12-04 16:50   ` Henning Schild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171128094156.4f2f1cf9@md1em3qc \
    --to=henning.schild@siemens.com \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=jim.epost@gmail.com \
    --cc=konrad.schwarz@siemens.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox