From 6880363fdb99d84f02b2aeb01a8edce3aa2bd283 Mon Sep 17 00:00:00 2001 From: Roger Binns Date: Mon, 30 Dec 2024 09:44:24 -0800 Subject: [PATCH] Also produce source .tar.gz Fixes #548 --- Makefile | 16 ++++++++++++---- doc/changes.rst | 6 ++++-- doc/install.rst | 18 +++++++++++++----- tools/docupdate.py | 18 +++++++++++++----- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index e39caa76..f6cc0e7d 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ GENDOCS = \ .PHONY : help all tagpush clean doc docs build_ext build_ext_debug coverage pycoverage test test_debug fulltest linkcheck unwrapped \ publish stubtest showsymbols compile-win setup-wheel source_nocheck source release pydebug \ - fossil doc-depends dev-depends docs-no-fetch compile-win-one langserver + fossil doc-depends dev-depends docs-no-fetch compile-win-one langserver source_check_extracted help: ## Show this help @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | \ @@ -229,12 +229,18 @@ source_nocheck: src/apswversion.h env APSW_NO_GA=t $(MAKE) doc rm -rf doc/build/html/_static/fonts/ doc/build/html/_static/css/fonts/ doc/build/apsw.1 rst2man doc/cli.rst doc/build/apsw.1 - $(PYTHON) setup.py sdist --formats zip --add-doc + $(PYTHON) setup.py sdist --formats zip,gztar --add-doc source: source_nocheck # Make the source and then check it builds and tests correctly. This will catch missing files etc mkdir -p work rm -rf work/$(VERDIR) cd work ; unzip -q ../dist/$(VERDIR).zip + $(MAKE) source_check_extracted + rm -rf work/$(VERDIR) + cd work ; tar xfa ../dist/$(VERDIR).tar.gz + $(MAKE) source_check_extracted + +source_check_extracted: # Make certain various files do/do not exist for f in man/cli.1 doc/vfs.html doc/_sources/pysqlite.txt apsw/trace.py src/faultinject.h; do test -f work/$(VERDIR)/$$f ; done for f in sqlite3.c sqlite3/sqlite3.c debian/control ; do test ! -f work/$(VERDIR)/$$f ; done @@ -244,8 +250,10 @@ source: source_nocheck # Make the source and then check it builds and tests corr release: ## Signs built source file(s) test "`git branch --show-current`" = master test -f dist/$(VERDIR).zip - -rm -f dist/$(VERDIR).cosign-bundle - cosign sign-blob --yes --bundle dist/$(VERDIR).cosign-bundle dist/$(VERDIR).zip + test -f dist/$(VERDIR).tar.gz + -rm -f dist/$(VERDIR).zip.cosign-bundle dist/$(VERDIR).tar.gz.cosign-bundle + cosign sign-blob --yes --bundle dist/$(VERDIR).zip.cosign-bundle dist/$(VERDIR).zip + cosign sign-blob --yes --bundle dist/$(VERDIR).tar.gz.cosign-bundle dist/$(VERDIR).tar.gz src/_unicodedb.c: tools/ucdprops2code.py ## Update generated Unicode database lookups -rm -f $@ diff --git a/doc/changes.rst b/doc/changes.rst index a0767fe0..a02a8412 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -10,8 +10,10 @@ history `__. APSW changes by version ----------------------- -next -==== +3.48.0.0 +======== + +Source releases are also available in tar format (:issue:`548`) `Shared cache `__ is omitted diff --git a/doc/install.rst b/doc/install.rst index cd894a69..68b22661 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -82,11 +82,19 @@ edit the :file:`setup.apsw` file inside. * `apsw-3.47.2.0.zip `__ - (Source, includes this HTML Help) + (Source as zip, includes this HTML Help) -* `apsw-3.47.2.0.cosign-bundle - `__ - cosign signature +* `apsw-3.47.2.0.tar.gz + `__ + (Source as tar.gz, includes this HTML Help) + +* `apsw-3.47.2.0.zip.cosign-bundle + `__ + cosign signature for zip source + +* `apsw-3.47.2.0.tar.gz.cosign-bundle + `__ + cosign signature for tar.gz source .. downloads-end @@ -121,7 +129,7 @@ Verify .. code-block:: console $ cosign verify-blob apsw-3.47.2.0.zip \ - --bundle apsw-3.47.2.0.cosign-bundle \ + --bundle apsw-3.47.2.0.zip.cosign-bundle \ --certificate-identity=rogerb@rogerbinns.com \ --certificate-oidc-issuer=https://github.com/login/oauth Verified OK diff --git a/tools/docupdate.py b/tools/docupdate.py index 0a3e36fd..051b4462 100644 --- a/tools/docupdate.py +++ b/tools/docupdate.py @@ -28,11 +28,19 @@ op.append("") op.append("* `apsw-%s.zip" % (version,)) op.append(url % ("apsw-%s.zip" % version)) - op.append(" (Source, includes this HTML Help)") + op.append(" (Source as zip, includes this HTML Help)") op.append("") - op.append("* `apsw-%s.cosign-bundle" % (version,)) - op.append(url % ("apsw-%s.cosign-bundle" % version)) - op.append(" cosign signature") + op.append("* `apsw-%s.tar.gz" % (version,)) + op.append(url % ("apsw-%s.tar.gz" % version)) + op.append(" (Source as tar.gz, includes this HTML Help)") + op.append("") + op.append("* `apsw-%s.zip.cosign-bundle" % (version,)) + op.append(url % ("apsw-%s.zip.cosign-bundle" % version)) + op.append(" cosign signature for zip source") + op.append("") + op.append("* `apsw-%s.tar.gz.cosign-bundle" % (version,)) + op.append(url % ("apsw-%s.tar.gz.cosign-bundle" % version)) + op.append(" cosign signature for tar.gz source") op.append("") continue if line == " .. verify-begin": @@ -46,7 +54,7 @@ def back(s): return s + " " * (65 - len(s)) + "\\" op.append(" " + back(f"$ cosign verify-blob apsw-{version}.zip")) - op.append(" " + back(f" --bundle apsw-{version}.cosign-bundle")) + op.append(" " + back(f" --bundle apsw-{version}.zip.cosign-bundle")) op.append(" " + back(" --certificate-identity=rogerb@rogerbinns.com")) op.append(" " + " --certificate-oidc-issuer=https://github.com/login/oauth") op.append(" " + "Verified OK")