when the admin builds sudosh/eas with the DESTDIR
option set, like in a packaging run, the config-perms
src/Makefile recipe does unexpected things:
573:config-perms:
574: test -f "$(bindir)/eash" && ( chown 0:0
"$(bindir)/eash" && chmod 4555 "$(bindir)/eash" )
575: test -f "$(bindir)/eas_test_pty" && ( chown 0:0
"$(bindir)/eas_test_pty" && chmod 4555
"$(bindir)/eas_test_pty"\
)
576:
577: test -f "$(sbindir)/easd" && ( chown 0:0
"$(sbindir)/easd" && chmod 500 "$(sbindir)/easd" )
578: test -f "$(sbindir)/eas_dbtool" && ( chown 0:0
"$(sbindir)/eas_dbtool" && chmod 500
"$(sbindir)/eas_dbtool" )
579: test -f "$(sbindir)/eas_replay" && ( chown 0:0
"$(sbindir)/eas_replay" && chmod 500
"$(sbindir)/eas_replay" )
580: test -f "$(sbindir)/eas_report" && ( chown 0:0
"$(sbindir)/eas_report" && chmod 500
"$(sbindir)/eas_report" )
In this case, it's still checking for /usr/sbin/easd,
for example, and not in $(DESTDIR)/usr/sbin/ as it
should. The patch for this is simple, but causes more
problems.
MAKEs will bail if !-f /usr/sbin/easd, simply because
the "test -f /usr/sbin/easd && something" construct
generates an error severe enough in regular operation
that it will kill the make.
s/-f/!-f/
s/ && \)/ || \(/
s/..sbindir/$(DESTDIR)$(sbindir/