* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 6:20 ` [devel] [git update] packages/perl-mozldap: heads/master Slava Semushin
@ 2007-07-09 6:28 ` Vitaly Kuznetsov
2007-07-09 6:31 ` Slava Semushin
2007-07-09 7:02 ` Денис Смирнов
2007-07-09 9:45 ` [devel] [git update] packages/perl-mozldap: heads/master Dmitry V. Levin
2 siblings, 1 reply; 14+ messages in thread
From: Vitaly Kuznetsov @ 2007-07-09 6:28 UTC (permalink / raw)
To: ALT Devel discussion list
Slava Semushin пишет:
> 2007/7/9, Vitaly Kuznetsov <vitty / altlinux.org>:
> [...]
>> +rm -f `find %buildroot -type f -name perllocal.pod -o -name .packlist`
>> +find %buildroot -name API.bs -a -size 0 -exec rm -f {} \;
>
> Как-то нелогично. Почему бы и в первом случае не использовать find +
> exec? Или даже в обоиз случаях find -delete
>
> [...]
>> # find and run the correct version of brp-compress
>> -if [ -x /usr/lib/rpm/brp-compress ] ; then
>> - /usr/lib/rpm/brp-compress
>> +if [ -x %_libdir/rpm/brp-compress ] ; then
>> + %_libdir/rpm/brp-compress
>> elif [ -x %_libdir/rpm/brp-compress ] ; then
>> %_libdir/rpm/brp-compress
>> fi
>
> Во-первых, вы тут перестарались с заменой макросов. После вашего
> изменения оба условия стали одинаковыми.
>
> Во-вторых, этот скрипт в АЛЬТе (если не ошибаюсь) запускается
> автоматически сам и этот код абсолютно не нужен.
>
> [...]
>> * Tue Oct 17 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-6
>> -- look for brp-compress first in /usr/lib then _libdir
>> +- look for brp-compress first in %_libdir then _libdir
> [...]
>
> Я бы не стал править записи в %changelog'е, которые делал не я сам
> (максимум удалить пробелы на концах строк, но не более).
>
>
Это я предложеный rpmcs тестирую ;)
не думал что он будет в changelog-е что-то менять
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 6:28 ` Vitaly Kuznetsov
@ 2007-07-09 6:31 ` Slava Semushin
0 siblings, 0 replies; 14+ messages in thread
From: Slava Semushin @ 2007-07-09 6:31 UTC (permalink / raw)
To: ALT Devel discussion list
2007/7/9, Vitaly Kuznetsov <vitty / altlinux.ru>:
[...]
> Это я предложеный rpmcs тестирую ;)
> не думал что он будет в changelog-е что-то менять
Программы не совершенны. Алгоритмы не могут предусмотреть всех
ситуаций. Тут нужен человек :)
В данном случае даже изменение в %build ломает задумку автора.
--
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 6:20 ` [devel] [git update] packages/perl-mozldap: heads/master Slava Semushin
2007-07-09 6:28 ` Vitaly Kuznetsov
@ 2007-07-09 7:02 ` Денис Смирнов
2007-07-09 8:40 ` [devel] rm `find` (was: [git update] packages/perl-mozldap: heads/master) Michael Shigorin
2007-07-09 9:45 ` [devel] [git update] packages/perl-mozldap: heads/master Dmitry V. Levin
2 siblings, 1 reply; 14+ messages in thread
From: Денис Смирнов @ 2007-07-09 7:02 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
On Mon, Jul 09, 2007 at 01:20:34PM +0700, Slava Semushin wrote:
>> +rm -f `find %buildroot -type f -name perllocal.pod -o -name .packlist`
>> +find %buildroot -name API.bs -a -size 0 -exec rm -f {} \;
SS> Как-то нелогично. Почему бы и в первом случае не использовать find +
SS> exec? Или даже в обоиз случаях find -delete
Первая команда это не просто ужас, это ужас-ужас.
exec здесь абсолютно не к месту. Если удалять, то действительно find
-delete.
А в других случаях стоит обратить внимание на find -print0 | xargs -0r
<commandname>.
Так как xargs может получать сразу множество имен файлов в качестве
параметров, не будет fork/exec на _каждый_ файл.
--
С уважением, Денис
http://freesource.info
----------------------------------------------------------------------------
И Бейсик - сын ошибок трудных, и Клиппер Парадоксов друг.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 6:20 ` [devel] [git update] packages/perl-mozldap: heads/master Slava Semushin
2007-07-09 6:28 ` Vitaly Kuznetsov
2007-07-09 7:02 ` Денис Смирнов
@ 2007-07-09 9:45 ` Dmitry V. Levin
2007-07-09 10:01 ` Slava Semushin
` (2 more replies)
2 siblings, 3 replies; 14+ messages in thread
From: Dmitry V. Levin @ 2007-07-09 9:45 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]
On Mon, Jul 09, 2007 at 01:20:34PM +0700, Slava Semushin wrote:
> 2007/7/9, Vitaly Kuznetsov <vitty / altlinux.org>:
> [...]
> > +rm -f `find %buildroot -type f -name perllocal.pod -o -name .packlist`
> > +find %buildroot -name API.bs -a -size 0 -exec rm -f {} \;
>
> Как-то нелогично. Почему бы и в первом случае не использовать find +
> exec? Или даже в обоиз случаях find -delete
Это просто сборник ошибок:
- rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
навсегда.
- find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
конструкцию навсегда.
- для удаления файлов используйте find ... -delete
- все файлы по имени .packlist внутри %buildroot/usr/lib/perl5/ удаляются
автоматически в /usr/lib/rpm/brp-cleanup
- все файлы нулевого размера по имени *.bs внутри
%buildroot/usr/lib/perl5/ удаляются автоматически в
/usr/lib/rpm/brp-cleanup
> [...]
> > # find and run the correct version of brp-compress
> > -if [ -x /usr/lib/rpm/brp-compress ] ; then
> > - /usr/lib/rpm/brp-compress
> > +if [ -x %_libdir/rpm/brp-compress ] ; then
> > + %_libdir/rpm/brp-compress
> > elif [ -x %_libdir/rpm/brp-compress ] ; then
> > %_libdir/rpm/brp-compress
> > fi
>
> Во-первых, вы тут перестарались с заменой макросов. После вашего
> изменения оба условия стали одинаковыми.
>
> Во-вторых, этот скрипт в АЛЬТе (если не ошибаюсь) запускается
> автоматически сам и этот код абсолютно не нужен.
Оба замечания верны.
> [...]
> > * Tue Oct 17 2006 Rich Megginson <richm@stanfordalumni.org> - 1.5-6
> > -- look for brp-compress first in /usr/lib then _libdir
> > +- look for brp-compress first in %_libdir then _libdir
> [...]
>
> Я бы не стал править записи в %changelog'е, которые делал не я сам
> (максимум удалить пробелы на концах строк, но не более).
+ заквотировать макросы, которые не должны раскрыться или которых не
существует.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 9:45 ` [devel] [git update] packages/perl-mozldap: heads/master Dmitry V. Levin
@ 2007-07-09 10:01 ` Slava Semushin
2007-07-09 16:15 ` Anton Farygin
2007-07-09 11:51 ` [devel] [wiki] devel/TypicalPackagingErrors/FindRm Michael Shigorin
2007-07-09 16:13 ` [devel] [git update] packages/perl-mozldap: heads/master Anton Farygin
2 siblings, 1 reply; 14+ messages in thread
From: Slava Semushin @ 2007-07-09 10:01 UTC (permalink / raw)
To: ALT Devel discussion list
09.07.07, Dmitry V. Levin<ldv / altlinux.org> написал(а):
[...]
> Это просто сборник ошибок:
Будем(?) публиковать после публикации архивов Сизифа и трудов vsu@ :)
> - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
> навсегда.
> - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
> конструкцию навсегда.
> - для удаления файлов используйте find ... -delete
> - все файлы по имени .packlist внутри %buildroot/usr/lib/perl5/ удаляются
> автоматически в /usr/lib/rpm/brp-cleanup
> - все файлы нулевого размера по имени *.bs внутри
> %buildroot/usr/lib/perl5/ удаляются автоматически в
> /usr/lib/rpm/brp-cleanup
Многие их этих советов нигде не документированы (во всяком случае, я
их не видел), не очевидны (как с файлами перла) и являются
ALT-специфичными. Это стОит записать/добавить куда...
2mike@: :)
> > [...]
> > > # find and run the correct version of brp-compress
> > > -if [ -x /usr/lib/rpm/brp-compress ] ; then
> > > - /usr/lib/rpm/brp-compress
> > > +if [ -x %_libdir/rpm/brp-compress ] ; then
> > > + %_libdir/rpm/brp-compress
> > > elif [ -x %_libdir/rpm/brp-compress ] ; then
> > > %_libdir/rpm/brp-compress
> > > fi
> >
> > Во-первых, вы тут перестарались с заменой макросов. После вашего
> > изменения оба условия стали одинаковыми.
> >
> > Во-вторых, этот скрипт в АЛЬТе (если не ошибаюсь) запускается
> > автоматически сам и этот код абсолютно не нужен.
>
> Оба замечания верны.
Как видно, идея заимствовать/использовать спеки из других
дистрибутивов не всегда хороша. Во всяком случае, без адаптации под
реалии АЛЬТа. (Хотя да, работать это будет...)
--
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 10:01 ` Slava Semushin
@ 2007-07-09 16:15 ` Anton Farygin
2007-07-09 21:42 ` Dmitry V. Levin
0 siblings, 1 reply; 14+ messages in thread
From: Anton Farygin @ 2007-07-09 16:15 UTC (permalink / raw)
To: ALT Devel discussion list
Slava Semushin wrote:
> 09.07.07, Dmitry V. Levin<ldv / altlinux.org> написал(а):
> [...]
>> Это просто сборник ошибок:
>
> Будем(?) публиковать после публикации архивов Сизифа и трудов vsu@ :)
>
>> - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
>> навсегда.
>> - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
>> конструкцию навсегда.
>> - для удаления файлов используйте find ... -delete
>> - все файлы по имени .packlist внутри %buildroot/usr/lib/perl5/ удаляются
>> автоматически в /usr/lib/rpm/brp-cleanup
>> - все файлы нулевого размера по имени *.bs внутри
>> %buildroot/usr/lib/perl5/ удаляются автоматически в
>> /usr/lib/rpm/brp-cleanup
>
> Многие их этих советов нигде не документированы (во всяком случае, я
> их не видел), не очевидны (как с файлами перла) и являются
> ALT-специфичными. Это стОит записать/добавить куда...
>
> 2mike@: :)
ну не правда.. по поводу find - есть куча мест где вылезают грабли с
таким использованием как у вас.
сразу заметно на файлопомойке, если пытаться делать с файлами на ней
какие-то операции... например chmod всем файлам.
в этом случае вылезает ругань про то, что файл не найден.. видимо
пробелы мешаются.
Rgds,
Rider
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 16:15 ` Anton Farygin
@ 2007-07-09 21:42 ` Dmitry V. Levin
2007-07-10 4:57 ` Anton Farygin
0 siblings, 1 reply; 14+ messages in thread
From: Dmitry V. Levin @ 2007-07-09 21:42 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]
On Mon, Jul 09, 2007 at 08:15:58PM +0400, Anton Farygin wrote:
> Slava Semushin wrote:
> > 09.07.07, Dmitry V. Levin<ldv / altlinux.org> написал(а):
> > [...]
> >> Это просто сборник ошибок:
> >
> > Будем(?) публиковать после публикации архивов Сизифа и трудов vsu@ :)
> >
> >> - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
> >> навсегда.
> >> - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
> >> конструкцию навсегда.
> >> - для удаления файлов используйте find ... -delete
> >> - все файлы по имени .packlist внутри %buildroot/usr/lib/perl5/ удаляются
> >> автоматически в /usr/lib/rpm/brp-cleanup
> >> - все файлы нулевого размера по имени *.bs внутри
> >> %buildroot/usr/lib/perl5/ удаляются автоматически в
> >> /usr/lib/rpm/brp-cleanup
> >
> > Многие их этих советов нигде не документированы (во всяком случае, я
> > их не видел), не очевидны (как с файлами перла) и являются
> > ALT-специфичными. Это стОит записать/добавить куда...
> >
> > 2mike@: :)
>
> ну не правда.. по поводу find - есть куча мест где вылезают грабли с
> таким использованием как у вас.
У нас? Кого из нас ты имеешь в виду?
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 21:42 ` Dmitry V. Levin
@ 2007-07-10 4:57 ` Anton Farygin
2007-07-10 5:01 ` Slava Semushin
0 siblings, 1 reply; 14+ messages in thread
From: Anton Farygin @ 2007-07-10 4:57 UTC (permalink / raw)
To: ALT Devel discussion list
Dmitry V. Levin wrote:
> On Mon, Jul 09, 2007 at 08:15:58PM +0400, Anton Farygin wrote:
>> Slava Semushin wrote:
>>> 09.07.07, Dmitry V. Levin<ldv / altlinux.org> написал(а):
>>> [...]
>>>> Это просто сборник ошибок:
>>> Будем(?) публиковать после публикации архивов Сизифа и трудов vsu@ :)
>>>
>>>> - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
>>>> навсегда.
>>>> - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
>>>> конструкцию навсегда.
>>>> - для удаления файлов используйте find ... -delete
>>>> - все файлы по имени .packlist внутри %buildroot/usr/lib/perl5/ удаляются
>>>> автоматически в /usr/lib/rpm/brp-cleanup
>>>> - все файлы нулевого размера по имени *.bs внутри
>>>> %buildroot/usr/lib/perl5/ удаляются автоматически в
>>>> /usr/lib/rpm/brp-cleanup
>>> Многие их этих советов нигде не документированы (во всяком случае, я
>>> их не видел), не очевидны (как с файлами перла) и являются
>>> ALT-специфичными. Это стОит записать/добавить куда...
>>>
>>> 2mike@: :)
>> ну не правда.. по поводу find - есть куча мест где вылезают грабли с
>> таким использованием как у вас.
>
> У нас? Кого из нас ты имеешь в виду?
Славу естественно.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-10 4:57 ` Anton Farygin
@ 2007-07-10 5:01 ` Slava Semushin
0 siblings, 0 replies; 14+ messages in thread
From: Slava Semushin @ 2007-07-10 5:01 UTC (permalink / raw)
To: ALT Devel discussion list
10.07.07, Anton Farygin<rider / altlinux.com> написал(а):
> Dmitry V. Levin wrote:
> > On Mon, Jul 09, 2007 at 08:15:58PM +0400, Anton Farygin wrote:
> >> Slava Semushin wrote:
> >>> 09.07.07, Dmitry V. Levin<ldv / altlinux.org> написал(а):
> >>> [...]
> >>>> Это просто сборник ошибок:
> >>> Будем(?) публиковать после публикации архивов Сизифа и трудов vsu@ :)
> >>>
> >>>> - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
> >>>> навсегда.
> >>>> - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
> >>>> конструкцию навсегда.
> >>>> - для удаления файлов используйте find ... -delete
> >>>> - все файлы по имени .packlist внутри %buildroot/usr/lib/perl5/ удаляются
> >>>> автоматически в /usr/lib/rpm/brp-cleanup
> >>>> - все файлы нулевого размера по имени *.bs внутри
> >>>> %buildroot/usr/lib/perl5/ удаляются автоматически в
> >>>> /usr/lib/rpm/brp-cleanup
> >>> Многие их этих советов нигде не документированы (во всяком случае, я
> >>> их не видел), не очевидны (как с файлами перла) и являются
> >>> ALT-специфичными. Это стОит записать/добавить куда...
> >>>
> >>> 2mike@: :)
> >> ну не правда.. по поводу find - есть куча мест где вылезают грабли с
> >> таким использованием как у вас.
> >
> > У нас? Кого из нас ты имеешь в виду?
>
> Славу естественно.
А причем тут я?! :) Если не ошибаюсь, в моих спеках нигде нет подобных
контрукций (find+rm), просто потому что не было такой задачи.
--
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru
^ permalink raw reply [flat|nested] 14+ messages in thread
* [devel] [wiki] devel/TypicalPackagingErrors/FindRm
2007-07-09 9:45 ` [devel] [git update] packages/perl-mozldap: heads/master Dmitry V. Levin
2007-07-09 10:01 ` Slava Semushin
@ 2007-07-09 11:51 ` Michael Shigorin
2007-07-09 16:13 ` [devel] [git update] packages/perl-mozldap: heads/master Anton Farygin
2 siblings, 0 replies; 14+ messages in thread
From: Michael Shigorin @ 2007-07-09 11:51 UTC (permalink / raw)
To: ALT Devel discussion list
On Mon, Jul 09, 2007 at 01:45:20PM +0400, Dmitry V. Levin wrote:
> > > +rm -f `find %buildroot -type f -name perllocal.pod -o -name .packlist`
> > > +find %buildroot -name API.bs -a -size 0 -exec rm -f {} \;
> > Как-то нелогично. Почему бы и в первом случае не использовать
> > find + exec? Или даже в обоиз случаях find -delete
> Это просто сборник ошибок:
Занесено на
http://www.freesource.info/wiki/AltLinux/Sisyphus/devel/TypicalPackagingErrors/FindRm
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] [git update] packages/perl-mozldap: heads/master
2007-07-09 9:45 ` [devel] [git update] packages/perl-mozldap: heads/master Dmitry V. Levin
2007-07-09 10:01 ` Slava Semushin
2007-07-09 11:51 ` [devel] [wiki] devel/TypicalPackagingErrors/FindRm Michael Shigorin
@ 2007-07-09 16:13 ` Anton Farygin
2007-07-09 22:01 ` [devel] find Security Considerations Dmitry V. Levin
2 siblings, 1 reply; 14+ messages in thread
From: Anton Farygin @ 2007-07-09 16:13 UTC (permalink / raw)
To: ALT Devel discussion list
Dmitry V. Levin wrote:
> On Mon, Jul 09, 2007 at 01:20:34PM +0700, Slava Semushin wrote:
>> 2007/7/9, Vitaly Kuznetsov <vitty / altlinux.org>:
>> [...]
>>> +rm -f `find %buildroot -type f -name perllocal.pod -o -name .packlist`
>>> +find %buildroot -name API.bs -a -size 0 -exec rm -f {} \;
>> Как-то нелогично. Почему бы и в первом случае не использовать find +
>> exec? Или даже в обоиз случаях find -delete
>
> Это просто сборник ошибок:
> - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
> навсегда.
> - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
> конструкцию навсегда.
Кстати, а что ты скажешь про конструкцию вида:
find . -type f|while read line;do rm -f "$line";done
??
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [devel] find Security Considerations
2007-07-09 16:13 ` [devel] [git update] packages/perl-mozldap: heads/master Anton Farygin
@ 2007-07-09 22:01 ` Dmitry V. Levin
0 siblings, 0 replies; 14+ messages in thread
From: Dmitry V. Levin @ 2007-07-09 22:01 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]
On Mon, Jul 09, 2007 at 08:13:28PM +0400, Anton Farygin wrote:
> Dmitry V. Levin wrote:
> > On Mon, Jul 09, 2007 at 01:20:34PM +0700, Slava Semushin wrote:
> >> 2007/7/9, Vitaly Kuznetsov <vitty / altlinux.org>:
> >> [...]
> >>> +rm -f `find %buildroot -type f -name perllocal.pod -o -name .packlist`
> >>> +find %buildroot -name API.bs -a -size 0 -exec rm -f {} \;
> >> Как-то нелогично. Почему бы и в первом случае не использовать find +
> >> exec? Или даже в обоиз случаях find -delete
> >
> > Это просто сборник ошибок:
> > - rm -f `find ...` это небезопасно в принципе, забудьте эту конструкцию
> > навсегда.
> > - find ... -exec rm -f {} \; это небезопасно в принципе, забудьте эту
> > конструкцию навсегда.
>
> Кстати, а что ты скажешь про конструкцию вида:
>
> find . -type f|while read line;do rm -f "$line";done
В этой конструкции много недостатков. Я не буду их перечислять, просто
рекомендую ознакомиться с соответствующей документацией,
$ info -f find security
Кстати, немного истории "find -delete":
Этот параметр ведёт свою историю с ноября 1997-го года, когда патч к
findutils-4.1 анонсировал в bugtraq'е Douglas Siebert:
http://marc.info/?l=bugtraq&m=87930069226479
Этот патч был адаптирован для Owl в сентябре 2000-го года,
у нас -- а апреле 2002-го года.
GNU findutils поддерживает параметр -delete с ноября 2004 года
(после того как GNU findutils обрёл нового мантейнера):
http://savannah.gnu.org/patch/index.php?3454
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread