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

[Git][ftp-team/dak][master] feat(buildd-add-keys): add option to skip uid check



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

  • 0a02cf82
    by Ansgar at 2025-12-14T15:33:51+01:00
    feat(buildd-add-keys): add option to skip uid check
    
    This is useful for initial import keys for new architectures that do
    not follow the buildd key naming scheme.
    

1 changed file:

Changes:

  • scripts/debian/buildd-add-keys
    ... ... @@ -57,6 +57,7 @@ ERRORS="${buildkeybase}/errors"
    57 57
     ADMINS="${buildkeybase}/adminkeys.gpg"
    
    58 58
     ARCHADMINS="${buildkeybase}/archadminkeys"
    
    59 59
     STAMPFILE="${buildkeybase}/updatedkeyring"
    
    60
    +: ${BUILDD_ADD_KEYS_SKIP_KEYUID_CHECK:=}
    
    60 61
     
    
    61 62
     # Default options for our gpg calls
    
    62 63
     DEFGPGOPT="--no-default-keyring --batch --no-tty --no-options --exit-on-status-write-error --no-greeting"
    
    ... ... @@ -209,9 +210,9 @@ for file in ${KEYS}; do
    209 210
         # - the UID
    
    210 211
         # - that the key does have an expiration date (or it wont match, the second date
    
    211 212
         #   field would be empty
    
    212
    -    regex="^pub:-:([0-9]{4}):1:([0-9A-F]{16}):([0-9]+):([0-9]+)::-:(buildd autosigning key ${BUILDD} <buildd_${ARCH}-${BUILDD}@buildd.debian.org>):$"
    
    213
    +    regex="^pub:-:([0-9]{4}):1:([0-9A-F]{16}):([0-9]+):([0-9]+)::-:([^:]+):$"
    
    213 214
         regex2="^pub:-:([0-9]{4}):1:([0-9A-F]{16}):([0-9]+):([0-9]+)::-:$"
    
    214
    -    regex3="^uid:::::::::(buildd autosigning key ${BUILDD} <buildd_${ARCH}-${BUILDD}@buildd.debian.org>):$"
    
    215
    +    regex3="^uid:::::::::([^:]+):$"
    
    215 216
         while read line <&4; do
    
    216 217
             if [[ $line =~ $regex ]]; then
    
    217 218
                 KEYSIZE=${BASH_REMATCH[1]}
    
    ... ... @@ -236,7 +237,7 @@ for file in ${KEYS}; do
    236 237
             continue
    
    237 238
         fi
    
    238 239
         done
    
    239
    -    if [ -z "${KEYUID}" ]; then
    
    240
    +    if [ -z "${BUILDD_ADD_KEYS_SKIP_KEYUID_CHECK}" -a "${KEYUID}" != "buildd autosigning key ${BUILDD} <buildd_${ARCH}-${BUILDD}@buildd.debian.org>" ]; then
    
    240 241
         log "Did not recognize the UID format"
    
    241 242
             DATE=$(date -Is)
    
    242 243
             mv "${INCOMING}/${file}" "${ERRORS}/keyuid.${file}.${DATE}"
    


  • Reply to: