AaronBurchfield / CloudFront-Middleware

Securely access a munki repo with Amazon CloudFront
36 stars 9 forks source link

Munky python3 #8

Closed LcTrKiD closed 4 years ago

LcTrKiD commented 5 years ago

I've tested the middleware with Munki 3.6.2.3776 and Munki 3.7.0.3855 (Embedded python) and works as expected

g4fa commented 5 years ago

Hi

When I try to compile Munki 3.7.0.3855 , I have this error productbuild: error: No URL for pkg-ref "com.googlecode.munki.python". Error creating /Users/fabien/munkitools-3.7.0.3857.pkg. Attempting to clean up temporary files...

Can you help me ?

LcTrKiD commented 5 years ago

You can download that version here: https://www.dropbox.com/s/t81086iwjyh89fp/munkitools-3.7.0.3855.pkg?dl=1

g4fa commented 5 years ago

Hi

Can you please reforward me munkitools 3.7.0 ?

Thanks

Le 27 juil. 2019 à 18:04, Joaquín notifications@github.com a écrit :

You can download that version here: https://www.dropbox.com/s/t81086iwjyh89fp/munkitools-3.7.0.3855.pkg?dl=1 https://www.dropbox.com/s/t81086iwjyh89fp/munkitools-3.7.0.3855.pkg?dl=1 — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AaronBurchfield/CloudFront-Middleware/pull/8?email_source=notifications&email_token=AEZWIK6WXFXRIF6PJYQYBM3QBRWY7A5CNFSM4IHIGCYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26OC7Q#issuecomment-515694974, or mute the thread https://github.com/notifications/unsubscribe-auth/AEZWIKYDRCGLAFOJ7FUEVZ3QBRWY7ANCNFSM4IHIGCYA.

clburlison commented 5 years ago

@LcTrKiD I think changes to this script should be backwards compatible. Something like:

try:
    from string import maketrans
    from OpenSSL.crypto import FILETYPE_PEM
    from OpenSSL.crypto import load_privatekey
    from OpenSSL.crypto import sign
except:
    from rsa import PrivateKey, sign

Or we could check for the python version

    if PY_VER[0] == 2:
       fooo
    else if PY_VER[0] == 3:
       bar

But don't do anything without @AaronBurchfield's input.

@g4fa Please see the munki-dev list https://groups.google.com/forum/#!topic/munki-dev/k5nCLZHI0nA

AaronBurchfield commented 4 years ago

I've added support for python3 slightly differently to hopefully make it easier to remove the py2 code later. Please check out the v2-python3 branch and give it a test.

@LcTrKiD thank you so much for working on this!