aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-09fs_config: align with new explicit fs_config target_out parameterandroid-cts-6.0_r9android-cts-6.0_r8android-cts-6.0_r7android-cts-6.0_r6android-cts-6.0_r5android-cts-6.0_r4android-cts-6.0_r32android-cts-6.0_r31android-cts-6.0_r30android-cts-6.0_r3android-cts-6.0_r29android-cts-6.0_r28android-cts-6.0_r27android-cts-6.0_r26android-cts-6.0_r25android-cts-6.0_r24android-cts-6.0_r23android-cts-6.0_r22android-cts-6.0_r21android-cts-6.0_r20android-cts-6.0_r2android-cts-6.0_r19android-cts-6.0_r18android-cts-6.0_r17android-cts-6.0_r16android-cts-6.0_r15android-cts-6.0_r14android-cts-6.0_r13android-cts-6.0_r12android-cts-6.0_r1android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r68android-6.0.1_r67android-6.0.1_r66android-6.0.1_r65android-6.0.1_r63android-6.0.1_r62android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r55android-6.0.1_r54android-6.0.1_r53android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r5android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r45android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r4android-6.0.1_r33android-6.0.1_r32android-6.0.1_r31android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r25android-6.0.1_r24android-6.0.1_r22android-6.0.1_r21android-6.0.1_r20android-6.0.1_r18android-6.0.1_r17android-6.0.1_r16android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r7android-6.0.0_r6android-6.0.0_r5android-6.0.0_r41android-6.0.0_r4android-6.0.0_r3android-6.0.0_r26android-6.0.0_r25android-6.0.0_r24android-6.0.0_r23android-6.0.0_r2android-6.0.0_r13android-6.0.0_r12android-6.0.0_r11android-6.0.0_r1marshmallow-releasemarshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-devmarshmallow-dr1.6-releasemarshmallow-dr1.5-releasemarshmallow-dr1.5-devmarshmallow-dr-releasemarshmallow-dr-dragon-releasemarshmallow-dr-devmarshmallow-devmarshmallow-cts-releaseThierry Strudel
Bug: 21989305 Bug: 22048934 Change-Id: I5b49d521562245cae00fa9701c92dc0a1fa3dd80 Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-06-24am 4f71fdf5: (-s ours) DO NOT MERGE Revert "squasfs-tool: use libcutils and ↵Simon Wilson
libselinux shared libraries" * commit '4f71fdf56ecf96e96be7e12dacb2cf84357963f6': DO NOT MERGE Revert "squasfs-tool: use libcutils and libselinux shared libraries"
2015-06-22DO NOT MERGE Revert "squasfs-tool: use libcutils and libselinux shared ↵Simon Wilson
libraries" This reverts commit a1dd2fc317a47496c175e49407fae4804995e96b. This change is incompatible with Lollipop and causes build failure.
2015-05-06mksquashfs: Fix segfault when SQUASHFS_TRACE is enabled and no -pf flagMohamad Ayyash
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>
2015-04-15am a1dd2fc3: squasfs-tool: use libcutils and libselinux shared librariesMark Salyzyn
* commit 'a1dd2fc317a47496c175e49407fae4804995e96b': squasfs-tool: use libcutils and libselinux shared libraries
2015-04-15squasfs-tool: use libcutils and libselinux shared librariesmaster-soongMark Salyzyn
- 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
2015-04-08am 2060ec14: squashfs-tools: add loggingMark Salyzyn
* commit '2060ec142b2e565aa8310a489e8d9f7ce73bad83': squashfs-tools: add logging
2015-04-07squashfs-tools: add loggingMark Salyzyn
libcutils fs_config has the right to add Android logging Bug: 19908228 Change-Id: I424911fbd346acd7260b1681942821bd4a2d56a5
2015-04-02am 1341c47f: mksquashfs: move fs_config to libcutilsMark Salyzyn
* commit '1341c47f6ab4f38395cf0feee6455496b6ea7d2a': mksquashfs: move fs_config to libcutils
2015-04-02mksquashfs: move fs_config to libcutilsandroid-wear-5.1.1_r1android-wear-5.1.0_r1Mark Salyzyn
Bug: 19908228 Change-Id: I8afccf99018a3497e841f5827097a1883e9171ef
2015-03-03am 77ac00bf: squashfs-tools: Add mount-point flagMohamad Ayyash
* commit '77ac00bf9aeb152ccb0e04d196c8350c0542690b': squashfs-tools: Add mount-point flag
2015-03-03squashfs-tools: Add mount-point flagMohamad Ayyash
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>
2015-03-02squashfs-tools: Add mount-point flagMohamad Ayyash
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>
2015-03-02Add MODULE_LICENSE_GPLBill Yi
Change-Id: I42eb382e373ec65d145b5368649db6dbca913d81
2015-02-25squashfs-tools: Add LZ4 compression option and make it the defaultMohamad Ayyash
Change-Id: Ie4aa158f369e5573fd385246843ec6bb370f993f Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-02-25squashfs-tools: Allow setting selinux xattrs through file_contextMohamad Ayyash
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>
2015-02-24squashfs-tools: Add android fs-config flag.Mohamad Ayyash
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>
2015-02-23squashfs-tools: Introduce Android.mk.Mohamad Ayyash
squashfs-tools now builds and runs on linux with gzip compression. Change-Id: I1188cb4045f035227023a29c1c7672b356e53aea Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-02-23Fix 2GB-limit of the is_fragment(...) function.Guan, Xin
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>
2015-02-23mksquashfs: fix rare race in fragment waiting in filesystem finalisationPhillip Lougher
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>
2015-02-23mksquashfs: fix progressbar for sort filesPhillip Lougher
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>
2015-02-23actions: add new noop actionPhillip Lougher
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>
2015-02-23actions: change expression logging to not print brackets if test has no ↵Phillip Lougher
arguments Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23action: change expression logging to use atom->argsPhillip Lougher
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>
2015-02-23action: chmod: fix mode setting if octal value specified for modePhillip Lougher
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>
2015-02-23action: add octal mode support to perm test functionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23actions: refactor parse_octal_mode_args(), to use it with the perm test functionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23actions: implement perm() test functionPhillip Lougher
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>
2015-02-23action: fix move argument parsingPhillip Lougher
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>
2015-02-23actions: update test function parser to handle variable amount of argumentsPhillip Lougher
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>
2015-02-23action: split the execute mode code out of mode_action()Phillip Lougher
Allowing it to be used by the (to be added later) perm test function. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: fix cmdline arg free if >1 source dir and one of them is excludedPhillip Lougher
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>
2015-02-23actions: Regularise SYNTAX_ERROR() statementsPhillip Lougher
Get rid of the redundant "Action mode: " prefix and make the error messages match others. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23actions: Regularise SYNTAX_ERROR() statementsPhillip Lougher
Get rid of the redundant "action: " prefix and make the error messages match others. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23action: expression logging should be using action->argsPhillip Lougher
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>
2015-02-23action: add chmod() as a synonym for mode()Phillip Lougher
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>
2015-02-23actions: fix symbolic mode parsing in the mode() actionPhillip Lougher
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>
2015-02-23actions: fix those underscoresPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23actions: eval_expr_top() should be using subpath and not pathnamePhillip Lougher
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>
2015-02-23mksquashfs: add -false-action-file optionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: fix usage of "_" in new optionsPhillip Lougher
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>
2015-02-23mksquashfs: add -true-action-file optionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: add -true_action_file optionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: fix read_action_file to use ACTION_LOG_{NONE|VERBOSE}Phillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: add -verbose_action_file as synonym for -vafPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: add -action_file as synonym for -afPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: add -false_action optionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: add -true_action optionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23action: make action_read_file use ACTION_LOG_{NONE|VERBOSE}Phillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23action: update action option parsing to use ACTION_LOG_{NONE|VERBOSE}Phillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>