tech-pkg archive

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

sysutils/xentools418 CHECK_RELRO_SKIP



The sysutils/xentools418 package has the following in Makefile:

CHECK_RELRO_SKIP+=    lib/debug/usr/pkg/libexec/xen/boot/xen-shim-syms                                                                                                                         

For nonstandard prefixes, the RELRO check fails with "missing RELRO” because the actual xen-shim-syms file (which has something other than /usr/pkg in its path) is not skipped.  It would seem that the correct fix would be to replace /usr/pkg with ${PREFIX} in that line, but that also fails in the same way.  Replacing /usr/pkg with the actual nonstandard prefix does skip the check as intended, but is clearly not the solution.

The RELRO check is implemented by the following chunk in mk/check/check-relro.mk:

privileged-install-hook: _check-relro
_check-relro: error-check .PHONY
        ${RUN}                                                          \
        ${STEP_MSG} "Checking for RELRO in ${PKGNAME}";                 \
        cd ${DESTDIR:Q}${PREFIX:Q};                                     \
        ${_CHECK_RELRO_FILELIST_CMD} |                                  \
        ${EGREP} -h ${_CHECK_RELRO_ERE:Q} |                             \
        while read file; do                                             \
                case "$$file" in                                        \
                ${CHECK_RELRO_SKIP:@p@${p}) continue ;;@}               \
                *) ;;                                                   \
                esac;                                                   \
                ${ECHO} $$file;                                         \
        done |                                                          \
        ${PKGSRC_SETENV} ${CHECK_RELRO_NATIVE_ENV} ${AWK} -f ${CHECK_RELRO_NATIVE} > ${ERROR_DIR}/${.TARGET}
.endif

It seems clear that this is looking for an exact match to file names, which is why the ${PREFIX} replacement fails to fix the problem.  I have tried several ways of changing this, but am not having any luck.

Having a hardcoded path like /usr/pkg in the CHECK_RELRO_SKIP variable seems fundamentally wrong, though.

What is the best way of fixing this?

Cheers,
Brook



Home | Main Index | Thread Index | Old Index