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

[Git][ftp-team/dak][deploy] 5 commits: Only need read access



Title: GitLab

Joerg Jaspert pushed to branch deploy at Debian FTP Team / dak

Commits:

4 changed files:

Changes:

  • config/debian-security/cron.unchecked
    ... ... @@ -104,6 +104,7 @@ fi
    104 104
     
    
    105 105
     if [[ "${old_last_changed}" != "${new_last_changed}" ]]; then
    
    106 106
         # We had something approved from a policy queue, push out new archive
    
    107
    +    exec {LOCKFD}>&-
    
    107 108
         $configdir/cronscript unchecked-dinstall
    
    108 109
     fi
    
    109 110
     
    

  • config/debian/cronscript
    ... ... @@ -123,7 +123,20 @@ function lock() {
    123 123
             TIME=300
    
    124 124
         fi
    
    125 125
         # Now try to get the lock
    
    126
    -    flock ${flockparm} --timeout ${TIME} ${LOCKFD[${LOCK}]}
    
    126
    +    set +e
    
    127
    +    flock ${flockparm} --timeout ${TIME} --conflict-exit-code 3 ${LOCKFD[${LOCK}]}
    
    128
    +    ret=$?
    
    129
    +    set -e
    
    130
    +    case ${ret} in
    
    131
    +        0)
    
    132
    +            return
    
    133
    +            ;;
    
    134
    +        3)
    
    135
    +            log_error "Could not get lock ${lvar}, timeout"
    
    136
    +            ;;
    
    137
    +        *)
    
    138
    +            log_error "Could not get lock ${lvar}"
    
    139
    +    esac
    
    127 140
     }
    
    128 141
     
    
    129 142
     function unlock() {
    

  • config/debian/dinstall.functions
    ... ... @@ -642,6 +642,7 @@ function startup() {
    642 642
     }
    
    643 643
     
    
    644 644
     function postcronscript() {
    
    645
    +    trap - ERR
    
    645 646
         logstats ${LOGFILE}
    
    646 647
         state "all done"
    
    647 648
         touch "${DINSTALLEND}"
    

  • dak/new_security_install.py
    ... ... @@ -89,7 +89,7 @@ def sudo(arg, fn, exit):
    89 89
     def do_Approve(): sudo("A", _do_Approve, True)
    
    90 90
     def _do_Approve():
    
    91 91
         print "Locking unchecked"
    
    92
    -    with os.fdopen(os.open('/srv/security-master.debian.org/lock/unchecked.lock', os.O_CREAT | os.O_RDWR ), 'w') as lock_fd:
    
    92
    +    with os.fdopen(os.open('/srv/security-master.debian.org/lock/unchecked.lock', os.O_CREAT | os.O_RDWR ), 'r') as lock_fd:
    
    93 93
             while True:
    
    94 94
                 try:
    
    95 95
                     fcntl.flock(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
    


  • Reply to: