ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Igor Vlasenko <vlasenko@imath.kiev.ua>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] /usr/bin/crc32
Date: Wed, 21 Jul 2010 21:24:15 +0300
Message-ID: <20100721182415.GA27145@dad.imath.kiev.ua> (raw)
In-Reply-To: <20100721175325.GB5257@wo.int.altlinux.org>

On Wed, Jul 21, 2010 at 09:53:25PM +0400, Dmitry V. Levin wrote:
> On Wed, Jul 21, 2010 at 08:11:43PM +0300, Igor Vlasenko wrote:
> > On Tue, Jul 20, 2010 at 07:23:43PM +0400, Alexey Tourbin wrote:
> > > > * cpan2rpm не умеет? паковать скрипты из %_bindir.
> > > > однако в вот этих  %_bindir/* зря не упакован.
> > [...]
> > > > perl-Archive-Zip     crc32
> > > 
> > > Скрипт crc32 не имеет не документации, ни даже опции --help.
> > > Класть его в /usr/bin (в том числе по этим причинам) неохота.
> > 
> > Как минимум Бубунта и Федора/ЦентОсь как /usr/bin/crc32
> > кладет именно этот скрипт.
> > 
> > И нормальной альтернативной реализации нет. Дурацкая ситуация получилась
> > с /usr/bin/crc32 из-за его простоты. Народ вовсю пользуется 
> > самодельнми реализациями в ~/bin, начиная от 4-хстрочника на питоне, 
> > есть и готовый С код,
> > но как-то всем лень добавить getopt, оформить его в нормальный пакет 
> > в /usr/bin с --help, man и прочая. 
> > 
> > Сложилась традиция брать /usr/bin/crc32 из perl-Archive-Zip,
> > давайте и мы будем придерживаться.
> > 
> > Я понимаю нежелание клась вместе с модулем, но если в подпакет вынести?
> > Ня-файлы чем-то проверять надо.
> 
> А /usr/bin/cksum -- это случайно не то же самое, но "с --help, man и прочая"?

нет, это POSIX.2 checksum.

checksum это не один алгоритм, а целое семейство,
зависящее, в частности, от выбора полинома, with, init, и т.д., см.
http://ru.wikipedia.org/wiki/%D0%A6%D0%B8%D0%BA%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%B8%D0%B7%D0%B1%D1%8B%D1%82%D0%BE%D1%87%D0%BD%D1%8B%D0%B9_%D0%BA%D0%BE%D0%B4

В BSD cksum есть опция -o, и там можно выбрать -o 3,
что даст crc32. у нас такой возможности нет.
[BSD man quote]...
-o
    Use historic algorithms instead of the (superior) default one.
...
    Algorithm 3 is what is commonly called the `32bit' CRC algorithm. This is a 32-bit checksum. ...
[/quote]

-- 

Dr. Igor Vlasenko
--------------------
Topology Department
Institute of Math
Kiev, Ukraine



      reply	other threads:[~2010-07-21 18:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-17 12:35 [devel] automated CPAN update: perl summary Igor Vlasenko
2010-07-17 18:19 ` Sergey Y. Afonin
2010-07-20 15:23 ` [devel] /usr/bin/crc32 (was: automated CPAN update: perl summary) Alexey Tourbin
2010-07-21 17:11   ` Igor Vlasenko
2010-07-21 17:53     ` [devel] /usr/bin/crc32 Dmitry V. Levin
2010-07-21 18:24       ` Igor Vlasenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100721182415.GA27145@dad.imath.kiev.ua \
    --to=vlasenko@imath.kiev.ua \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git