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=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Date: Sat, 6 Jun 2009 15:00:50 +0300 From: Michael Shigorin To: sisyphus@lists.altlinux.org Message-ID: <20090606120050.GX12156@osdn.org.ua> Mail-Followup-To: sisyphus@lists.altlinux.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Oiv9uiLrevHtW1RS" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i Subject: [sisyphus] [JT] rebuild script 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: Sat, 06 Jun 2009 12:01:05 -0000 Archived-At: List-Archive: List-Post: --Oiv9uiLrevHtW1RS Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit Здравствуйте. Подумал, вдруг кому ещё пригодится -- в прошлом году сделал, а собирался уже ооочень давно. А то так вообще про rpmbuild позабывают, пока доберусь хоть как-то опубликовать. :) -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --Oiv9uiLrevHtW1RS Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=rebuild #!/bin/sh # build spec or src.rpm with hasher hsh_build() { nice time hsh $HSHARGS \ --apt-conf="${APTCONF:=/etc/apt/apt.conf}" \ --mountpoints=/proc \ "${WORKDIR:=$HOME/hasher/tmpfs}" \ "$@" \ && echo rpm --resign $@ \ && echo rsync -Pav $@ incoming:/incoming/Sisyphus/ } rpmbs() { rpm -bs --nodeps "$1" \ | sed -ns 's/^.*: \(.*\.src\.rpm\)$/\1/p' } fatal() { echo "$0: error: $*" >&2 exit 1 } while [ $# -gt 0 ]; do case "$1" in *.spec) hsh_build `rpmbs "$1"`; shift;; *.src.rpm) hsh_build "$1"; shift;; *) fatal "$1 is neither src.rpm nor spec file";; esac done #find "$WORKDIR/repo" -name '*.rpm' --Oiv9uiLrevHtW1RS--