Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-962

The dist path needs to be created before running 'tar' command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Medium Medium
    • 17.10
    • 17.10
    • Build system
    • None

      1. Enable build from dist tarball independent of git.

           In current master branch of vpp version, we  use "make pkg-rpm" command to build a rpm, which may be break down if "git rev-parse 2> /dev/null" case return "0".

           As codes show below:

       

      DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
      DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
      
      dist:
      @if git rev-parse 2> /dev/null ; then \
      git archive \
      --prefix=$(DIST_SUBDIR)/ \
      --format=tar \
      -o $(DIST_FILE) \
      HEAD ; \
      git describe > $(BR)/.version ; \
      else \
      (cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
      src/scripts/version > $(BR)/.version ; \
      fi
      

         The path "DIST_SUBDIR" needs to be created before running 'tar' command, that is because  'tar'command can not compress files from a non-existent path.

          Errors show:

      tar: vpp-17.10: Cannot stat: No such file or directory
      tar: Exiting with failure status due to previous errors
      

       

      2. Fix bug

           In order to fix this bug, we should to create the path "DIST_SUBDIR" at fist, and, copy source codes into the "DIST_SUBDIR" . After these steps, we can get a whole tarball to build rpm.

       

            shenJibiao Shen Jibiao
            shenJibiao Shen Jibiao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: