File: cronjob.weekly

package info (click to toggle)
debian-cd 3.1.5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,532 kB
  • ctags: 138
  • sloc: sh: 6,174; perl: 2,352; makefile: 349
file content (211 lines) | stat: -rwxr-xr-x 6,954 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
#!/bin/bash

export TOPDIR=$(dirname $0)

. $TOPDIR/settings.sh

export PUBDIRJIG=$PUBDIR/weekly-builds
export DATE_BUILD="$DATE-$BUILDNUM"

. $TOPDIR/common.sh

export RSYNC_TARGET=/mnt/nfs-cdimage/weekly-builds

# If we're doing a normal set of daily/weekly builds, leave the
# checksum filenames alone. Otherwise, make life easier for people
# combining things later and append a suitable name as we build.
if [ "$DEBVERSION"x != "testing"x ] ; then
    export SUMS_EXTENSION=".large"
fi

. images4testing_d-i

# Uncomment the following to use daily d-i builds for weekly images
# rather than what's in the archive
USE_DAILY_DI=N

if [ "$USE_DAILY_DI"x = "Y"x ] ; then
    export DI=sid
    export DI_WWW_HOME=default
fi

export DI_DIST
export DI_CODENAME

OMIT_RELEASE_NOTES=0
export OMIT_RELEASE_NOTES

BUILDS_RUNNING=""

if [ "$ARCHES"x = ""x ] ; then
    ARCHES="i386 source amd64 multi powerpc armel hppa ia64 mips mipsel s390 sparc kfreebsd-amd64 kfreebsd-i386"
fi

if lockfile -r0 $TOPDIR/.debian-cd.lock ; then
#    echo "NOT checking for svn updates"
    echo "svn update debian-cd"
    cd debian-cd && svn cleanup; svn up ; cd ..

#    echo "NOT checking for popcon updates"
    cd debian-cd && ./tools/update_popcon tasks/squeeze/popularity-contest ; cd ..

    cd $TOPDIR
    mkdir -p $PUBDIRJIG/trace
    mkdir -p $RSYNC_TARGET

    for arch in $ARCHES; do
        arch_error=""
        if [ "$arch" != multi ] ; then
            rm -rf $PUBDIRJIG/$arch
            mkdir -p $PUBDIRJIG/$arch
            arch_start=`now`

            #export DI_DIR="$ARCH_DI_DIR"

            # Full CD set
            if [ "$NOCD"x = ""x ] && [ "$NOFULLCD"x = ""x ] ; then
                export MAX_PKG_SIZE=500000000
                case $arch in
                    i386|amd64|source)
                        export MAXISOS=ALL; export MAXJIGDOS=ALL ;;
                    powerpc)
                        export MAXISOS=8; export MAXJIGDOS=ALL ;;
                    *)
                        export MAXISOS=3; export MAXJIGDOS=ALL ;;
                esac
                unset DESKTOP
		build_started CD
                ./testingcds "$arch" &
            fi

            # Full DVD set
            if [ "$NODVD"x = ""x ] ; then
                export MAX_PKG_SIZE=999999999999
                case $arch in
                    i386|amd64|source)
                        export MAXISOS=ALL; export MAXJIGDOS=ALL ;;
                    *)
                        export MAXISOS=1; export MAXJIGDOS=ALL ;;
                esac
                export DESKTOP=all
		build_started DVD
                INSTALLER_CD=3 TASK=Debian-all \
                    KERNEL_PARAMS='desktop=all' \
                    ./testingcds "$arch" &
            fi

            # Full BD set
            if [ "$NOBD"x = ""x ] ; then
                export MAX_PKG_SIZE=999999999999
                case $arch in
                    i386|amd64|source)
                        export MAXISOS=0
                        export MAXJIGDOS=ALL
                        export DESKTOP=all
			build_started BD
                        INSTALLER_CD=9 TASK=Debian-all \
                            KERNEL_PARAMS='desktop=all' \
                            ./testingcds "$arch" &
                        ;;
                    *)
                        echo "  Not running BD build for $arch"
                        ;;
                esac
            fi

            # kde and xfce/lxde cds
            if [ "$arch"x != "source"x ] && [ "$NOCD"x = ""x ] ; then
		if [ "$NOKDECD"x = ""x ] ; then
                    export MAX_PKG_SIZE=300000000
                    export DESKTOP=kde
                    export MAXISOS=1; export MAXJIGDOS=1
		    build_started KDECD
                    INSTALLER_CD=4 TASK=Debian-kde \
                        KERNEL_PARAMS='desktop=kde' \
                        MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
                        ./testingcds "$arch" &
		fi

		if [ "$NOLIGHTCD"x = ""x ] ; then
                    export MAX_PKG_SIZE=300000000
                    export DESKTOP=light
                    export MAXISOS=1; export MAXJIGDOS=1
		    build_started LIGHTCD
                    INSTALLER_CD=B TASK=Debian-light \
			KERNEL_PARAMS='desktop=light' \
			MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
			./testingcds "$arch" &
		fi
            fi

	    catch_parallel_builds

            if [ "$NOSYNC"x = ""x ] ; then
                if [ "$arch_error"x = "none"x ] ; then
                    echo "  Running ~/build/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &"
                    ~/build/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ $arch &
                else
                    ~/build/report_build_error $RSYNC_TARGET $arch "$arch_error"
                fi
            fi
        else # multi
            rm -rf $PUBDIRJIG/multi-arch
            for i in iso-dvd jigdo-dvd; do
                mkdir -p $PUBDIRJIG/multi-arch/$i
            done

            if [ "$NODVD"x = ""x ] ; then
                export MAX_PKG_SIZE=999999999999
                export DESKTOP=all
		build_started DVD
                INSTALLER_CD=6 TASK=Debian-all \
                    KERNEL_PARAMS='desktop=all' \
                    MAXCDS=1 MAXISOS=ALL MAXJIGDOS=ALL \
		    VARIANTS=xen \
                    ./testingcds "i386 amd64 source"
                # We don't do multi in parallel, only one build type
                # to do!
                build_finished $arch $BUILDNAME $DVDSTART

                mv $PUBDIRJIG/multi/jigdo-dvd/debian* $PUBDIRJIG/multi-arch/jigdo-dvd
                for file in $PUBDIRJIG/multi/jigdo-dvd/*SUMS$SUMS_EXTENSION; do
                    outfile=$PUBDIRJIG/multi-arch/jigdo-dvd/`basename $file`
                    cat $file >> $outfile
                done

                mv $PUBDIRJIG/multi/iso-dvd/debian* $PUBDIRJIG/multi-arch/iso-dvd
                for file in $PUBDIRJIG/multi/iso-dvd/*SUMS$SUMS_EXTENSION; do
                    outfile=$PUBDIRJIG/multi-arch/iso-dvd/`basename $file`
                    cat $file >> $outfile
                done

                rm -rf $PUBDIRJIG/multi
            fi

            if [ "$NOSYNC"x = ""x ] ; then
                if [ "$arch_error"x = "none"x ] || [ "$arch_error"x = ""x ] ; then
                    echo "  Running ~/build/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &"
                    ~/build/iso_run $PUBDIRJIG/ $RSYNC_TARGET/ multi-arch &
                else
                    ~/build/report_build_error $RSYNC_TARGET multi-arch "$arch_error"
                fi
            fi
        fi # end of multi

        # Reset envvars for next iteration
        unset DESKTOP
    done

    if [ "$NOFW"x = ""x ] ; then
	~/build/generate_firmware_images squeeze
	~/build/generate_firmware_images sid
    fi
    
    if [ "$NOSNAP"x = ""x ] ; then
        ~/bin/weekly-snapshots
    fi

    date -u > $PUBDIRJIG/trace/cdimage.debian.org

    rm -f $TOPDIR/.debian-cd.lock
fi