Tinkoff / Nginx-builder

A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Apache License 2.0
154 stars 28 forks source link

git error: already exists and is not an empty directory. #33

Closed Bazis007 closed 2 years ago

Bazis007 commented 4 years ago

After second run inside docker container i got error:

builder - ERROR - Cmd('git') failed due to: exit code(128)
  cmdline: git clone --branch=master -v https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git /usr/src/nginx/modules/ngx_http_substitutions_filter_module
  stderr: 'fatal: destination path '/usr/src/nginx/modules/ngx_http_substitutions_filter_module' already exists and is not an empty directory.
'

config.yaml

nginx_version: 1.19.3
output_package: rpm
modules:
  - module:
      name: nginx-auth-ldap
      git_url: https://github.com/kvspb/nginx-auth-ldap.git
      git_branch: master
      dependencies:
        - openldap-devel
  - module:
      name: nginx-module-vts
      git_url: https://github.com/vozlt/nginx-module-vts.git
      git_branch: master
  - module:
      name: ngx_http_substitutions_filter_module
      git_url: https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
  - module:
      name: headers-more-nginx-module
      web_url: https://github.com/openresty/headers-more-nginx-module/archive/v0.261.zip
  - module:
      name: nginx-module-vts
      git_url: https://github.com/vozlt/nginx-module-vts.git
      git_tag: v0.1.18
  - module:
      name: ngx_devel_kit
      git_url: https://github.com/simplresty/ngx_devel_kit.git
      git_tag: v0.3.0
  - module:
      name: ngx_cache_purge
      git_url: https://github.com/FRiCKLE/ngx_cache_purge.git
  - module:
      name: ngx_http_dyups_module
      git_url: https://github.com/yzprofile/ngx_http_dyups_module.git
  - module:
      name: http_gzip_static_module
      type: embedded
  - module:
      name: http_v2_module
      type: embedded
  - module:
      name: http_ssl_module
      type: embedded
  - module:
      name: http_addition_module
      type: embedded
  - module:
      name: http_auth_request_module
      type: embedded
  - module:
      name: http_gunzip_module
      type: embedded
  - module:
      name: http_gzip_static_module
      type: embedded
  - module:
      name: http_realip_module
      type: embedded
  - module:
      name: http_secure_link_module
      type: embedded
  - module:
      name: http_slice_module
      type: embedded
  - module:
      name: http_stub_status_module
      type: embedded
  - module:
      name: http_sub_module
      type: embedded
  - module:
      name: stream_realip_module
      type: embedded
  - module:
      name: stream_ssl_preread_module
      type: embedded
configure_params:
  - "--with-openssl-opt='enable-tls1_3'"

Run inside docker: ./main.py build -f config.yaml -r r01

OS: centos

therb1 commented 2 years ago

You must clean durectory already exists and is not an empty directory /usr/src/nginx