This is the first time I've seen those % constructions for use in a spec file, so I can't offer specific advice. My generic troubleshooting thought is to try doing something like
Code:
echo "%-11{SIZE}" >>%{mytest_conf}
echo "%{NAME}" >>%{mytest_conf}
echo "`rpm -qa --qf \"%-11{SIZE} %{NAME}\n\" | sort -k1n`" >>%{mytest_conf}
and see if the basic variable substitution is happening properly.