Author xdegaye
Recipients Alex.Willmer, martin.panter, pitrou, xdegaye
Date 2017-10-30.10:48:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509360524.61.0.213398074469.issue31114@psf.upfronthosting.co.za>
In-reply-to
Content
To test PR 4172 on linux one needs a chroot. The following test is run on archlinux using systemd-nspawn (a chroot on steroids, see https://wiki.archlinux.org/index.php/Systemd-nspawn).

1) Setup systemd-nspawn by installing arch-install-scripts and by using pacstrap to install the archlinux 'base' package group in the /tmp/chroot container, this installs about 600M of archlinux packages in the chroot:
  $ mkdir /tmp/chroot
  $ pacman -S arch-install-scripts
  # pacstrap -i -c -d /tmp/chroot base --ignore linux

2) Build and install Python in the /tmp/python-build DESTDIR directory:
  $ mkdir /tmp/python-build
  $ ./configure --prefix=/ --without-ensurepip && make
  $ make DESTDIR=/tmp/python-build install

3) Copy the Python distribution to the chroot directory (note the trailing slash in the source directory):
  # rsync -av --keep-dirlinks /tmp/python-build/ /tmp/chroot

4) Boot into the chroot container and run python:
  # systemd-nspawn -b -D /tmp/chroot
  ...
  [  OK  ] Started Console Getty.
  [  OK  ] Reached target Login Prompts.
  [  OK  ] Started Login Service.
  [  OK  ] Reached target Multi-User System.
  [  OK  ] Reached target Graphical Interface.
  [  OK  ] Started Rotate log files.

  Arch Linux 4.13.4-1-ARCH (console)

  chroot login: root
  Last login: Mon Oct 30 10:54:11 on console
  [root@chroot ~]# python3.7
  Python 3.7.0a2+ (heads/bpo-31114:ffa5bff252, Oct 30 2017, 11:24:54)
  [GCC 7.2.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import abc, _bisect, sysconfig, sys
  >>> sys.prefix
  '/usr'
  >>> sysconfig.get_config_var('prefix')
  '/.'
  >>> sys.exit(0)
  [root@chroot ~]# poweroff
  ...
  [  OK  ] Reached target Shutdown.
  Container chroot has been shut down.
History
Date User Action Args
2017-10-30 10:48:44xdegayesetrecipients: + xdegaye, pitrou, martin.panter, Alex.Willmer
2017-10-30 10:48:44xdegayesetmessageid: <1509360524.61.0.213398074469.issue31114@psf.upfronthosting.co.za>
2017-10-30 10:48:44xdegayelinkissue31114 messages
2017-10-30 10:48:44xdegayecreate