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

Bug#1007764: gcc-defaults: please support DPKG_ROOT



On 18.11.22 11:11, Johannes Schauer Marin Rodrigues wrote:
Hi doko,

Quoting Johannes Schauer Marin Rodrigues (2022-08-28 08:28:52)
On Wed, 17 Aug 2022 18:20:36 +0200 Johannes Schauer Marin Rodrigues <josch@debian.org> wrote:
On Wed, 16 Mar 2022 13:30:26 +0100 Johannes Schauer Marin Rodrigues <josch@debian.org> wrote:
when creating chroots for new architectures that are in the process of being
bootstrapped without yet having emulation support from qemu, it is not
possible to run maintainer scripts inside the foreign architecture chroot
because foreign architecture ELF binaries cannot be executed. The solution to
that problem is to run maintainer scripts from outside the chroot and use the
DPKG_ROOT environment variable to instruct the maintainer script on which
chroot to operate. By default, for normal installations, that environment
variable is set, but empty.

Apart from init-system-helpers and pam, all packages in the
Essential:yes set have support for DPKG_ROOT already. To start building
packages we also need to install build-essential.

Please consider applying the patch from this merge request:

https://salsa.debian.org/toolchain-team/gcc-defaults/-/merge_requests/4

We tested it in our CI environment and it produces a bit-by-bit
identical chroot with DPKG_ROOT compared to a normal installation.

https://salsa.debian.org/helmutg/dpkg-root-demo/

Since the DPKG_ROOT variable is empty on normal installations, the patch
should have no effect in the normal case.

I wanted to send a friendly ping about this bug. I see that since I filed this
bug, you uploaded three new versions of gcc-defaults. Please consider applying
the changes of above merge request against gcc-defaults on salsa. Here is the
diff in plain text for your convenience:

--- a/debian/g++.postinst.in
+++ b/debian/g++.postinst.in
@@ -2,9 +2,9 @@

  # remove the doc dir, if it's still a directory and replace with a symlink
  pkg=`basename $0 .postinst`
-if [ ! -L  /usr/share/doc/$pkg ]; then
-    rm -rf /usr/share/doc/$pkg
-    ln -s cpp /usr/share/doc/$pkg
+if [ ! -L  "$DPKG_ROOT/usr/share/doc/$pkg" ]; then
+    rm -rf "$DPKG_ROOT/usr/share/doc/$pkg"
+    ln -s cpp "$DPKG_ROOT/usr/share/doc/$pkg"
  fi

  # fix for report #138038: remove old diversions

I uploaded an NMU of gcc-defaults with the maximum delay of 15 days. Please
cancel if you disagree. Full debdiff attached.

my last NMU got cancelled because you uploaded a new version of gcc-defaults
while my NMU was still waiting in the delayed queue. On September 1, you told
me in #debian-devel that this bug is on your TODO list but now more than two
months have passed without anything having happened.

So I uploaded another NMU of gcc-defaults with the maximum delay of 15 days.
Please cancel if you disagree. Full debdiff attached.

that should not be uploaded, but the postinst just removed. I'll do that with the next upload


Thanks!

cheers, josch


Reply to: