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

[Git][ftp-team/dak][master] 2 commits: fix(wrap-tag2upload-verify): correct errors



Title: GitLab

Ansgar pushed to branch master at Debian FTP Team / dak

Commits:

  • 3a1fb70d
    by Ansgar at 2025-05-12T17:52:28+02:00
    fix(wrap-tag2upload-verify): correct errors
    
  • 830a43dc
    by Ansgar at 2025-05-12T17:52:34+02:00
    fix(tag2upload): `tag=` includes tag object id, not name
    
    We do not have the object id readily available and only care that it
    is available. We know the latter is true as we could retrive it from
    the `*.git.tar.xz` included in the upload. Therefore just drop this
    check.
    

3 changed files:

Changes:

  • daklib/archive.py
    ... ... @@ -1381,11 +1381,6 @@ class ArchiveUpload:
    1381 1381
                     success = False
    
    1382 1382
                     self.reject_reasons.append("tag2upload: could not parse Git-Tag-Info")
    
    1383 1383
                 else:
    
    1384
    -                if tag_info.tag != info.tag.tag:
    
    1385
    -                    success = False
    
    1386
    -                    self.reject_reasons.append(
    
    1387
    -                        "tag2upload: tag name from Git and Git-Tag-Info differ"
    
    1388
    -                    )
    
    1389 1384
                     if tag_info.fp.upper() != info.signed_file.fingerprint:
    
    1390 1385
                         success = False
    
    1391 1386
                         self.reject_reasons.append(
    

  • scripts/debian/wrap-tag2upload-verify
    ... ... @@ -23,22 +23,21 @@ with NamedTemporaryFile() as out_sig, NamedTemporaryFile() as out_txt:
    23 23
                 out_txt.name,
    
    24 24
                 *sys.argv[1:],
    
    25 25
             ],
    
    26
    -        stdout=subprocess.DEVNULL,
    
    27 26
             capture_output=True,
    
    28 27
         )
    
    29
    -if result.returncode == 0:
    
    30
    -    output = {
    
    31
    -        "result": {
    
    32
    -            "tag": encode(out_txt.read()),
    
    33
    -            "signature": encode(out_sig.read()),
    
    28
    +    if result.returncode == 0:
    
    29
    +        output = {
    
    30
    +            "result": {
    
    31
    +                "tag": encode(out_txt.read()),
    
    32
    +                "signature": encode(out_sig.read()),
    
    33
    +            }
    
    34 34
             }
    
    35
    -    }
    
    36
    -else:
    
    37
    -    output = {
    
    38
    -        "error": {
    
    39
    -            "returncode": result.returncode,
    
    40
    -            "stderr": encode(result.stderr),
    
    35
    +    else:
    
    36
    +        output = {
    
    37
    +            "error": {
    
    38
    +                "returncode": result.returncode,
    
    39
    +                "stderr": encode(result.stderr),
    
    40
    +            }
    
    41 41
             }
    
    42
    -    }
    
    43 42
     
    
    44 43
     json.dump(output, sys.stdout)

  • tests/fixtures/packages/tag2upload-0.1/debian/control
    ... ... @@ -4,7 +4,7 @@ Priority: optional
    4 4
     Maintainer: A Maintainer <maint@example.com>
    
    5 5
     Build-Depends: debhelper-compat (= 12)
    
    6 6
     Rules-Requires-Root: no
    
    7
    -XS-Git-Tag-Info: tag=debian/0.1 fp=993C2870F54D83789E55323C13D986C3912E851C
    
    7
    +XS-Git-Tag-Info: tag=0000000000000000000000000000000000000000 fp=993C2870F54D83789E55323C13D986C3912E851C
    
    8 8
     
    
    9 9
     Package: tag2upload
    
    10 10
     Architecture: all
    


  • Reply to: