[Git][reproducible-builds/reproducible-presentations][master] 14 commits: 2025-02-08 PyCascades: skeleton for Re-Py-Ducible Builds.
Vagrant Cascadian (@vagrant)
gitlab at salsa.debian.org
Fri Jan 24 00:57:58 UTC 2025
Vagrant Cascadian pushed to branch master at Reproducible Builds / reproducible-presentations
Commits:
5b8b929d by Vagrant Cascadian at 2025-01-23T13:20:43-08:00
2025-02-08 PyCascades: skeleton for Re-Py-Ducible Builds.
- - - - -
d4e9201b by Vagrant Cascadian at 2025-01-23T14:37:19-08:00
re-py-ducible: show status in Debian.
- - - - -
f7f8f976 by Vagrant Cascadian at 2025-01-23T15:10:38-08:00
re-py-ducible: split out reprotest example.
- - - - -
8e7063af by Vagrant Cascadian at 2025-01-23T15:11:27-08:00
debian/changelog: Update timestamp.
- - - - -
ad27bfea by Vagrant Cascadian at 2025-01-23T15:14:04-08:00
re-py-ducible: .pyc files and the way forward...
- - - - -
d1559c9a by Vagrant Cascadian at 2025-01-23T15:17:59-08:00
re-py-ducible: just run diffoscope on the .pyc files
- - - - -
f3e76cb4 by Vagrant Cascadian at 2025-01-23T15:25:36-08:00
re-py-ducible: drop some example slides.
- - - - -
f6a803fa by Vagrant Cascadian at 2025-01-23T15:26:18-08:00
re-py-ducible: format summary of debian python team results better.
- - - - -
7ae690fb by Vagrant Cascadian at 2025-01-23T15:32:35-08:00
re-py-ducible: python team packages formatting and updates
- - - - -
89615c80 by Vagrant Cascadian at 2025-01-23T15:39:28-08:00
re-py-ducible: make python teams stats image a little bigger.
- - - - -
c97166b0 by Vagrant Cascadian at 2025-01-23T15:47:50-08:00
re-py-ducible: diffoscope examples
- - - - -
2ce086a3 by Vagrant Cascadian at 2025-01-23T15:53:30-08:00
re-py-ducible: guix uses python --invalidation-mode=unchecked-hash.
- - - - -
0b02b6f1 by Vagrant Cascadian at 2025-01-23T16:50:15-08:00
re-py-ducible: Use pympress as an example.
- - - - -
a018512c by Vagrant Cascadian at 2025-01-23T16:56:41-08:00
re-py-ducible: Add wxmplot example antipattern of build time as
copyright date.
- - - - -
14 changed files:
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/Makefile
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/Re-Py-Ducible-Builds.org
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/changelog
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/control
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/copyright
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/re-py-ducible-builds.install
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/rules
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/source/format
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/images/diffoscope.png
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/images/reproducible-builds.png
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/images/stats_meta_pkg_state_maint_debian-python.png
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/images/try.diffoscope.org.png
- + 2025-02-08-pycascades-Re-Py-Ducible-Builds/images/vagrantupsidedown.png
- − proposed/2025-02-xx-pycascades-Re-Py-Ducible-Builds/Re-Py-Ducible-Builds
Changes:
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/Makefile
=====================================
@@ -0,0 +1,17 @@
+# thanks to dima for walking me through this!
+#
+# Debian needs: apt install emacs texlive-latex-extra texlive-plain-generic
+# Guix needs: guix shell --pure --container coreutils-minimal emacs-no-x make texlive-collection-fontsrecommended texlive-collection-plaingeneric texlive-collection-latex texlive-collection-latexextra
+
+export FORCE_SOURCE_DATE = 1
+export SOURCE_DATE_EPOCH := $(shell date --utc --date '2025-02-08 14:30:00 -0800' +%s)
+
+all: $(patsubst %.org,%.pdf,$(wildcard *.org))
+
+%.pdf: %.org
+ emacs -Q --batch --eval '(progn (random "0") (find-file "$<") (org-beamer-export-to-pdf))'
+
+clean:
+ rm -f *.pdf *.tex *.png
+
+.PHONY:clean
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/Re-Py-Ducible-Builds.org
=====================================
@@ -0,0 +1,262 @@
+#+TITLE: Re-Py-ducible Builds
+#+AUTHOR: Vagrant Cascadian <vagrant at reproducible-builds.org>
+#+EMAIL: vagrant at reproducible-builds.org
+#+DATE: PyCascades 2025-02-08
+#+LANGUAGE: en
+#+OPTIONS: H:1 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
+#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
+#+OPTIONS: ^:nil
+#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
+#+EXPORT_SELECT_TAGS: export
+#+EXPORT_EXCLUDE_TAGS: noexport
+#+startup: beamer
+#+LaTeX_CLASS: beamer
+#+LaTeX_CLASS_OPTIONS: [bigger]
+#+latex_header: \mode<beamer>{\usetheme{Madrid}}
+#+LaTeX_CLASS_OPTIONS: [aspectratio=169]
+#+BEGIN_comment
+https://2025.pycascades.com
+https://pretalx.com/pycascades-2025/talk/DUZVPC/
+
+Re-Py-ducible Builds
+
+Crank your Python best practices up to 11 with Reproducible Builds!
+
+This talk will explore Reproducible Builds by highlighting issues
+identified in Python projects, from the simple to the seemingly
+inscrutible.
+
+Reproducible Builds is basically the crazy idea that when you build
+something, and you build it again, you get the exact same thing... or
+even more important, if someone else builds it, they get the exact
+same thing too.
+
+Through a few code examples demonstrating common problems folks will
+learn what to watch out for when coding and how to fix them once
+identified.
+
+Some of the useful tooling for diagnosing and troubleshooting
+reproducibility issues (diffoscope and reprotest)... just so happen to
+be written in Python! Will even show you how to use them... and maybe
+take a look inside.
+#+END_comment
+
+* Who am I
+
+** image
+ :PROPERTIES:
+ :BEAMER_col: 0.4
+ :END:
+
+[[./images/vagrantupsidedown.png]]
+
+
+** text
+ :PROPERTIES:
+ :BEAMER_col: 0.4
+ :END:
+
+ | | Vagrant |
+ |---------------------+---------|
+ | debian user | 2001 |
+ | debian developer | 2010 |
+ | reproducible builds | 2015 |
+ | guix contributor | 2017 |
+ | guix committer | 2019 |
+
+* Reproducible Builds
+
+** text
+ :PROPERTIES:
+ :BEAMER_col: 0.7
+ :END:
+
+https://reproducible-builds.org/docs/definition/
+
+\vspace{\baselineskip}
+
+A build is reproducible if given the same source code, build
+environment and build instructions, any party can recreate bit-by-bit
+identical copies of all specified artifacts.
+
+** image
+ :PROPERTIES:
+ :BEAMER_col: 0.3
+ :END:
+
+[[./images/reproducible-builds.png]]
+
+* Python packages in Debian
+
+Maintained by Debian Python team
+
+https://tests.reproducible-builds.org/debian/unstable/amd64/pkg_set_maint_debian-python.html
+
+** text
+ :PROPERTIES:
+ :BEAMER_col: 0.4
+ :END:
+
+- 2600+ Packages
+- 94.5% reproducible
+
+** image
+ :PROPERTIES:
+ :BEAMER_col: 0.5
+ :END:
+
+[[./images/stats_meta_pkg_state_maint_debian-python.png]]
+
+* Debian sneaks around some of the problems
+
+.pyc contain timestamps and Debian generates them at install time!
+
+#+BEGIN_SRC Shell
+diffoscope __pycache__.*/*.pyc
+--- __pycache__.orig/foo.cpython-311.pyc
++++ __pycache__.orig2/foo.cpython-311.pyc
+├── Python bytecode
+│ @@ -1,4 +1,4 @@
+│ magic: 0xa70d0d0a
+│ -moddate: 0x64bd9267 (Thu Jan 23 22:06:28 2025 UTC)
+│ +moddate: 0xd2c59267 (Thu Jan 23 22:42:26 2025 UTC)
+│ files sz: 95
+│ code: starts at offset 16 (size: 392 bytes)
+#+END_SRC
+
+* Python 3.7 invalidation-mode
+
+Guix uses the invalidation-mode feature introduced in python 3.7
+
+#+BEGIN_SRC Shell
+python -m compileall --invalidation-mode=unchecked-hash
+#+END_SRC
+
+Using a hash of the file rather than timestamps
+
+* Python 3.13.1 to the rescue
+
+Workaround in python 3.13.1:
+
+https://docs.python.org/3/library/compileall.html#cmdoption-compileall-invalidation-mode
+
+Respects SOURCE_DATE_EPOCH environment variable and uses a hash
+instead of a timestamp.
+
+* wxmplot example
+
+https://bugs.debian.org/1059013
+
+#+BEGIN_SRC Shell
+--- a/doc/conf.py
++++ b/doc/conf.py
+...
++import time
+-from datetime import date
+...
++date_str = time.strftime(
++ "%Y-%m-%d",
++ time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
++)
+
+-copyright = f'{date.today()}, Matthew Newville, The University of Chicago'
++copyright = f'{date_str}, Matthew Newville, The University of Chicago'
+#+END_SRC
+
+* pympress example
+
+https://bugs.debian.org/1068795
+
+#+BEGIN_SRC Shell
+--- pympress-1.8.5.orig/pympress/app.py
++++ pympress-1.8.5/pympress/app.py
+@@ -150,11 +150,14 @@ class Pympress(Gtk.Application):
+ Gtk.Application.do_startup(self)
+
+
+- def do_activate(self, timestamp=GLib.get_current_time()):
++ def do_activate(self, timestamp=None):
+ """ Activate: show UI windows.
+
+ Build them if they do not exist, otherwise bring to front.
+ """
++ if timestamp is None:
++ timestamp = GLib.get_current_time()
++
+ if self.gui is None:
+ if self.auto_log_level:
+ self.activate_action('log-level', logging.INFO)
+#+END_SRC
+
+* diffoscope example
+
+[[./images/diffoscope.png]]
+
+* diffoscope, supported file types
+
+Android APK files, Android boot images, Ar(1) archives, Berkeley DB
+database files, Bzip2 archives, Character/block devices, ColorSync
+colour profiles (.icc), Coreboot CBFS filesystem images, Cpio
+archives, Dalvik .dex files, Debian .buildinfo files, Debian .changes
+files, Debian source packages (.dsc), Device Tree Compiler blob files,
+Directories, ELF binaries, Ext2/ext3/ext4/btrfs filesystems,
+FreeDesktop Fontconfig cache files, FreePascal files (.ppu), Gettext
+message catalogues, GHC Haskell .hi files, GIF image files, Git
+repositories, GNU R database files (.rdb), GNU R Rscript files (.rds),
+Gnumeric spreadsheets, Gzipped files, ISO 9660 CD images, Java .class
+files, JavaScript files, JPEG images, JSON files, LLVM IR bitcode
+files, MacOS binaries, Microsoft Windows icon files, Microsoft Word
+.docx files, Mono 'Portable Executable' files, Ogg Vorbis audio files,
+OpenOffice .odt files, OpenSSH public keys, OpenWRT package archives
+(.ipk), PDF documents, PGP signed/encrypted messages, PNG images,
+PostScript documents, RPM archives, Rust object files (.deflate),
+SQLite databases, SquashFS filesystems, Statically-linked binaries,
+Symlinks, Tape archives (.tar), Tcpdump capture files (.pcap), Text
+files, TrueType font files, XML binary schemas (.xsb), XML files, XZ
+compressed files, etc.
+
+* try diffoscope online
+
+And on the World Wide Web!
+
+https://try.diffoscope.org
+
+[[./images/try.diffoscope.org.png]]
+
+* reprotest example
+
+#+BEGIN_SRC shell
+ reprotest --verbose \
+ --vary=-fileordering,-domain_host \
+ --vary=-user_group,-time \
+ auto -- null
+#+END_SRC
+
+#+ATTR_BEAMER: :overlay <+->
+- reproducibility build checks with extensive variations
+- flexibly define which variations to use
+- options to "bisect" to identify nature of reproducibility issue
+- needs maintenence and updating
+
+* Thanks
+
+Help make it happen!
+
+https://reproducible-builds.org/contribute/
+
+https://reproducible-builds.org/donate/
+
+https://reproducible-builds.org/who/sponsors
+
+* Copyright and attributions
+\addtocounter{framenumber}{-1}
+\tiny
+
+ Copyright 2016-2024 Vagrant Cascadian <vagrant at reproducible-builds.org>
+ Portions by contributors to the reproducible-builds.org website.
+
+ This work is licensed under the Creative Commons
+ Attribution-ShareAlike 4.0 International License.
+
+ To view a copy of this license, visit
+ https://creativecommons.org/licenses/by-sa/4.0/
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/changelog
=====================================
@@ -0,0 +1,5 @@
+re-py-ducible-builds (2025.02.08+pycascades) UNRELEASED; urgency=medium
+
+ * Presented at PyCascades 2025.
+
+ -- Vagrant Cascadian <vagrant at reproducible-builds.org> Thu, 23 Jan 2025 13:45:58 -0800
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/control
=====================================
@@ -0,0 +1,17 @@
+Source: re-py-ducible-builds
+Section: doc
+Priority: optional
+Maintainer: Vagrant Cascadian <vagrant at reproducible-builds.org>
+Build-Depends: debhelper-compat (=13),
+ emacs,
+ emacs-nox,
+ texlive-latex-extra,
+ texlive-plain-generic,
+Standards-Version: 4.7.0
+Rules-Requires-Root: no
+Homepage: https://pretalx.com/pycascades-2025/talk/DUZVPC/
+
+Package: re-py-ducible-builds
+Architecture: all
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Description: Re-Py-Ducible Builds
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/copyright
=====================================
@@ -0,0 +1,14 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Re-Py-Ducible Builds
+Source: https://salsa.debian.org/reproducible-builds/reproducible-presentations/-/tree/master/2025-02-08-pycascades-Re-Py-Ducible-Builds
+
+Files: *
+Copyright: 2019-2025 Vagrant Cascadian <vagrant at reproducible-builds.org>
+License: cc-by-sa-4.0
+
+License: cc-by-sa-4.0
+ This work is licensed under the Creative Commons
+ Attribution-ShareAlike 4.0 International License.
+ .
+ To view a copy of this license, visit
+ https://creativecommons.org/licenses/by-sa/4.0/
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/re-py-ducible-builds.install
=====================================
@@ -0,0 +1 @@
+Re-Py-Ducible-Builds.pdf /usr/share/doc/re-py-ducible-builds/
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/rules
=====================================
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/debian/source/format
=====================================
@@ -0,0 +1 @@
+3.0 (native)
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/images/diffoscope.png
=====================================
Binary files /dev/null and b/2025-02-08-pycascades-Re-Py-Ducible-Builds/images/diffoscope.png differ
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/images/reproducible-builds.png
=====================================
Binary files /dev/null and b/2025-02-08-pycascades-Re-Py-Ducible-Builds/images/reproducible-builds.png differ
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/images/stats_meta_pkg_state_maint_debian-python.png
=====================================
Binary files /dev/null and b/2025-02-08-pycascades-Re-Py-Ducible-Builds/images/stats_meta_pkg_state_maint_debian-python.png differ
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/images/try.diffoscope.org.png
=====================================
Binary files /dev/null and b/2025-02-08-pycascades-Re-Py-Ducible-Builds/images/try.diffoscope.org.png differ
=====================================
2025-02-08-pycascades-Re-Py-Ducible-Builds/images/vagrantupsidedown.png
=====================================
Binary files /dev/null and b/2025-02-08-pycascades-Re-Py-Ducible-Builds/images/vagrantupsidedown.png differ
=====================================
proposed/2025-02-xx-pycascades-Re-Py-Ducible-Builds/Re-Py-Ducible-Builds deleted
=====================================
@@ -1,23 +0,0 @@
-proposed for https://2025.pycascades.com/
-
-Re-Py-ducible Builds
-
-Crank your Python best practices up to 11 with Reproducible Builds!
-
-This talk will explore Reproducible Builds by highlighting issues
-identified in Python projects, from the simple to the seemingly
-inscrutible.
-
-Reproducible Builds is basically the crazy idea that when you build
-something, and you build it again, you get the exact same thing... or
-even more important, if someone else builds it, they get the exact
-same thing too.
-
-Through a few code examples demonstrating common problems folks will
-learn what to watch out for when coding and how to fix them once
-identified.
-
-Some of the useful tooling for diagnosing and troubleshooting
-reproducibility issues (diffoscope and reprotest)... just so happen to
-be written in Python! Will even show you how to use them... and maybe
-take a look inside.
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-presentations/-/compare/8654485613611312d449969851da28e7b2889b7b...a018512c5fb0c4811f399ec55d3012c762455615
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-presentations/-/compare/8654485613611312d449969851da28e7b2889b7b...a018512c5fb0c4811f399ec55d3012c762455615
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20250124/b622cf47/attachment.htm>
More information about the rb-commits
mailing list