Age | Commit message (Collapse) | Author |
|
Bug: 21989305
Bug: 22048934
Change-Id: I5b49d521562245cae00fa9701c92dc0a1fa3dd80
Signed-off-by: Thierry Strudel <tstrudel@google.com>
|
|
libselinux shared libraries"
* commit '4f71fdf56ecf96e96be7e12dacb2cf84357963f6':
DO NOT MERGE Revert "squasfs-tool: use libcutils and libselinux shared libraries"
|
|
libraries"
This reverts commit a1dd2fc317a47496c175e49407fae4804995e96b.
This change is incompatible with Lollipop and causes build failure.
|
|
Segfault happens when attempting to dump pseudo files in SQUASHFS_TRACE
mode after attempting to dereference NULL pseudo pointer.
Change-Id: I48097cce9b7a7e57fea5411c7d1eb5b5de8dc053
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
* commit 'a1dd2fc317a47496c175e49407fae4804995e96b':
squasfs-tool: use libcutils and libselinux shared libraries
|
|
- move libcutils and libselinux as shared now that they are
in DISTTOOL.
- liblog dependency is part of libcutils, and need not be
called out explicitly now. liblog is in DISTTOOL.
Bug: 19908228
Change-Id: I6cd1e72cad271a911c9a26ff914f31ef1bd8fe8b
|
|
* commit '2060ec142b2e565aa8310a489e8d9f7ce73bad83':
squashfs-tools: add logging
|
|
libcutils fs_config has the right to add Android logging
Bug: 19908228
Change-Id: I424911fbd346acd7260b1681942821bd4a2d56a5
|
|
* commit '1341c47f6ab4f38395cf0feee6455496b6ea7d2a':
mksquashfs: move fs_config to libcutils
|
|
Bug: 19908228
Change-Id: I8afccf99018a3497e841f5827097a1883e9171ef
|
|
* commit '77ac00bf9aeb152ccb0e04d196c8350c0542690b':
squashfs-tools: Add mount-point flag
|
|
This flag is necessary when android-fs-config or context-file are passed
and the source directory is not mount point (e.g. absolute
path, current dir '.', different dir name than mount point...etc).
Change-Id: I3b4bdc401527765a571ff4e5fb5815c6d5e85adc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
This flag is necessary when android-fs-config or context-file are passed
and the source directory is not mount point (e.g. absolute
path, current dir '.', different dir name than mount point...etc).
Change-Id: I3b4bdc401527765a571ff4e5fb5815c6d5e85adc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
Change-Id: I42eb382e373ec65d145b5368649db6dbca913d81
|
|
Change-Id: Ie4aa158f369e5573fd385246843ec6bb370f993f
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
Add a context-file flag that allows passing an selinux security context
file to set security.selinux xattrs rather than reading xattrs from
filesystem's source directory.
Change-Id: Icad4d38a736137d85835a0eab9650c0c99908721
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
Android specific flag to set inodes' mode, uid, and gid according to
android_filesystem_config rather than reading them from the source filesystem.
Change-Id: I11c54158c53c5aaaebb0d8db0409201548207d44
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
squashfs-tools now builds and runs on linux with gzip compression.
Change-Id: I1188cb4045f035227023a29c1c7672b356e53aea
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
|
|
Applies to squashfs-tools 4.3.
Reported-by: Bruno Wolff III <bruno@wolff.to>
Signed-off-by: Guan, Xin <guanx.bac@gmail.com>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Fix a rare race condition in fragment waiting when finalising the
filesystem. This is a race condition that was initially fixed in 2009,
but inadvertantly re-introduced in the latest release when the code
was rewritten.
Background:
When finalising the filesystem, the main control thread needs to ensure
all the in-flight fragments have been queued to the writer thread before
asking the writer thread to finish, and then writing the metadata.
It does this by waiting on the fragments_outstanding counter. Once this
counter reaches 0, it synchronises with the writer thread, waiting until
the writer thread reports no outstanding data to be written.
However, the main thread can race with the fragment deflator thread(s)
because the fragment deflator thread(s) decrement the fragments_outstanding
counter and release the mutex before queueing the compressed fragment
to the writer thread, i.e. the offending code is:
fragments_outstanding --;
pthread_mutex_unlock(&fragment_mutex);
queue_put(to_writer, write_buffer);
In extremely rare circumstances, the main thread may see the
fragments_outstanding counter is zero before the fragment
deflator sends the fragment buffer to the writer thread, and synchronise
with the writer thread, and finalise before the fragment has been written.
The fix is to ensure the fragment is queued to the writer thread
before releasing the mutex.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
The progressbar was incorrectly enabled *after* writing files
if sort files were used. This meant the progressbar would not
be updated whilst files were being written to the filesystem.
As this is the bulk of the work for Mksquashfs, this means
the progressbar basically didn't appear to update whilst
Mksquashfs was running, and then suddenly updated to 100%
at the end of Mksquashfs.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
This action does exactly what it says, i.e. nothing.
It's designed to be used in conjunction with the verbose action
options to enable debugging of the test expression.
In otherwords, it allows you to check which files match on
your test expression but without doing anything to the filesystem.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
arguments
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Previously it used atom->test->args which is the arg count in the "generic"
test function.
Now that test function parsing has been improved to add variable arguments,
we should be using the new atom->args field which is the number of actual
arguments in the particular parsed test - i.e. the instance rather than
the definition.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
The set code incorrectly did (st_mode & ~S_IFMT) | mode, which is the
exact inverse of what it should have been, i.e. (st_mode & S_IFMT) | mode
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Implement perm() test function, this is modelled directly on
find -perm and implements its behaviour.
Following find, three types of match are supported:
perm(mode) - exact match
perm(-mode) - all of the permission bits are set for the file
perm(/mode) - any of the permission bits are set for the file
With perm(/mode) if no permission bits are set in mode match
on any file, this is to be consistent with find, which
does this to be consistent with the behaviour of
-perm -000
Note, only symbolic modes are currently implemented. Octal modes
will be implemented next.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
At one point in time it was anticipated that the move action
might take multiple arguments. So it used the multi argument
setting of "-2"...
But the current implementation expects one argument only. But
the -2 setting allows zero arguments which isn't expected. So
enforce 1 argument.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Update the test function parser to handle variable amount of arguments,
as that's now needed for the perm() test function. Up till now, though
updating the test parser has been a TODO, it been a low priority because
it's done what's needed.
Updating the parser to speculatively read the number of arguments
present (and hence handle variable number of arguments) has been a
TODO even without the need to handle a variable number of arguments
because experience gained updating the action parser to do this showed
it generates better syntax error messages.
Previously the parser just parsed the number of arguments expected, and
then quit. The parser now parses all the arguments present, and then
compares it against what was expected.
No big deal? Well guess what gives the better syntax error if you
enter too many arguments. Reading just the number of arguments
expected, and then quitting, means the extra arguments cause to
paraphrase a "I expected a ) here, and I got a comma or string".
Now, you get an error message like "I got 5 arguments, but only
expected 2". Which IMHO is a better syntax error message.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Allowing it to be used by the (to be added later) perm test function.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
If you specify multiple sources (directories and/or files) on the command
line, Mksquashfs will merge those sources into a root directory
containing all of them. This is different to the behaviour when
a single directory is specified, in which case Mksquashfs creates
a filesystem with the root containing the contents of the source
directory.
The difference manifests itself in the way the pathname of each
of the directory entries is stored/obtained. Normally to reduce
runtime overhead when the directory entries have all come from the
same parent directory, the source pathname is not stored in each
directory entry, but is computed from the source pathname of the
parent directory. But in the case of the "dummy" root created
to merge multiple sources specified on the command line, each
directory entry does not share the same parent pathname, and so
the source pathname of each directory entry is stored in the
nonstandard_pathname field. This nonstandard_pathname was originally
filled in using a pointer to the source pathname on the command line.
Now, if you later exclude one of these source directories, Mksquashfs
will free the storage, and it will try and free the nonstandard_pathname
field, which leads to a crash as you cannot free a command line argument.
The fix to this is to strdup the command line source and store the
copy in the directory entry.
This is not considered a serious bug, it has not been reported, and
the scenario was discovered by chance whilst looking at the code.
Additionally the trigger scenario is highly artificial and there
is no use-case where this bug will be triggered. To trigger it you
need to specifiy multiple source command arguments, and then you
need to exclude one of them. But, if you explicitly specified it
on the command line why would you later exclude it, and if
you did want to exclude it the obvious way would be to remove it
from the command line.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Get rid of the redundant "Action mode: " prefix and make the
error messages match others.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Get rid of the redundant "action: " prefix and make the
error messages match others.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Fix display of the arguments in the action() statement.
Previously it used action->action->args which is the arg
count in the "generic" action statement, not the number of
actual arguments in the particular parsed action - i.e. the instance
rather than the definition.
For actions which take a fixed number of arguments there, obviously,
is no difference. But for actions which take a variable number of
arguments the generic action count is "-2", and it is the
responsibility of an specific action parser helper to parse
the arguments. In this case the discovered number of arguments
in the instance will be different to the -2 argument count in the
generic statement.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
When testing the mode action, I'm always typing chmod() as
that's what it's called elsewhere. So add chmod as a synonym, it
should probably have been called chmod in the first place.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
When I implemented symbolic modes in the mode() action (i.e.
u+r-w) I made an oversight. I didn't realise the specification
allowed multiple =-+ sequences after the ownership specification.
In otherwords if you wanted to add r (+r) and remove w (-w)
from user, I assumed you would do u+r,u-w. After revisiting
the symbolic mode specification it turns out you should be able
to do u+r-w as a short cut to the previous specification. It
also should be obvious I don't tend to use the symbolic mode but
directly use the octal specification!
So fix the parser to allow multiple =-+ sequences.
So the syntax of the symbolic mode support goes from
[ugoa]+[+-=]PERMS
PERMS = [rwxXst]+ or [ugo]
to
[ugoa]*[[+-=]PERMS]+
PERMS = [rwxXst]+ or [ugo]
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Subpath is the path rooted at the root of the destination filesystem.
It includes renames (due to name conflicts), and moves.
Pathname is the original source pathname rooted at whatever pathname(s)
were given on the command line.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Gah, I like using "_" as the separator between words in
options. But, a long time ago I noticed I'd ended up with "-"
as the separator in the majority case, and so I'm stuck with
"-" as the separator.
Fix verbose_option, true_option, false_option, action_file
and verbse_action_file.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|