dell-xps-9560-ubuntu-respin icon indicating copy to clipboard operation
dell-xps-9560-ubuntu-respin copied to clipboard

Error during ISO building with Linux Mint 19.1 (using docker)

Open Bogardo opened this issue 5 years ago • 2 comments

$ ./docker-respin.sh origin/linuxmint-19.1-cinnamon-64bit.iso -c bionicbeaver 

Found Docker Hub image!
Iso: linuxmint-19.1-cinnamon-64bit.iso
Input dir: /home/<user>/dell-xps-9560-ubuntu-respin/origin
Output dir: /home/<user>/dell-xps-9560-ubuntu-respin/destination
"docker rm" requires at least 1 argument.
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
default via 172.17.0.1 dev eth0 172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.2
Gateway: 172.17.0.1
Internet test passed.
Images found in folder:
linuxmint-19.1-cinnamon-64bit.iso  readme.md  ubuntu-18.04.1-desktop-amd64.iso
Starting process...
Kernel arguments found!
respin linuxmint-19.1-cinnamon-64bit.iso -c bionicbeaver
./build.sh linuxmint-19.1-cinnamon-64bit.iso -c bionicbeaver --docker
Setting compatibility...
Called from docker...
isorespin.sh -i /docker-input/linuxmint-19.1-cinnamon-64bit.iso
Extracting ISO ...
Parallel unsquashfs: Using 8 processors
241107 inodes (261597 blocks) to write

[=======================================================================================================================================================================================================================|] 261597/261597 100%

created 176381 files
created 21124 directories
created 64616 symlinks
created 81 devices
created 0 fifos
Extracting isorespin files ...
Processing bootloader/bootmanager ...
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
Adding repositories ...
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
You are about to add the following PPA:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1689, in <module>
    add_repository_via_cli(ppa_line, codename, options.forceYes, use_ppas)
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 143, in add_repository_via_cli
    print(" %s" % (ppa_info["description"]))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 919-922: ordinal not in range(128)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 546, in add_proc_info
    self['ExecutablePath'] = os.readlink('/proc/' + pid + '/exe')
FileNotFoundError: [Errno 2] No such file or directory: '/proc/19195/exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 109, in apport_excepthook
    pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
  File "/usr/lib/python3/dist-packages/apport/report.py", line 549, in add_proc_info
    raise ValueError('invalid process')
ValueError: invalid process

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1689, in <module>
    add_repository_via_cli(ppa_line, codename, options.forceYes, use_ppas)
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 143, in add_repository_via_cli
    print(" %s" % (ppa_info["description"]))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 919-922: ordinal not in range(128)
./isorespin.sh: Adding repository 'ppa:graphics-drivers/ppa' failed.

Doing this with the ubuntu-18.04.1-desktop-amd64.iso works without issues.

Bogardo avatar Jan 08 '19 16:01 Bogardo

I just ran into the same problem, but while building on my local host without docker.

./build.sh linuxmint-19.1-cinnamon-64bit.iso -c bionicbeaver 
Setting compatibility...
isorespin.sh -i linuxmint-19.1-cinnamon-64bit.iso
Extracting ISO ...
Parallel unsquashfs: Using 8 processors
241107 inodes (261597 blocks) to write

[=========================================================\] 261597/261597 100%

created 176381 files
created 21124 directories
created 64616 symlinks
created 81 devices
created 0 fifos
Extracting isorespin files ...
Processing bootloader/bootmanager ...
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
Adding repositories ...
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
You are about to add the following PPA:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1689, in <module>
    add_repository_via_cli(ppa_line, codename, options.forceYes, use_ppas)
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 143, in add_repository_via_cli
    print(" %s" % (ppa_info["description"]))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 919-922: ordinal not in range(128)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 546, in add_proc_info
    self['ExecutablePath'] = os.readlink('/proc/' + pid + '/exe')
FileNotFoundError: [Errno 2] No such file or directory: '/proc/29431/exe'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 109, in apport_excepthook
    pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
  File "/usr/lib/python3/dist-packages/apport/report.py", line 549, in add_proc_info
    raise ValueError('invalid process')
ValueError: invalid process

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1689, in <module>
    add_repository_via_cli(ppa_line, codename, options.forceYes, use_ppas)
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 143, in add_repository_via_cli
    print(" %s" % (ppa_info["description"]))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 919-922: ordinal not in range(128)
./isorespin.sh: Adding repository 'ppa:graphics-drivers/ppa' failed.

arjenveenhuizen avatar Feb 03 '19 12:02 arjenveenhuizen

I was able to work-around the issue by making the following change to isorespin.sh

From 0e29df671223dc4682e8ebd75437cef9816d578b Mon Sep 17 00:00:00 2001
From: Arjen Veenhuizen <[email protected]>
Date: Sun, 3 Feb 2019 14:18:53 +0100
Subject: [PATCH] Set default locale (LC_ALL=C.UTF-8) when adding apt
 repository to FIX #49

---
 isorespin.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 isorespin.sh

diff --git a/isorespin.sh b/isorespin.sh
old mode 100644
new mode 100755
index badf809..2b17eed
--- a/isorespin.sh
+++ b/isorespin.sh
@@ -2729,7 +2729,7 @@ export LC_ALL=C
 trap '' SIGHUP SIGINT SIGTERM
 cd /usr/src
 apt-get update
-add-apt-repository -y "${REPOSITORY_TO_ADD}" > .repository.log 2>&1
+LC_ALL=C.UTF-8 add-apt-repository -y "${REPOSITORY_TO_ADD}" > .repository.log 2>&1
 REPOSITORY_ADDED=\$?
 if [ \${REPOSITORY_ADDED} != 0 ]; then
 	echo "${REPOSITORY_TO_ADD}" > .repository.failed
@@ -2807,7 +2807,7 @@ export LC_ALL=C
 trap '' SIGHUP SIGINT SIGTERM
 cd /usr/src
 apt-get update
-add-apt-repository -r -y "${ROLLING_REPOSITORY}" > .repository.log 2>&1
+LC_ALL=C.UTF-8 add-apt-repository -r -y "${ROLLING_REPOSITORY}" > .repository.log 2>&1
 REPOSITORY_REMOVED=\$?
 if [ \${REPOSITORY_REMOVED} != 0 ]; then
 	echo "${ROLLING_REPOSITORY}" > .repository.failed
-- 
2.17.1


Feel free to apply it upstream :)

arjenveenhuizen avatar Feb 03 '19 13:02 arjenveenhuizen