2024-01-24  Timothy Sample  <samplet@ngyro.com>

	Update NEWS for 0.6.0.

	* NEWS: Add a section for 0.6.0.

2024-01-24  Timothy Sample  <samplet@ngyro.com>

	Fix swapped XZ test names.

	* tests/kinds/xz.scm: Swap the names of the large and small stream
	header tests.

2024-01-24  Timothy Sample  <samplet@ngyro.com>

	Add basic bzip2 support.

	* disarchive/kinds/bzip2.scm: New file.
	* disarchive/assemblers/bzip2-stream.scm: New file.
	* tests/kinds/bzip2.scm: New file.
	* Makefile.am (SOURCES): Add the new module files.
	(TESTS): Add the new test file.
	* disarchive/disassemblers.scm (%disassemblers): Add 'bzip2-stream'.
	* disarchive/assemblers.scm (%assemblers): Likewise.

2024-01-24  Timothy Sample  <samplet@ngyro.com>

	Add bzip2 as a dependency.

	* README: Add Guile-bzip2 and bzip2 as requirements.
	* configure.ac: Check for them.
	* disarchive/config.scm.in (%bzip2): New variable.
	* Makefile.am: Set it.
	* manifest.scm: Use 'guile-lzma' from Guix; replace the custom
	'guile-lzma' with a custom 'guile-bzip2'.

2024-01-24  Timothy Sample  <samplet@ngyro.com>

	Touch up a configure script comment.

	* configure.ac: Fix O_NOFOLLOW comment.

2023-01-27  Timothy Sample  <samplet@ngyro.com>

	Fail on missed (dis-)assembler dispatch.

	This fixes a bug where Disarchive would happily disassemble any
	file, producing a nonsense specification.

	* disarchive/assemblers.scm (blueprint-assembler): New procedure.
	(blueprint-name, blueprint-digest, blueprint-inputs)
	(serialize-blueprint, assemble): Use it.
	(serialized-assembler): New procedure.
	(deserialize-blueprint): Use it.
	* disarchive/disassemblers.scm (file-disassembler): New procedure.
	(disassemble): Use it.

	Reported-by: Arun Isaac <arunisaac@systemreboot.net>

2023-01-27  Timothy Sample  <samplet@ngyro.com>

	Make disassembler names match assembler names.

	* disarchive/disassemblers.scm (<disassembler>): Rename the 'pred'
	field to 'x-file?' and the 'disassemble' field to 'disassemble-x'.

2022-09-15  Timothy Sample  <samplet@ngyro.com>

	Update NEWS.

	* NEWS: Add notes for 0.5.0.

2022-09-15  Timothy Sample  <samplet@ngyro.com>

	Improve octal validation.

	See <https://bugs.gnu.org/57573>.

	* disarchive/kinds/octal.scm (valid-unstructured-octal?): Check that
	the underlying string cannot be treated as a padded octal.

2022-06-15  Timothy Sample  <samplet@ngyro.com>

	Add test data to the distribution tarball.

	This is a follow up to 084a155848d2f8a221dc4ab75468e07bf6dac4f1.

	* Makefile.am (EXTRA_DIST): Add test data files.

2022-06-15  Timothy Sample  <samplet@ngyro.com>

	Flesh out the Unix interface.

	* disarchive.scm (specification->blueprint): Accept a port.
	(disarchive-assemble): Rename the 'filename' argument to 'out';
	implement writing to a port; and update the docstring to reflect
	that ports can be used for both the 'specification' and 'out'
	arguments.
	* disarchive/config.scm.in (%package-name): New variable.
	(%version): New variable.
	(version-message): New variable.
	* scripts/disarchive.in (options-grammar): New variable.
	(help-message): New variable.
	(short-help-message): New variable.
	(getopt-long*): New procedure.
	(main): Rewrite to use 'getopt-long'; accept '--help' and
	'--version' options.
	* disarchive/scripts/assemble.scm (options-grammar): New variable.
	(help-message): New variable.
	(short-help-message): New variable.
	(getopt-long*): New procedure.
	(assemble-main): Rewrite to use 'getopt-long'; write to stdout by
	default; accept '--output', '--help', and '--version' options; and
	read the specification from stdin when given "-".
	* disarchive/scripts/disassemble.scm (options-grammar): New
	variable.
	(help-message): New variable.
	(short-help-message): New variable.
	(getopt-long*): New procedure.
	(disassemble-main): Rewrite to use 'getopt-long'; accept '--output',
	'--help', and '--version' options.
	* build-aux/tests-env.in: Set 'PATH', 'DISARCHIVE_ZGZ', and
	'DISARCHIVE_TEST_DATA'.
	* tests/data/README: New file.
	* tests/data/test-archive.da: New file.
	* tests/data/test-archive.tar: New file.
	* tests/data/test-archive/test-archive/file-a: New file.
	* tests/data/test-archive/test-archive/file-b: New file.
	* tests/cli.scm: New file.
	* Makefile.am (TESTS): Add it.
	(disarchive/config.scm): Substitute 'PACKAGE_NAME' and 'VERSION'.

