NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

install/50846: etcupdate -a doesn't handle destdir properly

>Number:         50846
>Category:       install
>Synopsis:       etcupdate -a doesn't handle destdir properly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 24 21:45:00 +0000 2016
>Originator:     Valery Ushakov
>Release:        NetBSD 7.0
From source code inspection, etcupdate has:

	if ${AUTOMATIC} && [ -f "${DESTDIR}/var/etcupdate/${1}" ]; then
		SUM1="$(md5 "${1}")"

The problem is that SUM1 is computed for the wrong file if -d destdir
is also specified.  Unfortunately, it can't be fixed by just using

  md5 "${DESTDIR}${1}"

since the file name is in the output and it will be different from the
one in SUM2.  See also the massage of the file name that the
install_checksum() does.



Home | Main Index | Thread Index | Old Index