Eric Biggers [Mon, 27 Aug 2012 03:32:09 +0000 (22:32 -0500)]
Image capture configuration
Support a capture configuration file like Microsoft's imagex.exe does. It lets
you specify patterns of files to exclude from capture, exclude from compression,
or align within the WIM file. Currently, only the exclusion list is
implemented. --config options have been added to `imagex capture' and `imagex
append'.
Eric Biggers [Sun, 26 Aug 2012 23:46:47 +0000 (18:46 -0500)]
Misc fixes
- Remove code pertaining to root permissions. We don't need to be root to do a
NTFS apply anymore.
- Improve comments on fields of `struct dentry'.
- Another fix to hard-link creation in the NTFS apply. We close the directory
inode before opening the target inode and re-opening the directory inode, so
that we can make sure the directory inode will not be opened twice at the same
time.
Eric Biggers [Sat, 25 Aug 2012 18:58:11 +0000 (13:58 -0500)]
NTFS apply updates
- Hard link creation code fixed and uncommented. We need to close the source
directory inode before the target inode.
- Code to set DOS filenames added but commented out due to a problem.
- New function wim_apply_dentry_timestamps() to apply timestamps to dentry, run
in a depth-first traversal of the directory tree following the main WIM
application.
Eric Biggers [Fri, 24 Aug 2012 00:44:42 +0000 (19:44 -0500)]
Code to handle some weird siutations and bad WIMs
- read_lookup_table(): It is now an error if uncompressed resources have
different compressed and uncompressed size.
- read_lookup_table(): It is now an error if two lookup table entries have the
same SHA1 message digest.
- write_metadata_resource(): Append 20 random bytes to the end of the metadata
resource to make the metadata resource unique even if we capture exactly the
same image again.
Eric Biggers [Thu, 23 Aug 2012 14:50:42 +0000 (09:50 -0500)]
Finally fixed most of the problems with the new resource code.
Also, write_wim_resource() will now verify the SHA1 message digest when writing
a WIM resource. This makes it possible to detect concurrent modifications of
the directory tree when capturing a WIM.
Eric Biggers [Wed, 22 Aug 2012 04:40:57 +0000 (23:40 -0500)]
Rewritten functions for reading and writing resources
Functions for reading and writing compressed and uncompressed resources have
been rewritten to reduce code duplication and simplify the interface to the rest
of the code.
Eric Biggers [Tue, 21 Aug 2012 22:17:36 +0000 (17:17 -0500)]
Add modified security.c from NTFS-3g
This simplifies WIM application because we can modifiy
ntfs_set_file_attributes() and ntfs_set_file_security() to take ntfs_inodes
instead of pathnodes, and we can also get rid of the SECURITY_API structure.
Eric Biggers [Sun, 19 Aug 2012 22:32:15 +0000 (17:32 -0500)]
Hard link fix
I'm noticing weird things in the Windows 7 install.wim file where WIM dentries
are marked as being in the same hard link set, but the dentries have differences
such as different file streams or different file permissions. I'm working
around the problem by splitting these offending dentries into their own hard
link groups.
Eric Biggers [Sat, 18 Aug 2012 00:46:24 +0000 (19:46 -0500)]
Some preparations for supporting NTFS capture and apply.
- Restore support for reading and writing alternate data streams (this was in
early versions of wimlib but had been removed for not actually being used...)
- Remove the --disable-security-data option. I don't think anyone would really
want this; instead we just copy the existing security data by default. New
files will be created without security data except when capturing from NTFS
(not yet implemented).
- Read and write the reparse tag field.
- Remove --verify, --config, --norpfix from imagex commands. I'm still not
planning to do anything with these, so remove them to simplify the commands.
Who knows, maybe I'll add these back later though...
- wimlib_set_link_type(), wimlib_set_verbose(), wimlib_set_output_dir() removed.
You now pass flags or the output directory to the relevant functions such as
wimlib_extract_image().
- --enable-ntfs-3g configure option
- --ntfs options on `imagex capture' and `imagex apply' (Actual operations not
yet implemented!)
Eric Biggers [Tue, 14 Aug 2012 00:20:28 +0000 (19:20 -0500)]
Test suite
This commit introduces a primitive test suite for wimlib. It consists of a
shell script that runs some tests on the 'imagex' program. Run it with `make
check'; only works with in-tree builds.
As a result of writing the test suite I also fixed two issues:
mount.c: Allow opening empty files in read-only filesystem
mount.c: Implement utimens() for WIM filesystem
Eric Biggers [Mon, 13 Aug 2012 20:54:21 +0000 (15:54 -0500)]
Various minor changes and fixes.
- Automatic newline when calling DEBUG() or ERROR()
- Use ERROR_WITH_ERRNO instead of "%m" conversion specifier
- Security data cannot be NULL anymore; just allocate one with zero entries.
- Cleaned up failure case code in some functions, also documented whether the
WIMs are valid after wimlib_add_image(), wimlib_delete_image(), and
wimlib_export_image() fails or not.
Eric Biggers [Sat, 26 May 2012 18:49:31 +0000 (13:49 -0500)]
Use public domain SHA1 code
I believe that technically I shouldn't have been using the coreutils SHA1 code
in wimlib because the coreutils code is GPLv3 while wimlib is LGPLv2.1+. So I
replaced it with public domain code.
This only applies to building SHA1 support into wimlib. I would recommend using
an external libcrypto if possible.