Changeset 620 for trunk/technical


Ignore:
Timestamp:
Oct 10, 2002, 7:33:42 PM (22 years ago)
Author:
joergs
Message:

direktes bauen von src.rpms

Location:
trunk/technical/common/build
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/technical/common/build/build.sh

    r619 r620  
    11#!/bin/bash
    22# Remote build script (iboernig@suse.de)
    3 # $Id: build.sh,v 1.11 2002/10/10 15:01:08 joergs Exp $
     3# $Id: build.sh,v 1.12 2002/10/10 17:33:42 joergs Exp $
    44#
    55# Kurze Featuritis:
     
    3535
    3636# Hier gehts los:
    37 make
    3837
    39 SPECFILE=$(ls *.spec | awk '{print $1}')
    40 TARFILE=$(ls  *.tar.[gb]z*| awk '{print $1}')
    41 DIFFILES=$(ls *.dif* 2>/dev/null | awk '{print $1}')
    42 PATCHFILES=$(ls *.patch 2>/dev/null | awk '{print $1}')
     38#DIFFILES=$(ls *.dif* 2>/dev/null | awk '{print $1}')
     39#PATCHFILES=$(ls *.patch 2>/dev/null | awk '{print $1}')
    4340
    4441# sonstige files die gebraucht werden
    45 RESTFILES=$(ls *.init *.html 2>/dev/null | awk '{print $1}') # fuer srpm inetd
    46 
    47 PACKAGE=$(awk '/^Name:/ {print $2}' <$SPECFILE)
    48 VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE)
     42#RESTFILES=$(ls *.init *.html 2>/dev/null | awk '{print $1}') # fuer srpm inetd
    4943
    5044ERROR=0
     45
     46
     47if [ -z "$1" ]; then
     48        # without parameter, we are in source directory
     49        test -e Makefile && make
     50        SPECFILE=$(ls *.spec | awk '{print $1}')
     51        TARFILE=$(ls  *.tar.[gb]z*| awk '{print $1}')
     52        PACKAGE=$(awk '/^Name:/ {print $2}' <$SPECFILE)
     53        VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE)
     54        SRC_FILES="$SPECFILE $TARFILE"
     55else
     56        # parameter is src.rpm file
     57        PACKAGE=`echo $1 | sed 's/-[0-9]*\..*.src.rpm//'`
     58        VERSION=`echo $1 | sed 's/.*-\([0-9]*\..*\)-.*.src.rpm/\1/'`
     59        SRC_FILES="$1"
     60fi
    5161
    5262echo $PACKAGE $VERSION $BUILD_DIST
    5363
    5464# Cleaning up and install tempdir
    55 ssh -${SSH_VERSION} ${FQBUILDHOST} "rm -r ${BUILDTEMP}/src/${PACKAGE}-${VERSION}; \
    56 mkdir -p ${BUILDTEMP}/src/${PACKAGE}-${VERSION} ${BUILDTEMP}/${BUILD_DIST}";
     65ssh -${SSH_VERSION} ${FQBUILDHOST} "rm -r ${BUILDTEMP}/src/${PACKAGE}; \
     66mkdir -p ${BUILDTEMP}/src/${PACKAGE} ${BUILDTEMP}/${BUILD_DIST}";
    5767
    58 scp -oProtocol=$SSH_VERSION $TARFILE $SPECFILE $DIFFILES $PATCHFILES $RESTFILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}-${VERSION}
     68scp -oProtocol=$SSH_VERSION $SRC_FILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}
     69
     70if [ "$1" ]; then
     71        ssh -${SSH_VERSION} ${FQBUILDHOST} "\
     72                cd ${BUILDTEMP}/src/${PACKAGE}; rpm2cpio $1 | cpio -i";
     73fi
    5974
    6075# create buildscript
     
    7085#echo "BUILD_PREPARE_SPEC ist $BUILD_PREPARE_SPEC";
    7186
    72 
    73 cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE}-${VERSION}
     87cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE}
    7488build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/${BUILD_DIST}
    7589EOF
     
    7791cat /tmp/tmpscript.$$
    7892
    79 scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}-${VERSION}/buildscript
     93scp -oProtocol=$SSH_VERSION /tmp/tmpscript.$$ ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}/buildscript
    8094rm /tmp/tmpscript.$$
    8195
    8296# build and file rpms
    8397ssh -oProtocol=$SSH_VERSION root@${FQBUILDHOST} \
    84         . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}-${VERSION}/buildscript
     98        . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}/buildscript
    8599ssh -oProtocol=$SSH_VERSION ${FQBUILDHOST} \
    86         cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/
     100        "rm -f ${BUILDTEMP}/${BUILD_DIST}/${PACKAGE}-*.*.rpm;\
     101        cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/"
    87102
    88103mkdir -p ${DEST_DIR}/src
     104# delete all old versions of this package
     105rm -f ${DEST_DIR}/src/${PACKAGE}-*.src.rpm
    89106if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src ); then
    90107        ERROR=1
     
    92109
    93110mkdir -p ${DEST_DIR}/${BUILD_DIST}
     111# delete all old versions of this package
     112rm -f ${DEST_DIR}/${BUILD_DIST}/${PACKAGE}-*.rpm
    94113if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then
    95114        ERROR=2
  • trunk/technical/common/build/buildlist_8.1

    r618 r620  
    11# Steuerdatei für autobuildskript
    2 # $Id: buildlist_8.1,v 1.1 2002/10/10 15:00:37 joergs Exp $
     2# $Id: buildlist_8.1,v 1.2 2002/10/10 17:33:42 joergs Exp $
    33# Format:
    44#
     
    1919client/sc_hardware/                             :8.1-i386               :--no-init
    2020
    21 external/cpan/perl-Net-IP       :8.1-i386               :--no-init 
     21external/cpan/perl-Net-IP       :8.1-i386       :--no-init 
Note: See TracChangeset for help on using the changeset viewer.