Repository navigation
Preserve directory structure during packaging - #127
Draft
mschwan-phytec wants to merge 3 commits into
Draft
mschwan-phytec wants to merge 3 commits into
mschwan-phytec wants to merge 3 commits into
Conversation
mksquashfs strips the leading directories of its sources by default, so `partup package out.partup layout.yaml foo/bar.txt` stored bar.txt at the package root instead of foo/bar.txt. Passing a directory kept its name, which made the behavior inconsistent. Pass -no-strip to mksquashfs, so the relative paths are kept and the input files are used directly without copying them. As the paths now end up in the package, validate them first: they must be located below the current directory, which can be changed with the -C option, and the layout configuration must be placed at the package root. Add the error code PU_PACKAGE_ERROR_INVALID_PATH for violations. Also shell-quote the input and output paths, so that names containing spaces no longer break the mksquashfs command line, and pass -noappend. Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Check that foo/bar.txt is stored with its directory and that its siblings are not packaged. Also check that a layout configuration in a subdirectory, paths above the current directory and absolute paths are rejected. Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Document that relative paths of input files are preserved and which restrictions apply to them. Add the corresponding changelog entry. Signed-off-by: Martin Schwan <m.schwan@phytec.de>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mksquashfs strips the leading directories of its sources by default, so
partup package out.partup layout.yaml foo/bar.txtstored bar.txt atthe package root instead of foo/bar.txt. Passing a directory kept its
name, which made the behavior inconsistent.
Pass -no-strip to mksquashfs, so the relative paths are kept and the
input files are used directly without copying them. As the paths now end
up in the package, validate them first: they must be located below the
current directory, which can be changed with the -C option, and the
layout configuration must be placed at the package root. Add the error
code PU_PACKAGE_ERROR_INVALID_PATH for violations.
Also shell-quote the input and output paths, so that names containing
spaces no longer break the mksquashfs command line, and pass -noappend.
Check that foo/bar.txt is stored with its directory and that its
siblings are not packaged. Also check that a layout configuration in a
subdirectory, paths above the current directory and absolute paths are
rejected.
Document that relative paths of input files are preserved and which
restrictions apply to them. Add the corresponding changelog entry.