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

Fix Builds (python_gnupg-0.5.2-py2.py3-none-any.whl.asc 404 not found) #78

Closed
maltfield opened this issue Feb 26, 2024 · 162 comments
Closed

Comments

@maltfield
Copy link
Member

Describe the bug
Currently it's not possible to build the BusKill app due to gpg signing issues with the python-gnupg dependency

To Reproduce
I've tested this on Linux, but it should be an issue on all platforms

Steps to reproduce the behavior:

Execute the following on Debian 11

sudo su -
sudo apt-get install git
git clone https://github.com/BusKill/buskill-app.git
cd buskill-app/
build/linux/debianWrapper.sh

You'll get the following error

user@buskill:~/sandbox/buskill-app$ build/linux/debianWrapper.sh 
...
Successfully installed Kivy-1.11.1 Kivy-Garden-0.1.4 certifi-2020.6.20 chardet-3.0.4 docutils-0.16 idna-2.10 pygments-2.6.1 requests-2.24.0 urllib3-1.25.9
++ mktemp -d
+ tmpDir=/tmp/tmp.TxQFtmxBry
+ chown _apt:root /tmp/tmp.TxQFtmxBry
+ chmod 0770 /tmp/tmp.TxQFtmxBry
+ pushd /tmp/tmp.TxQFtmxBry
+ /bin/su _apt -s /bin/bash -c '/tmp/kivy_appdir/AppRun -m pip download python-gnupg'
/tmp/tmp.TxQFtmxBry ~/buskill-app
WARNING: The directory '/nonexistent/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-gnupg
  Downloading python_gnupg-0.5.2-py2.py3-none-any.whl (20 kB)
  Saved ./python_gnupg-0.5.2-py2.py3-none-any.whl
Successfully downloaded python-gnupg
WARNING: You are using pip version 20.1.1; however, version 24.0 is available.
You should consider upgrading via the '/tmp/kivy_appdir/opt/python3.7/bin/python3.7 -m pip install --upgrade pip' command.
++ head -n1
++ ls -1
+ filename=python_gnupg-0.5.2-py2.py3-none-any.whl
++ /bin/su _apt -s /bin/bash -c 'curl -s https://pypi.org/simple/python-gnupg/'
++ grep -oE 'https://.*python_gnupg-0.5.2-py2.py3-none-any.whl#'
++ sed s/#/.asc/
+ signature_url=https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl.asc
+ /bin/su _apt -s /bin/bash -c 'wget "https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl.asc"'
--2024-02-26 01:35:40--  https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl.asc
Resolving files.pythonhosted.org (files.pythonhosted.org)... 199.232.44.223, 2a04:4e42:48::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|199.232.44.223|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-02-26 01:35:42 ERROR 404: Not Found.

+ mkdir gnupg
+ chmod 0700 gnupg
+ popd
+ gpg --homedir /tmp/tmp.TxQFtmxBry/gnupg --import build/deps/python-gnupg.asc
~/buskill-app
gpg: keybox '/tmp/tmp.TxQFtmxBry/gnupg/pubring.kbx' created
gpg: /tmp/tmp.TxQFtmxBry/gnupg/trustdb.gpg: trustdb created
gpg: key 9147B477339A9B86: public key "Vinay Sajip (CODE SIGNING KEY) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
+ gpgv --homedir /tmp/tmp.TxQFtmxBry/gnupg --keyring /tmp/tmp.TxQFtmxBry/gnupg/pubring.kbx /tmp/tmp.TxQFtmxBry/python_gnupg-0.5.2-py2.py3-none-any.whl.asc /tmp/tmp.TxQFtmxBry/python_gnupg-0.5.2-py2.py3-none-any.whl
gpgv: can't open '/tmp/tmp.TxQFtmxBry/python_gnupg-0.5.2-py2.py3-none-any.whl.asc': No such file or directory
gpgv: verify signatures failed: No such file or directory
ERROR: Invalid PGP signature!
+ [[ 2 -ne 0 ]]
+ echo 'ERROR: Invalid PGP signature!'
+ exit 1
+ chown -R user dist
+ exit 0
+ exit 0
user@buskill:~/sandbox/buskill-app$

Expected behavior
The build should be able to verify the authenticity of the python_gnupg package and proceed with building the BusKill app

@maltfield maltfield changed the title Fix Builds Fix Builds (python_gnupg-0.5.2-py2.py3-none-any.whl.asc 404 not found) Feb 26, 2024
@maltfield
Copy link
Member Author

In the past, we've had build issues due to the verification of this same python_gnupg python module, but only on MacOS

  1. Fix MacOS Builds (curl dyld Library not loaded for libunistring.2.dylib) #70
  2. Fix MacOS Builds #72

In the above issues, the issue was a tooling issue with the availability of curl/wget on MacOS.

But in this case, it appears that the file actually has disappeared from the server. I cannot fetch it, for example, on my local machine

user@buskill:~$ wget https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl
--2024-02-25 22:08:59--  https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.124.223, 2a04:4e42:1e::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.124.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20964 (20K) [binary/octet-stream]
Saving to: ‘python_gnupg-0.5.2-py2.py3-none-any.whl’

python_gnupg-0.5.2- 100%[===================>]  20.47K  --.-KB/s    in 0.02s   

2024-02-25 22:09:00 (868 KB/s) - ‘python_gnupg-0.5.2-py2.py3-none-any.whl’ saved [20964/20964]

user@buskill:~$ 

user@buskill:~$ wget https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl.asc
--2024-02-25 22:09:03--  https://files.pythonhosted.org/packages/5f/86/18938c2378a8c8284910308b93e2bc521a965ced4ca028947e1ffa6e98dc/python_gnupg-0.5.2-py2.py3-none-any.whl.asc
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.124.223, 2a04:4e42:1e::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.124.223|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-02-25 22:09:04 ERROR 404: Not Found.

user@buskill:~$ 

@maltfield
Copy link
Member Author

I checked the package's page on the PyPI project's website. If there's a newer version, then it might make sense that the archived version somehow got orphaned from its signature? If so, it's a bug that we should report

Anyway, it appears that the version hasn't changed since the one we pegged as a dependency. The latest version is still v0.5.2

@maltfield
Copy link
Member Author

maltfield commented Feb 26, 2024

I was digging through my notes and found that my old link to hash checking in PyPI is stale

The above link points to a new location which, after some digging, brings you here

Woah, that's dangerous. The above link suggests that hash checking in pip somehow adds security to verify packages are not malicious when turned-on. This is dangerous misinformation. pip doesn't have any built-in mechanism to cryptographically verify the authenticity of packages (although they've been working on this since 2019).

The whole reason we have this awkward manual gpg check is because pip doesn't have a secure way to download software. Fortunately, twine does have PGP signing support, as documented here:

Anyway, I opened a ticket with PyPI to fix their documentation to move the hashing section outside of the Secure Install section and to add a big warning indicating to users that hashes does not provide any secure verification checks

@maltfield
Copy link
Member Author

I opened an upstream bug about this here:

@maltfield
Copy link
Member Author

maltfield commented Feb 27, 2024

I switched to fetching the files from GitHub, but now I have an issue with verifying the signature of the libusb1 dependency

Successfully installed Kivy-1.11.1 Kivy-Garden-0.1.4 certifi-2020.6.20 chardet-3.0.4 docutils-0.16 idna-2.10 pygments-2.6.1 requests-2.24.0 urllib3-1.25.9
++ mktemp -d
+ tmpDir=/tmp/tmp.hTMYgQLAMP
+ chown _apt:root /tmp/tmp.hTMYgQLAMP
+ chmod 0770 /tmp/tmp.hTMYgQLAMP
+ pushd /tmp/tmp.hTMYgQLAMP
/tmp/tmp.hTMYgQLAMP ~/buskill-app
+ file_url=https://github.com/vsajip/python-gnupg/releases/download/0.5.2/python_gnupg-0.5.2-py2.py3-none-any.whl
+ signature_url=https://github.com/vsajip/python-gnupg/releases/download/0.5.2/python_gnupg-0.5.2-py2.py3-none-any.whl.asc
+ /bin/su _apt -s /bin/bash -c 'wget "https://github.com/vsajip/python-gnupg/releases/download/0.5.2/python_gnupg-0.5.2-py2.py3-none-any.whl"'
--2024-02-27 00:20:12--  https://github.com/vsajip/python-gnupg/releases/download/0.5.2/python_gnupg-0.5.2-py2.py3-none-any.whl
Resolving github.com (github.com)... 20.248.137.48
Connecting to github.com (github.com)|20.248.137.48|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/436952016/770eba9a-6d0e-489e-beb3-660efc8abc55?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240227%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240227T002015Z&X-Amz-Expires=300&X-Amz-Signature=d6d333e9827488296005b9563b5060663602719b4323be9e940fc2e4019f76de&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=436952016&response-content-disposition=attachment%3B%20filename%3Dpython_gnupg-0.5.2-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream [following]
--2024-02-27 00:20:14--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/436952016/770eba9a-6d0e-489e-beb3-660efc8abc55?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240227%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240227T002015Z&X-Amz-Expires=300&X-Amz-Signature=d6d333e9827488296005b9563b5060663602719b4323be9e940fc2e4019f76de&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=436952016&response-content-disposition=attachment%3B%20filename%3Dpython_gnupg-0.5.2-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20964 (20K) [application/octet-stream]
Saving to: 'python_gnupg-0.5.2-py2.py3-none-any.whl'

     0K .......... ..........                                 100% 2.51M=0.008s

2024-02-27 00:20:17 (2.51 MB/s) - 'python_gnupg-0.5.2-py2.py3-none-any.whl' saved [20964/20964]

++ ls -1
++ head -n1
+ filename=python_gnupg-0.5.2-py2.py3-none-any.whl
+ /bin/su _apt -s /bin/bash -c 'wget "https://github.com/vsajip/python-gnupg/releases/download/0.5.2/python_gnupg-0.5.2-py2.py3-none-any.whl.asc"'
--2024-02-27 00:20:17--  https://github.com/vsajip/python-gnupg/releases/download/0.5.2/python_gnupg-0.5.2-py2.py3-none-any.whl.asc
Resolving github.com (github.com)... 20.248.137.48
Connecting to github.com (github.com)|20.248.137.48|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/436952016/d1d4da38-0a74-42b8-aa0f-120f13479a30?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240227%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240227T002020Z&X-Amz-Expires=300&X-Amz-Signature=6b0dbdfe514fea43d2a4db573cf3ba5b44c16abcf510ed005368e91f22427422&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=436952016&response-content-disposition=attachment%3B%20filename%3Dpython_gnupg-0.5.2-py2.py3-none-any.whl.asc&response-content-type=application%2Foctet-stream [following]
--2024-02-27 00:20:20--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/436952016/d1d4da38-0a74-42b8-aa0f-120f13479a30?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240227%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240227T002020Z&X-Amz-Expires=300&X-Amz-Signature=6b0dbdfe514fea43d2a4db573cf3ba5b44c16abcf510ed005368e91f22427422&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=436952016&response-content-disposition=attachment%3B%20filename%3Dpython_gnupg-0.5.2-py2.py3-none-any.whl.asc&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 801 [application/octet-stream]
Saving to: 'python_gnupg-0.5.2-py2.py3-none-any.whl.asc'

     0K                                                       100% 38.5M=0s

2024-02-27 00:20:22 (38.5 MB/s) - 'python_gnupg-0.5.2-py2.py3-none-any.whl.asc' saved [801/801]

+ mkdir gnupg
+ chmod 0700 gnupg
+ popd
+ gpg --homedir /tmp/tmp.hTMYgQLAMP/gnupg --import build/deps/python-gnupg.asc
~/buskill-app
gpg: keybox '/tmp/tmp.hTMYgQLAMP/gnupg/pubring.kbx' created
gpg: /tmp/tmp.hTMYgQLAMP/gnupg/trustdb.gpg: trustdb created
gpg: key 9147B477339A9B86: public key "Vinay Sajip (CODE SIGNING KEY) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
+ gpgv --homedir /tmp/tmp.hTMYgQLAMP/gnupg --keyring /tmp/tmp.hTMYgQLAMP/gnupg/pubring.kbx /tmp/tmp.hTMYgQLAMP/python_gnupg-0.5.2-py2.py3-none-any.whl.asc /tmp/tmp.hTMYgQLAMP/python_gnupg-0.5.2-py2.py3-none-any.whl
gpgv: Signature made Tue Dec 12 08:14:22 2023 UTC
gpgv:                using RSA key 9147B477339A9B86
gpgv: Good signature from "Vinay Sajip (CODE SIGNING KEY) <[email protected]>"
+ [[ 0 -ne 0 ]]
+ /tmp/kivy_appdir/AppRun -m pip install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:////tmp/tmp.hTMYgQLAMP /tmp/tmp.hTMYgQLAMP/python_gnupg-0.5.2-py2.py3-none-any.whl
WARNING: The directory '/root/buskill-app/build/deps' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in links: file://tmp/tmp.hTMYgQLAMP
Processing /tmp/tmp.hTMYgQLAMP/python_gnupg-0.5.2-py2.py3-none-any.whl
Installing collected packages: python-gnupg
Successfully installed python-gnupg-0.5.2
+ rm -rf /tmp/tmp.hTMYgQLAMP
++ mktemp -d
+ tmpDir=/tmp/tmp.TMbcMBjmCN
+ chown _apt:root /tmp/tmp.TMbcMBjmCN
+ chmod 0770 /tmp/tmp.TMbcMBjmCN
/tmp/tmp.TMbcMBjmCN ~/buskill-app
+ pushd /tmp/tmp.TMbcMBjmCN
+ /bin/su _apt -s /bin/bash -c '/tmp/kivy_appdir/AppRun -m pip download libusb1'
WARNING: The directory '/nonexistent/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting libusb1
  Downloading libusb1-3.1.0-py3-none-any.whl (62 kB)
  Saved ./libusb1-3.1.0-py3-none-any.whl
Successfully downloaded libusb1
WARNING: You are using pip version 20.1.1; however, version 24.0 is available.
You should consider upgrading via the '/tmp/kivy_appdir/opt/python3.7/bin/python3.7 -m pip install --upgrade pip' command.
++ ls -1
++ head -n1
+ filename=libusb1-3.1.0-py3-none-any.whl
++ /bin/su _apt -s /bin/bash -c 'curl -s https://pypi.org/simple/libusb1/'
++ grep -oE 'https://.*libusb1-3.1.0-py3-none-any.whl#'
++ sed s/#/.asc/
+ signature_url=https://files.pythonhosted.org/packages/85/5c/9169aea7690df382b677d9f725accc3ec864849c5ab49991e3823a942392/libusb1-3.1.0-py3-none-any.whl.asc
+ /bin/su _apt -s /bin/bash -c 'wget "https://files.pythonhosted.org/packages/85/5c/9169aea7690df382b677d9f725accc3ec864849c5ab49991e3823a942392/libusb1-3.1.0-py3-none-any.whl.asc"'
--2024-02-27 00:20:34--  https://files.pythonhosted.org/packages/85/5c/9169aea7690df382b677d9f725accc3ec864849c5ab49991e3823a942392/libusb1-3.1.0-py3-none-any.whl.asc
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.164.223, 2a04:4e42:27::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.164.223|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-02-27 00:20:36 ERROR 404: Not Found.

+ mkdir gnupg
+ chmod 0700 gnupg
~/buskill-app
+ popd
+ gpg --homedir /tmp/tmp.TMbcMBjmCN/gnupg --import build/deps/libusb1.asc
gpg: keybox '/tmp/tmp.TMbcMBjmCN/gnupg/pubring.kbx' created
gpg: /tmp/tmp.TMbcMBjmCN/gnupg/trustdb.gpg: trustdb created
gpg: key CAC936914257B0C1: public key "Vincent Pelletier <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
+ gpgv --homedir /tmp/tmp.TMbcMBjmCN/gnupg --keyring /tmp/tmp.TMbcMBjmCN/gnupg/pubring.kbx /tmp/tmp.TMbcMBjmCN/libusb1-3.1.0-py3-none-any.whl.asc /tmp/tmp.TMbcMBjmCN/libusb1-3.1.0-py3-none-any.whl
gpgv: can't open '/tmp/tmp.TMbcMBjmCN/libusb1-3.1.0-py3-none-any.whl.asc': No such file or directory
gpgv: verify signatures failed: No such file or directory
ERROR: Invalid PGP signature!
+ [[ 2 -ne 0 ]]
+ echo 'ERROR: Invalid PGP signature!'
+ exit 1
+ chown -R user dist
+ exit 0
+ exit 0
user@buskill:~/sandbox/buskill-app$ 

@maltfield
Copy link
Member Author

I opened an upstream bug about this here:

@maltfield
Copy link
Member Author

Per the above ticket, the python-libusb1 project is now uploading their releases (including their release signatures) as GitHub releases, which should enable us to fix this bug by switching from downloading from PyPI to GitHub.

maltfield added a commit that referenced this issue Mar 6, 2024
it looks like the upstream PyPI signature bugs are more widespread than just python_gnupg

I've worked with the devs to ensure releases are getting uploaded to GitHub so our builds aren't blocked by PyPI bugs breaking PGP signatures

 * #78
 * vsajip/python-gnupg#234
 * vpelletier/python-libusb1#96

Now we download from GitHub's website instead of PyPI's website, so 404 errors from PyPI won't break the builds.

TODO: update this to query the GitHub API and grab the latest release (currently they're just hardcoded & pinned as a quick fix)
@maltfield
Copy link
Member Author

I've replaced the download URL for the signed python deps from PyPI to GitHub in all three platform's build scripts, but it looks like MacOS is still having some distinct issues finding the path to pip after upgrade

2024-03-07T23:52:10.4864930Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/pip-20.1.1-py2.py3-none-any.whl
2024-03-07T23:52:10.9370650Z Looking in links: file:///Users/runner/work/buskill-app/buskill-app/build/deps/
2024-03-07T23:52:10.9683600Z Processing ./build/deps/pip-20.1.1-py2.py3-none-any.whl
2024-03-07T23:52:11.0374420Z Installing collected packages: pip
2024-03-07T23:52:12.3176550Z Successfully installed pip-23.3.1
2024-03-07T23:52:12.4074210Z ++ sort -n
2024-03-07T23:52:12.4102550Z ++ uniq
2024-03-07T23:52:12.4104960Z ++ find /usr/local/Cellar/python -type f -wholename '*bin/pip3*'
2024-03-07T23:52:12.4107930Z ++ head -n1
2024-03-07T23:52:12.4108430Z find: /usr/local/Cellar/python: No such file or directory
2024-03-07T23:52:12.4115640Z + PIP_PATH=
2024-03-07T23:52:12.4125740Z ++ pwd
2024-03-07T23:52:12.4131170Z + install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/setuptools-49.1.0-py3-none-any.whl
2024-03-07T23:52:12.4196800Z install: illegal option -- -

@maltfield
Copy link
Member Author

I'm also struggling with the PowerShell on Windows.

For some reason I can't get the subcommand to work on this curl call. But if I take the same output from the subcommand and paste it into the curl command manually, it works fine

PS C:\> curl -OutFile "$(Split-Path -Leaf ${file_url})" "${file_url}"
Invoke-WebRequest : Illegal characters in path.
At line:1 char:1
+ Invoke-WebRequest -OutFile "$(Split-Path -Leaf ${file_url})" "${file_ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-WebRequest], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

PS C:\>

PS C:\> Split-Path -Leaf "${file_url}"
python_gnupg-0.5.2-py2.py3-none-any.whl

PS C:\> curl -OutFile "python_gnupg-0.5.2-py2.py3-none-any.whl" "${file_url}"
PS C:\>

I've asked about this on SE here:

@maltfield
Copy link
Member Author

Update: issue with the windows builds in previous comment was a trailing newline. I fixed it by saving the output of Split-Path to a variable and using trim() on that variable.

@maltfield
Copy link
Member Author

maltfield commented Mar 8, 2024

Windows builds are fixed!

I fixed the issue with the MacOS builds not being able to find PIP_PATH by adding a wildcard glob at the end of /usr/local/Cellar/python*

But, unfortunately, lots of other pip depends are now failing to install

024-03-08T03:55:28.9972210Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/setuptools-49.1.0-py3-none-any.whl
2024-03-08T03:55:29.1427280Z Traceback (most recent call last):
2024-03-08T03:55:29.1428920Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3", line 5, in <module>
2024-03-08T03:55:29.1430120Z     from pip._internal.cli.main import main
2024-03-08T03:55:29.1431310Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:55:29.1432440Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:55:29.1433710Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:55:29.1435590Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:55:29.1436890Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:55:29.1437960Z     from pip._internal.cli import cmdoptions
2024-03-08T03:55:29.1440800Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:55:29.1441970Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:55:29.1443210Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:55:29.1444370Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:55:29.1445570Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:55:29.1446660Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:55:29.1447770Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:55:29.1448780Z     from pip._internal.locations import (
2024-03-08T03:55:29.1450340Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:55:29.1451550Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:55:29.1453230Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)
2024-03-08T03:55:29.1600870Z ++ pwd
2024-03-08T03:55:29.1606060Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/wheel-0.34.2-py2.py3-none-any.whl
2024-03-08T03:55:29.3006910Z Traceback (most recent call last):
2024-03-08T03:55:29.3008080Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3", line 5, in <module>
2024-03-08T03:55:29.3009800Z     from pip._internal.cli.main import main
2024-03-08T03:55:29.3011050Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:55:29.3012170Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:55:29.3013460Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:55:29.3014680Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:55:29.3015940Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:55:29.3017000Z     from pip._internal.cli import cmdoptions
2024-03-08T03:55:29.3018120Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:55:29.3019260Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:55:29.3020490Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:55:29.3021660Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:55:29.3022870Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:55:29.3023960Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:55:29.3025080Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:55:29.3026090Z     from pip._internal.locations import (
2024-03-08T03:55:29.3027210Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:55:29.3028410Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:55:29.3030100Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)
2024-03-08T03:55:29.3181420Z ++ pwd
2024-03-08T03:55:29.3186770Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/Kivy-1.11.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
2024-03-08T03:55:29.4661550Z Traceback (most recent call last):
2024-03-08T03:55:29.4662880Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3", line 5, in <module>
2024-03-08T03:55:29.4664470Z     from pip._internal.cli.main import main
2024-03-08T03:55:29.4666110Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:55:29.4667650Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:55:29.4669180Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:55:29.4670560Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:55:29.4672620Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:55:29.4673790Z     from pip._internal.cli import cmdoptions
2024-03-08T03:55:29.4675030Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:55:29.4676280Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:55:29.4677640Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:55:29.4678930Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:55:29.4680260Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:55:29.4681440Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:55:29.4683080Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:55:29.4684220Z     from pip._internal.locations import (
2024-03-08T03:55:29.4685470Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:55:29.4692810Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:55:29.4696270Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)
2024-03-08T03:55:29.4870360Z ++ pwd
2024-03-08T03:55:29.4875950Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/pyinstaller-4.7.tar.gz
2024-03-08T03:55:29.6303010Z Traceback (most recent call last):
2024-03-08T03:55:29.6304690Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3", line 5, in <module>
2024-03-08T03:55:29.6306170Z     from pip._internal.cli.main import main
2024-03-08T03:55:29.6307450Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:55:29.6308590Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:55:29.6309860Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:55:29.6311100Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:55:29.6312360Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:55:29.6313420Z     from pip._internal.cli import cmdoptions
2024-03-08T03:55:29.6314540Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:55:29.6315670Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:55:29.6316910Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:55:29.6318100Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:55:29.6319310Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:55:29.6320390Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:55:29.6321530Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:55:29.6322550Z     from pip._internal.locations import (
2024-03-08T03:55:29.6323670Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:55:29.6324870Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:55:29.6326580Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)

It even fails at the end (in the "print debugging info" section) when trying to get the pip version

2024-03-08T03:56:03.3518480Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 --version
2024-03-08T03:56:03.4926870Z Traceback (most recent call last):
2024-03-08T03:56:03.4928060Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3", line 5, in <module>
2024-03-08T03:56:03.4929260Z     from pip._internal.cli.main import main
2024-03-08T03:56:03.4930470Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:56:03.4931590Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:56:03.4932870Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:56:03.4934100Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:56:03.4935370Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:56:03.4936440Z     from pip._internal.cli import cmdoptions
2024-03-08T03:56:03.4937540Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:56:03.4938680Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:56:03.4939910Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:56:03.4941420Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:56:03.4942610Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:56:03.4944060Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:56:03.4946270Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:56:03.4947290Z     from pip._internal.locations import (
2024-03-08T03:56:03.4948410Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:56:03.4949620Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:56:03.4951360Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)
2024-03-08T03:56:03.5091190Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -m pip list
2024-03-08T03:56:03.6462720Z Traceback (most recent call last):
2024-03-08T03:56:03.6463950Z   File "<frozen runpy>", line 198, in _run_module_as_main
2024-03-08T03:56:03.6465360Z   File "<frozen runpy>", line 88, in _run_code
2024-03-08T03:56:03.6467210Z   File "/usr/local/lib/python3.11/site-packages/pip/__main__.py", line 23, in <module>
2024-03-08T03:56:03.6468780Z     from pip._internal.cli.main import main as _main  # isort:skip # noqa
2024-03-08T03:56:03.6469580Z     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-08T03:56:03.6470680Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:56:03.6471860Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:56:03.6473200Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:56:03.6474460Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:56:03.6475780Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:56:03.6476890Z     from pip._internal.cli import cmdoptions
2024-03-08T03:56:03.6478060Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:56:03.6480010Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:56:03.6481320Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:56:03.6482510Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:56:03.6483750Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:56:03.6484860Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:56:03.6486000Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:56:03.6487060Z     from pip._internal.locations import (
2024-03-08T03:56:03.6488220Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:56:03.6489450Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:56:03.6491170Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)
2024-03-08T03:56:03.6643590Z + which pip3
2024-03-08T03:56:03.6661270Z /usr/local/bin/pip3
2024-03-08T03:56:03.6662710Z + pip3 list
2024-03-08T03:56:03.8124880Z Traceback (most recent call last):
2024-03-08T03:56:03.8125740Z   File "/usr/local/bin/pip3", line 5, in <module>
2024-03-08T03:56:03.8133380Z     from pip._internal.cli.main import main
2024-03-08T03:56:03.8134880Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in <module>
2024-03-08T03:56:03.8136070Z     from pip._internal.cli.autocompletion import autocomplete
2024-03-08T03:56:03.8137410Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
2024-03-08T03:56:03.8138680Z     from pip._internal.cli.main_parser import create_main_parser
2024-03-08T03:56:03.8139990Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
2024-03-08T03:56:03.8141120Z     from pip._internal.cli import cmdoptions
2024-03-08T03:56:03.8142310Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
2024-03-08T03:56:03.8143620Z     from pip._internal.cli.progress_bars import BAR_TYPES
2024-03-08T03:56:03.8144850Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/progress_bars.py", line 12, in <module>
2024-03-08T03:56:03.8146020Z     from pip._internal.utils.logging import get_indentation
2024-03-08T03:56:03.8147220Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/logging.py", line 18, in <module>
2024-03-08T03:56:03.8148300Z     from pip._internal.utils.misc import ensure_dir
2024-03-08T03:56:03.8149420Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 31, in <module>
2024-03-08T03:56:03.8150430Z     from pip._internal.locations import (
2024-03-08T03:56:03.8151550Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/locations/__init__.py", line 9, in <module>
2024-03-08T03:56:03.8153130Z     from pip._internal.models.scheme import SCHEME_KEYS, Scheme
2024-03-08T03:56:03.8154800Z ImportError: cannot import name 'SCHEME_KEYS' from 'pip._internal.models.scheme' (/usr/local/lib/python3.11/site-packages/pip/_internal/models/scheme.py)

@maltfield
Copy link
Member Author

Looks like I had this issue before, and it was fixed by making sure we used the right python/pip version

@maltfield
Copy link
Member Author

maltfield commented Mar 8, 2024

Google seems to suggest that these SCHEME_KEYS errors mean I need to upgrade pip. And, of course, there's no secure way to do that. Let's 3TOFU again because the fucking pip maintainers don't give a shit about secure supply chain security.

Currently we install pip-20.1.1-py2.py3-none-any.whl

${PIP_PATH} install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file://`pwd`/build/deps/ build/deps/pip-20.1.1-py2.py3-none-any.whl

Looks like the latest version is 24.0:

@maltfield
Copy link
Member Author

TOFU 1/3 (VPN, exit in Hong Kong) gives sha256sum = ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc

user@disp3820:~$ REMOTE_FILES="https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl"

CURL="/usr/bin/curl"
WGET="/usr/bin/wget --retry-on-host-error --retry-connrefused"
PYTHON="/usr/bin/python3"

# in tails, we must torify
if  "`whoami`" == "amnesia" ; then
        CURL="/usr/bin/torify ${CURL}"
        WGET="/usr/bin/torify ${WGET}"
        PYTHON="/usr/bin/torify ${PYTHON}"
fi

tmpDir=`mktemp -d`
pushd "${tmpDir}"

# first get some info about our internet connection
${CURL} -s https://ifconfig.co/country | head -n1
${CURL} -s https://check.torproject.org | grep Congratulations | head -n1

# and today's date
gpg --with-fingerprint --keyid-format 0xlong *
bash: user: command not found
/tmp/tmp.G5nLcLkzB7 ~
Hong Kong
2024-03-08
--2024-03-07 23:25:53--  https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.76.223, 2a04:4e42:12::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.76.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2110226 (2.0M) [binary/octet-stream]
Saving to: ‘pip-24.0-py3-none-any.whl’

pip-24.0-py3-none-a 100%[===================>]   2.01M  41.6KB/s    in 24s     

2024-03-07 23:26:20 (85.5 KB/s) - ‘pip-24.0-py3-none-any.whl’ saved [2110226/2110226]

Fri 08 Mar 2024 04:26:20 AM UTC
ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc  pip-24.0-py3-none-any.whl
...
user@disp3820:/tmp/tmp.G5nLcLkzB7$ 

@maltfield
Copy link
Member Author

maltfield commented Mar 8, 2024

TOFU 2/3 (Tor, exit in Poland) gives sha256sum = ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc

user@host:~$ REMOTE_FILES="https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl" 

CURL="/usr/bin/curl"
WGET="/usr/bin/wget --retry-on-host-error --retry-connrefused"
PYTHON="/usr/bin/python3"

# in tails, we must torify
if  "`whoami`" == "amnesia" ; then
        CURL="/usr/bin/torify ${CURL}"
        WGET="/usr/bin/torify ${WGET}"
        PYTHON="/usr/bin/torify ${PYTHON}"
fi

tmpDir=`mktemp -d`
pushd "${tmpDir}"

# first get some info about our internet connection
${CURL} -s https://ifconfig.co/country | head -n1
${CURL} -s https://check.torproject.org | grep Congratulations | head -n1

# and today's date
gpg --with-fingerprint --keyid-format 0xlong *
bash: user: command not found
/tmp/tmp.B9EwgGn7if ~
<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="robots" content="noindex,nofollow"><meta name="viewport" content="width=device-width,initial-scale=1"><style>*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%;color:#313131}button,html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}@media (prefers-color-scheme:dark){body{background-color:#222;color:#d9d9d9}body a{color:#fff}body a:hover{color:#ee730a;text-decoration:underline}body .lds-ring div{border-color:#999 transparent transparent}body .font-red{color:#b20f03}body .big-button,body .pow-button{background-color:#4693ff;color:#1d1d1d}body #challenge-success-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDI2IDI2Ij48cGF0aCBmaWxsPSIjZDlkOWQ5IiBkPSJNMTMgMGExMyAxMyAwIDEgMCAwIDI2IDEzIDEzIDAgMCAwIDAtMjZtMCAyNGExMSAxMSAwIDEgMSAwLTIyIDExIDExIDAgMCAxIDAgMjIiLz48cGF0aCBmaWxsPSIjZDlkOWQ5IiBkPSJtMTAuOTU1IDE2LjA1NS0zLjk1LTQuMTI1LTEuNDQ1IDEuMzg1IDUuMzcgNS42MSA5LjQ5NS05LjYtMS40Mi0xLjQwNXoiLz48L3N2Zz4=)}body #challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+)}}body{display:flex;flex-direction:column;min-height:100vh}body.no-js .loading-spinner{visibility:hidden}body.no-js .challenge-running{display:none}body.dark{background-color:#222;color:#d9d9d9}body.dark a{color:#fff}body.dark a:hover{color:#ee730a;text-decoration:underline}body.dark .lds-ring div{border-color:#999 transparent transparent}body.dark .font-red{color:#b20f03}body.dark .big-button,body.dark .pow-button{background-color:#4693ff;color:#1d1d1d}body.dark #challenge-success-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDI2IDI2Ij48cGF0aCBmaWxsPSIjZDlkOWQ5IiBkPSJNMTMgMGExMyAxMyAwIDEgMCAwIDI2IDEzIDEzIDAgMCAwIDAtMjZtMCAyNGExMSAxMSAwIDEgMSAwLTIyIDExIDExIDAgMCAxIDAgMjIiLz48cGF0aCBmaWxsPSIjZDlkOWQ5IiBkPSJtMTAuOTU1IDE2LjA1NS0zLjk1LTQuMTI1LTEuNDQ1IDEuMzg1IDUuMzcgNS42MSA5LjQ5NS05LjYtMS40Mi0xLjQwNXoiLz48L3N2Zz4=)}body.dark #challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+)}body.light{background-color:transparent;color:#313131}body.light a{color:#0051c3}body.light a:hover{color:#ee730a;text-decoration:underline}body.light .lds-ring div{border-color:#595959 transparent transparent}body.light .font-red{color:#fc574a}body.light .big-button,body.light .pow-button{background-color:#003681;border-color:#003681;color:#fff}body.light #challenge-success-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDI2IDI2Ij48cGF0aCBmaWxsPSIjMzEzMTMxIiBkPSJNMTMgMGExMyAxMyAwIDEgMCAwIDI2IDEzIDEzIDAgMCAwIDAtMjZtMCAyNGExMSAxMSAwIDEgMSAwLTIyIDExIDExIDAgMCAxIDAgMjIiLz48cGF0aCBmaWxsPSIjMzEzMTMxIiBkPSJtMTAuOTU1IDE2LjA1NS0zLjk1LTQuMTI1LTEuNDQ1IDEuMzg1IDUuMzcgNS42MSA5LjQ5NS05LjYtMS40Mi0xLjQwNXoiLz48L3N2Zz4=)}body.light #challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI2ZjNTc0YSIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjZmM1NzRhIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+)}a{background-color:transparent;color:#0051c3;text-decoration:none;transition:color .15s ease}a:hover{color:#ee730a;text-decoration:underline}.main-content{margin:8rem auto;max-width:60rem;width:100%}.heading-favicon{height:2rem;margin-right:.5rem;width:2rem}@media (width <= 720px){.main-content{margin-top:4rem}.heading-favicon{height:1.5rem;width:1.5rem}}.footer,.main-content{padding-left:1.5rem;padding-right:1.5rem}.main-wrapper{align-items:center;display:flex;flex:1;flex-direction:column}.font-red{color:#b20f03}.spacer{margin:2rem 0}.h1{font-size:2.5rem;font-weight:500;line-height:3.75rem}.h2{font-weight:500}.core-msg,.h2{font-size:1.5rem;line-height:2.25rem}.body-text,.core-msg{font-weight:400}.body-text{font-size:1rem;line-height:1.25rem}@media (width <= 720px){.h1{font-size:1.5rem;line-height:1.75rem}.h2{font-size:1.25rem}.core-msg,.h2{line-height:1.5rem}.core-msg{font-size:1rem}}#challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI2ZjNTc0YSIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjZmM1NzRhIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+);padding-left:34px}#challenge-error-text,#challenge-success-text{background-repeat:no-repeat;background-size:contain}#challenge-success-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDI2IDI2Ij48cGF0aCBmaWxsPSIjMzEzMTMxIiBkPSJNMTMgMGExMyAxMyAwIDEgMCAwIDI2IDEzIDEzIDAgMCAwIDAtMjZtMCAyNGExMSAxMSAwIDEgMSAwLTIyIDExIDExIDAgMCAxIDAgMjIiLz48cGF0aCBmaWxsPSIjMzEzMTMxIiBkPSJtMTAuOTU1IDE2LjA1NS0zLjk1LTQuMTI1LTEuNDQ1IDEuMzg1IDUuMzcgNS42MSA5LjQ5NS05LjYtMS40Mi0xLjQwNXoiLz48L3N2Zz4=);padding-left:42px}.text-center{text-align:center}.big-button{border:.063rem solid #0051c3;border-radius:.313rem;font-size:.875rem;line-height:1.313rem;padding:.375rem 1rem;transition-duration:.2s;transition-property:background-color,border-color,color;transition-timing-function:ease}.big-button:hover{cursor:pointer}.captcha-prompt:not(.hidden){display:flex}@media (width <= 720px){.captcha-prompt:not(.hidden){flex-wrap:wrap;justify-content:center}}.pow-button{background-color:#0051c3;color:#fff;margin:2rem 0}.pow-button:hover{background-color:#003681;border-color:#003681;color:#fff}.footer{font-size:.75rem;line-height:1.125rem;margin:0 auto;max-width:60rem;width:100%}.footer-inner{border-top:1px solid #d9d9d9;padding-bottom:1rem;padding-top:1rem}.clearfix:after{clear:both;content:"";display:table}.clearfix .column{float:left;padding-right:1.5rem;width:50%}.diagnostic-wrapper{margin-bottom:.5rem}.footer .ray-id{text-align:center}.footer .ray-id code{font-family:monaco,courier,monospace}.core-msg,.zone-name-title{overflow-wrap:break-word}@media (width <= 720px){.diagnostic-wrapper{display:flex;flex-wrap:wrap;justify-content:center}.clearfix:after{clear:none;content:none;display:initial;text-align:center}.column{padding-bottom:2rem}.clearfix .column{float:none;padding:0;width:auto;word-break:keep-all}.zone-name-title{margin-bottom:1rem}}.loading-spinner{height:76.391px}.lds-ring{display:inline-block;position:relative}.lds-ring,.lds-ring div{height:1.875rem;width:1.875rem}.lds-ring div{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border:.3rem solid transparent;border-radius:50%;border-top-color:#313131;box-sizing:border-box;display:block;position:absolute}.lds-ring div:first-child{animation-delay:-.45s}.lds-ring div:nth-child(2){animation-delay:-.3s}.lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){.main-wrapper,body{display:block}}</style><meta http-equiv="refresh" content="375"></head><body class="no-js"><div class="main-wrapper" role="main"><div class="main-content"><noscript><div id="challenge-error-title"><div class="h2"><span id="challenge-error-text">Enable JavaScript and cookies to continue</span></div></div></noscript></div></div><script>(function(){window._cf_chl_opt={cvId: '3',cZone: "ifconfig.co",cType: 'managed',cNounce: '88448',cRay: '8614626d4c1b91fc',cHash: '74a0e7cd429f6ab',cUPMDTk: "\/country?__cf_chl_tk=YtIaq1nVHT..arhPkeS814SgOzRQTIcS6287O.RMTk4-1709917257-0.0.1.1-1471",cFPWv: 'b',cTTimeMs: '1000',cMTimeMs: '375000',cTplV: 5,cTplB: 'cf',cK: "visitor-time",fa: "\/country?__cf_chl_f_tk=YtIaq1nVHT..arhPkeS814SgOzRQTIcS6287O.RMTk4-1709917257-0.0.1.1-1471",md: "eweM2EZLa.S9TQpU3TRjwFKa7d6V_zzrCbYyu13NacI-1709917257-1.1.1.1-3nhX8taVzQnqsXxFXTv.nzakzStrFP0Cr9PlgBEJvJfOj3eyvnAvtTs26R9ZIAIvrw8G1r86H9r5aE3QuX5oQ4Zqcy6bbbx3wxRRCz_GAI0uZ4MFkiG.597lDAEUA.TSq7fK.EEAiuFynPhC6Z6oJ1Ra4N8zdEE4ie21KgimUOPQ8hUMFnkOIm.bNBHtxSuIM3oYKD2AFiRMPQGK2KjAp9QzA3hZdy9MVDTaybFkCBd3oZKBd3J6U.roItEX1yimBLyOWhQgbqcRR7ZowunJwGOSntVTn1UZRd7o.n1239roSD7kBgxA_J8D6q7gu8VoRBdZLXohdyivV4wFcntQKUXcP0DdV.SRNB2kPH30qpc1yezcxHabBylwYBTvwXOrVs6j6fn5mrP8JEllfcsjADz6li3oHaRqMLgixZzKUlDroH7vC3pn16YCcMIY_amBjK1HDHDu.yVQ6YkoezEFdkH8sDpFZNSHVijjefYTV.RnyUKWR7hLrOKXKYKpL5KEbGv_UnGRNZ_FtjRdfRNAehh1rcJtxTxYNcAWiZldNkmZF38mjc4tsuEDGH9iGW7I0pFEKRGUqEMd43KpCmZtryhHe2fz9ou9DQ74GmhLjUklZ31ODJBWNjjULZvTcx8v1CA_09sn2RFs5M.RX2B7NP9yqEHFkkFHmoep9BOizAC66XWDp4DTn8lkce4ptfNbc3BwG14xBFrd_Txa54Hk4Tf3vwmAwEWszfLWmi21KsbavC4vVP4j8UzBZgcLtajUPI_TAVofFNjBvUlpLn1nQXCP45TMzpKKsZUIfTTl8d5H7uVwKmDc67_7MtQigBdwNvSCTC.jl6x1pWX7Td54YkSoxGnsHCPQUcEj6J1bWBk1lwYGWG1q4FDuuSTW0I6X.XIjaEb35qsXJKTdm3FnOsJrvgw32LGFBLAFmQJMxnBKdqmWKk44jAZ.znh7FZ0xysyWU4V.xijmFgDHXFXCAmv3OgHx1QKxnZxmVAAOTC2_V..L1dIEvmCrV9y9uwWH.iDaZHlFvN4rF8zAywaV4DzDTizpQWpo0iJrxrjdY_8mcfvNSQWOmvr.AGYIVBkKqPirzgfGp8eXcn0NzM0L5v7wH9SVmkPxkdTouYLEkgKRkYu_P1Ox9XLcwJmEpLAN_9C2NSqT9nP42Kv3TxdoSyK_.OG_ZenB2gyo2_mraD2Id0QZ1x1sQ3tZNQwifVfWnufbJblUuYc1_.4EIV0ZbujluCVpoxSFjv7mN7v.cMYR9_OtIZE8kviaVmrVOyAxy01GXrb4Nz.cbvuIhMJXZF1pZmX88GrOIWdCDbf.FCLuuQXQs4i2Id80e_TWBsypveg9dSqdZWn2Pshk6rFgdgtL8VjgBFUADDCx5vAuGZ_xP7tp.OP_86Rd3YM6y4hs",mdrd: "T5ot9nPODhhGDF25P3aGml6AxfOOY8hHK2UPfbKbDUA-1709917257-1.1.1.1-L1ZnNusCuTsJ02jEzFcBJPcXKKKhTLXD2QIgysr0xjKswFRPcaxGeZAZZO8Q47tlFy3t0_lg8O0JeYdG__gc_bscmJgXbcIYvsKwZ4Sumwp3t.FQ7XBZdZgmuQYO.V6teSsPeWnTEPjIUWyEvPFgpOIlE1RuSIk3y9RSoe_FSf3.7waRTEEMAySjbxlYFRJ24PEDiTgFLJb5OUgv1hw7zbxuCC2oI8UuE20yWwn28k7KbneFt7Rkh_VtsRWQYOu1fJ620dNt8sgLKMHh0bhbIGOUTbz7YzQjOXnB91NO.9W1b1ZhTZQetBUcsIGSds8WZAYTMQVF8sSsvUdTnEOClWhE3_j4RoKNm1Rn1dKAYnzN6uxOh6aJH_U3WKj__575pxM3SE.oHAGwm5x.YY47BLUj.7G1_Uw7yRxMvxIx_p9g1jwEMshvZEpXNKsQmZZ_H9cC3USiBBZ2osLDP46pQi7gSdHOqn.EzIkc0_bqB_UOHwZAMKqSoNA4sk3imVCWvfXbUP5P.HKRFY6T4K_ZqPMtfJC8_jrOrFtCUYQq2TRuiwltCVWOiOUKFcOFBYeKqOkNPq3Jl1oeVux4zJ1fIb.mxwcioH9K2uueg5fessPUkdNBuDzK5PsNrpDLAT8xk9i2dPsM36IW9amdfROe9El5n7jZc13WYImHyoIj3s6KKhbjrC.xXbBwkCXLobxKniHJwAnnQ3gt3nqs.c94B.OS6FiRsXWJI8rI4_1O0yJSZfycNCyXQLYFEtsHyvmoWgN9BE57MnHxIFEmvy8ilfRXZVyFSEJoUBq1To9Mb1J34pAytIVsQ_pJibv6_bEFC0875FOoOpW1DAXoBD2ILiek7uSj99R.nM9GvkzG0LuYIKBmF63VehrJHwhibydShW1g.shKz80kUUtyvaBRge8SFm8OBBmfWdPLFzUNK.s_FStrcjTvsOjA4flRTeIXmR20O5Z7tYHaKkWGPn_7iB9A0f_9H4dRMQ5ub7i_Ig.uiIuNjJTqm7rhoVEKTb6uO_xcpi52Yf7Gjo5gIE6WMIqFAgXJQeqWTO_k86Lpcqt9hxhaYqTNJcidkhyyWoMKVhpZDCt_9_kxrF4XQIPcsRcBhhOLiDDq5BtPo00M1SDzEtaK6paxgBpxl.cZMgnGK67q9r1QtmhbUdr43off9_w4Bol9IkEV88Yco6r8kixwYxwzovRYGDBLcNJJa4KfaHjwiiTvNgQdR2ZEqoSWLmhdY0lzlUBjM3TXvhN4oQxA4g4tDZO61jozn0IBT1NOBTertKsR2qVvBXFEOQ9owgGGS7Mqa6Y7iH59Y8P.nqK0PPqXYBz99f00iy3Jf3U_yVzYSbSrwLRliw4PrOImXD_5ib19vjauazj12gxFhrrG0WMrhkK_jZ4WAL_3Ze9gnAJ2E7_BsKOqNY035zrv6bQul1HuxFDqLhL3uysaT0l6ky65MrMSKySnjHoOLtCgYi__mgiF7r7RTvBFxTqZ4HQbJeeb.56eoNU9YJqaTd6XndwaVVN.WH4z9_BrLqlV.JPdePg9T3fA2gAeNCpaCf4BYOqv1k51MzzV6c49eSBziRXI3unMHzz_apx8PdBuldgnzg_FleK7vZWCMDKeJTC75E1_T3llegmGdf_Zpr0MDv3028LOLGEyTXH0X0fgvLRmDc169E.QtLt5.TzdtLpoUXMTDOCApD69DoWeAclLRdQRsYiQxsslVXvoOXuuQYdjEY8JBhC_7zPz99yXv4wTCmHDqqt6B8qaDeQF.qVJLq3g34gFHkmyuYKXGUBB.j3ILzs5wvFYYRl..O.P8n9kfesFZZA78nYK_S90JdnoE2Ou4cLXLZHuCL7dH1c4eAGQVzW88HcwvdJTq9H0yKyYg.byXfdIkZjblXb7tmfM1ExMaKG2VUkOo55jdhYt",cRq: {ru: 'aHR0cHM6Ly9pZmNvbmZpZy5jby9jb3VudHJ5',ra: 'Y3VybC83Ljc0LjA=',rm: 'R0VU',d: '3DDgWqBx3GVP+3GLCKwVoMu+pMbTGLrgvQR5iLOSfzyhYozzsauPHdSFMIzYTy5ODSFyHp89C2JXU/y1sTBFoMezXzamuIx3uTwJO595r5NF81GF3M6dq04jOxkYhlWS6gUy1aCpfgVIHFLksUScbtE3Z2yllkgoJEl+SojtdhYBh9cU4cWlImTqG7Bb2KmEYEnLuzLfYyUb0IUPcYkhHffZ+Xxg3+IwTSylttfIU0L2cfVumdzAc0Zrz0+MxmcI3NjKfrKBTeeBPDRVJPlniUr2SSFU90u0szM1F7+DxItN9dY6bstJVQJkwnWG/r2ezOwIpP+xUiu6RTsC8upsYgA93zrojtND/3sY5AjAruRfuvOyE1KGm1ufLAnU18/tZixNdgdtpkKBJuSKFNqWO/7WFhQq5b0oMn5YUVQRlEIzLcD73AjYlZqk9SJIjl07J5aDA1jD9Dqa9gzcwPxkd/CyI6BGzbUgy/haFFOszuO9W4Ya+i3YR8NeQ86p/7tp',t: 'MTcwOTkxNzI1Ny44MDYwMDA=',cT: Math.floor(Date.now() / 1000),m: 'QAvhr7ZpyQf3eRA8LucA3Q4Th9mUEmMQe1g4irgD1o8=',i1: 'ixHNoeA/9VObKR9avRrfsw==',i2: 'HauQv12KjsSBBnPDJq7HpA==',zh: 'wfxagHEJWT3JG7Kg7GGlyGD+aeLZ/HC9BE3wDXuEzqE=',uh: 'zu+cQgicc5rF6Q8HHTJhdGCD3QVkjetpkn+QXGMpZBU=',hh: 'am/Zv95ZWAcmK4pRq/3uE/0XoTs/sjoPLUYI0lCN1aE=',}};var cpo = document.createElement('script');cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1?ray=8614626d4c1b91fc';window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;if (window.history && window.history.replaceState) {var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;history.replaceState(null, null, "\/country?__cf_chl_rt_tk=YtIaq1nVHT..arhPkeS814SgOzRQTIcS6287O.RMTk4-1709917257-0.0.1.1-1471" + window._cf_chl_opt.cOgUHash);cpo.onload = function() {history.replaceState(null, null, ogU);}}document.getElementsByTagName('head')[0].appendChild(cpo);}());</script></body></html>      Congratulations. This browser is configured to use Tor.
2024-03-08
--2024-03-08 17:01:00--  https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.36.223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.36.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2110226 (2.0M) [binary/octet-stream]
Saving to: ‘pip-24.0-py3-none-any.whl’

pip-24.0-py3-none-a 100%[===================>]   2.01M   153KB/s    in 17s     

2024-03-08 17:01:19 (122 KB/s) - ‘pip-24.0-py3-none-any.whl’ saved [2110226/2110226]

Fri 08 Mar 2024 05:01:19 PM UTC
ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc  pip-24.0-py3-none-any.whl
gpg: keybox '/home/user/.gnupg/pubring.kbx' created
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: no valid OpenPGP data found.
gpg: processing message failed: Unknown system error
user@host:/tmp/tmp.B9EwgGn7if$

@maltfield
Copy link
Member Author

TOFU 3/3 (ISP, exit in Ecuador) gives sha256sum = ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc

user@disp4805:~$ REMOTE_FILES="https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl"

CURL="/usr/bin/curl"
WGET="/usr/bin/wget --retry-on-host-error --retry-connrefused"
PYTHON="/usr/bin/python3"

# in tails, we must torify
if  "`whoami`" == "amnesia" ; then
        CURL="/usr/bin/torify ${CURL}"
        WGET="/usr/bin/torify ${WGET}"
        PYTHON="/usr/bin/torify ${PYTHON}"
fi

tmpDir=`mktemp -d`
pushd "${tmpDir}"

# first get some info about our internet connection
${CURL} -s https://ifconfig.co/country | head -n1
${CURL} -s https://check.torproject.org | grep Congratulations | head -n1

# and today's date
gpg --with-fingerprint --keyid-format 0xlong *
bash: user: command not found
/tmp/tmp.ClOrQkf9Q8 ~
Ecuador
2024-03-09
--2024-03-09 13:05:28--  https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 199.232.48.223, 2a04:4e42:49::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|199.232.48.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2110226 (2.0M) [binary/octet-stream]
Saving to: ‘pip-24.0-py3-none-any.whl’

pip-24.0-py3-none-any.whl     100%[===============================================>]   2.01M   921KB/s    in 2.2s    

2024-03-09 13:05:30 (921 KB/s) - ‘pip-24.0-py3-none-any.whl’ saved [2110226/2110226]

Sat 09 Mar 2024 06:05:30 PM UTC
ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc  pip-24.0-py3-none-any.whl
gpg: directory '/home/user/.gnupg' created
gpg: keybox '/home/user/.gnupg/pubring.kbx' created
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: no valid OpenPGP data found.
gpg: processing message failed: Unknown system error
user@disp4805:/tmp/tmp.ClOrQkf9Q8$ 

@maltfield
Copy link
Member Author

Ok, 3/3 TOFU on 3 distinct days matches; adding to the repo

Sat 09 Mar 2024 06:05:30 PM UTC
Fri 08 Mar 2024 04:26:20 AM UTC
Fri 08 Mar 2024 05:01:19 PM UTC
ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc  pip-24.0-py3-none-any.whl
ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc  pip-24.0-py3-none-any.whl
ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc  pip-24.0-py3-none-any.whl

maltfield added a commit that referenced this issue Mar 10, 2024
Upgrading pip in attempt to fix the SCHEME_KEYS errors on macos builds. For more info, see:

 * #78 (comment)
@maltfield
Copy link
Member Author

After upgrading, the linux & windows builds are still working but the MacOS builds are still failing

We fixed the issue with SCHEME_KEYS, however, this is something new.

For some reason when it installs pip-24.0 it says it Successfully installed pip-23.3.1

2024-03-10T02:06:09.6857290Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/pip-24.0-py3-none-any.whl
2024-03-10T02:06:10.2061330Z Looking in links: file:///Users/runner/work/buskill-app/buskill-app/build/deps/
2024-03-10T02:06:10.2293570Z Processing ./build/deps/pip-24.0-py3-none-any.whl
2024-03-10T02:06:10.3062690Z Installing collected packages: pip
2024-03-10T02:06:12.1157720Z Successfully installed pip-23.3.1
2024-03-10T02:06:12.1848790Z ++ sort -n
2024-03-10T02:06:12.1851640Z ++ find /usr/local/Cellar/[email protected] /usr/local/Cellar/[email protected] -type f -wholename '*bin/pip3*'
2024-03-10T02:06:12.1857130Z ++ uniq
2024-03-10T02:06:12.1869520Z ++ head -n1
2024-03-10T02:06:12.2749580Z + PIP_PATH=/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip

@maltfield
Copy link
Member Author

The first noticeable error appears to be when it tries to install PyInstaller

2024-03-10T02:06:14.5875850Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/pyinstaller-4.7.tar.gz
2024-03-10T02:06:15.0305170Z Looking in links: file:///Users/runner/work/buskill-app/buskill-app/build/deps/
2024-03-10T02:06:15.0492760Z Processing ./build/deps/pyinstaller-4.7.tar.gz
2024-03-10T02:06:15.2806720Z   Installing build dependencies: started
2024-03-10T02:06:16.4391520Z   Installing build dependencies: finished with status 'done'
2024-03-10T02:06:16.4442830Z   Getting requirements to build wheel: started
2024-03-10T02:06:16.6307710Z   Getting requirements to build wheel: finished with status 'done'
2024-03-10T02:06:16.6362190Z ERROR: Exception:
2024-03-10T02:06:16.6362790Z Traceback (most recent call last):
2024-03-10T02:06:16.6365210Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
2024-03-10T02:06:16.6366370Z     status = run_func(*args)
2024-03-10T02:06:16.6366790Z              ^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6367790Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
2024-03-10T02:06:16.6368820Z     return func(self, options, args)
2024-03-10T02:06:16.6369290Z            ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6370290Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 377, in run
2024-03-10T02:06:16.6371310Z     requirement_set = resolver.resolve(
2024-03-10T02:06:16.6371800Z                       ^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6372990Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 76, in resolve
2024-03-10T02:06:16.6374650Z     collected = self.factory.collect_root_requirements(root_reqs)
2024-03-10T02:06:16.6375630Z                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6377070Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 534, in collect_root_requirements
2024-03-10T02:06:16.6378340Z     reqs = list(
2024-03-10T02:06:16.6378660Z            ^^^^^
2024-03-10T02:06:16.6380310Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 490, in _make_requirements_from_install_req
2024-03-10T02:06:16.6382590Z     cand = self._make_base_candidate_from_link(
2024-03-10T02:06:16.6383170Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6385020Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 228, in _make_base_candidate_from_link
2024-03-10T02:06:16.6387170Z     self._link_candidate_cache[link] = LinkCandidate(
2024-03-10T02:06:16.6388130Z                                        ^^^^^^^^^^^^^^
2024-03-10T02:06:16.6389540Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
2024-03-10T02:06:16.6390700Z     super().__init__(
2024-03-10T02:06:16.6391810Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
2024-03-10T02:06:16.6393290Z     self.dist = self._prepare()
2024-03-10T02:06:16.6393750Z                 ^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6394970Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 222, in _prepare
2024-03-10T02:06:16.6396700Z     dist = self._prepare_distribution()
2024-03-10T02:06:16.6397220Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6398970Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 301, in _prepare_distribution
2024-03-10T02:06:16.6401620Z     return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
2024-03-10T02:06:16.6402990Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6404330Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_linked_requirement
2024-03-10T02:06:16.6406160Z     return self._prepare_linked_requirement(req, parallel_builds)
2024-03-10T02:06:16.6406860Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6408500Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 640, in _prepare_linked_requirement
2024-03-10T02:06:16.6409950Z     dist = _get_prepared_distribution(
2024-03-10T02:06:16.6410460Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6412190Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
2024-03-10T02:06:16.6414140Z     abstract_dist.prepare_distribution_metadata(
2024-03-10T02:06:16.6416700Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 54, in prepare_distribution_metadata
2024-03-10T02:06:16.6417960Z     self._install_build_reqs(finder)
2024-03-10T02:06:16.6419180Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 124, in _install_build_reqs
2024-03-10T02:06:16.6420380Z     build_reqs = self._get_build_requires_wheel()
2024-03-10T02:06:16.6420940Z                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6422210Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 101, in _get_build_requires_wheel
2024-03-10T02:06:16.6423770Z     return backend.get_requires_for_build_wheel()
2024-03-10T02:06:16.6424550Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6425840Z   File "/usr/local/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 745, in get_requires_for_build_wheel
2024-03-10T02:06:16.6427260Z     return super().get_requires_for_build_wheel(config_settings=cs)
2024-03-10T02:06:16.6428080Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6429860Z   File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 166, in get_requires_for_build_wheel
2024-03-10T02:06:16.6431450Z     return self._call_hook('get_requires_for_build_wheel', {
2024-03-10T02:06:16.6432110Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6433270Z   File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
2024-03-10T02:06:16.6434500Z     raise BackendUnavailable(data.get('traceback', ''))
2024-03-10T02:06:16.6435490Z pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
2024-03-10T02:06:16.6437210Z   File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
2024-03-10T02:06:16.6438700Z     obj = import_module(mod_path)
2024-03-10T02:06:16.6439190Z           ^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6441290Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
2024-03-10T02:06:16.6442960Z     return _bootstrap._gcd_import(name[level:], package, level)
2024-03-10T02:06:16.6444020Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-10T02:06:16.6444920Z   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-03-10T02:06:16.6445790Z   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-03-10T02:06:16.6446740Z   File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
2024-03-10T02:06:16.6447760Z   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2024-03-10T02:06:16.6448700Z   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-03-10T02:06:16.6449570Z   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-03-10T02:06:16.6450530Z   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2024-03-10T02:06:16.6451680Z   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2024-03-10T02:06:16.6453010Z   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2024-03-10T02:06:16.6454400Z   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2024-03-10T02:06:16.6456730Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/__init__.py", line 23, in <module>
2024-03-10T02:06:16.6458450Z     from setuptools.dist import Distribution
2024-03-10T02:06:16.6460150Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/dist.py", line 36, in <module>
2024-03-10T02:06:16.6461730Z     from setuptools.config import parse_configuration
2024-03-10T02:06:16.6467840Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/config/__init__.py", line 8, in <module>
2024-03-10T02:06:16.6470410Z     from . import setupcfg
2024-03-10T02:06:16.6472670Z   File "/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/config/setupcfg.py", line 32, in <module>
2024-03-10T02:06:16.6474750Z     from ..errors import FileError, OptionError
2024-03-10T02:06:16.6476760Z ImportError: cannot import name 'FileError' from 'setuptools.errors' (/usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/errors.py)

@maltfield
Copy link
Member Author

There's also issues installing Kivy. I think I should just go-through and update all the python packages to their latest versions.

2024-03-10T02:06:14.0117250Z + /usr/local/Cellar/[email protected]/3.11.7_1/Frameworks/Python.framework/Versions/3.11/bin/pip3 install --ignore-installed --upgrade --cache-dir build/deps/ --no-index --find-links file:///Users/runner/work/buskill-app/buskill-app/build/deps/ build/deps/Kivy-1.11.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
2024-03-10T02:06:14.4974820Z Looking in links: file:///Users/runner/work/buskill-app/buskill-app/build/deps/
2024-03-10T02:06:14.5164950Z ERROR: Kivy-1.11.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl is not a supported wheel on this platform.

@maltfield
Copy link
Member Author

maltfield commented Mar 10, 2024

While I'm at it, I'll update python to Python v3.12.

Python is already securely installed in our linux CI runner, so no manual updates needed there.

Python comes installed on our MacOS CI runner. Possibly not secure, but we're relying on shared GitHub runners for MacOS builds. Anyway, no manual updates needed.

We do have to install Python on our Windows CI runners, and manually update our installer in this repo. Fortunately, it looks like Python does sign their windows releases with PGP, but I don't have the key in my keyring.

user@disp5109:~/Downloads$ wget https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe
--2024-03-09 23:54:26--  https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe
Resolving www.python.org (www.python.org)... 146.75.0.223, 2a04:4e42:70::223
Connecting to www.python.org (www.python.org)|146.75.0.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26667456 (25M) [application/octet-stream]
Saving to: ‘python-3.12.2-amd64.exe’

python-3.12.2-amd64 100%[===================>]  25.43M   734KB/s    in 32s     

2024-03-09 23:54:59 (820 KB/s) - ‘python-3.12.2-amd64.exe’ saved [26667456/26667456]

user@disp5109:~/Downloads$ 
user@disp5109:~/Downloads$ wget https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe.asc
--2024-03-09 23:57:10--  https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe.asc
Resolving www.python.org (www.python.org)... 146.75.0.223, 2a04:4e42:70::223
Connecting to www.python.org (www.python.org)|146.75.0.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 836 [application/octet-stream]
Saving to: ‘python-3.12.2-amd64.exe.asc’

python-3.12.2-amd64 100%[===================>]     836  --.-KB/s    in 0s      

2024-03-09 23:57:12 (151 MB/s) - ‘python-3.12.2-amd64.exe.asc’ saved [836/836]

user@disp5109:~/Downloads$ 
user@disp5109:~/Downloads$ gpg --verify python-3.12.2-amd64.exe.asc 
gpg: directory '/home/user/.gnupg' created
gpg: keybox '/home/user/.gnupg/pubring.kbx' created
gpg: assuming signed data in 'python-3.12.2-amd64.exe'
gpg: Signature made Tue 06 Feb 2024 05:41:09 PM -05
gpg:                using RSA key FC624643487034E5
gpg: Can't check signature: No public key
user@disp5109:~/Downloads$

It looks like Python has a designated person as a Release Manager for each version of Python. Additionally, they have a designated person just for signing their Windows releases:

OpenPGP Public Keys

Source and binary executables are signed by the release manager or binary builder using their OpenPGP key. Release files for currently supported releases are signed by the following:

Thomas Wouters (3.12.x and 3.13.x source files and tags) (key id: A821E680E5FA6305)
Pablo Galindo Salgado (3.10.x and 3.11.x source files and tags) (key id: 64E628F8D684696D)
Steve Dower (Windows binaries) (key id: FC62 4643 4870 34E5)
Łukasz Langa (3.8.x and 3.9.x source files and tags) (key id: B269 95E3 1025 0568)
Ned Deily (macOS binaries, 3.7.x / 3.6.x source files and tags) (key ids: 2D34 7EA6 AA65 421D and FB99 2128 6F5E 1540
Larry Hastings (3.5.x source files and tags) (key id: 3A5C A953 F73C 700D)
Benjamin Peterson (2.7.z source files and tags) (key id: 04C3 67C2 18AD D4FF and A4135B38)

I'm going to have to 3TOFU those fingerprints. Here's the commands for this

CURL="/usr/bin/curl --compressed"
WGET="/usr/bin/wget --retry-on-host-error --retry-connrefused"
PYTHON="/usr/bin/python3"

# in tails, we must torify
if  "`whoami`" == "amnesia" ; then
	CURL="/usr/bin/torify ${CURL}"
	WGET="/usr/bin/torify ${WGET}"
	PYTHON="/usr/bin/torify ${PYTHON}"
fi

tmpDir=`mktemp -d`
pushd "${tmpDir}"

# first get some info about our internet connection
${CURL} -s https://ifconfig.co/country | head -n1
${CURL} -s https://check.torproject.org | grep Congratulations | head -n1

# and today's date
date -u +"%Y-%m-%d"

# get the file
out=$(${CURL} -s https://www.python.org/downloads/ | grep -i 'windows binaries')
echo $out
fingerprint=$(echo $out | sed 's/.*fingerprint=\([^\"]*\).*/\1/')
echo $fingerprint
url=$(echo $out | sed 's/.*href="\([^\"]*\).*/\1/')
gpg --recv-keys $fingerprint
${WGET} -O pubkey.asc "${url}"
gpg --import pubkey.asc

# checksum
date -u
sha256sum *

# gpg fingerprint
gpg --with-fingerprint --keyid-format 0xlong *
gpg --keyid-format long --list-keys

@maltfield
Copy link
Member Author

The documentation on how to verify the signature on python releases wasn't linked-to from the actual download page (where the link to download the signature is available), so I opened this ticket with the Python project to address this:

@maltfield
Copy link
Member Author

I also updated the build script to output the version of gpg that it's using

2024-06-06T20:54:43.2868880Z DEBUG:   99+  >>>> gpg --version | Out-String
2024-06-06T20:54:44.2448205Z gpg (GnuPG) 2.4.5-unknown
2024-06-06T20:54:44.2448788Z libgcrypt 1.9.4-unknown
2024-06-06T20:54:44.2449216Z Copyright (C) 2024 g10 Code GmbH
2024-06-06T20:54:44.2450036Z License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
2024-06-06T20:54:44.2450976Z This is free software: you are free to change and redistribute it.
2024-06-06T20:54:44.2451805Z There is NO WARRANTY, to the extent permitted by law.
2024-06-06T20:54:44.2452286Z 
2024-06-06T20:54:44.2452468Z Home: /c/Users/runneradmin/.gnupg
2024-06-06T20:54:44.2452989Z Supported algorithms:
2024-06-06T20:54:44.2453448Z Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
2024-06-06T20:54:44.2454171Z Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
2024-06-06T20:54:44.2454918Z         CAMELLIA128, CAMELLIA192, CAMELLIA256
2024-06-06T20:54:44.2456032Z Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
2024-06-06T20:54:44.2456909Z Compression: Uncompressed, ZIP, ZLIB, BZIP2
2024-06-06T20:54:44.2457347Z 
2024-06-06T20:54:44.2457702Z DEBUG:  100+  >>>> gpgv --version | Out-String
2024-06-06T20:54:44.3572927Z gpgv (GnuPG) 2.4.5-unknown
2024-06-06T20:54:44.3573534Z libgcrypt 1.9.4-unknown
2024-06-06T20:54:44.3573818Z Copyright (C) 2024 g10 Code GmbH
2024-06-06T20:54:44.3574339Z License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
2024-06-06T20:54:44.3574927Z This is free software: you are free to change and redistribute it.
2024-06-06T20:54:44.3575453Z There is NO WARRANTY, to the extent permitted by law.

My local Windows 10 VM (which verifies the GOOD signature correctly) has gpg 2.4.5 (same as above), but with libgcrypt 1.10.3 (slightly newer than above)

@maltfield
Copy link
Member Author

maltfield commented Jun 6, 2024

I manually re-ran the build, and it's working now. So, yep, adding --textmode as an arg when creating the signature file SHA256SUMS.asc fixes the BAD signature errors that occur on (some) Windows systems.

2024-06-06T21:08:05.4757882Z "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS.asc" "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS" | Out-String
2024-06-06T21:08:05.4894736Z gpgv: Signature made Thu Jun  6 21:02:39 2024 CUT
2024-06-06T21:08:05.4895425Z gpgv:                using RSA key 798DC1101F3DEC428ADE124D68B8BCB0C5023905
2024-06-06T21:08:05.4914790Z gpgv: Good signature from "BusKill Releases Signing Key 2020.07 <[email protected]>"
2024-06-06T21:08:05.4925708Z 
2024-06-06T21:08:05.4934788Z DEBUG:  162+  >>>> gpgv --homedir "${tmpDir}\gnupg" --keyring "pubring.gpg" 
2024-06-06T21:08:05.4936333Z "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS.asc" "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS" | Out-String
2024-06-06T21:08:05.5065042Z gpgv: keyblock resource 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\862b0ba5-20e1-430d-8def-efcdca257717\\gnupg/pubring.gpg': No such file or directory
2024-06-06T21:08:05.5076606Z gpgv: Signature made Thu Jun  6 21:02:39 2024 CUT
2024-06-06T21:08:05.5077944Z gpgv:                using RSA key 798DC1101F3DEC428ADE124D68B8BCB0C5023905
2024-06-06T21:08:05.5078693Z gpgv: Can't check signature: No public key
2024-06-06T21:08:05.5087000Z 
2024-06-06T21:08:05.5095962Z DEBUG:  163+  >>>> gpgv --homedir "${tmpDir}\gnupg" --keyring "pubring.kbx" 
2024-06-06T21:08:05.5097904Z "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS.asc" "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS" | Out-String
2024-06-06T21:08:05.5235481Z gpgv: Signature made Thu Jun  6 21:02:39 2024 CUT
2024-06-06T21:08:05.5236279Z gpgv:                using RSA key 798DC1101F3DEC428ADE124D68B8BCB0C5023905
2024-06-06T21:08:05.5255651Z gpgv: Good signature from "BusKill Releases Signing Key 2020.07 <[email protected]>"
2024-06-06T21:08:05.5265924Z 
2024-06-06T21:08:05.5276186Z DEBUG:  165+  >>>> gpg --homedir "${tmpDir}\gnupg" --keyring "pubring.gpg" --verify 
2024-06-06T21:08:05.5277389Z "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS.asc" "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS" | Out-String
2024-06-06T21:08:05.5561381Z gpg: keyblock resource 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\862b0ba5-20e1-430d-8def-efcdca257717\\gnupg/pubring.gpg': No such file or directory
2024-06-06T21:08:05.5572801Z gpg: Signature made Thu Jun  6 21:02:39 2024 CUT
2024-06-06T21:08:05.5573420Z gpg:                using RSA key 798DC1101F3DEC428ADE124D68B8BCB0C5023905
2024-06-06T21:08:05.5587383Z gpg: Good signature from "BusKill Releases Signing Key 2020.07 <[email protected]>" [unknown]
2024-06-06T21:08:05.5590196Z gpg: WARNING: This key is not certified with a trusted signature!
2024-06-06T21:08:05.5591092Z gpg:          There is no indication that the signature belongs to the owner.
2024-06-06T21:08:05.5591790Z Primary key fingerprint: E0AF FF57 DC00 FBE0 5635  8761 4AE2 1E19 36CE 786A
2024-06-06T21:08:05.5592492Z      Subkey fingerprint: 798D C110 1F3D EC42 8ADE  124D 68B8 BCB0 C502 3905
2024-06-06T21:08:05.5608757Z 
2024-06-06T21:08:05.5620372Z DEBUG:  166+  >>>> gpg --homedir "${tmpDir}\gnupg" --keyring "pubring.kbx" --verify 
2024-06-06T21:08:05.5622169Z "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS.asc" "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS" | Out-String
2024-06-06T21:08:05.5902464Z gpg: keyblock resource 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\862b0ba5-20e1-430d-8def-efcdca257717\\gnupg/pubring.kbx': File exists
2024-06-06T21:08:05.5914088Z gpg: Signature made Thu Jun  6 21:02:39 2024 CUT
2024-06-06T21:08:05.5914664Z gpg:                using RSA key 798DC1101F3DEC428ADE124D68B8BCB0C5023905
2024-06-06T21:08:05.5928659Z gpg: Good signature from "BusKill Releases Signing Key 2020.07 <[email protected]>" [unknown]
2024-06-06T21:08:05.5931563Z gpg: WARNING: This key is not certified with a trusted signature!
2024-06-06T21:08:05.5932622Z gpg:          There is no indication that the signature belongs to the owner.
2024-06-06T21:08:05.5933388Z Primary key fingerprint: E0AF FF57 DC00 FBE0 5635  8761 4AE2 1E19 36CE 786A
2024-06-06T21:08:05.5934151Z      Subkey fingerprint: 798D C110 1F3D EC42 8ADE  124D 68B8 BCB0 C502 3905
2024-06-06T21:08:05.5949990Z 

Curiously, though, it's still detecting it as a failure and exiting 1

2024-06-06T21:08:05.5963370Z DEBUG:  168+ if (  >>>> $? -ne $true -or $LastExitCode -ne 0 ){
2024-06-06T21:08:05.5973824Z DEBUG:  169+   >>>> echo "ERROR: Invalid PGP signature!" | Out-String
2024-06-06T21:08:05.5977719Z ERROR: Invalid PGP signature!
2024-06-06T21:08:05.5978069Z 
2024-06-06T21:08:05.5986271Z DEBUG:  170+   >>>> exit 1 | Out-String
2024-06-06T21:08:05.5994156Z DEBUG:  170+  exit  >>>> 1 | Out-String
2024-06-06T21:08:05.6012271Z DEBUG:    3+ if ( >>>> (Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }
2024-06-06T21:08:05.6024986Z DEBUG:    3+ if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) {  >>>> exit $LASTEXITCODE }
2024-06-06T21:08:05.6026787Z 
2024-06-06T21:08:05.6026957Z 
2024-06-06T21:08:10.6381144Z ##[error]Process completed with exit code 1.

maltfield added a commit that referenced this issue Jun 6, 2024
this commit updates our documentation such that, when signing text files, we use the '--textmode' argument. This ensures that the signatures will still be valid on dumb systems (cough Windows cough) that insert additional carriage return characters before our newline characters.

 * #78 (comment)
 * BusKill/buskill-app-deps@63ccc12
@maltfield
Copy link
Member Author

ok, I fixed the error by making sure to execute gpgv (as opposed to gpg) right before the check:

2024-06-06T21:24:46.9016340Z DEBUG:  140+  >>>> gpgv --homedir "${tmpDir}\gnupg" --keyring "pubring.kbx" 
2024-06-06T21:24:46.9018263Z "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS.asc" "${tmpDir}\buskill-app-deps\build\deps\SHA256SUMS" | Out-String
2024-06-06T21:24:46.9188053Z gpgv: Signature made Thu Jun  6 21:02:39 2024 CUT
2024-06-06T21:24:46.9188692Z gpgv:                using RSA key 798DC1101F3DEC428ADE124D68B8BCB0C5023905
2024-06-06T21:24:46.9213092Z gpgv: Good signature from "BusKill Releases Signing Key 2020.07 <[email protected]>"
2024-06-06T21:24:46.9225972Z 
2024-06-06T21:24:46.9236941Z DEBUG:  141+ if (  >>>> $? -ne $true -or $LastExitCode -ne 0 ){
2024-06-06T21:24:46.9252366Z DEBUG:  146+  >>>> pushd "${tmpDir}/buskill-app-deps/build/deps"
...

@maltfield
Copy link
Member Author

cool, looks like our windows builds deps are now being installed OK. But we're getting an error on PyInstaller

2024-06-06T21:44:34.5817984Z DEBUG:  276+  >>>> cd pyinstaller | Out-String
2024-06-06T21:44:34.5829067Z 
2024-06-06T21:44:34.5839412Z DEBUG:  278+  >>>> echo "# -*- mode: python ; coding: utf-8 -*-
2024-06-06T21:44:34.5846565Z # -*- mode: python ; coding: utf-8 -*-
2024-06-06T21:44:34.5847074Z from kivy_deps import angle, glew, sdl2
2024-06-06T21:44:34.5847654Z 
2024-06-06T21:44:34.5847801Z block_cipher = None
2024-06-06T21:44:34.5848070Z 
2024-06-06T21:44:34.5848287Z a = Analysis(['..\\src\\main.py'],
2024-06-06T21:44:34.5848640Z              pathex=['.\\'],
2024-06-06T21:44:34.5848901Z              binaries=[],
2024-06-06T21:44:34.5849143Z              datas=
2024-06-06T21:44:34.5849362Z               [
2024-06-06T21:44:34.5849642Z                ( '..\\KEYS', '.' ),
2024-06-06T21:44:34.5850062Z                ( '..\\src\\images\\buskill-icon-150.png', '.' ),
2024-06-06T21:44:34.5850577Z                ('C:\\Program Files\\Git\\usr\\bin\\gpg.exe', '.'),
2024-06-06T21:44:34.5851070Z                ('C:\\msys64\\usr\\bin\\msys-bz2-1.dll', '.'),
2024-06-06T21:44:34.5851563Z                ('C:\\msys64\\usr\\bin\\msys-assuan-0.dll', '.'),
2024-06-06T21:44:34.5852055Z                ('C:\\msys64\\usr\\bin\\msys-gcrypt-20.dll', '.'),
2024-06-06T21:44:34.5852553Z                ('C:\\msys64\\usr\\bin\\msys-gpg-error-0.dll', '.'),
2024-06-06T21:44:34.5853035Z                ('C:\\msys64\\usr\\bin\\msys-2.0.dll', '.'),
2024-06-06T21:44:34.5853496Z                ('C:\\msys64\\usr\\bin\\msys-readline8.dll', '.'),
2024-06-06T21:44:34.5853958Z                ('C:\\msys64\\usr\\bin\\msys-z.dll', '.'),
2024-06-06T21:44:34.5854413Z                ('C:\\msys64\\usr\\bin\\msys-sqlite3-0.dll', '.'),
2024-06-06T21:44:34.5854887Z                ('C:\\msys64\\usr\\bin\\msys-iconv-2.dll', '.'),
2024-06-06T21:44:34.5855354Z                ('C:\\msys64\\usr\\bin\\msys-intl-8.dll', '.'),
2024-06-06T21:44:34.5855822Z                ('C:\\msys64\\usr\\bin\\msys-ncursesw6.dll', '.'),
2024-06-06T21:44:34.5856158Z               ],
2024-06-06T21:44:34.5856479Z              hiddenimports=['pkg_resources.py2_warn'],
2024-06-06T21:44:34.5857239Z              hookspath=[],
2024-06-06T21:44:34.5857584Z              runtime_hooks=[],
2024-06-06T21:44:34.5857851Z              excludes=[],
2024-06-06T21:44:34.5858134Z              win_no_prefer_redirects=False,
2024-06-06T21:44:34.5858492Z              win_private_assemblies=False,
2024-06-06T21:44:34.5858882Z              cipher=block_cipher,
2024-06-06T21:44:34.5859310Z              noarchive=False)
2024-06-06T21:44:34.5859978Z pyz = PYZ(a.pure, a.zipped_data,
2024-06-06T21:44:34.5860285Z              cipher=block_cipher)
2024-06-06T21:44:34.5860552Z exe = EXE(pyz,
2024-06-06T21:44:34.5860760Z           a.scripts,
2024-06-06T21:44:34.5860977Z           [],
2024-06-06T21:44:34.5861183Z           exclude_binaries=True,
2024-06-06T21:44:34.5861525Z           name='buskill',
2024-06-06T21:44:34.5861768Z           debug=False,
2024-06-06T21:44:34.5862029Z           bootloader_ignore_signals=False,
2024-06-06T21:44:34.5862336Z           strip=False,
2024-06-06T21:44:34.5862572Z           upx=True,
2024-06-06T21:44:34.5862916Z           icon='..\\src\\images\\buskill-icon-150.ico',
2024-06-06T21:44:34.5863274Z           console=False,
2024-06-06T21:44:34.5863510Z           onefile=True )
2024-06-06T21:44:34.5863815Z coll = COLLECT(exe, Tree('..\\src\\'),
2024-06-06T21:44:34.5864116Z                a.binaries,
2024-06-06T21:44:34.5864350Z                a.zipfiles,
2024-06-06T21:44:34.5864582Z                a.datas,
2024-06-06T21:44:34.5864967Z                *[Tree(p) for p in (glew.dep_bins + angle.dep_bins + sdl2.dep_bins)],
2024-06-06T21:44:34.5865407Z                strip=False,
2024-06-06T21:44:34.5865646Z                upx=True,
2024-06-06T21:44:34.5865885Z                upx_exclude=[],
2024-06-06T21:44:34.5866188Z                name='buskill')
2024-06-06T21:44:34.5866364Z 
2024-06-06T21:44:34.5866752Z DEBUG:  338+  >>>> (Get-Content .\buskill.spec) -replace "`0", "" | Set-Content .\buskill.spec
2024-06-06T21:44:34.5880410Z DEBUG:  348+  >>>> $env:KIVY_GL_BACKEND="angle_sdl2"
2024-06-06T21:44:34.5892180Z DEBUG:  351+  >>>> C:\tmp\kivy_venv\Scripts\python.exe -m PyInstaller --noconfirm .\buskill.spec | Out-String
2024-06-06T21:44:34.8913900Z Traceback (most recent call last):
2024-06-06T21:44:34.8914399Z   File "<frozen runpy>", line 198, in _run_module_as_main
2024-06-06T21:44:34.8914834Z   File "<frozen runpy>", line 88, in _run_code
2024-06-06T21:44:34.8915915Z   File "C:\tmp\kivy_venv\Lib\site-packages\PyInstaller\__main__.py", line 121, in <module>
2024-06-06T21:44:34.8916667Z     run()
2024-06-06T21:44:34.8917203Z   File "C:\tmp\kivy_venv\Lib\site-packages\PyInstaller\__main__.py", line 81, in run
2024-06-06T21:44:34.8917991Z     import PyInstaller.building.build_main
2024-06-06T21:44:34.8918844Z   File "C:\tmp\kivy_venv\Lib\site-packages\PyInstaller\building\build_main.py", line 36, in <module>
2024-06-06T21:44:34.8919745Z     from ..depend import bindepend
2024-06-06T21:44:34.8920562Z   File "C:\tmp\kivy_venv\Lib\site-packages\PyInstaller\depend\bindepend.py", line 30, in <module>
2024-06-06T21:44:34.8921250Z     from . import dylib, utils
2024-06-06T21:44:34.8922453Z   File "C:\tmp\kivy_venv\Lib\site-packages\PyInstaller\depend\utils.py", line 29, in <module>
2024-06-06T21:44:34.8923295Z     from ..lib.modulegraph import util, modulegraph
2024-06-06T21:44:34.8924277Z   File "C:\tmp\kivy_venv\Lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 4, in <module>
2024-06-06T21:44:34.8925024Z     import imp
2024-06-06T21:44:34.8925443Z ModuleNotFoundError: No module named 'imp'

@maltfield
Copy link
Member Author

maltfield commented Jun 6, 2024

Well, I'm not familiar with the imp module, but it appears that it was removed in Python 3.12

Curiously, it looks like PyInstaller is bitching about a module that it itself uses. So my best-guess here is that I need to update PyInstaller.

It appears that we're currently installing PyInstaller-3.6. Oh wow, that's crazy oudated; it was release Jan 2020

The latest version is PyInstaller-6.7.0

it looks like this imp module was removed from PyInstaller on 2023-06-04:

PyInstalller-5.12.0 was released on 2023-06-08, but the next release (5.13.0) explicilty states "Add support for Python 3.12"

Looks like I'm missing a section to download windows-specific wheels for pyinstaller from the download.sh script, so I added it. The script is already set to download PyInstaller-6.5.0 for the other platforms, so I'll stick to that version for Windows too.

Here's the 3TOFU script

CURL="/usr/bin/curl"
WGET="/usr/bin/wget --retry-on-host-error --retry-connrefused"
PYTHON="/usr/bin/python3"

# in tails, we must torify
if [[ "`whoami`" == "amnesia" ]] ; then
	CURL="/usr/bin/torify ${CURL}"
	WGET="/usr/bin/torify ${WGET}"
	PYTHON="/usr/bin/torify ${PYTHON}"
fi

tmpDir=`mktemp -d`
pushd "${tmpDir}"

# first get some info about our internet connection
${CURL} -s https://ifconfig.co/country | head -n1
${CURL} -s https://check.torproject.org | grep Congratulations | head -n1

# and today's date
date -u +"%Y-%m-%d"

# get the file
${WGET} `${CURL} -s https://pypi.org/simple/pyinstaller/ | grep -oE 'https://.*pyinstaller-6.7.0-py3-none-win_amd64.whl#'`

# checksum
date -u +"%Y-%m-%d"
sha256sum *

@maltfield
Copy link
Member Author

Here's TOFU 1/3 (Tor, exit in Germany)

Congratulations. This browser is configured to use Tor.
2024-06-06
--2024-06-06 22:25:52--  https://files.pythonhosted.org/packages/d9/01/c5a663940f3e05219db48af7a4e65960921dd71252ee0c81297661e60c39/pyinstaller-6.7.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.36.223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.36.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1311409 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’

pyinstaller-6.7.0-p 100%[===================>]   1.25M  31.3KB/s    in 61s     

2024-06-06 22:27:05 (21.1 KB/s) - ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’ saved [1311409/1311409]

2024-06-06
a3f85935b40f89e717f1e67377d3bfc953060e5795828ecf5357e2c1f7aa52bf  pyinstaller-6.7.0-py3-none-win_amd64.whl

@maltfield
Copy link
Member Author

Here's TOFU 2/3 (VPN, exit in France)

France
2024-06-07
--2024-06-07 09:59:10--  https://files.pythonhosted.org/packages/d9/01/c5a663940f3e05219db48af7a4e65960921dd71252ee0c81297661e60c39/pyinstaller-6.7.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 146.75.72.223, 2a04:4e42:82::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|146.75.72.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1311409 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’

pyinstaller-6.7.0-p 100%[===================>]   1.25M   256KB/s    in 5.3s    

2024-06-07 09:59:17 (239 KB/s) - ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’ saved [1311409/1311409]

2024-06-07
a3f85935b40f89e717f1e67377d3bfc953060e5795828ecf5357e2c1f7aa52bf  pyinstaller-6.7.0-py3-none-win_amd64.whl

@maltfield
Copy link
Member Author

Ah, fuck. I just realized that I've been downloading pyinstaller-6.7.0 (the latest version) though I said I'd use pyinstaller-6.5.0 to be consistent with others. Probably I should have done both

CURL="/usr/bin/curl"
WGET="/usr/bin/wget --retry-on-host-error --retry-connrefused"
PYTHON="/usr/bin/python3"

# in tails, we must torify
if  "`whoami`" == "amnesia"  ; then
	CURL="/usr/bin/torify ${CURL}"
	WGET="/usr/bin/torify ${WGET}"
	PYTHON="/usr/bin/torify ${PYTHON}"
fi

tmpDir=`mktemp -d`
pushd "${tmpDir}"

# first get some info about our internet connection
${CURL} -s https://ifconfig.co/country | head -n1
${CURL} -s https://check.torproject.org | grep Congratulations | head -n1

# and today's date
date -u +"%Y-%m-%d"

# get the files
${WGET} `${CURL} -s https://pypi.org/simple/pyinstaller/ | grep -oE 'https://.*pyinstaller-6.5.0-py3-none-win_amd64.whl#'`
${WGET} `${CURL} -s https://pypi.org/simple/pyinstaller/ | grep -oE 'https://.*pyinstaller-6.7.0-py3-none-win_amd64.whl#'`

# checksum
date -u +"%Y-%m-%d"
sha256sum *

@maltfield
Copy link
Member Author

Here's TOFU 1/3 (Tor, exit in the Netherlands)

Congratulations. This browser is configured to use Tor.
2024-06-07
--2024-06-07 15:04:26--  https://files.pythonhosted.org/packages/8d/28/d3b728e059dbaf2705563c593155f862fcd29eb6e5126690ef76572b76f3/pyinstaller-6.5.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 199.232.16.223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|199.232.16.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1306900 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.5.0-py3-none-win_amd64.whl’

pyinstaller-6.5.0-p 100%[===================>]   1.25M   389KB/s    in 3.3s    

2024-06-07 15:04:31 (389 KB/s) - ‘pyinstaller-6.5.0-py3-none-win_amd64.whl’ saved [1306900/1306900]

--2024-06-07 15:04:34--  https://files.pythonhosted.org/packages/d9/01/c5a663940f3e05219db48af7a4e65960921dd71252ee0c81297661e60c39/pyinstaller-6.7.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.36.223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.36.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1311409 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’

pyinstaller-6.7.0-p 100%[===================>]   1.25M   393KB/s    in 3.3s    

2024-06-07 15:04:40 (393 KB/s) - ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’ saved [1311409/1311409]

2024-06-07
e1266498893ce1d6cc7337e8d2acbf7905a10ed2b7c8377270117d6b7b922fc4  pyinstaller-6.5.0-py3-none-win_amd64.whl
a3f85935b40f89e717f1e67377d3bfc953060e5795828ecf5357e2c1f7aa52bf  pyinstaller-6.7.0-py3-none-win_amd64.whl

@maltfield
Copy link
Member Author

Here's TOFU 2/3 (VPN, exit in India)

India
2024-06-09
--2024-06-09 17:51:28--  https://files.pythonhosted.org/packages/8d/28/d3b728e059dbaf2705563c593155f862fcd29eb6e5126690ef76572b76f3/pyinstaller-6.5.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.164.223, 2a04:4e42:27::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.164.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1306900 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.5.0-py3-none-win_amd64.whl’

pyinstaller-6.5.0-p 100%[===================>]   1.25M   769KB/s    in 1.7s    

2024-06-09 17:51:31 (769 KB/s) - ‘pyinstaller-6.5.0-py3-none-win_amd64.whl’ saved [1306900/1306900]

--2024-06-09 17:51:33--  https://files.pythonhosted.org/packages/d9/01/c5a663940f3e05219db48af7a4e65960921dd71252ee0c81297661e60c39/pyinstaller-6.7.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.164.223, 2a04:4e42:27::223
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.164.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1311409 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’

pyinstaller-6.7.0-p 100%[===================>]   1.25M   767KB/s    in 1.7s    

2024-06-09 17:51:36 (767 KB/s) - ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’ saved [1311409/1311409]

2024-06-09
e1266498893ce1d6cc7337e8d2acbf7905a10ed2b7c8377270117d6b7b922fc4  pyinstaller-6.5.0-py3-none-win_amd64.whl
a3f85935b40f89e717f1e67377d3bfc953060e5795828ecf5357e2c1f7aa52bf  pyinstaller-6.7.0-py3-none-win_amd64.whl

@maltfield
Copy link
Member Author

Here's TOFU 3/3 (ISP, exit in Ecuador)

Ecuador
2024-06-10
--2024-06-10 09:45:20--  https://files.pythonhosted.org/packages/8d/28/d3b728e059dbaf2705563c593155f862fcd29eb6e5126690ef76572b76f3/pyinstaller-6.5.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.52.223, 2a04:4e42:f000::223, 2a04:4e42:d::223, ...
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.52.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1306900 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.5.0-py3-none-win_amd64.whl’

pyinstaller-6.5.0-p 100%[===================>]   1.25M   456KB/s    in 2.8s    

2024-06-10 09:45:24 (456 KB/s) - ‘pyinstaller-6.5.0-py3-none-win_amd64.whl’ saved [1306900/1306900]

--2024-06-10 09:45:25--  https://files.pythonhosted.org/packages/d9/01/c5a663940f3e05219db48af7a4e65960921dd71252ee0c81297661e60c39/pyinstaller-6.7.0-py3-none-win_amd64.whl
Resolving files.pythonhosted.org (files.pythonhosted.org)... 151.101.52.223, 2a04:4e42:d::223, 2a04:4e42:200::223, ...
Connecting to files.pythonhosted.org (files.pythonhosted.org)|151.101.52.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1311409 (1.2M) [application/octet-stream]
Saving to: ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’

pyinstaller-6.7.0-p 100%[===================>]   1.25M   998KB/s    in 1.3s    

2024-06-10 09:45:26 (998 KB/s) - ‘pyinstaller-6.7.0-py3-none-win_amd64.whl’ saved [1311409/1311409]

2024-06-10
e1266498893ce1d6cc7337e8d2acbf7905a10ed2b7c8377270117d6b7b922fc4  pyinstaller-6.5.0-py3-none-win_amd64.whl
a3f85935b40f89e717f1e67377d3bfc953060e5795828ecf5357e2c1f7aa52bf  pyinstaller-6.7.0-py3-none-win_amd64.whl
user@disp862:/tmp/tmp.xqQifhKWPb$ 

@maltfield
Copy link
Member Author

Ok, the hashes match on all 3TOFUs. I'll try upgrading pyinstaller in Windows now.

maltfield added a commit to BusKill/buskill-app-deps that referenced this issue Jun 10, 2024
maltfield added a commit that referenced this issue Jun 10, 2024
@maltfield
Copy link
Member Author

w00t! The latest windows build completed successfully

@maltfield
Copy link
Member Author

maltfield commented Jun 10, 2024

Well, I tried to download and run the latest build of BusKill for windows on my Windows 10 VM, but I got an error

Unhandled exception in script
Failed to execute script 'main' due to unhandled exception: No module named 'grp'

Traceback (most recent call last:):
 File "main .py", line 22 in <module>
  import platform, os, grp
ModuleNotFoundError: No module named 'grp'

Here's the relevant code that it's complaining about

  • buskill-app/src/main.py

    Lines 20 to 25 in 791d3aa

    # this is needed for supporting Windows 10 with OpenGL < v2.0
    # Example: VirtualBox w/ OpenGL v1.1
    import platform, os, grp
    CURRENT_PLATFORM = platform.system().upper()
    if CURRENT_PLATFORM.startswith( 'WIN' ):
    os.environ['KIVY_GL_BACKEND'] = 'angle_sdl2'

Curiously, it appears this block was only added for running the app in a Windows 10 VM :/

@maltfield
Copy link
Member Author

maltfield commented Jun 10, 2024

Apparently the grp module is only available on *nix systems. I honestly don't know how we never encountered this error in the past

Update: Oh, right, it's because this is a new addition that I made in the dev branch to get more debugging info out on-launch to troubleshoot this bug (which is what I was last working on, before I realized I couldn't build anymore and got sidetracked on this ticket for over a month):

maltfield added a commit that referenced this issue Jun 10, 2024
This commit only imports grp on *nix systems, since it isn't available on windows systems, and it will throw an error

 * #78 (comment)

  Traceback (most recent call last:):
   File "main .py", line 22 in <module>
    import platform, os, grp
  ModuleNotFoundError: No module named 'grp'
@maltfield
Copy link
Member Author

Apparently the pwd module has the same issue as the grp module.

maltfield added a commit that referenced this issue Jun 13, 2024
this commit makes the 'import pwd' only happen on *nix systems, since it's not available on windows

 * #78
@maltfield
Copy link
Member Author

I was successfully able to open the most-recent Windows build in my win10 VM

I quickly encountered a bug that triggered the app to crash...but that's an item for another ticket. The builds are working.

@maltfield
Copy link
Member Author

I was successfully able to open the most-recent MacOS bulid in our macOS 10.15 mac mini in the cloud.

After brief testing, it worked fine (I was unable to get it to crash).

@maltfield
Copy link
Member Author

I was successfully able to open the most-recent Linux build in Debian 12.

After brief testing, it worked fine (I was unable to get it to crash).

@maltfield
Copy link
Member Author

Builds are fixed. This ticket is complete 🎉

@maltfield
Copy link
Member Author

maltfield commented Aug 5, 2024

Update: to provide more background on what I did with the "3TOFU" process above in this ticket, I wrote this article: 3TOFU: Verifying Unsigned Releases

Verifying Unsigned Releases with 3TOFU
Verifying Unsigned Releases with 3TOFU

@maltfield
Copy link
Member Author

Update I've documented the painful process to download Brew dependencies (for 3TOFU) from GitHub Packages (as opposed to Bintray) in this article: Manually Downloading Container Images (Docker, Github Packages)

Manual Download of Container Images with wget and curl
Manual Download of Container Images with wget and curl

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

1 participant