Skip to content
  • Thomas Haller's avatar
    contrib/rpm: fix obtaining SOURCE via git-archive · a348bda6
    Thomas Haller authored
    - when user provided a $SOURCE argument, do call abs_path on
      it. abs_path allows the user to provide relative paths in
      the original directory.
    
    - don't call abs_path on "$GITDIR/NetworkManager-$VERSION".tar.xz
      abs_path is there to verify user input and it will abort the script
      if the file doesn't exist.
    
    - when creating a temporary tarball via git-archive, put it
      into the output directory and not overwriting files in
      $GITDIR.
    
    - fix abs_path to return an error code and let callers abort
      the script
    
    - add a new parameter $SOURCE_FROM_GIT so that you can control
      whether git-archive is used. You can now specify either $SOURCE
      or $SOURCE_FROM_GIT. In case of absence of both, it tries to
      detect a tar file in the $GITDIR directory.
    
    Fixes: 9e9ec1a3
    a348bda6