Update Technical_Decomp_Harvest

Miguel Jacq 2025-12-27 20:59:16 -06:00
parent db25157d1d
commit ed56307910

@ -6,7 +6,7 @@
- uses IgnorePolicy + PathFilter/CompiledPathPattern to decide what files are safe to copy - uses IgnorePolicy + PathFilter/CompiledPathPattern to decide what files are safe to copy
- emits ServiceSnapshot, PackageSnapshot, UsersSnapshot, etc. - emits ServiceSnapshot, PackageSnapshot, UsersSnapshot, etc.
- emits ManagedFile and ExcludedFile entries everywhere - emits ManagedFile and ExcludedFile entries everywhere
- writes everything into state.json, and file copies into artifacts/<role>/... - writes everything into state.json, and file copies into `artifacts/<role>/...`
### ManagedFile (dataclass) ### ManagedFile (dataclass)
@ -16,7 +16,7 @@
#### Fields: #### Fields:
- path: absolute original path on host - path: absolute original path on host
- src_rel: relative path used inside artifacts/<role>/... (almost always path.lstrip("/")) - src_rel: relative path used inside `artifacts/<role>/...` (almost always `path.lstrip("/")`)
- owner, group, mode: captured from stat_triplet() - owner, group, mode: captured from stat_triplet()
- reason: classification string explaining why it was captured (examples): - reason: classification string explaining why it was captured (examples):
- systemd_dropin, systemd_envfile - systemd_dropin, systemd_envfile
@ -80,12 +80,12 @@ _____________________
- consider candidate /etc files from: - consider candidate /etc files from:
- systemd dropins/envfiles (only under /etc) - systemd dropins/envfiles (only under /etc)
- modified dpkg conffiles or packaged files under /etc (by md5 compare) - modified dpkg conffiles or packaged files under /etc (by md5 compare)
- service-specific “unowned” files under /etc/<hint> trees - service-specific “unowned” files under `/etc/<hint>` trees
- filter each candidate through: - filter each candidate through:
- user exclude patterns (PathFilter.is_excluded) - user exclude patterns (PathFilter.is_excluded)
- IgnorePolicy.deny_reason - IgnorePolicy.deny_reason
- readability + regular-file checks - readability + regular-file checks
- copy accepted files into artifacts/<role>/<src_rel> - copy accepted files into `artifacts/<role>/<src_rel>`
#### Why this class matters: #### Why this class matters:
@ -110,7 +110,7 @@ ______________________
- For remaining packages: - For remaining packages:
- detect modified conffiles / modified packaged files under /etc via hashes - detect modified conffiles / modified packaged files under /etc via hashes
- capture associated timer overrides if the timer is attributable to that package - capture associated timer overrides if the timer is attributable to that package
- scan for custom/unowned files under /etc/<topdir> trees for the package - scan for custom/unowned files under `/etc/<topdir>` trees for the package
______________ ______________