2021-12-18  Timothy Sample  <samplet@ngyro.com>

	Update NEWS for 0.4.0.

	* NEWS: Add a section for 0.4.0.

2021-12-18  Timothy Sample  <samplet@ngyro.com>

	guix: Use new inputs style.

	* manifest.scm (guile-lzma): Replace explicitly named inputs with
	plain package lists.

2021-12-18  Timothy Sample  <samplet@ngyro.com>

	guix: Switch to using a manifest.

	* guix.scm: Rename this...
	* manifest.scm: ...to this, and produce a Guix manifest instead of a
	package.
	* Makefile.am (EXTRA_DIST): Update accordingly.

2021-12-18  Timothy Sample  <samplet@ngyro.com>

	Use Guile's O_NOFOLLOW when available.

	* disarchive/config.scm.in: Do not export the O_NOFOLLOW value
	computed by the configure script if Guile already provides it.

2021-12-18  Timothy Sample  <samplet@ngyro.com>

	Add XZ support.

	* guix.scm (guile-lzma): New variable.
	(package): Move 'guile-gcrypt' to 'propagated-inputs' and add
	'guile-lzma' there, too.
	* configure.ac: Check for the 'lzma' Guile module and the 'xz'
	program.
	* disarchive/config.scm.in (%xz): New variable.
	* README: Mention "Guile-LZMA" and "XZ".
	* disarchive/utils.scm (make-thing-encoder): New procedure.
	* disarchive/assemblers/xz-file.scm: New file.
	* disarchive/kinds/xz.scm: New file.
	* disarchive/assemblers.scm (%assemblers): Add 'xz-file'.
	* disarchive/disassemblers.scm (%disassemblers): Likewise.
	* tests/kinds/xz.scm: New file.
	* Makefile.am (SOURCES): Add 'kinds/xz.scm' and
	'assemblers/xz-file.scm'.
	(disarchive/config.scm): Substitute '@XZ@'.
	(TESTS): Add 'tests/kinds/xz.scm'.
	* .dir-locals.el: Set indentation for Guile-LZMA procedures and
	'generator-let*'.

2021-12-04  Timothy Sample  <samplet@ngyro.com>

	zgz: Pull in upstream nondeterminism fix.

	This is GZip commit 0a284baeaedca68017f46d2646e4c921aa98a90d plus the
	relevant copyright metadata changes.  The original commit message is
	as follows.

	gzip: fix nondeterministic compression results

	Reported by Jakub Wilk in <http://bugs.debian.org/647522>.
	* deflate.c (fill_window): Don't let garbage pollute the dictionary.

2021-12-02  Timothy Sample  <samplet@ngyro.com>

	git-hash: Allow filtering which files are hashed.

	* disarchive/git-hash.scm (%read-tree-node): Add a 'select?'
	argument; only hash a file if 'select?' does not return '#f'.
	(git-hash-directory): Add a 'select?' keyword argument; pass it
	through to '%read-tree-node'.

2021-11-29  Timothy Sample  <samplet@ngyro.com>

	Have the scripts log to the current error port.

	* disarchive/scripts/assemble.scm (assemble-main): Set
	'%disarchive-log-port' to 'current-error-port'.
	* disarchive/scripts/disassemble.scm (disassemble-main): Likewise.

2021-11-29  Timothy Sample  <samplet@ngyro.com>

	Fix outdated '<tarball>' comments.

	* disarchive/assemblers/tarball.scm (<tarball>): Update comments.

2021-11-29  Timothy Sample  <samplet@ngyro.com>

	Fix tarball padding assembly.

	* disarchive/assemblers/tarball.scm (assemble-tarball): Treat
	'padding' as either a number or a bytevector, not a string.

2021-10-24  Timothy Sample  <samplet@ngyro.com>

	Add cross-compilation fix to NEWS.

	* NEWS (0.3.0): Mention the cross-compilation fix.

2021-10-24  Maxim Cournoyer  <maxim.cournoyer@gmail.com>

	build: Fix cross-compilation.

	The cross-compilation issues corrected by this change were discovered
	when attempting to cross-compile Disarchive for the i586-gnu target on
	GNU Guix.

	* configure.ac [O_NOFOLLOW]: Rewrite test using AC_COMPUTE_INT, which
	is supported even when cross-compiling.
	(GUILD_TARGET_OPTION): New computed variable.
	* build-aux/guile.am (.scm.go): Use it.

2021-10-24  Timothy Sample  <samplet@ngyro.com>

	Update the NEWS file for 0.3.0.

	NEWS: Add an entry for 0.3.0.

2021-10-21  Timothy Sample  <samplet@ngyro.com>

	Include empty directories when computing hashes.

	This is what SWH does, so we need this to be compatible with them.
	Furthermore, it makes sense as an archival tool to not throw away
	this information.

	Cf. https://lists.gnu.org/archive/html/guix-devel/2021-10/msg00151.html

	* disarchive/git-hash.scm (empty-directory-tree?): Delete procedure.
	(%read-tree-node): Do not skip empty directories.
	(git-hash-directory): Update docstring.

2021-06-02  Timothy Sample  <samplet@ngyro.com>

	Fix directory-ref exports.

	This is a correction to 34f07758352224624758da9de410448c6ca2219f.

	* disarchive/assemblers/directory-ref.scm: Change the
	'directory-ref-id' export to 'directory-ref-addresses'.

2021-05-13  Timothy Sample  <samplet@ngyro.com>

	tests: Further increase octal discard tolerance.

	This is a follow-up to bf0c4a6622e5f66213573297b3f9b5b455345700.  The
	previous value was probably fine, but there's no need to be
	conservative here.

	* tests/kinds/octal.scm: Make the Guile-QuickCheck 'give-up?'
	predicate tolerate 500 discards per success.

2021-05-13  Timothy Sample  <samplet@ngyro.com>

	guix: Remove custom Guile-QuickCheck package.

	guix.scm (guile-quickcheck): Remove variable.

2021-05-13  Timothy Sample  <samplet@ngyro.com>

	guix: Use plain 'guile-3.0'.

	guix.scm: Use 'guile-3.0' instead of 'guile-3.0-latest'.

2021-05-06  Timothy Sample  <samplet@ngyro.com>

	Update the NEWS file for 0.2.1.

	NEWS: Add an entry for 0.2.1.

2021-05-06  Timothy Sample  <samplet@ngyro.com>

	tests: Make octal property tests more robust.

	* tests/kinds/octal.scm: Adjust the 'give-up?' predicate in the
	Guile-QuickCheck configuration.

2021-05-06  Timothy Sample  <samplet@ngyro.com>

	tests: Do not use regex to find octal substrings.

	See <https://bugs.gnu.org/48114>.

	* tests/kinds.scm (fix-unstructured-octal-value): Instead of
	'string-match', use 'string-tokenize' to find the first octal value.

2021-03-22  Timothy Sample  <samplet@ngyro.com>

	Add a NEWS file.

	* NEWS: New file.

2021-03-21  Timothy Sample  <samplet@ngyro.com>

	Make 'tar-header-typeflag' a procedure.

	* disarchive/kinds/tar-header.scm (tar-header-typeflag): Rename this
	syntax...
	(%tar-header-typeflag): ...to this.
	(tar-header-typeflag): New procedure.

2021-03-21  Timothy Sample  <samplet@ngyro.com>

	No backtraces for mundane assembly errors.

	* disarchive/assemblers.scm (&assembly-error): New exception type.
	(assembly-error): New syntax.
	(assemble): Use it for hash validation failure.
	* disarchive/assemblers/directory-ref.scm (assemble-directory-ref):
	Use if for unobtainable references.
	* disarchive.scm (disarchive-assemble): Handle it.

2021-03-20  Timothy Sample  <samplet@ngyro.com>

	Use git-version-gen for the package version.

	* build-aux/git-version-gen: New file.
	* configure.ac (AC_INIT): Use it to generate the version.
	* Makefile.am (EXTRA_DIST): Add it.
	(dist-hook): Generate the '.tarball-version' file.

2021-03-20  Timothy Sample  <samplet@ngyro.com>

	Add a ChangeLog using gitlog-to-changelog.

	* ChangeLog: New file.
	* build-aux/gitlog-to-changelog: New file.
	* Makefile.am (EXTRA_DIST): Add it.
	(gen-ChangeLog): New rule.
	(dist-hook): Add it as a prerequisite.

