I am sorry, I confused a bit with Lazarus bug tracker, so I posted it here...
In files create_fpc_deb.sh and create_lazarus_deb.sh
#------------------------------------------------------------------------------
# fixing permissions
echo "fixing permissions ..."
find $FPCBuildDir -type d -print0 | xargs -0 chmod 755 # this is needed, don't ask me why
find $FPCBuildDir -type f -print0 | xargs -0 chmod a+r # this is needed, don't ask me why
find $FPCBuildDir -perm 775 | xargs -d '\n' chmod 755
find $FPCBuildDir -perm 664 | xargs -d '\n' chmod 644
and
# fixing permissions
echo "fixing permissions ..."
find $LazBuildDir -type d | xargs -d '\n' chmod 755
find $LazBuildDir -perm 775 | xargs -d '\n' chmod 755
find $LazBuildDir -perm 664 | xargs -d '\n' chmod 644
should be
#------------------------------------------------------------------------------
# fixing permissions
echo "fixing permissions ..."
find $FPCBuildDir -type d -print0 | xargs -0 -r chmod 755 # this is needed, don't ask me why
find $FPCBuildDir -type f -print0 | xargs -0 -r chmod a+r # this is needed, don't ask me why
find $FPCBuildDir -perm 775 | xargs -d '\n' -r chmod 755
find $FPCBuildDir -perm 664 | xargs -d '\n' -r chmod 644
and
# fixing permissions
echo "fixing permissions ..."
find $LazBuildDir -type d | xargs -d '\n' -r chmod 755
find $LazBuildDir -perm 775 | xargs -d '\n' -r chmod 755
find $LazBuildDir -perm 664 | xargs -d '\n' -r chmod 644
(
-r, --no-run-if-empty if there are no arguments, then do not run COMMAND;
if this option is not given, COMMAND will be
run at least once
)
because it failed if no files found. For example:
...
fixing permissions ...
+ find /home/nd/tmp/fpc_patchdir/fpc_build -type d -print0
+ xargs -0 chmod 755
+ xargs -0 chmod a+r
+ find /home/nd/tmp/fpc_patchdir/fpc_build -type f -print0
+ find /home/nd/tmp/fpc_patchdir/fpc_build -perm 775
+ xargs -d '\n' chmod 755
chmod: missing operand after ‘755’
Try 'chmod --help' for more information.
nd@home ~/dev/lazarus/tools/install $ And also why it is necessary to change files mode in the current dir when everything happenings in the ~/tmp dir?