[Xymon] 4.3.16 make depends on gnu find/xargs

John Thurston john.thurston at alaska.gov
Thu Feb 13 21:20:06 CET 2014


There are several features of 4.3.16 I wanted (I'm currently running 
4.3.12) but have been tripped up during the 'make install' process.

./build/Makefile.rules is using 'find -0' and 'xargs -0'. Neither option 
is familiar to me, but some reading of man pages indicates that these 
are options available on gnufind and gnuxargs (which I don't have on my 
Solaris systems).

 From http://www.gnu.org/software/findutils/manual/html_mono/find.html
> using the find action ‘-print0’ and the xargs option ‘-0’ to avoid misinterpreting files whose names contain spaces

It appears twice:
> # find .  -print |xargs grep "\-print0"
> ./build/Makefile.rules: find $(INSTALLROOT)$(INSTALLWWWDIR) -type f -print0 | xargs -0 chmod 644
> ./build/Makefile.rules: find $(INSTALLROOT)$(MANROOT) -type f -print0 | xargs -0 chmod 644

Comparing with the Makefile.rules from 4.3.12 shows these lines are new. 
It looks to me like their purpose is to chmod everything in ~/server/www 
(the default location for the www files).

I've looked in ~/server/www and can't find any files with spaces, so I'm 
going to modify these lines in MAkefile.rules (remove the -print0 and 
-0) and see how it goes.

Are we expecting there to be files containing spaces in ~/server/www, or 
is -print0/-0 just considered best practice and the safe way to do this?

<offtopic>
Yes, I understand that everyone else in the world has all of the gnu 
tools installed by default and that my Solaris systems are stone-age 
relics. Sorry.

IMHO, files don't have spaces in their names, and servers don't have 
frame buffers. I break the knuckles of anyone I find putting spaces in 
file names on servers.
</offtopic>
-- 
    Do things because you should, not just because you can.

John Thurston    907-465-8591
John.Thurston at alaska.gov
Enterprise Technology Services
Department of Administration
State of Alaska



More information about the Xymon mailing list