Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues and errors in install script output in Ubuntu 18.10 (Ubuntu 18.04 LTS affected too) #36

Closed
dkorzhevin opened this issue Dec 4, 2018 · 11 comments
Assignees

Comments

@dkorzhevin
Copy link
Contributor

Hello, I met next errors and warnings in output:

$ ./install-open-eid.sh 
Adding RIA repository to APT sources list (/etc/apt/sources.list.d/ria-repository.list)
deb https://installer.id.ee/media/ubuntu/ cosmic main
Adding key to trusted key set (apt-key add)
0x592073D4 'RIA Software Signing Key <signing@ria.ee>'
OK
0xC6C83D68 'RIA Software Signing Key <signing@ria.ee>'
OK
Installing software (apt-get update && apt-get install open-eid)
Hit:1 http://ua.archive.ubuntu.com/ubuntu cosmic InRelease
Get:2 http://ua.archive.ubuntu.com/ubuntu cosmic-updates InRelease [83,2 kB]   
Get:3 http://ua.archive.ubuntu.com/ubuntu cosmic-backports InRelease [74,6 kB] 
Hit:4 http://linux.teamviewer.com/deb stable InRelease                         
Get:5 http://ua.archive.ubuntu.com/ubuntu cosmic-proposed InRelease [92,5 kB]  
Get:6 https://installer.id.ee/media/ubuntu cosmic InRelease [3 139 B]          
Hit:7 http://security.ubuntu.com/ubuntu cosmic-security InRelease              
Get:8 https://installer.id.ee/media/ubuntu cosmic/main amd64 Packages [6 849 B]
Get:9 https://installer.id.ee/media/ubuntu cosmic/main i386 Packages [1 731 B]
Fetched 262 kB in 1s (295 kB/s)           
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  awp chrome-token-signing firefox-pkcs11-loader libccid libdigidoc-common
  libdigidoc-tools libdigidoc2 libdigidocpp-common libdigidocpp-tools
  libdigidocpp1 libnss3-tools libxalan-c111 libxerces-c3.2 libxml-security-c20
  libzip4 opensc-pkcs11 pcscd qdigidoc-tera qdigidoc4
The following NEW packages will be installed:
  awp chrome-token-signing firefox-pkcs11-loader libccid libdigidoc-common
  libdigidoc-tools libdigidoc2 libdigidocpp-common libdigidocpp-tools
  libdigidocpp1 libnss3-tools libxalan-c111 libxerces-c3.2 libxml-security-c20
  libzip4 open-eid opensc opensc-pkcs11 pcscd qdigidoc-tera qdigidoc4
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.
Need to get 23,2 MB of archives.
After this operation, 68,1 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 libnss3-tools amd64 2:3.36.1-1ubuntu1 [870 kB]
Get:2 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 libccid amd64 1.4.29-2 [88,3 kB]
Get:3 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 pcscd amd64 1.8.23-3 [57,8 kB]
Get:4 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 libxerces-c3.2 amd64 3.2.1+debian-2 [851 kB]
Get:5 https://installer.id.ee/media/ubuntu cosmic/main amd64 awp amd64 5.3.0.18.04.75 [15,5 MB]
Get:6 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 libxalan-c111 amd64 1.11-8 [817 kB]
Get:7 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 libxml-security-c20 amd64 2.0.1-1 [256 kB]
Get:8 http://ua.archive.ubuntu.com/ubuntu cosmic/universe amd64 libzip4 amd64 1.1.2-1.1 [37,8 kB]
Get:9 https://installer.id.ee/media/ubuntu cosmic/main amd64 libdigidocpp-common all 3.13.8.1379-1804 [22,6 kB]
Get:10 https://installer.id.ee/media/ubuntu cosmic/main amd64 libdigidoc-common all 3.10.4.1218-1804 [21,6 kB]
Get:11 https://installer.id.ee/media/ubuntu cosmic/main amd64 libdigidoc2 amd64 3.10.4.1218-1804 [163 kB]
Get:12 https://installer.id.ee/media/ubuntu cosmic/main amd64 libdigidocpp1 amd64 3.13.8.1379-1804 [485 kB]
Get:13 https://installer.id.ee/media/ubuntu cosmic/main amd64 libdigidocpp-tools amd64 3.13.8.1379-1804 [242 kB]
Get:14 https://installer.id.ee/media/ubuntu cosmic/main amd64 opensc-pkcs11 amd64 0.19.0-0RIA3 [813 kB]
Get:15 https://installer.id.ee/media/ubuntu cosmic/main amd64 opensc amd64 0.19.0-0RIA3 [273 kB]
Get:16 https://installer.id.ee/media/ubuntu cosmic/main amd64 chrome-token-signing amd64 1:1.0.8.500-1804 [86,3 kB]
Get:17 https://installer.id.ee/media/ubuntu cosmic/main amd64 firefox-pkcs11-loader all 3.13.0.1074-1710 [11,5 kB]
Get:18 https://installer.id.ee/media/ubuntu cosmic/main amd64 libdigidoc-tools amd64 3.10.4.1218-1804 [29,6 kB]
Get:19 https://installer.id.ee/media/ubuntu cosmic/main amd64 qdigidoc4 amd64 4.2.0.43-1804 [2 098 kB]
Get:20 https://installer.id.ee/media/ubuntu cosmic/main amd64 qdigidoc-tera amd64 1.1.0.12-1804 [476 kB]
Get:21 https://installer.id.ee/media/ubuntu cosmic/main amd64 open-eid all 18.12.0.1815-1804 [3 576 B]
Fetched 23,2 MB in 13s (1 795 kB/s)                                            
Selecting previously unselected package libnss3-tools.
(Reading database ... 180985 files and directories currently installed.)
Preparing to unpack .../00-libnss3-tools_2%3a3.36.1-1ubuntu1_amd64.deb ...
Unpacking libnss3-tools (2:3.36.1-1ubuntu1) ...
Selecting previously unselected package libccid.
Preparing to unpack .../01-libccid_1.4.29-2_amd64.deb ...
Unpacking libccid (1.4.29-2) ...
Selecting previously unselected package pcscd.
Preparing to unpack .../02-pcscd_1.8.23-3_amd64.deb ...
Unpacking pcscd (1.8.23-3) ...
Selecting previously unselected package awp.
Preparing to unpack .../03-awp_5.3.0.18.04.75_amd64.deb ...
Unpacking awp (5.3.0.18.04.75) ...
Selecting previously unselected package libdigidocpp-common.
Preparing to unpack .../04-libdigidocpp-common_3.13.8.1379-1804_all.deb ...
Unpacking libdigidocpp-common (3.13.8.1379-1804) ...
Selecting previously unselected package libdigidoc-common.
Preparing to unpack .../05-libdigidoc-common_3.10.4.1218-1804_all.deb ...
Unpacking libdigidoc-common (3.10.4.1218-1804) ...
Selecting previously unselected package libdigidoc2:amd64.
Preparing to unpack .../06-libdigidoc2_3.10.4.1218-1804_amd64.deb ...
Unpacking libdigidoc2:amd64 (3.10.4.1218-1804) ...
Selecting previously unselected package libxerces-c3.2:amd64.
Preparing to unpack .../07-libxerces-c3.2_3.2.1+debian-2_amd64.deb ...
Unpacking libxerces-c3.2:amd64 (3.2.1+debian-2) ...
Selecting previously unselected package libxalan-c111:amd64.
Preparing to unpack .../08-libxalan-c111_1.11-8_amd64.deb ...
Unpacking libxalan-c111:amd64 (1.11-8) ...
Selecting previously unselected package libxml-security-c20:amd64.
Preparing to unpack .../09-libxml-security-c20_2.0.1-1_amd64.deb ...
Unpacking libxml-security-c20:amd64 (2.0.1-1) ...
Selecting previously unselected package libdigidocpp1:amd64.
Preparing to unpack .../10-libdigidocpp1_3.13.8.1379-1804_amd64.deb ...
Unpacking libdigidocpp1:amd64 (3.13.8.1379-1804) ...
Selecting previously unselected package libdigidocpp-tools.
Preparing to unpack .../11-libdigidocpp-tools_3.13.8.1379-1804_amd64.deb ...
Unpacking libdigidocpp-tools (3.13.8.1379-1804) ...
Selecting previously unselected package libzip4:amd64.
Preparing to unpack .../12-libzip4_1.1.2-1.1_amd64.deb ...
Unpacking libzip4:amd64 (1.1.2-1.1) ...
Selecting previously unselected package opensc-pkcs11:amd64.
Preparing to unpack .../13-opensc-pkcs11_0.19.0-0RIA3_amd64.deb ...
Unpacking opensc-pkcs11:amd64 (0.19.0-0RIA3) ...
Selecting previously unselected package opensc.
Preparing to unpack .../14-opensc_0.19.0-0RIA3_amd64.deb ...
Unpacking opensc (0.19.0-0RIA3) ...
Selecting previously unselected package chrome-token-signing.
Preparing to unpack .../15-chrome-token-signing_1%3a1.0.8.500-1804_amd64.deb ...
Unpacking chrome-token-signing (1:1.0.8.500-1804) ...
Selecting previously unselected package firefox-pkcs11-loader.
Preparing to unpack .../16-firefox-pkcs11-loader_3.13.0.1074-1710_all.deb ...
Unpacking firefox-pkcs11-loader (3.13.0.1074-1710) ...
Selecting previously unselected package libdigidoc-tools.
Preparing to unpack .../17-libdigidoc-tools_3.10.4.1218-1804_amd64.deb ...
Unpacking libdigidoc-tools (3.10.4.1218-1804) ...
Selecting previously unselected package qdigidoc4.
Preparing to unpack .../18-qdigidoc4_4.2.0.43-1804_amd64.deb ...
Unpacking qdigidoc4 (4.2.0.43-1804) ...
Selecting previously unselected package qdigidoc-tera.
Preparing to unpack .../19-qdigidoc-tera_1.1.0.12-1804_amd64.deb ...
Unpacking qdigidoc-tera (1.1.0.12-1804) ...
Selecting previously unselected package open-eid.
Preparing to unpack .../20-open-eid_18.12.0.1815-1804_all.deb ...
Unpacking open-eid (18.12.0.1815-1804) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-3ubuntu3) ...
Setting up libdigidocpp-common (3.13.8.1379-1804) ...
Setting up opensc-pkcs11:amd64 (0.19.0-0RIA3) ...
Setting up libzip4:amd64 (1.1.2-1.1) ...
Processing triggers for libc-bin (2.28-0ubuntu1) ...
Setting up libnss3-tools (2:3.36.1-1ubuntu1) ...
Processing triggers for systemd (239-7ubuntu10.4) ...
Processing triggers for man-db (2.8.4-2) ...
Processing triggers for shared-mime-info (1.10-1) ...
Setting up libccid (1.4.29-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Setting up libdigidoc-common (3.10.4.1218-1804) ...
Setting up libxerces-c3.2:amd64 (3.2.1+debian-2) ...
Setting up opensc (0.19.0-0RIA3) ...
Setting up pcscd (1.8.23-3) ...
Created symlink /etc/systemd/system/sockets.target.wants/pcscd.socket → /lib/systemd/system/pcscd.socket.
Setting up awp (5.3.0.18.04.75) ...
Adding smartcard support in Google Chrome ...
Module "idemia-pkcs11" added to database.
Setting up firefox-pkcs11-loader (3.13.0.1074-1710) ...
Setting up libxml-security-c20:amd64 (2.0.1-1) ...
Setting up libdigidoc2:amd64 (3.10.4.1218-1804) ...
Setting up libxalan-c111:amd64 (1.11-8) ...
Setting up chrome-token-signing (1:1.0.8.500-1804) ...
Setting up qdigidoc-tera (1.1.0.12-1804) ...
Setting up libdigidoc-tools (3.10.4.1218-1804) ...
Setting up libdigidocpp1:amd64 (3.13.8.1379-1804) ...
Setting up qdigidoc4 (4.2.0.43-1804) ...
Setting up libdigidocpp-tools (3.13.8.1379-1804) ...
Setting up open-eid (18.12.0.1815-1804) ...
Processing triggers for libc-bin (2.28-0ubuntu1) ...
Processing triggers for systemd (239-7ubuntu10.4) ...
Importing /usr/share/libdigidoc/ESTEID-SK 2011.crt
Importing /usr/share/libdigidoc/ESTEID-SK 2015.crt
/usr/share/esteid/certs/ESTEID-SK 2011.crt missing, perhaps Estonian ID-card stack needs updating?
/usr/share/esteid/certs/ESTEID-SK 2015.crt missing, perhaps Estonian ID-card stack needs updating?
Found PKCS#11 library at: /usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
Enabling ID-card functionality in Google Chrome/Chromium via /usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
ERROR: Failed to delete module "opensc-pkcs11".
Module "opensc-pkcs11" added to database.


Thank you for using Estonian ID card!
@dkorzhevin
Copy link
Contributor Author

/usr/share/esteid/certs/ESTEID-SK 2011.crt missing, perhaps Estonian ID-card stack needs updating?
/usr/share/esteid/certs/ESTEID-SK 2015.crt missing, perhaps Estonian ID-card stack needs updating?
Found PKCS#11 library at: /usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
Enabling ID-card functionality in Google Chrome/Chromium via /usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
ERROR: Failed to delete module "opensc-pkcs11".
Module "opensc-pkcs11" added to database.

@virtual-machinist
Copy link

virtual-machinist commented Dec 5, 2018

Don't know whether this is a separate issue, but install fails on 18.04 as well. To be more exact - something is wrong with awp installation package -

Setting up awp (5.3.0.18.04.75) ...
Adding smartcard support in Google Chrome ...
Initializing new database
sudo: unknown user: mkdir
sudo: unable to initialize policy plugin
sudo: unknown user: mkdir
sudo: unable to initialize policy plugin
sudo: invalid option -- 'd'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-T timeout] [-u user] file ...
dpkg: error processing package awp (--configure):
 installed awp package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 awp
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up awp (5.3.0.18.04.75) ...
Adding smartcard support in Google Chrome ...
Initializing new database
sudo: unknown user: mkdir
sudo: unable to initialize policy plugin
sudo: unknown user: mkdir
sudo: unable to initialize policy plugin
sudo: invalid option -- 'd'
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
            [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
            prompt] [-T timeout] [-u user] file ...
dpkg: error processing package awp (--configure):
 installed awp package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 awp

Reinstall using sudo apt install gives the following:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up awp (5.3.0.18.04.75) ...
Adding smartcard support in Google Chrome ...
Module "idemia-pkcs11" deleted from database.
Module "idemia-pkcs11" added to database.
W: APT had planned for dpkg to do more than it reported back (0 vs 4).
   Affected packages: awp:amd64

@teadur
Copy link

teadur commented Dec 6, 2018

https://gist.github.com/teadur/12c1eccee063384d3b88eb46acb0cbf9
Here you can see the awp package postinstall script, it does alot of assumptions and fails on some of them.

for example it assumes package is installed via sudo (usage of SUDO_USER variable) - very bad assumption for any script.
But even if the package is installed via sudo apt tries to add the google chrome smartcard plugin to root user because the script fails to derive HOME parameter from correct place.

I would think that adding the plugin to some system level place would make a bit more sense because there could be more then one user using the computer.

It seems this package has had zero testing before released, it does zero validations in the script about the env, so many bad practices a bit dissapointing for so important software.

@virtual-machinist
Copy link

Is it even common practice to do something like

if [ -n "`which apt-get`" ]; 
then
    sudo apt-get -y install libnss3-tools 2>/dev/null
fi

