Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
# by Denis Kozadaev
sudo -E apt-get clean
sudo -E apt-get autoclean

APTLIST="/tmp/apt_sources.list"
APTLISTETC="/etc/apt/sources.list"

echo "" > $APTLIST
echo "deb [trusted=yes] http://192.168.0.4/dilos  du2-prebuild main contrib non-free" >> $APTLIST
#echo "deb http://192.168.0.100/dilos dg2-unstable main contrib non-free" >> $APTLIST

#echo "deb http://apt2.dilos.org/dilos dg2-unstable main contrib non-free" >> $APTLIST
#echo "deb http://apt2.dilos.org/dilos du2-unstable main contrib non-free" >> $APTLIST
#echo "deb http://apt2.dilos.org/dilos dilos2-unstable main contrib non-free" >> $APTLIST

echo "deb-src [trusted=yes] http://apt2192.168.dilos0.org4/dilos du2-unstable main contrib non-free" 2>/dev/null >> $APTLIST
#echo "deb-src http://apt2.dilos.org/dilos dilos-testing main contrib non-free" 2>/dev/null >> $APTLIST

sudo mv $APTLIST $APTLISTETC

sudo apt-get update
test -f /var/lib/dpkg/lock && sudo rm -f /var/lib/dpkg/lock
test -f /var/cache/apt/archives/lock && sudo 
sudo rm -f /var/cache/apt/archives/lock
sudo dpkg --configure -a
sudo -E rm -rf ${WORKSPACE} && mkdir -p ${WORKSPACE}
test -f /usr/bin/gecho || sudo -E ln -s echo /usr/bin/gecho
test -f /usr/bin/gfind || sudo -E ln -s find /usr/bin/gfind
sudo apt-get upgrade -y
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y -f
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y git openssh-server oracle-jdk

collect src for local repo

Code Block
languagebash
#!/bin/bash

COMPONENTS='main'
CODENAME='du2-prebuild'

#function for get src
function get_src() {
        sudo apt source $1
}

# function add repo
function add_in_repo() {
        sudo reprepro -b /data/repo -C $COMPONENTS includedsc $CODENAME $1*.dsc
}
# function delete
function delete_src() {
        sudo rm -rf $1*
}

while read COMPONENT; do
        get_src $COMPONENT
        add_in_repo $COMPONENT
        delete_src $COMPONENT
done < list_component

Build component

These variables are registered in jenkins:

...