2021-03-17  Timothy Sample  <samplet@ngyro.com>

	Export the 'specification->blueprint' procedure.

	* disarchive.scm: Export the 'specification->blueprint' procedure.

2021-03-17  Timothy Sample  <samplet@ngyro.com>

	Allow user-specified address resolution.

	* disarchive/assemblers/directory-ref.scm (assemble-directory-ref):
	Factor out address resolution from here...
	* disarchive/resolvers.scm (resolve-addresses): ...to this new
	procedure.
	(%resolve-addresses): New parameter.
	* disarchive.scm (disarchive-assemble): Add the 'resolver' keyword
	argument.
	* disarchive/scripts/assemble.scm (make-resolver): New procedure.
	(assemble-main): Require an 'input' command-line argument for simple
	address resolution.

2021-03-16  Timothy Sample  <samplet@ngyro.com>

	Use the full SWHID in the SWH resolver.

	See <https://forge.softwareheritage.org/T2430#47486>.

	* disarchive/resolvers/swh.scm: Rename this...
	* disarchive/resolvers/swhid.scm: ...to this, adjusting procedure
	names, and adding the full SWHID around the directory hash.
	* disarchive/resolvers.scm (%resolvers): Adjust accordingly.
	* Makefile.am (SOURCES): Likewise.

2021-03-16  Timothy Sample  <samplet@ngyro.com>

	Do not use a database.

	Instead of trying to stick everything in a database, just generate a
	single specification that represents a single input archive.  The main
	downside here is that we lose deduplication of tarballs that are
	compressed differently.  The benefit is that Disarchive no longer
	needs to know how to lookup blueprints.  The caller can just obtain
	one ahead of time and let Disarchive assemble it.

	* disarchive/database.scm: Delete file.
	* disarchive/scripts/load.scm: Delete file.
	* disarchive/scripts/assemble.scm: New file.
	* disarchive/scripts/save.scm: Delete file.
	* disarchive/scripts/disassemble.scm: New file.
	* Makefile.am (SOURCES): Adjust accordingly.
	* disarchive/assemblers.scm (deserialize-blueprint): Remove
	'database' argument.
	* disarchive/assemblers/directory-ref.scm
	(deserialize-directory-ref): Adjust accordingly.
	* disarchive/assemblers/tarball.scm (serialize-tarball): Remove
	'version'; swap the order of 'digest' and 'input'; and serialize the
	input itself instead of a reference to it.
	(deserialize-tarball): Adjust accordingly.
	* disarchive/assemblers/gzip-member.scm (serialize-gzip-member):
	Changed just like 'serialize-tarball'.
	(deserialize-gzip-member): Adjust accordingly.
	* disarchive.scm (->digest): Delete procedure.
	(wrap-blueprint): New procedure.
	(unwrap-blueprint): New procedure.
	(specification->blueprint): New procedure.
	(disarchive-load): Delete procedure.
	(disarchive-assemble): New procedure.
	(disarchive-save): Delete procedure.
	(disarchive-disassemble): New procedure.
	* scripts/disarchive.in (main): Replace 'load' and 'save' with
	'assemble' and 'disassemble'.

2021-03-15  Timothy Sample  <samplet@ngyro.com>

	Introduce "blueprint" to disambiguate "assembler".

	By accident, the word "assembler" came to mean "a thing that
	assembles" and "a thing that can be assembled".  This change
	introduces the word "blueprint" for the latter.

	* disarchive/assemblers.scm (assembler-name, assembler-digest,
	assembler-inputs, serialize-assembler, deserialize-assembler):
	Rename these procedures to...
	(blueprint-name, blueprint-digest, blueprint-inputs,
	serialize-blueprint, deserialize-blueprint): ...these respectively,
	renaming their arguments accordingly.
	(assemble): Rename the 'assembler' argument to 'blueprint'.
	* disarchive/database.scm (lookup-assembler, store-assembler,
	store-assembler-closure): Rename these procedures to...
	(lookup-blueprint, store-blueprint, store-blueprint-closure):
	...these respectively, renaming their arguments accordingly.
	* disarchive.scm (disarchive-load, disarchive-save): Adjust callers
	and rename variables accordingly.
	* disarchive/assemblers/tarball.scm (serialize-tarball,
	deserialize-tarball, assemble-tarball): Likewise.
	* disarchive/assemblers/gzip-member.scm (serialize-gzip-member,
	deserialize-gzip-member, assemble-gzip-member): Likewise.

Copyright © 2021 Timothy Sample <samplet@ngyro.com>

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.
