Someone just pointed out that the --setugids popt alias doesn't
reset symlink permissions correctly.

Adding -h to chown/chgrp in the pipe is all that rpm itself needs
to Get It Right:

rpm     alias --setugids -q --qf \
'[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} % {FILENAMES:shescape}\n]' \ --pipe "(echo 'ch() { chown -- \"$1\" \"$3\";chgrp -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" \
        --POPTdesc=$"set user/group ownership of files in a package"


However, there may still be symlink challenged SysV platforms somewhere,
and so some AutoFu may be necessary for portability.

The other possible issue is interacting properly with sysadmin
modifications to paths outside of rpm itself. Adding -h is very
much not the right thing to do if the sysadmin has moved a directory
and left a symlink that needs to be followed.

Should -h be added to chown/chgrp --setugids or not?

73 de Jeff
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        [email protected]

Reply via email to