Description of Problem: When having /var/ftp mounted read-only and put into rpm's %_netsharedpath, the %trigger scripts fail. I suggest to test if /var/ftp can be written before executing them; probably there is new rpm-functionality needed. How Reproducible: everytime Steps to Reproduce: 1. echo '%_netsharedpath /var/ftp' >/etc/rpm/macros 2. mount -o remount,ro /var/ftp 3. rpm -i anonftp-4.0-6 4. rpm -U glibc-<a newer version> Actual Results: (4) [sorry for German messages; they are telling there is no permission to delete the files or change the file-mode] cp: Entfernen von ;/var/ftp/lib/ld-2.2.3.so+ nicht mvglich: Keine Berechtigung cp: Entfernen von ;/var/ftp/lib/libc-2.2.3.so+ nicht mvglich: Keine Berechtigung cp: Entfernen von ;/var/ftp/lib/libnsl-2.2.3.so+ nicht mvglich: Keine Berechtigung cp: Entfernen von ;/var/ftp/lib/libnss_files-2.2.3.so+ nicht mvglich: Keine Berechtigung chmod: Beim Setzen der Zugriffsrechte f|r ;/var/ftp/lib/libs.md5+: Die Operation ist nicht erlaubt /sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied Fehler: execution of %trigger scriptlet from anonftp-4.0-6 failed, exit status 1 Expected Results: no error messages
If /var/ftp is mounted ro, anonftp can't work by design. A %trigger foo if ! touch /var/ftp/test; then echo "Trigger couldn't execute, please clean up the mess manually" echo "because this script can't be rerun!" fi wouldn't be very nice either - especially not if you're using kpackage or gnorpm (and therefore don't see the output of trigger messages). If you have any idea what should be done in this case (without having to change rpm), let me know. I think for now, assuming /var/anything is writable [that's what /var is there for, anyway] is safe.
Why must /var/ftp be mounted rw? Yes, I have tested it locally and it works. /var/ftp is NFS-mounted from another host which executed the trigger-script successfully. Thus, all the needed files are there and "the mess" was cleaned up already. Perhaps you are asking for the reasons why I am doing such crazy thing: I have mounted /var/ftp (+ /var/www) locally because the usual filesystem-functions are more comfortable than ftp-clients or www-browser. If you do not trust into wu-ftpd's robustness, it may be advantageously to prohibit writing in /var/ftp on the file-system layer already. In bug #51193 I have asked for a general way to respect %_netsharedpath. I have not got an answer, but I gave a (more or less dirty) %__isDirectoryShared macro which can be used as: | %post | %__isDirectoryShared /var/ftp && exit 0 | # ... the old stuff ...
Changing package to rpm
Collapsing RO mount problems at #52190. *** This bug has been marked as a duplicate of 52190 ***