<div dir="ltr"><div dir="ltr">On Thu, Aug 20, 2020 at 11:48 AM Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com">christian.ehrhardt@canonical.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Aug 20, 2020 at 5:15 PM Mark Mielke <<a href="mailto:mark.mielke@gmail.com" target="_blank">mark.mielke@gmail.com</a>> wrote:<br>> On Thu, Aug 20, 2020 at 8:55 AM Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com" target="_blank">christian.ehrhardt@canonical.com</a>> wrote:<br>>> This was meant for upgrades, but if libvirt would define a known path in<br>
>> there like /var/run/qemu/last_packaging_change the packages could easily<br>
>> touch it on any install/remove/update as Daniel suggested and libvirt could<br>
>> check this path like it does with the date of the qemu binary already.<br>> Earlier in this thread - I think one or two of us had asked about the timestamp on the directory that contains the modules.<br>> I'm wondering if a "last_packaging_change" provides any value over and above the timestamp of the directory itself? Wouldn't the directory be best - as it would work automatically for both distro packaging as well as custom installs?<br>Sure, if<br>
- "list of files in module dir"<br>
- "stat dates of files in module dir"<br>
would be checked by libvirt that would also be a no-op for packaging<br>
and thereby land faster.<br></blockquote><div><br></div><div>Why is the list of files and stat dates needed? Any change done by RPM to add or remove a file from the directory, should cause the mtime for the directory to be updated. It doesn't really matter what the change is - it only matters that the change is detected.</div><div><br></div><div>The case for needing to check the files *in* the directory, would be a concern about the modules keeping the same name, but being updated in place. I'm doubtful that this ever occurs for real, as it would cause breakage for running programs. Existing running programs would mmap() or similar the binaries into memory, and cannot be updated in place. Instead, the inode remains alive, and a new file is created with the same name, to replace the old file, and once all file descriptors are closed - the inode is deleted.</div><div><br></div><div>So, unless there is a hierarchical directory structure - I believe checking the modules directory timestamp is near 100% accuracy for whether modules were added, removed, or updated using "safe" deployment practices either by RPM or "make install".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
But I guess there were reasons against it in the discussion before?<br></blockquote><div><br></div><div>I don't think there was a follow up discussion on the idea. I think that is here. :-)</div><div> </div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mark Mielke <<a href="mailto:mark.mielke@gmail.com" target="_blank">mark.mielke@gmail.com</a>><br><br></div></div>