All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Petr Vorel <petr.vorel@gmail.com>, linux-kbuild@vger.kernel.org
Cc: Guillem Jover <guillem@hadrons.org>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [PATCH] builddeb: Fix build on non-Debian/Ubuntu distros
Date: Fri, 30 Oct 2020 17:14:32 +0000	[thread overview]
Message-ID: <12abc099c30681e88107bb468ba1795f197f02f8.camel@decadent.org.uk> (raw)
In-Reply-To: <20201030165607.290612-1-petr.vorel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

On Fri, 2020-10-30 at 17:56 +0100, Petr Vorel wrote:
> This fixes make bindeb-pkg for RPM based distros, which don't have
> dpkg-dev (and thus not /usr/bin/dpkg-buildpackage), which sets
> $DEB_RULES_REQUIRES_ROOT.
> 
> Fixes: 3e8541803624 ("builddeb: Enable rootless builds")

This doesn't seem to fix a bug, and in fact it would introduce one.

> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
[...]
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -37,7 +37,7 @@ create_package() {
>                 | xargs -r0 md5sum > DEBIAN/md5sums"
>  
>         # Fix ownership and permissions
> -       if [ "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then
> +       if [ -z "$DEB_RULES_REQUIRES_ROOT" -o "$DEB_RULES_REQUIRES_ROOT" = "no" ]; then
>                 dpkg_deb_opts="--root-owner-group"
>         else
>                 chown -R root:root "$pdir"

This is the wrong default behaviour; it will cause a regression with
older versions of dpkg that don't support this option.

If you invoke this script directly and do not use dpkg-buildpackage
(which I don't think is really supported anyway) then you must either
do so as root or use fakeroot (as dpkg-buildpackage does by default).

Ben.

-- 
Ben Hutchings
The first rule of tautology club is the first rule of tautology club.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-10-30 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 16:56 [PATCH] builddeb: Fix build on non-Debian/Ubuntu distros Petr Vorel
2020-10-30 17:14 ` Ben Hutchings [this message]
2020-10-30 18:57   ` Petr Vorel
2020-11-02  8:35     ` Masahiro Yamada
2020-11-02 19:05       ` Petr Vorel

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=12abc099c30681e88107bb468ba1795f197f02f8.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=guillem@hadrons.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=petr.vorel@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.