aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/tar.go
AgeCommit message (Collapse)Author
18 hourspkg: move from internalHEADmasterdevelopOphestra
Closes #43. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-30internal/pkg: highlight miscellaneous verbose outputOphestra
These were missed when adding highlight for core cache verbose output. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-25internal/pkg: skip character device nodesOphestra
This allows unpacking of tarballs containing these entries. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-02internal/pkg: rename inputs methodOphestra
Inputs is more correct than dependencies in the current terminology. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-20internal/pkg: optionally exempt implementations from cures counterOphestra
This avoids holding up many slots with a long pipeline. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-04internal/pkg: prefix reporting namesOphestra
This reads better than suffixes. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-04internal/pkg: remove tar built-in decompressorOphestra
This is replaced by decompressArtifact and is no longer necessary. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-13internal/rosa: assume file source is xz-compressedOphestra
XZ happens to be the only widely-used format that is awful to deal with, everything else is natively supported. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30all: use filepathOphestra
This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-11internal/pkg: buffer tar readerOphestra
This significantly improves performance and is a good assumption since the primary use case of FileArtifact is over the network. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-11internal/pkg: validate tar pathnamesOphestra
TContext no longer validates FileArtifact ahead of time, validation outcome is instead determined after consuming the reader to EOF. All data must therefore be treated as untrusted input until the reader is closed. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-05internal/pkg: standardise artifact IROphestra
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: exclusive artifactsOphestra
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-26internal/pkg: close gzip reader on successOphestra
The Close method panics otherwise. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-26internal/pkg: absolute hard linkOphestra
This cannot be relative since the curing process is not in the temp directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose underlying readerOphestra
This will be fully implemented in httpArtifact in a future commit. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-15internal/pkg: cache computed identifiersOphestra
This eliminates duplicate identifier computations. The new implementation also significantly reduces allocations while computing identifier for a large dependency tree. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-13internal/pkg: remove typeflag promotion loopOphestra
Expanding this enables sharing of code common between types. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12internal/pkg: append user-facing name in messagesOphestra
This makes verbose messages much more useful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: pass context to file cureOphestra
This removes the left over embedded contexts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: move dependency flooding to cacheOphestra
This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: make tar temporary directory writableOphestra
This allows it to be renamed to work directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: tar optional fileOphestra
This allows tar to take a single-file directory Artifact as input. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: return reader for filesOphestra
This improves efficiency for cache hits. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-07internal/pkg: support tarball compressed via bzip2Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: do not clear execute bitOphestra
Only write should be cleared here, clearing execute causes execArtifact to be unable to start anything since no Artifact is able to produce an executable file. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: ensure parent for non-directory entriesOphestra
This works around streams containing out of order entries. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-06internal/pkg: pass cure context as single valueOphestra
This cleans up the function signature and makes backwards compatible API changes possible. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: expand single directory tarballOphestra
This enables much cleaner use of their output without giving up any meaningful data. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: temporary scratch space for cureOphestra
This allows for more flexibility during implementation. The use case that required this was for expanding single directory tarballs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: compute http identifier from urlOphestra
The previous implementation exposes arbitrary user input to the cache as an identifier, which is highly error-prone and can cause the cache to enter an inconsistent state if the user is not careful. This change replaces the implementation to compute identifier late, using url string as params. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-05internal/pkg: improve artifact interfaceOphestra
This moves all cache I/O code to Cache. Artifact now only contains methods for constructing their actual contents. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-04internal/pkg: ignore typeflag 'g'Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-04internal/pkg: implement tar artifactOphestra
This is useful for unpacking tarballs downloaded from the internet. Signed-off-by: Ophestra <cat@gensokyo.uk>