Bigtop
  1. Bigtop
  2. BIGTOP-1199

Makefile for deb packing needs to support zip archives

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: general
    • Labels:
      None

      Description

      At the moment it isn't possible to build debian packages if the source archive comes in the form of .zip file. The makes file is failing as gzip can't deal with zip file. E.g in case of bigtop-groovy package the log looks like this:

      if [ -n "groovy-binary-2.2.1.zip" ]; then \
                cp /biggy/workspaces/bigtop/dl/groovy-binary-2.2.1.zip /biggy/workspaces/bigtop/build/bigtop-groovy//deb/bigtop-groovy_2.2.1.orig.tar.gz ;\
                cd /biggy/workspaces/bigtop/build/bigtop-groovy//deb/bigtop-groovy-2.2.1 && \
                  tar --strip-components 1 -xvf ../bigtop-groovy_2.2.1.orig.tar.gz;\
              else \
                       tar -czf /biggy/workspaces/bigtop/build/bigtop-groovy//deb/bigtop-groovy_2.2.1.orig.tar.gz LICENSE ;\
              fi
      gzip: stdin has more than one entry--rest ignored
      tar: Child returned status 2
      

        Issue Links

          Activity

          Hide
          Konstantin Boudnik added a comment -

          Can anyone pick this up? My makefile foo is 16+ years old and I don't really want to learn it all over again

          Show
          Konstantin Boudnik added a comment - Can anyone pick this up? My makefile foo is 16+ years old and I don't really want to learn it all over again
          Hide
          Roman Shaposhnik added a comment -

          I'll take a look tonight. My make-foo is tingling like I'm a teenager

          Show
          Roman Shaposhnik added a comment - I'll take a look tonight. My make-foo is tingling like I'm a teenager
          Hide
          Konstantin Boudnik added a comment -

          Don't get carried away though

          Show
          Konstantin Boudnik added a comment - Don't get carried away though
          Hide
          Roman Shaposhnik added a comment -

          Here's the first cut of the patch. It basically makes it possible to have input files in various formats that get re-tared if needed.

          Show
          Roman Shaposhnik added a comment - Here's the first cut of the patch. It basically makes it possible to have input files in various formats that get re-tared if needed.
          Hide
          Konstantin Boudnik added a comment -

          Patch works overall - thanks for stepping in!. A couple of comments:

          • it has a side effect of re-downloading the source archive each time unless both .zip and .tar.gz files are present
          • once the build is over, it left a tiny talball in dl/groovy-binary-2.2.1.tar.gz and repackaged tarball in dl/groovy-binary-2.2.1.tar.gz; The former fails the consequent build attempt.
          Show
          Konstantin Boudnik added a comment - Patch works overall - thanks for stepping in!. A couple of comments: it has a side effect of re-downloading the source archive each time unless both .zip and .tar.gz files are present once the build is over, it left a tiny talball in dl/groovy-binary-2.2.1.tar.gz and repackaged tarball in dl/groovy-binary-2.2.1.tar.gz ; The former fails the consequent build attempt.
          Hide
          Konstantin Boudnik added a comment -

          Roman Shaposhnik, any chance to iron out these couple of wrinkles so, the groovy package can be unblocked?

          Show
          Konstantin Boudnik added a comment - Roman Shaposhnik , any chance to iron out these couple of wrinkles so, the groovy package can be unblocked?
          Hide
          Roman Shaposhnik added a comment -

          Konstantin Boudnik so here's the weird part: now that I tried it in two different environments (DEB/SLES) I can no longer reproduce it on a clean workspace

          Wold you mind posting the steps starting with make realclean to reproduce both issues?

          Show
          Roman Shaposhnik added a comment - Konstantin Boudnik so here's the weird part: now that I tried it in two different environments (DEB/SLES) I can no longer reproduce it on a clean workspace Wold you mind posting the steps starting with make realclean to reproduce both issues?
          Hide
          Konstantin Boudnik added a comment -

          There's a couple of ways to reproduce the issue:

          % make realclean
          % make bigtop-groovy-rpm
          ## zip file is getting downloaded and everything builds fine
          ## there are dl/groovy-binary-2.2.1.tar.gz.orig (zip format) and dl/groovy-binary-2.2.1.tar.gz (tar.gz)
          % make clean bigtop-groovy-rpm
          ## fails as unzip fails now
          

          Exactly same behavior is observable in case of deb creation. So, there are some extra file movements happening around the zip file, that are screwing up the setup.

          The patch in current form works if I manually delete dl/groovy*. It triggers re-downloading of the zip archive and process is moving forward just fine. Perhaps, this is an acceptable first iteration of the patch and it unblocks BIGTOP-1097 for now. However, we should fix it sooner than later, because the build process will now inadvertently require a real clean process in between of the runs.

          I am ok with +1'ing this patch, committing it, and opening a separate bug issue to fix the glitch, if this is something we want to do to unblock the progress on groovy-package JIRA.

          Show
          Konstantin Boudnik added a comment - There's a couple of ways to reproduce the issue: % make realclean % make bigtop-groovy-rpm ## zip file is getting downloaded and everything builds fine ## there are dl/groovy-binary-2.2.1.tar.gz.orig (zip format) and dl/groovy-binary-2.2.1.tar.gz (tar.gz) % make clean bigtop-groovy-rpm ## fails as unzip fails now Exactly same behavior is observable in case of deb creation. So, there are some extra file movements happening around the zip file, that are screwing up the setup. The patch in current form works if I manually delete dl/groovy* . It triggers re-downloading of the zip archive and process is moving forward just fine. Perhaps, this is an acceptable first iteration of the patch and it unblocks BIGTOP-1097 for now. However, we should fix it sooner than later, because the build process will now inadvertently require a real clean process in between of the runs. I am ok with +1'ing this patch, committing it, and opening a separate bug issue to fix the glitch, if this is something we want to do to unblock the progress on groovy-package JIRA.
          Hide
          Roman Shaposhnik added a comment -

          Here's an updated version of the patch. Please take a look and let me know if it solves your problems.

          Show
          Roman Shaposhnik added a comment - Here's an updated version of the patch. Please take a look and let me know if it solves your problems.
          Hide
          Konstantin Boudnik added a comment - - edited

          Thanks Roman - it works well now.

          I have cleaned up the patch of the remnants of BIGTOP-1097 to make it independent from anything else (just package.mk file now). Your changes for BIGTOP-1097 are now incorporated within that patch.

          If this looks ok to you - I will commit it.

          Show
          Konstantin Boudnik added a comment - - edited Thanks Roman - it works well now. I have cleaned up the patch of the remnants of BIGTOP-1097 to make it independent from anything else (just package.mk file now). Your changes for BIGTOP-1097 are now incorporated within that patch. If this looks ok to you - I will commit it.
          Hide
          Roman Shaposhnik added a comment -

          Konstantin Boudnik LGTM. please commit as part of BIGTOP-1097

          Show
          Roman Shaposhnik added a comment - Konstantin Boudnik LGTM. please commit as part of BIGTOP-1097
          Hide
          Konstantin Boudnik added a comment -

          Committed to master. Thanks Roman!

          Show
          Konstantin Boudnik added a comment - Committed to master. Thanks Roman!

            People

            • Assignee:
              Roman Shaposhnik
              Reporter:
              Konstantin Boudnik
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development