<div dir="ltr"><div dir="ltr">On Thu, Aug 20, 2020 at 2:01 PM Daniel P. Berrangé <<a href="mailto:berrange@redhat.com">berrange@redhat.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">IIUC, Mark's point is that an RPM update won't replace the file in-placec.<br>
It will write out a new temporary file and then rename over the top of the<br>
old file, which should trigger an update on the directory mtime.<br></blockquote><div><br></div><div>Yep, correct.</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">
Not sure what a "make install" will do with QEMU, but since QEMU is about<br>
to switch to meson, we might get lucky in having the same temp+rename<br>
behaviour.<br>
</blockquote></div><div><br></div><div>I think this is the relevant section of the Makefile:</div><div><br></div><div><font face="monospace">ifneq ($(CONFIG_MODULES),)<br>        $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"<br>        for s in $(modules-m:.mo=$(DSOSUF)); do \<br>                t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \<br>                $(INSTALL_LIB) $$s "$$t"; \<br>                test -z "$(STRIP)" || $(STRIP) "$$t"; \<br>        done<br>endif<br></font></div><div><br></div><div><br></div>The INSTALL_LIB is detected by configure, and will normally be:<div><br></div><div><font face="monospace">config-host.mak:INSTALL_LIB=install -c -m 0644<br></font><div><br></div><div><br></div><div>You can see here that "install" results in a new inode, which indicates a new file:</div><div><br></div><div><font face="monospace">$ cd /tmp<br>$ install -c -m 0644 /etc/motd motd_temp<br>$ ls -li motd_temp<br><b>3544372</b> -rw-r--r-- 1 mark mark 0 Aug 20 17:25 motd_temp<br>$ install -c -m 0644 /etc/motd motd_temp<br>$ ls -li motd_temp                      <br><b>3561572</b> -rw-r--r-- 1 mark mark 0 Aug 20 17:25 motd_temp<br></font></div><div><br></div><div><br></div><div>Once upon a time, this wasn't done - and the consequence is that things like "make install" would break running programs with various undefined behaviour. Now it is done "correctly" for so long, that people may have forgotten the old days. :-)</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></div>