[Backports] Сборка thunderbird-1.5.0.8-alt1 на ALM-2.4

Michael Shigorin =?iso-8859-1?q?mike_=CE=C1_osdn=2Eorg=2Eua?=
Вт Янв 9 16:22:06 MSK 2007


On Tue, Jan 09, 2007 at 12:42:30AM +0200, Motsyo Gennadi aka Drool wrote:
> **************************************************************************
> find %buildroot/%_datadir/aclocal -type f -execdir %__mv -f \{\}
> %tbird_name-\{\} \;
> **************************************************************************
> Так как не совсем понимаю смысл данного скрипта прошу совета - как поступить?

Выдержка из find(1) от findutils-4.2.29-alt1:

       -exec command ;
              Execute  command;  true  if 0 status is returned.  All following
              arguments to find are taken to be arguments to the command until
              an  argument  consisting of `;' is encountered.  The string `{}'
              is replaced by the current file name being processed  everywhere
              it occurs in the arguments to the command, not just in arguments
              where it is alone, as in some versions of find.  Both  of  these
              constructions might need to be escaped (with a `\') or quoted to
              protect them from expansion by the shell.  See the EXAMPLES sec-
              tion  for examples of the use of the `-exec' option.  The speci-
              fied command is run once for each matched file.  The command  is
              executed  in  the  starting  directory.    There are unavoidable
              security problems surrounding  use  of  the  -exec  option;  you
              should use the -execdir option instead.

       -exec command {} +
              This  variant  of the -exec option runs the specified command on
              the selected files, but the command line is built  by  appending
              each  selected file name at the end; the total number of invoca-
              tions of the command will  be  much  less  than  the  number  of
              matched  files.   The command line is built in much the same way
              that xargs builds its command lines.  Only one instance of  '{}'
              is  allowed  within the command.  The command is executed in the
              starting directory.

       -execdir command ;

       -execdir command {} +
              Like -exec, but the specified command is run from the  subdirec-
              tory  containing  the  matched  file,  which is not normally the
              directory in which you started find.  This a  much  more  secure
              method  for invoking commands, as it avoids race conditions dur-
              ing resolution of the paths to the matched files.  As  with  the
              -exec option, the '+' form of -execdir will build a command line
              to process more than one matched file, but any given  invocation
              of command will only list files that exist in the same subdirec-
              tory.  If you use this option, you must ensure that  your  $PATH
              environment  variable  does not reference the current directory;
              otherwise, an attacker can run any commands they like by leaving
              an appropriately-named file in a directory in which you will run
              -execdir.

-- 
 ---- WBR, Michael Shigorin <mike на altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/



Подробная информация о списке рассылки backports