Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-2592

Modifying an existing non-rootfs-image artifact breaks the artifact

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Days in progress:
      10

      Description

      Take the following commands and their output:

      $ ./mender-artifact read artifact.mender 
      Mender artifact:
        Name: test
        Format: mender
        Version: 3
        Signature: no signature
        Compatible devices: '[test]'
        Provides group: 
        Depends on one of artifact(s): []
        Depends on one of group(s): []
        State scripts:
      
      Updates:
          0:
          Type:   test
          Provides: Nothing
          Depends: Nothing
          Metadata: Nothing
          Files:
            name:     README.md
            size:     3317
            modified: 2019-05-07 14:43:33 +0200 CEST
            checksum: c15687d6a34353be04ef0a550257e63b7cb6115bedcd5eb346d38f06263e6ead
          Files:
            name:     Dockerfile
            size:     439
            modified: 2019-06-11 09:38:38 +0200 CEST
            checksum: b70c98f53491169851dc7d0c2c0a4612eead61f17d3a46ce7eef70db113dc92d
      
      $ ./mender-artifact modify -n newtest artifact.mender
      
      $ ./mender-artifact read artifact.mender 
      Mender artifact:
        Name: newtest
        Format: mender
        Version: 3
        Signature: no signature
        Compatible devices: '[test]'
        Provides group: 
        Depends on one of artifact(s): []
        Depends on one of group(s): []
        State scripts:
      
      Updates:
          0:
          Type:   rootfs-image
          Provides: Nothing
          Depends: Nothing
          Metadata: Nothing
          Files:
            name:     mender-repack794333676
            size:     0
            modified: 2019-06-11 10:38:10 +0200 CEST
            checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
      

      Notice how the resulting artifact has not only lost one payload file, but its checksum is also different from both of the original inputs. Also, the type of payload is also wrong.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10040 Kristian Amlie
                Reporter:
                a10040 Kristian Amlie
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel