2018-04-04 14:18 GMT+03:00 Dave Page <dp...@pgadmin.org>:
>
>
> On Wed, Apr 4, 2018 at 12:16 PM, Максим Кольцов <kolma...@gmail.com> wrote:
>>
>> 2018-04-04 13:55 GMT+03:00 Dave Page <dp...@pgadmin.org>:
>> > Hi
>> >
>> > On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов <kolma...@gmail.com>
>> > wrote:
>> >>
>> >> I've updated patch. Now I drop tests and regressions.
>> >>
>> >> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for
>> >> http and 8443 for https mode.
>> >>
>> >> Please review.
>> >
>> >
>> > I'm seeing the following error when building. It looks like it's caused
>> > by
>> > the new requirement on pycryptodome:
>>
>> Is this new requirement merged in master? I will rebase my patch.
>
>
> Yes it is.
>
>>
>>
>> In future, when chaning C-extensions in requirements.txt, it's needed
>> to update Dockerfile, line 43:
>>     pip install --no-cache-dir psycopg2 pycrypto && \
>
>
> Ah, OK.
>
>>
>>
>> I install build deps, build C-extensions and remove build deps in one
>> RUN step in order to avoid having layer with build deps in image
>> stack.
>
>
> Makes sense.
>
>>
>> In fact, I can merge this with installation from requirements.txt.
>> There were some reasons I made it this way in the first place, but
>> it's not so relevant now.
>>
>> Will post patch later.
>
>
> Thanks!

So, I've fixed it. Patch attached. Now whole requirements.txt is
installed in one step, with no left-overs and incompabilities.

>>
>>
>> >   Running setup.py install for pycryptodome: started
>> >     Running setup.py install for pycryptodome: finished with status
>> > 'error'
>> >     Complete output from command /usr/local/bin/python -u -c "import
>> > setuptools,
>> >
>> > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize,
>> > 'open', open)(__file__);code=f.read().replace('\r\n',
>> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
>> > /tmp/pip-4wlgoy0e-record/install-record.txt
>> > --single-version-externally-managed --compile:
>> >     Testing support for x86intrin.h header
>> >     Target does not support x86intrin.h header
>> >     running install
>> >     running build
>> >     running build_py
>> >     creating build/lib.linux-x86_64-3.6
>> >     creating build/lib.linux-x86_64-3.6/Crypto
>> >     copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/PKCS1_v1_5.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_ofb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/ARC2.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/CAST.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_openpgp.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/ChaCha20.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_ccm.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_cbc.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_gcm.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/Salsa20.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/Blowfish.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/DES3.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_ctr.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/ARC4.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/PKCS1_OAEP.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_siv.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/AES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_eax.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_ecb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_ocb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/DES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     copying lib/Crypto/Cipher/_mode_cfb.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Cipher
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHAKE256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA384.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA224.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHAKE128.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/HMAC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/keccak.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/MD2.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/CMAC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA3_384.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA3_256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/BLAKE2b.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA3_512.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA1.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/RIPEMD160.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/BLAKE2s.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA512.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA3_224.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/MD4.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/MD5.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/SHA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     copying lib/Crypto/Hash/RIPEMD.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Hash
>> >     creating build/lib.linux-x86_64-3.6/Crypto/IO
>> >     copying lib/Crypto/IO/PKCS8.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/IO
>> >     copying lib/Crypto/IO/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/IO
>> >     copying lib/Crypto/IO/PEM.py -> build/lib.linux-x86_64-3.6/Crypto/IO
>> >     copying lib/Crypto/IO/_PBES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/IO
>> >     creating build/lib.linux-x86_64-3.6/Crypto/PublicKey
>> >     copying lib/Crypto/PublicKey/ECC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/PublicKey
>> >     copying lib/Crypto/PublicKey/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/PublicKey
>> >     copying lib/Crypto/PublicKey/RSA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/PublicKey
>> >     copying lib/Crypto/PublicKey/DSA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/PublicKey
>> >     copying lib/Crypto/PublicKey/ElGamal.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/PublicKey
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Protocol
>> >     copying lib/Crypto/Protocol/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Protocol
>> >     copying lib/Crypto/Protocol/SecretSharing.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Protocol
>> >     copying lib/Crypto/Protocol/KDF.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Protocol
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Random
>> >     copying lib/Crypto/Random/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Random
>> >     copying lib/Crypto/Random/random.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Random
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     copying lib/Crypto/Signature/PKCS1_v1_5.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     copying lib/Crypto/Signature/PKCS1_PSS.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     copying lib/Crypto/Signature/pss.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     copying lib/Crypto/Signature/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     copying lib/Crypto/Signature/pkcs1_15.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     copying lib/Crypto/Signature/DSS.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Signature
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/asn1.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/_raw_api.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/strxor.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/RFC1751.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/_number_new.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/Counter.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/_file_system.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/number.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/py3compat.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     copying lib/Crypto/Util/Padding.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Util
>> >     creating build/lib.linux-x86_64-3.6/Crypto/Math
>> >     copying lib/Crypto/Math/_Numbers_int.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Math
>> >     copying lib/Crypto/Math/_Numbers_gmp.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Math
>> >     copying lib/Crypto/Math/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Math
>> >     copying lib/Crypto/Math/_Numbers_custom.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Math
>> >     copying lib/Crypto/Math/Primality.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Math
>> >     copying lib/Crypto/Math/Numbers.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/Math
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest
>> >     copying lib/Crypto/SelfTest/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest
>> >     copying lib/Crypto/SelfTest/loader.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest
>> >     copying lib/Crypto/SelfTest/st_common.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest
>> >     copying lib/Crypto/SelfTest/__main__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_ChaCha20.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_DES3.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_ARC4.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_DES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_Salsa20.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_OCB.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_GCM.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_AES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_CTR.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_CBC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/common.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_OFB.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_ARC2.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_CAST.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_OpenPGP.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_CCM.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_EAX.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_SIV.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     copying lib/Crypto/SelfTest/Cipher/test_CFB.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA3_224.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_MD4.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_BLAKE2.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_CMAC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA512.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHAKE.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA3_256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA256.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_MD5.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_RIPEMD160.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA224.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA3_384.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/common.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_MD2.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_HMAC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA3_512.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA384.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_keccak.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     copying lib/Crypto/SelfTest/Hash/test_SHA1.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/IO
>> >     copying lib/Crypto/SelfTest/IO/test_PBES.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/IO
>> >     copying lib/Crypto/SelfTest/IO/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/IO
>> >     copying lib/Crypto/SelfTest/IO/test_PKCS8.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/IO
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Protocol
>> >     copying lib/Crypto/SelfTest/Protocol/test_KDF.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Protocol
>> >     copying lib/Crypto/SelfTest/Protocol/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Protocol
>> >     copying lib/Crypto/SelfTest/Protocol/test_SecretSharing.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Protocol
>> >     copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Protocol
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_import_ECC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_ElGamal.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_import_DSA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_RSA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_ECC.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_DSA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     copying lib/Crypto/SelfTest/PublicKey/test_import_RSA.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Random
>> >     copying lib/Crypto/SelfTest/Random/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Random
>> >     copying lib/Crypto/SelfTest/Random/test_random.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Random
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature
>> >     copying lib/Crypto/SelfTest/Signature/test_pss.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature
>> >     copying lib/Crypto/SelfTest/Signature/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature
>> >     copying lib/Crypto/SelfTest/Signature/test_pkcs1_15.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature
>> >     copying lib/Crypto/SelfTest/Signature/test_dss.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     copying lib/Crypto/SelfTest/Util/test_Counter.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     copying lib/Crypto/SelfTest/Util/test_asn1.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     copying lib/Crypto/SelfTest/Util/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     copying lib/Crypto/SelfTest/Util/test_number.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     copying lib/Crypto/SelfTest/Util/test_strxor.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     copying lib/Crypto/SelfTest/Util/test_Padding.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Util
>> >     creating build/lib.linux-x86_64-3.6/Crypto/SelfTest/Math
>> >     copying lib/Crypto/SelfTest/Math/test_modexp.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Math
>> >     copying lib/Crypto/SelfTest/Math/__init__.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Math
>> >     copying lib/Crypto/SelfTest/Math/test_Primality.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Math
>> >     copying lib/Crypto/SelfTest/Math/test_Numbers.py ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Math
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128GFSbox256.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128VarTxt128.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8VarKey128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBKeySbox256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128MMT256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128KeySbox256.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBGFSbox128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8GFSbox192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128VarKey256.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128MCT128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCMMT128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128GFSbox192.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCKeySbox128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCVarTxt256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8VarKey192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBVarKey192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCGFSbox256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCGFSbox128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCKeySbox192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCVarTxt192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBGFSbox256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8VarTxt128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/gcmEncryptExtIV128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128VarKey128.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128VarTxt192.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8GFSbox128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCGFSbox192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8GFSbox256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8MCT128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCMCT256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128VarTxt256.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCVarKey128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCVarKey192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBMCT128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBVarTxt128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCMMT192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8VarTxt256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBVarTxt192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/gcmDecrypt128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8VarKey256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBMCT192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8MMT256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCVarTxt128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128MMT192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBMMT192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBMMT128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8KeySbox256.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8VarTxt192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8KeySbox128.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBKeySbox128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8KeySbox192.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCVarKey256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBVarKey128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCKeySbox256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8MMT192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128KeySbox128.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBMMT256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBMCT256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128GFSbox128.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128KeySbox192.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCMCT128.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCMCT192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8MCT256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBVarKey256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128MMT128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8MMT128.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBGFSbox192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128VarKey192.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB8MCT192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128MCT256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CBCMMT256.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBVarTxt256.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/AES/CFB128MCT192.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/AES/OFBKeySbox192.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/AES
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64invperm.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCvarkey.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCsubtab.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCpermop.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCinvperm.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBMMT2.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8varkey.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8permop.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBsubtab.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCMMT2.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8vartext.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8invperm.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TECBMMT2.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBinvperm.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64vartext.rsp
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBvartext.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8MMT2.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCvartext.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64MMT2.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8subtab.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBMMT3.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TECBMMT3.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64varkey.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64permop.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64MMT3.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying
>> > lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB64subtab.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCBCMMT3.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TCFB8MMT3.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBvarkey.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     copying lib/Crypto/SelfTest/Cipher/test_vectors/TDES/TOFBpermop.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Cipher/test_vectors/TDES
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA1
>> >     copying lib/Crypto/SelfTest/Hash/test_vectors/SHA1/SHA1ShortMsg.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA1
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/SHA3/ShortMsgKAT_SHAKE128.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/SHA3/ShortMsgKAT_SHA3-384.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/SHA3/ShortMsgKAT_SHA3-224.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/SHA3/ShortMsgKAT_SHAKE256.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/SHA3/ShortMsgKAT_SHA3-512.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/SHA3/ShortMsgKAT_SHA3-256.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/SHA3
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/LongMsgKAT_256.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/LongMsgKAT_512.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ExtremelyLongMsgKAT_256.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_384.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_512.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ExtremelyLongMsgKAT_512.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/LongMsgKAT_224.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ExtremelyLongMsgKAT_224.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying lib/Crypto/SelfTest/Hash/test_vectors/keccak/readme.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_256.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ShortMsgKAT_224.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/ExtremelyLongMsgKAT_384.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/keccak/LongMsgKAT_384.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/keccak
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2s
>> >     copying lib/Crypto/SelfTest/Hash/test_vectors/BLAKE2s/tv2.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2s
>> >     copying lib/Crypto/SelfTest/Hash/test_vectors/BLAKE2s/tv1.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2s
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/BLAKE2s/blake2s-test.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2s
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2b
>> >     copying lib/Crypto/SelfTest/Hash/test_vectors/BLAKE2b/tv2.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2b
>> >     copying lib/Crypto/SelfTest/Hash/test_vectors/BLAKE2b/tv1.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2b
>> >     copying
>> > lib/Crypto/SelfTest/Hash/test_vectors/BLAKE2b/blake2b-test.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/Hash/test_vectors/BLAKE2b
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_enc_aes192.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_p8_clear.der
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_x509.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_enc_aes128.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_public_openssh.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_public_compressed.der
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_enc_aes256_gcm.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_public.der ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_public_compressed.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_p8.pem
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private.pem ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_p8_clear.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private.der ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_p8.der
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/point-at-infinity.org-P256.txt
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_public.pem ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/openssl_version.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> >
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_private_enc_des3.pem
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     copying
>> > lib/Crypto/SelfTest/PublicKey/test_vectors/ECC/ecc_p256_x509.der
>> > -> build/lib.linux-x86_64-3.6/Crypto/SelfTest/PublicKey/test_vectors/ECC
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/DSA
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/DSA/FIPS_186_3_SigGen.txt ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/DSA
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/DSA/FIPS_186_3_SigVer.rsp ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/DSA
>> >     creating
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/ECDSA
>> >     copying lib/Crypto/SelfTest/Signature/test_vectors/ECDSA/README.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/ECDSA
>> >     copying lib/Crypto/SelfTest/Signature/test_vectors/ECDSA/SigVer.rsp
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/ECDSA
>> >     copying lib/Crypto/SelfTest/Signature/test_vectors/ECDSA/SigGen.txt
>> > ->
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/ECDSA
>> >     creating
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigGen15_186-2.txt
>> > ->
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigVer15_186-3.rsp
>> > ->
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigGen15_186-3.txt
>> > ->
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
>> >     creating
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigVerPSS_186-3.rsp
>> > ->
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigGenPSS_186-3.txt
>> > ->
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
>> >     copying
>> > lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigGenPSS_186-2.txt
>> > ->
>> >
>> > build/lib.linux-x86_64-3.6/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
>> >     Skipping optional fixer: buffer
>> >     Skipping optional fixer: idioms
>> >     Skipping optional fixer: set_literal
>> >     Skipping optional fixer: ws_comma
>> >     running build_ext
>> >     Testing support for 128-bit integer
>> >     Target does not support 128-bit integer
>> >     Testing support for intrin.h header
>> >     Target does not support intrin.h header
>> >     Testing support for cpuid.h header
>> >     Target does not support cpuid.h header
>> >     warning: no support for Intel AESNI instructions
>> >     building 'Crypto.Hash._MD2' extension
>> >     creating build/temp.linux-x86_64-3.6
>> >     creating build/temp.linux-x86_64-3.6/src
>> >     gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall
>> > -Wstrict-prototypes -DTHREAD_STACK_SIZE=0x100000 -fPIC
>> > -DPY_LITTLE_ENDIAN
>> > -DLTC_NO_ASM -Isrc/ -I/usr/local/include/python3.6m -c src/MD2.c -o
>> > build/temp.linux-x86_64-3.6/src/MD2.o
>> >     unable to execute 'gcc': No such file or directory
>> >     error: command 'gcc' failed with exit status 1
>> >
>> >     ----------------------------------------
>> > Command "/usr/local/bin/python -u -c "import setuptools,
>> >
>> > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize,
>> > 'open', open)(__file__);code=f.read().replace('\r\n',
>> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
>> > /tmp/pip-4wlgoy0e-record/install-record.txt
>> > --single-version-externally-managed --compile" failed with error code 1
>> > in
>> > /tmp/pip-build-mfrhme1c/pycryptodome/
>> > The command '/bin/sh -c pip install --no-cache-dir -r requirements.txt'
>> > returned a non-zero code: 1
>> > make: *** [docker] Error 1
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
From 883d710765cc34dc666efb1e060ffab3913e9f7d Mon Sep 17 00:00:00 2001
From: Maxim Koltsov <kolma...@gmail.com>
Date: Sat, 31 Mar 2018 20:37:51 +0300
Subject: [PATCH] Re-make Docker container packaging

Key features of this update:
- Main image is based on python:3.6-alpine3.7.
  Using Alpine linux leads to much smaller image
- All build is done with Docker multi-stage build. First of all build the frontend in node:6 image,
  then build Sphinx documentation in separate Python container and in the end just install all
  dependencies in a clean python:3.6-alpine3.7 image, so that it does not have any leftovers from the build
  process and we don't rely on any tools available on the host.
- Use Gunicorn (http://gunicorn.org) as lightweight HTTP / WSGI server.
  Gunicorn supports both HTTP and HTTPS.
- Install Alpine postgresql-client package, which includes pg_dump and other tools and config
  PgAdmin to find these tools by default
- Byte-compile all PgAdmin Python code in Dockerfile with optimization (-O) enabled. This way Python
  does not have to compile modules on each container restart and consume space in overlay fs
---
 pkg/docker/.dockerignore    |  2 +
 pkg/docker/Dockerfile       | 89 ++++++++++++++++++++++++---------------------
 pkg/docker/README           | 58 ++++++++++++++---------------
 pkg/docker/build.sh         | 58 +++++------------------------
 pkg/docker/config_distro.py |  4 ++
 pkg/docker/entry.sh         | 29 ---------------
 pkg/docker/entrypoint.sh    | 21 +++++++++++
 pkg/docker/pgadmin4.conf.j2 | 43 ----------------------
 pkg/docker/run_pgadmin.py   |  4 ++
 9 files changed, 115 insertions(+), 193 deletions(-)
 create mode 100644 pkg/docker/.dockerignore
 create mode 100644 pkg/docker/config_distro.py
 delete mode 100644 pkg/docker/entry.sh
 create mode 100755 pkg/docker/entrypoint.sh
 delete mode 100644 pkg/docker/pgadmin4.conf.j2
 create mode 100644 pkg/docker/run_pgadmin.py

diff --git a/pkg/docker/.dockerignore b/pkg/docker/.dockerignore
new file mode 100644
index 00000000..1b7ed264
--- /dev/null
+++ b/pkg/docker/.dockerignore
@@ -0,0 +1,2 @@
+pgadmin4/web/**/tests/
+pgadmin4/web/regression/
diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile
index 1c1dde27..e5f0ceea 100644
--- a/pkg/docker/Dockerfile
+++ b/pkg/docker/Dockerfile
@@ -7,58 +7,63 @@
 #
 #########################################################################
 
-# Get the basics out of the way
-FROM centos:latest
+# First of all, build frontend with NodeJS in a separate builder container
+# Node-6 with ABI v48 is supported by all needed C++ packages
+FROM node:6 AS node-builder
 
-LABEL name="pgAdmin 4" \
-    vendor="The pgAdmin Development Team" \
-    license="PostgreSQL"
+COPY ./pgadmin4/web/ /pgadmin4/web/
+WORKDIR /pgadmin4/web
 
-# We only need the web/ directory, and a few other things
-COPY web /var/www/pgadmin
-COPY requirements.txt /var/www/pgadmin
+RUN yarn install --cache-folder ./ycache --verbose && \
+    yarn run bundle && \
+    rm -rf ./ycache ./pgadmin/static/js/generated/.cache
 
-# Install everything we need. Use easy_install to get pip, to avoid setting up EPEL
-RUN yum install -y python-setuptools python-devel httpd mod_wsgi mod_ssl gcc
-RUN easy_install pip
-RUN pip install j2cli
+# Build Sphinx documentation in separate container
+FROM python:3.6-alpine3.7 as docs-builder
 
-# Now install the Python runtime dependencies
-RUN pip install -r /var/www/pgadmin/requirements.txt
+# Install only dependencies absolutely required for documentation building
+RUN apk add --no-cache make
+RUN pip install --no-cache-dir \
+    sphinx flask_security flask_paranoid python-dateutil flask_sqlalchemy \
+    flask_gravatar simplejson
 
-# Create required directories for config
+COPY ./pgadmin4/ /pgadmin4
 
+RUN LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C /pgadmin4/docs/en_US -f Makefile.sphinx html
 
-# Create required directories for running
-RUN mkdir -p /var/log/pgadmin
-RUN chown -R apache /var/log/pgadmin
-RUN mkdir -p /var/lib/pgadmin
-RUN chown -R apache /var/lib/pgadmin
-RUN mkdir -p /certs
-RUN chown -R apache /certs
-RUN chmod 700 /certs
+# Then install backend, copy static files and set up entrypoint
+# Need alpine3.7 to get pg_dump and friends in postgresql-client package
+FROM python:3.6-alpine3.7
 
-# Push logs to the container's output streams
-RUN ln -sf /proc/self/fd/1 /var/log/httpd/access_log && \
-    ln -sf /proc/self/fd/1 /var/log/httpd/ssl_access_log && \
-    ln -sf /proc/self/fd/2 /var/log/httpd/error_log && \
-    ln -sf /proc/self/fd/2 /var/log/httpd/ssl_error_log
+RUN pip --no-cache-dir install gunicorn
+RUN apk add --no-cache postgresql-client postgresql-libs
 
-# Apache config time
-RUN mkdir -p /templates
-COPY pgadmin4.conf.j2 /templates/
-COPY entry.sh /
+WORKDIR /pgadmin4
+ENV PYTHONPATH=/pgadmin4
 
-# Finally, remove packages we only needed for building
-RUN yum -y remove gcc cpp glibc-devel glibc-headers kernel-headers libgomp libmpc mpfr
+# Install build-dependencies, build & install C extensions and purge deps in one RUN step
+# so that deps do not increase the size of resulting image by remaining in layers
+COPY ./pgadmin4/requirements.txt /pgadmin4
+RUN set -ex && \
+    apk add --no-cache --virtual build-deps build-base postgresql-dev && \
+    pip install --no-cache-dir -r requirements.txt && \
+    apk del --no-cache build-deps
 
-# Default config options
-ENV PGADMIN_DEFAULT_EMAIL contai...@pgadmin.org
-ENV PGADMIN_DEFAULT_PASSWORD Conta1ner
-ENV PGADMIN_ENABLE_TLS False
-ENV PGADMIN_SERVER_NAME pgadmin4
+COPY --from=node-builder /pgadmin4/web/pgadmin/static/js/generated/ /pgadmin4/pgadmin/static/js/generated/
+COPY --from=docs-builder /pgadmin4/docs/en_US/_build/html/ /pgadmin4/docs/
 
-EXPOSE 80 443
+COPY ./pgadmin4/web /pgadmin4
+COPY ./run_pgadmin.py /pgadmin4
+COPY ./config_distro.py /pgadmin4
 
-# Start the service
-ENTRYPOINT ["/bin/bash", "/entry.sh"]
+RUN pip install --no-cache-dir -r requirements.txt
+
+# Precompile and optimize python code to save time and space on startup
+RUN python -O -m compileall /pgadmin4
+
+COPY ./entrypoint.sh /entrypoint.sh
+
+VOLUME /var/lib/pgadmin
+EXPOSE 8080 8443
+
+ENTRYPOINT ["/entrypoint.sh"]
diff --git a/pkg/docker/README b/pkg/docker/README
index b2d9595e..9fed51c9 100644
--- a/pkg/docker/README
+++ b/pkg/docker/README
@@ -4,14 +4,16 @@ Building
 ========
 
 Whilst you can just use the Dockerfile directly, it requires that various pre-configuration steps are performed, for
-example, the pgAdmin web code must be copied to ./web and yarn install/yarn run bundle must be executed.
-requirements.txt is also expected to be in this directory, and the pre-built docs must be in web/docs.
+example, the pgAdmin web code must be copied to `./web`, Sphinx documentation source must be copied to `./docs`
+and `requirements.txt` is also expected to be in this directory.
 
 The recommended (and easy) way to build the container is to do:
 
+```console
 cd $PGADMIN_SRC/
 workon pgadmin-venv
 make docker
+```
 
 This will call the build script $PGADMIN_SRC/pkg/docker/build.sh which will prepare a staging directory containing all
 the required files, then build the container and push it to your repo.
@@ -21,57 +23,51 @@ Running
 
 The container will accept the following variables at startup:
 
-PGADMIN_DEFAULT_EMAIL
----------------------
-
-Default: contai...@pgadmin.org)
+PGADMIN_SETUP_EMAIL
+-------------------
 
 This is the email address used when setting up the initial administrator account to login to pgAdmin.
 
-PGADMIN_DEFAULT_PASSWORD
-------------------------
-
-Default: Conta1ner
+PGADMIN_SETUP_PASSWORD
+----------------------
 
 This is the password used when setting up the initial administrator account to login to pgAdmin.
 
 PGADMIN_ENABLE_TLS
 ------------------
 
-Default: False
+Default: unset
 
-If set to the default, False, the container will listen on port 80 for connections in plain text. If set to True, the
-container will listen on port 443 for TLS connections.
+If not set, the container will listen on port 8080 for connections in insecure HTTP protocol.
+If set to any value, the container will listen on port 8443 for TLS connections.
 
-When TLS is enabled, a certificate and key must be provided. Typically these should be stored on the host file system
-and mounted from the container. The expected paths are /certs/server.crt and /certs/server.key
+When TLS is enabled, a certificate and key must be provided.
+Typically these should be stored on the host file system and mounted from the container.
+The expected paths are `/certs/server.crt` and `/certs/server.key`.
 
-PGADMIN_SERVER_NAME
--------------------
-
-Default: pgadmin4
-
-This variable allows you to specify the value used for the Apache HTTPD ServerName directive. This is commonly used to
-ensure the CN of the TLS certificate matches what the server expects.
+You need to explicitly map these ports with `-p` option to some port at your machine.
 
 Examples
 ========
 
 Run a simple container over port 80:
 
-docker run -p 80:80 \
-           -e "PGADMIN_DEFAULT_EMAIL=u...@domain.com" \
-           -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
+```console
+docker run -p 80:8080 \
+           -e "PGADMIN_SETUP_EMAIL=u...@domain.com" \
+           -e "PGADMIN_SETUP_PASSWORD=SuperSecret" \
            -d pgadmin4
+```
 
 Run a TLS secured container using a shared config/storage directory in /private/var/lib/pgadmin on the host:
 
-docker run -p 443:443 \
+```console
+docker run -p 443:8443 \
            -v "/private/var/lib/pgadmin:/var/lib/pgadmin" \
            -v "/path/to/certificate.cert:/certs/server.cert" \
            -v "/path/to/certificate.key:/certs/server.key" \
-           -e "PGADMIN_DEFAULT_EMAIL=u...@domain.com" \
-           -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
-           -e "PGADMIN_ENABLE_TLS=True" \
-           -e "PGADMIN_SERVER_NAME=pgadmin.domain.com" \
-           -d pgadmin4
\ No newline at end of file
+           -e "PGADMIN_SETUP_EMAIL=u...@domain.com" \
+           -e "PGADMIN_SETUP_PASSWORD=SuperSecret" \
+           -e "PGADMIN_ENABLE_TLS=1" \
+           -d pgadmin4
+```
diff --git a/pkg/docker/build.sh b/pkg/docker/build.sh
index 373c99b7..68bf13b6 100755
--- a/pkg/docker/build.sh
+++ b/pkg/docker/build.sh
@@ -41,60 +41,22 @@ if [ -d docker-build ]; then
     rm -rf docker-build
 fi
 
-mkdir docker-build
-
-# Create the output directory if not present
-if [ ! -d dist ]; then
-    mkdir dist
-fi
+mkdir -p docker-build/pgadmin4
 
 # Build the clean tree
-for FILE in `git ls-files web`
-do
-    echo Adding $FILE
-    # We use tar here to preserve the path, as Mac (for example) doesn't support cp --parents
-    tar cf - $FILE | (cd docker-build; tar xf -)
-done
-
-pushd web
-    yarn install
-    yarn run bundle
-
-    rm -rf pgadmin/static/js/generated/.cache
-
-    for FILE in `ls -d pgadmin/static/js/generated/*`
-    do
-        echo Adding $FILE
-        tar cf - $FILE | (cd ../docker-build/web; tar xf -)
-    done
-popd
-
-# Build the docs
-if [ -d docs/en_US/_build/html ]; then
-    rm -rf docs/en_US/_build/html
-fi
-
-LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C docs/en_US -f Makefile.sphinx html
-
-mkdir docker-build/web/docs
-cp -R docs/en_US/_build/html/* docker-build/web/docs/
-
-# Configure pgAdmin
-echo "HELP_PATH = '../../docs/'" >> docker-build/web/config_distro.py
-echo "DEFAULT_BINARY_PATHS = {" >> docker-build/web/config_distro.py
-echo "    'pg':   ''," >> docker-build/web/config_distro.py
-echo "    'ppas': ''," >> docker-build/web/config_distro.py
-echo "    'gpdb': ''" >> docker-build/web/config_distro.py
-echo "}" >> docker-build/web/config_distro.py
+echo Copying source tree...
+git archive HEAD -- docs web requirements.txt | tar xvf - -C docker-build/pgadmin4
 
 # Copy the Docker specific assets into place
-cp pkg/docker/Dockerfile docker-build/
-cp pkg/docker/entry.sh docker-build/
-cp pkg/docker/pgadmin4.conf.j2 docker-build/
-cp requirements.txt docker-build/
+cp pkg/docker/Dockerfile \
+    pkg/docker/entrypoint.sh \
+    pkg/docker/config_distro.py \
+    pkg/docker/run_pgadmin.py \
+    pkg/docker/.dockerignore \
+    docker-build/
 
 # Build the container
 docker build docker-build -t $CONTAINER_NAME \
                           -t $CONTAINER_NAME:latest \
                           -t $CONTAINER_NAME:$APP_RELEASE \
-                          -t $CONTAINER_NAME:$APP_LONG_VERSION
\ No newline at end of file
+                          -t $CONTAINER_NAME:$APP_LONG_VERSION
diff --git a/pkg/docker/config_distro.py b/pkg/docker/config_distro.py
new file mode 100644
index 00000000..71ad3c74
--- /dev/null
+++ b/pkg/docker/config_distro.py
@@ -0,0 +1,4 @@
+HELP_PATH = '../../docs'
+DEFAULT_BINARY_PATHS = {
+        'pg': '/usr/bin'
+}
diff --git a/pkg/docker/entry.sh b/pkg/docker/entry.sh
deleted file mode 100644
index b6ba42e9..00000000
--- a/pkg/docker/entry.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-
-########################################################################
-#
-# pgAdmin 4 - PostgreSQL Tools
-#
-# Copyright (C) 2013 - 2018, The pgAdmin Development Team
-# This software is released under the PostgreSQL Licence
-#
-#########################################################################
-
-export PGADMIN_SETUP_EMAIL=${PGADMIN_DEFAULT_EMAIL}
-export PGADMIN_SETUP_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
-
-if [ ${PGADMIN_ENABLE_TLS} != "True" ]; then
-    if [ -f /etc/httpd/conf.d/ssl.conf ]; then
-        mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled
-    fi
-else
-    if [ -f /etc/httpd/conf.d/ssl.conf.disabled ]; then
-        mv /etc/httpd/conf.d/ssl.conf.disabled /etc/httpd/conf.d/ssl.conf
-    fi
-fi
-
-j2 /templates/pgadmin4.conf.j2 > /etc/httpd/conf.d/pgadmin4.conf
-
-rm -f /run/httpd/httpd.pid
-
-/usr/sbin/httpd -D FOREGROUND
diff --git a/pkg/docker/entrypoint.sh b/pkg/docker/entrypoint.sh
new file mode 100755
index 00000000..f57e6461
--- /dev/null
+++ b/pkg/docker/entrypoint.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
+    if [ -z "${PGADMIN_SETUP_EMAIL}" -o -z "${PGADMIN_SETUP_PASSWORD}" ]; then
+        echo 'You need to specify PGADMIN_SETUP_EMAIL and PGADMIN_SETUP_PASSWORD environment variables'
+        exit 1
+    fi
+
+    # Initialize DB before starting Gunicorn
+    # Importing pgadmin4 (from this script) is enough
+    python run_pgadmin.py
+fi
+
+# NOTE: currently pgadmin can run only with 1 worker due to sessions implementation
+# Using --threads to have multi-threaded single-process worker
+
+if [ ! -z ${PGADMIN_ENABLE_TLS} ]; then
+    exec gunicorn --bind 0.0.0.0:${PGADMIN_LISTEN_PORT:-8443} -w 1 --threads ${GUNICORN_THREADS:-25} --access-logfile - --keyfile /certs/server.key --certfile /certs/server.cert run_pgadmin:app
+else
+    exec gunicorn --bind 0.0.0.0:${PGADMIN_LISTEN_PORT:-8080} -w 1 --threads ${GUNICORN_THREADS:-25} --access-logfile - run_pgadmin:app
+fi
diff --git a/pkg/docker/pgadmin4.conf.j2 b/pkg/docker/pgadmin4.conf.j2
deleted file mode 100644
index d44de2d5..00000000
--- a/pkg/docker/pgadmin4.conf.j2
+++ /dev/null
@@ -1,43 +0,0 @@
-########################################################################
-#
-# pgAdmin 4 - PostgreSQL Tools
-#
-# Copyright (C) 2013 - 2018, The pgAdmin Development Team
-# This software is released under the PostgreSQL Licence
-#
-#########################################################################
-
-ServerName {{ PGADMIN_SERVER_NAME }}
-{% if PGADMIN_ENABLE_TLS|default('False') == 'True' %}
-LoadModule ssl_module modules/mod_ssl.so
-
-<VirtualHost *:443>
-    SSLEngine on
-    SSLCipherSuite HIGH:!aNULL:!MD5
-    SSLCertificateFile "/certs/server.cert"
-    SSLCertificateKeyFile "/certs/server.key"
-
-    ServerName {{ PGADMIN_SERVER_NAME }}
-    WSGIDaemonProcess pgadmin processes=1 threads=25
-    WSGIScriptAlias / /var/www/pgadmin/pgAdmin4.wsgi
-
-    <Directory /var/www/pgadmin>
-        WSGIProcessGroup pgadmin
-        WSGIApplicationGroup %{GLOBAL}
-        Order deny,allow
-        Allow from all
-    </Directory>
-</VirtualHost>
-{% else %}
-<VirtualHost *:80>
-    WSGIDaemonProcess pgadmin processes=1 threads=25
-    WSGIScriptAlias / /var/www/pgadmin/pgAdmin4.wsgi
-
-    <Directory /var/www/pgadmin>
-        WSGIProcessGroup pgadmin
-        WSGIApplicationGroup %{GLOBAL}
-        Order deny,allow
-        Allow from all
-    </Directory>
-</VirtualHost>
-{% endif %}
\ No newline at end of file
diff --git a/pkg/docker/run_pgadmin.py b/pkg/docker/run_pgadmin.py
new file mode 100644
index 00000000..48b17735
--- /dev/null
+++ b/pkg/docker/run_pgadmin.py
@@ -0,0 +1,4 @@
+import builtins
+builtins.SERVER_MODE = True
+
+from pgAdmin4 import app
-- 
2.16.2

Reply via email to