[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] 2 commits: config/debian-security: run cron.buildd only once



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

3 changed files:

Changes:

  • config/debian-security/cron.buildd
    ... ... @@ -14,42 +14,36 @@ if [ -e $ftpdir/Archive_Maintenance_In_Progress ]; then
    14 14
         exit 0
    
    15 15
     fi
    
    16 16
     
    
    17
    -dists=
    
    18
    -now=$(date +%s)
    
    19
    -check=$(( now - 3*60 ))
    
    17
    +last_changed=${1:?}
    
    18
    +
    
    19
    +trigger_wb() {
    
    20
    +    local dist="${1:?}"
    
    21
    +    local send=
    
    22
    +
    
    23
    +    case "${dist}" in
    
    24
    +        oldoldstable)
    
    25
    +            send=jessie
    
    26
    +            ;;
    
    27
    +        oldstable)
    
    28
    +            send=stretch
    
    29
    +            ;;
    
    30
    +        stable)
    
    31
    +            send=buster
    
    32
    +            ;;
    
    33
    +        testing-security)
    
    34
    +            send=bullseye
    
    35
    +            ;;
    
    36
    +        *)
    
    37
    +            send=unknown
    
    38
    +            ;;
    
    39
    +    esac
    
    40
    +
    
    41
    +    ssh -n wbadm@buildd trigger.security $send
    
    42
    +}
    
    20 43
     
    
    21 44
     for dist in $DISTS; do
    
    22
    -    smodtime=$(stat -c "%Y" $base/build-queues/dists/buildd-$dist/updates/*/source/Sources.xz | sort -n | tail -1)
    
    23
    -    pmodtime=$(stat -c "%Y" $base/build-queues/dists/buildd-$dist/updates/*/binary-*/Packages.xz | sort -n | tail -1)
    
    24
    -
    
    25
    -    if [ ${smodtime} -gt ${check} ] || [ ${pmodtime} -gt ${check} ]; then
    
    26
    -        # Packages/Sources changed in the last minutes
    
    27
    -        dists="${dists} ${dist}"
    
    28
    -    else
    
    29
    -        continue
    
    45
    +    dist_changed=$(psql -qAtc "SELECT last_changed > '${last_changed}' FROM suite WHERE suite_name = '${dist}'")
    
    46
    +    if [[ "${dist_changed}" = "t" ]]; then
    
    47
    +        trigger_wb ${dist}
    
    30 48
         fi
    
    31 49
     done
    32
    -
    
    33
    -if [ ! -z "${dists}" ]; then
    
    34
    -    for d in ${dists}; do
    
    35
    -        case ${d} in
    
    36
    -            oldoldstable)
    
    37
    -                send=jessie
    
    38
    -                ;;
    
    39
    -            oldstable)
    
    40
    -                send=stretch
    
    41
    -                ;;
    
    42
    -            stable)
    
    43
    -                send=buster
    
    44
    -                ;;
    
    45
    -            testing-security)
    
    46
    -                send=bullseye-security
    
    47
    -                ;;
    
    48
    -            *)
    
    49
    -                send=unknown
    
    50
    -                ;;
    
    51
    -        esac
    
    52
    -
    
    53
    -        ssh -n wbadm@buildd trigger.security $send
    
    54
    -    done
    
    55
    -fi

  • config/debian-security/unchecked.functions
    ... ... @@ -4,7 +4,7 @@ function sync_accepted() {
    4 4
     }
    
    5 5
     
    
    6 6
     function trigger_wb_security() {
    
    7
    -    ${configdir}/cron.buildd
    
    7
    +    ${configdir}/cron.buildd ${LAST_CHANGED}
    
    8 8
     }
    
    9 9
     
    
    10 10
     function clean_suites() {
    

  • config/debian/common
    ... ... @@ -97,7 +97,6 @@ function make_buildd_dir () {
    97 97
     
    
    98 98
         if [[ $archive = security ]]; then
    
    99 99
             ${scriptsdir}/update-buildd-archive ${base}/build-queues ${incoming}/debian-security-buildd
    
    100
    -        $configdir/cron.buildd
    
    101 100
             sudo -u archvsync runmirrors -a security-buildd-pool
    
    102 101
         else
    
    103 102
             # Stick a last modified date in the page footer
    


  • Reply to: