Hi,
it seems Microsoft has finally added support for Extended file attributes, properly in favor of the linux subsystem.
And they also added support for cabinet files (or their extracted folders) as reference file.
These *.cab files have a $filehashes$.dat inside their root that wimgapi seem to use.
There is a downloader called uupdl that can download such *.cab using distributions.
Would be awesome if wimlib would support these new features.
EA and CAB support?
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: EA and CAB support?
Indeed, I had considered extended attributes support on Windows before, but no one was asking for it. But now that it's supported by WIMGAPI/DISM (so there is a known on-disk format; they are stored in the "tagged metadata items") and extended attributes are used by the Linux subsystem, I might as well add it; it doesn't seem particularly difficult at this point.
Oddly enough, WIMGAPI/DISM has a bug where it only restores one extended attribute per file even if there are multiple. It's not clear why, given that it stores the full list in the WIM file...
CAB support is significantly harder and I don't know if it will be feasible to add. I'll look into it, though (for readonly support only).
Oddly enough, WIMGAPI/DISM has a bug where it only restores one extended attribute per file even if there are multiple. It's not clear why, given that it stores the full list in the WIM file...
CAB support is significantly harder and I don't know if it will be feasible to add. I'll look into it, though (for readonly support only).
Re: EA and CAB support?
Thanks, sounds good.
If cab support it to much work, I think it would be enough if wimlib_reference_resource_files()
could use a already extracted cab content.
If cab support it to much work, I think it would be enough if wimlib_reference_resource_files()
could use a already extracted cab content.
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: EA and CAB support?
If that's the case, what about just doing something like the following:If cab support it to much work, I think it would be enough if wimlib_reference_resource_files()
could use a already extracted cab content.
It adds the reference directory to the WIMStruct as a temporary image, without actually committing it to disk. Then it extracts a different image that references files from that directory.wimlib_open_wim(wimfile, 0, &wim);
wimlib_add_image(wim, reference_dir, NULL, NULL, 0);
wimlib_extract_image(wim, 1, target_dir, 0);
A less optimized version that would work with current wimlib-imagex would be to capture the reference_dir to an on-disk WIM file first. But the API can work with uncommitted images.
Of course it won't know to do anything special with "$filehashes$.dat", but if I understand correctly that's not strictly required; it would just be another optimization.
Re: EA and CAB support?
Thanks,
using wimlib_add_image() is working perfectly here.
using wimlib_add_image() is working perfectly here.
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: EA and CAB support?
wimlib-v1.13.0-BETA1 includes extended attributes support on Windows:
I still haven't been able to solve the mystery of why DISM will store multiple extended attributes per file but will only extract the first one, though. Needless to say, I opted not to include the same bug in wimlib...On Windows, wimlib now supports capturing and applying extended
attributes (EAs). It is compatible with DISM with the /EA option,
available since Windows 10 version 1607. wimlib's EA support is on by
default; no option has to be provided, and it should work on older
versions of Windows too.