in post-install script? I thought its purpose is to add users/groups/modules/whatnot, not install other packages. That's why there's probably also a warning

APT had planned for dpkg to do more than it reported back

Very disappointed, this shouldn't have been released at all. Also I don't seem to have the possibility of rolling back to previous version of this software, can anyone confirm this?

@laurivosandi
Copy link
Contributor

laurivosandi commented Dec 9, 2018

What is going on? Idemia shipped this half-assed software to RIA and RIA gladly accepted this without any QA?! Also as I understand the Idemia software contains binary only blobs with no source code available?

@tynisr tynisr self-assigned this Dec 10, 2018
@tynisr
Copy link

tynisr commented Dec 10, 2018

Thank you for all that information.
We are escalating this issue right now.

Best Regards
Tõnis Reimo, eID software Product Owner
RIA

metsma added a commit that referenced this issue Dec 10, 2018
Signed-off-by: Raul Metsma <raul@metsma.ee>

#36
metsma added a commit that referenced this issue Dec 10, 2018
#36

Signed-off-by: Raul Metsma <raul@metsma.ee>
iannaska pushed a commit that referenced this issue Dec 10, 2018
#36

Signed-off-by: Raul Metsma <raul@metsma.ee>
@MagicFab
Copy link

MagicFab commented Jan 8, 2019

Thanks for reporting this, I almost tried testing the scripts again in Debian and you saved me this time!
As an e-Residency holder It's disappointing to see the GNU/Linux support for Digidoc is only getting worse,

@tynisr can you share this link with your team and can you add a note indicating the installer doesn't work for GNU/Linux in the README ? It should also include requirements and a clear indication that sudo is required while warning users that downloading a script to execute with admin permissions is bad practice, one should carefully read its code before execution.

@MagicFab
Copy link

MagicFab commented Jan 8, 2019

@dkorzhevin can you please update the issue description to indicate 18.04 LTS support is broken too ?

@dkorzhevin dkorzhevin changed the title Issues and errors in install script output in Ubuntu 18.10 Issues and errors in install script output in Ubuntu 18.10 (Ubuntu 18.04 LTS affected too) Jan 23, 2019
@dkorzhevin
Copy link
Contributor Author

@MagicFab Hello. I've changed title. Hope this will help to get more attention on this problem.

@sakno
Copy link

sakno commented Mar 24, 2019

@tynisr, is there any updates on this?

@Jalakas
Copy link
Contributor

Jalakas commented Jun 13, 2019

"awp" dependency is removed now: https://github.com/open-eid/linux-installer/pull/49/files
Hope there will be 19.06 release soon: https://installer.id.ee/media/ubuntu/

@metsma metsma closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants