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

Python 0.9.1 source #1734

Open
smontanaro opened this issue Feb 17, 2021 · 5 comments
Open

Python 0.9.1 source #1734

smontanaro opened this issue Feb 17, 2021 · 5 comments

Comments

@smontanaro
Copy link

@smontanaro smontanaro commented Feb 17, 2021

I hesitate to call this a bug. Yet it's not a feature request either. The legacy download page has antique releases back to 1.0.1. Availability of 0.9.1 has been pointed out a in the past. Andrew Dalke did the legwork in 2009, but it was never taken up. A few days ago, another person pointed out that it was available from Google Groups. Not remembering Andrew's earlier work, I revisited it, and with a bit of help from the community, uploaded it to Github On python-dev, someone pointed out that pristine shar files are available from netbsd.org. Those shar files are also in my repo.

So, there are plenty of places to pick it up. For ease of reference, I generated a gzipped tarfile from the shar files and placed it in my repo. I also added an amended README file to the same directory. Can we make this change so someone doesn't notice the missing release in another ten years' time? :-)

@jcgoble3
Copy link

@jcgoble3 jcgoble3 commented Feb 18, 2021

I found this page via Google, although I'm not sure where it's linked from or if it's linked from anywhere.

@smontanaro
Copy link
Author

@smontanaro smontanaro commented Feb 18, 2021

Thanks. I appreciate the extra reference. I do think the legacy download page I referred to is probably the "right" place for all ancient releases. Also, if you look at Andrew's README.reconstructed file, it seems he made all the necessary edits manually. Props for his diligence, but I think it best to start from the archived shar files on netbsd.org.

@pfalcon
Copy link

@pfalcon pfalcon commented Feb 18, 2021

I generated a gzipped tarfile

I think instead of "I generated file", it would be better to provide a script which does that generation in a reproducible way, so everyone (including python.org admin) can verify the process, confirm that it's free of mistakes on the intermediate side, and finally put, as close as possible to the original, source code of 0.9.1 at https://legacy.python.org/download/releases/src/

@pfalcon
Copy link

@pfalcon pfalcon commented Feb 18, 2021

I attach my version of such a script (and also paste it below for reference, but if you use it, please use the attached version to avoid any discrepancies due to copy-paste).

The script takes care to preserve not just data, but the metadata of the release, by setting file timestamps to the date/time of the message which contained the 1st chunk of the shar archive. It also takes care to create reproducible tarball, i.e. tarball archives created by different runs of the script should byte-to-byte match each other (cf. https://en.wikipedia.org/wiki/Reproducible_builds). Of course, that depends on .tar and .gz formats themselves being stable (which should be de-facto the case, and I hope their maintainers treat them as such). As an extra measure, MD5SUMS of the individual files is also computed and included in the tarball. Finally, the script itself is also included, as a kind of executable documentation. That's why it's important the script itself to be byte-perfect when recreating the tarball. I also didn't make it executable, it should be run as sh python-0.9.1-create-tarball.sh.

Under conditions described above, the tarball produced should have following md5sum:

65e0c4140583c7032f35036939cf1bdd  python-0.9.1.tar.gz

python-0.9.1-create-tarball.sh.gz

The script contents for reference (do not copy-paste, use attached version above):

#!/bin/sh
#
# This script creates fully reproducible, bytes-perfect tarball of the
# CPython 0.9.1 release (initial public release) as posted by Guido
# van Rossum to the Usenet "alt.sources" newsgroup
# (https://en.wikipedia.org/wiki/Usenet_newsgroup). This is not first
# attempt to recover the original 0.9.1 sources, but many previous
# attempts started from the Dejanews Usenet archives, later acquired
# by Google, which have whitespace issues (tabs converted to spaces).
# This script uses alternative archive source at ftp.fi.netbsd.org,
# which doesn't have whitespace issues.
#
# This script strives to produce fully reproducible archive, and for
# this explicitly sets GMT date of all files included in the archive.
# So, for as long as TAR and GZIP formats are themselves stable across
# systems, this script should produce bytes-exact archive files on any
# system.
#

set -e
# Index: http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/index.gz
cat >urls <<EOF
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910220.10.gz#Python 0.9.1 part 01/21 <2963@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910220.11.gz#Python 0.9.1 part 03/21 <2965@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.31.gz#Python 0.9.1 part 04/21 <2966@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.32.gz#Python 0.9.1 part 05/21 <2967@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.33.gz#Python 0.9.1 part 06/21 <2968@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.34.gz#Python 0.9.1 part 07/21 <2969@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.35.gz#Python 0.9.1 part 08/21 <2970@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.36.gz#Python 0.9.1 part 09/21 <2971@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.37.gz#Python 0.9.1 part 10/21 <2972@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.38.gz#Python 0.9.1 part 11/21 <2973@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.39.gz#Python 0.9.1 part 12/21 <2974@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.40.gz#Python 0.9.1 part 13/21 <2975@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.41.gz#Python 0.9.1 part 14/21 <2976@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.42.gz#Python 0.9.1 part 15/21 <2977@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.43.gz#Python 0.9.1 part 16/21 <2978@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.44.gz#Python 0.9.1 part 17/21 <2979@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.45.gz#Python 0.9.1 part 19/21 <2981@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.46.gz#Python 0.9.1 part 21/21 <2983@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.47.gz#Python 0.9.1 part 02/21 <2985@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.48.gz#Python 0.9.1 part 18/21 <2980@charon.cwi.nl>
http://ftp.fi.netbsd.org/pub/misc/archive/alt.sources/volume91/Feb/910224.49.gz#Python 0.9.1 part 20/21 <2982@charon.cwi.nl>
EOF
wget -i urls
gzip -d -f *.gz
rm -rf python-0.9.1
mkdir -p python-0.9.1
unshar -d python-0.9.1 [0-9]*.[0-9][0-9]
find python-0.9.1 -type f | xargs md5sum >MD5SUMS
# Set the modtime based on the date of the "part 01/21" message.
find python-0.9.1/ | xargs touch -d "19 Feb 1991 17:35:26 GMT"
# Set the date of the script itself (and MD5SUMS), to make 100% reproducible
# tarball. Use +30 years date. In reality, script was written a couple of days
# earlier.
touch -d "19 Feb 2021 17:35:26 GMT" python-0.9.1-create-tarball.sh MD5SUMS
# Create tarball, include this script itself as a documentation/reference.
tar cfz python-0.9.1.tar.gz python-0.9.1-create-tarball.sh MD5SUMS python-0.9.1/
touch -d "19 Feb 1991 17:35:26 GMT" python-0.9.1.tar.gz
md5sum python-0.9.1.tar.gz

@smontanaro
Copy link
Author

@smontanaro smontanaro commented Feb 21, 2021

Would be nice to get this change up on the website (somewhere visible), as Python's 30th birthday was coincidentally just a couple days ago:

https://mail.python.org/archives/list/python-dev@python.org/message/RAPFBOPRDICVP5F2GVRHICMAH5NDHXJS/

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

3 participants