From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Tue, 31 Jul 2012 18:44:54 +0300 From: Michael Shigorin To: sisyphus@lists.altlinux.org Message-ID: <20120731154454.GR31323@osdn.org.ua> Mail-Followup-To: sisyphus@lists.altlinux.org References: <20120730111849.GA22496@mw.mithraen.ru> <5016A698.5040308@rattler.kiev.ua> <20120730184123.GK31323@osdn.org.ua> <5016ED75.6090200@rattler.kiev.ua> <20120731004132.GA18588@mw.mithraen.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20120731004132.GA18588@mw.mithraen.ru> User-Agent: Mutt/1.4.2.1i Subject: [sisyphus] =?koi8-r?b?W0pUXSBycG0yY3Bpby5zaCAod2FzOiD0xcvT1M/X?= =?koi8-r?b?2cogyc7T1MHMzMXSKQ==?= X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: shigorin@gmail.com, ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 15:44:59 -0000 Archived-At: List-Archive: List-Post: --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Jul 31, 2012 at 04:41:32AM +0400, Денис Смирнов wrote: > А вот у cpio очень мерзкая бага -- он не умеет при распаковке (sic) > разбивать хардлинки. Может, led@ напомнит -- но если мне не изменяет склероз, то это как раз tar не умеет их разбивать, а cpio умеет. PS: вдруг кому понадобится -- прилагаю свежий rpm2cpio.sh. -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --mYCpIKhGyMATD0i+ Content-Type: application/x-sh Content-Disposition: attachment; filename="rpm2cpio.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A=0Apkg=3D$1=0Aif [ "$pkg" =3D "" -o ! -e "$pkg" ]; then=0A e= cho "no package supplied" 1>&2=0A exit 1=0Afi=0A=0Aleadsize=3D96=0Ao=3D`e= xpr $leadsize + 8`=0Aset `od -j $o -N 8 -t u1 $pkg`=0Ail=3D`expr 256 \* \( = 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`=0Adl=3D`expr 256 \* \( 256 \* \( = 256 \* $6 + $7 \) + $8 \) + $9`=0A=0Asigsize=3D`expr 8 + 16 \* $il + $dl`= =0Ao=3D`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`=0Aset = `od -j $o -N 8 -t u1 $pkg`=0Ail=3D`expr 256 \* \( 256 \* \( 256 \* $2 + $3 = \) + $4 \) + $5`=0Adl=3D`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \)= + $9`=0A=0Ahdrsize=3D`expr 8 + 16 \* $il + $dl`=0Ao=3D`expr $o + $hdrsize`= =0Aset `od -j $o -N 8 -t u1 $pkg`=0A# --- gzip magic \037\213=0Aif [ $2 -eq= 31 -a $3 -eq 139 ]; then=0A exec dd if=3D$pkg ibs=3D$o skip=3D1 | gunzip= =0A# --- bzip2 magic BZh=0Aelif [ $2 -eq 66 -a $3 -eq 90 -a $4 -eq 104 ]; t= hen=0A exec dd if=3D$pkg ibs=3D$o skip=3D1 | bunzip2=0A# --- XZ magic \xFD7= zXZ\x00=0Aelif [ $2 -eq 253 -a $3 -eq 55 -a $4 -eq 122 -a $5 -eq 88 -a $6 -= eq 90 ]; then=0A exec dd if=3D$pkg ibs=3D$o skip=3D1 | unxz=0Aelse=0A # Mos= t versions of file don't support LZMA, therefore we assume=0A # anything no= t detected is LZMA=0A DECOMPRESSOR=3D`which unlzma 2>/dev/null`=0A case "$D= ECOMPRESSOR" in=0A /* ) ;;=0A * ) DECOMPRESSOR=3D`which lzmash 2>/= dev/null`=0A case "$DECOMPRESSOR" in=0A /* ) DECOMPRE= SSOR=3D"lzmash -d -c" ;;=0A * ) DECOMPRESSOR=3Dcat ;;=0A = esac=0A ;;=0A esac=0A exec dd if=3D$pkg ibs=3D$o skip=3D1 | $= DECOMPRESSOR=0Afi=0A --mYCpIKhGyMATD0i+--