Buildout -N -c fails with lint errors

So I am trying to get involved in the development of rockstor. I followed the wiki article on how to setup an environment to develop Rockstor. After creating my fork of Rockstor on git hub, cloned my repo, and ran python /opt/rockstor-build/bootstrap.py -c /opt/rockstor-build/buildout.cfg without issue. Created a fresh Centos VM and rsync’ed the code to the build vm. Then, using the command line:

/opt/rockstor-build/bin/buildout -N -c /opt/rockstor-build/buildout.cfg

Produces:

Setting socket time out to 120 seconds.
Develop: '/opt/rockstor-build/.'
Getting distribution for ‘plone.recipe.command’.
Got plone.recipe.command 1.1.
Getting distribution for ‘djangorecipe==1.9’.
.
.
.
.


Configure: Autodetecting ZMQ settings...
    Custom ZMQ dir:       
build/temp.linux-x86_64-2.7/scratch/tmp/easy_install-6sxmdU/pyzmq-15.0.0/temp/timer_createLgjsNY.o: In function `main':
timer_createLgjsNY.c:(.text+0x15): undefined reference to `timer_create'
collect2: error: ld returned 1 exit status
    ZMQ version detected: 4.1.4
************************************************
zmq/backend/cython/socket.c: In function ‘__pyx_f_3zmq_7backend_6cython_6socket__send_copy.constprop.28’:
zmq/backend/cython/socket.c:2587:13: warning: ‘__pyx_v_rc2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   __pyx_t_2 = __pyx_f_3zmq_7backend_6cython_7checkrc__check_rc(__pyx_v_rc2); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
             ^
  File "build/bdist.linux-x86_64/egg/zmq/tests/_test_asyncio.py", line 37
    yield from a.send(b'hi')
             ^
SyntaxError: invalid syntax

  File "/opt/rockstor-build/eggs/tmpk4nFQ4/pyzmq-15.0.0-py2.7-linux-x86_64.egg/zmq/tests/_test_asyncio.py", line 37
    yield from a.send(b'hi')
             ^
SyntaxError: invalid syntax

Got pyzmq 15.0.0.
Getting distribution for 'pytz==2014.3'.

.
.
.
/temp.linux-x86_64-2.7/libev
In file included from gevent/libev.h:2:0,
from gevent/gevent.corecext.c:273:
libev/ev.c:483:48: warning: “/" within comment [-Wcomment]
/
#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 /
^
In file included from gevent/libev.h:2:0,
from gevent/gevent.corecext.c:273:
libev/ev.c:1692:31: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’ [enabled by default]
EV_API_DECL struct ev_loop ev_default_loop_ptr = 0; / needs to be initialised to make it a definition despite extern /
^
In file included from gevent/libev.h:2:0,
from gevent/gevent.corecext.c:273:
libev/ev.c: In function ‘ev_io_start’:
libev/ev.c:3715:34: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
^
libev/ev.c: At top level:
libev/ev.c:4956:27: warning: "/
" within comment [-Wcomment]
/
EV_STAT 0x00001000 /* stat data changed /
^
libev/ev.c:4957:27: warning: "/
” within comment [-Wcomment]
/* EV_EMBED 0x00010000 /* embedded event loop needs sweep /
^
In file included from gevent/libev.h:2:0,
from gevent/gevent.corecext.c:273:
libev/ev.c: In function ‘evpipe_write’:
libev/ev.c:2321:17: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write (evpipe [1], &counter, sizeof (uint64_t));
^
libev/ev.c:2333:17: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write (evpipe [1], &(evpipe [1]), 1);
^
libev/ev.c: In function ‘pipecb’:
libev/ev.c:2354:16: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
read (evpipe [1], &counter, sizeof (uint64_t));
^
libev/ev.c:2368:16: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
read (evpipe [0], &dummy, sizeof (dummy));
^
Linking /tmp/easy_install-uc7ldQ/gevent-1.1.2/build/lib.linux-x86_64-2.7/gevent/corecext.so to /tmp/easy_install-uc7ldQ/gevent-1.1.2/gevent/corecext.so
Running ‘(cd “/tmp/easy_install-uc7ldQ/gevent-1.1.2/c-ares” && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi && /bin/sh ./configure CONFIG_COMMANDS= CONFIG_FILES= && cp ares_config.h ares_build.h “$OLDPWD” && mv ares_build.h.orig ares_build.h) > configure-output.txt’ in /tmp/easy_install-uc7ldQ/gevent-1.1.2/build/temp.linux-x86_64-2.7/c-ares
In file included from gevent/gevent.ares.c:274:0:
gevent/dnshelper.c:19:0: warning: “PyUnicode_FromString” redefined [enabled by default]
#define PyUnicode_FromString PyBytes_FromString
^
In file included from /usr/include/python2.7/Python.h:85:0,
from gevent/gevent.ares.c:4:
/usr/include/python2.7/unicodeobject.h:281:0: note: this is the location of the previous definition
# define PyUnicode_FromString PyUnicodeUCS4_FromString
^
In file included from gevent/gevent.ares.c:274:0:
gevent/dnshelper.c: In function ‘gevent_append_addr’:
gevent/dnshelper.c:53:5: warning: implicit declaration of function ‘inet_ntop’ [-Wimplicit-function-declaration]
if (ares_inet_ntop(family, src, tmpbuf, tmpsize)) {
^
gevent/dnshelper.c: In function ‘gevent_make_sockaddr’:
gevent/dnshelper.c:146:5: warning: implicit declaration of function ‘inet_pton’ [-Wimplicit-function-declaration]
if ( ares_inet_pton(AF_INET, hostp, &((struct sockaddr_in
)sa6)->sin_addr.s_addr) > 0 ) {
^
Linking /tmp/easy_install-uc7ldQ/gevent-1.1.2/build/lib.linux-x86_64-2.7/gevent/ares.so to /tmp/easy_install-uc7ldQ/gevent-1.1.2/gevent/ares.so
Linking /tmp/easy_install-uc7ldQ/gevent-1.1.2/build/lib.linux-x86_64-2.7/gevent/_semaphore.so to /tmp/easy_install-uc7ldQ/gevent-1.1.2/gevent/_semaphore.so
File “build/bdist.linux-x86_64/egg/gevent/_socket3.py”, line 183
def makefile(self, mode=“r”, buffering=None, *,
^
SyntaxError: invalid syntax

  File "/opt/rockstor-build/eggs/tmpWBGXcQ/gevent-1.1.2-py2.7-linux-x86_64.egg/gevent/_socket3.py", line 183
    def makefile(self, mode="r", buffering=None, *,
                                                  ^
SyntaxError: invalid syntax

Got gevent 1.1.2.
Getting distribution for 'djangorestframework==3.1.1'.

.
.
.
Got URLObject 2.1.1.
Getting distribution for ‘python-engineio>=1.0.0’.
warning: no files found matching 'README.md
File “build/bdist.linux-x86_64/egg/engineio/async_aiohttp.py”, line 89
async def call(self, environ):
^
SyntaxError: invalid syntax

  File "build/bdist.linux-x86_64/egg/engineio/async_sanic.py", line 37
    async def read(self, length=None):
            ^
SyntaxError: invalid syntax

  File "build/bdist.linux-x86_64/egg/engineio/asyncio_server.py", line 65
    async def send(self, sid, data, binary=None):
            ^
SyntaxError: invalid syntax

  File "build/bdist.linux-x86_64/egg/engineio/asyncio_socket.py", line 15
    async def poll(self):
            ^
SyntaxError: invalid syntax

  File "/opt/rockstor-build/eggs/tmpcwz51P/python_engineio-1.7.0-py2.7.egg/engineio/async_aiohttp.py", line 89
    async def __call__(self, environ):
            ^
SyntaxError: invalid syntax

  File "/opt/rockstor-build/eggs/tmpcwz51P/python_engineio-1.7.0-py2.7.egg/engineio/async_sanic.py", line 37
    async def read(self, length=None):
            ^
SyntaxError: invalid syntax

  File "/opt/rockstor-build/eggs/tmpcwz51P/python_engineio-1.7.0-py2.7.egg/engineio/asyncio_server.py", line 65
    async def send(self, sid, data, binary=None):
            ^
SyntaxError: invalid syntax

  File "/opt/rockstor-build/eggs/tmpcwz51P/python_engineio-1.7.0-py2.7.egg/engineio/asyncio_socket.py", line 15
    async def poll(self):
            ^
SyntaxError: invalid syntax

Got python-engineio 1.7.0.
Getting distribution for 'greenlet>=0.4.9'.

.
.
.
sending incremental file list
rsync: change_dir “/opt/rockstor-build/static/js/lib.bkp” failed: No such file or directory (2)

sent 12 bytes  received 12 bytes  48.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.9]
Unused options for js-sync: 'update-command'.

.
.
.
Installing gulp-eslint.
gulp-eslint: Running ‘cd /opt/rockstor-build &&
npm install --save-dev --silent gulp &&
npm install --save-dev --silent gulp-eslint &&
gulp’
/opt/rockstor-build
└─┬ gulp@3.9.1
├── archy@1.0.0
├─┬ chalk@1.1.3
│ ├── ansi-styles@2.2.1
.
.
.
/opt/rockstor-build
└─┬ gulp-eslint@4.0.0
└─┬ eslint@4.1.1
├─┬ babel-code-frame@6.22.0
│ └── js-tokens@3.0.2
├─┬ concat-stream@1.6.0
│ ├─┬ readable-stream@2.3.3
│ │ ├── isarray@1.0.0
│ │ └── string_decoder@1.0.3
│ └── typedarray@0.0.6
├─┬ debug@2.6.8
│ └── ms@2.0.0
├─┬ doctrine@2.0.0
│ └── isarray@1.0.0
├─┬ eslint-scope@3.7.1
│ └─┬ esrecurse@4.2.0
│ └── object-assign@4.1.1
├─┬ espree@3.4.3
│ ├── acorn@5.1.0
│ └─┬ acorn-jsx@3.0.1
│ └── acorn@3.3.0
├── esquery@1.0.0
├── estraverse@4.2.0
├── esutils@2.0.2
├─┬ file-entry-cache@2.0.0
│ ├─┬ flat-cache@1.2.2
│ │ ├── circular-json@0.3.1
│ │ ├─┬ del@2.2.2
│ │ │ ├─┬ globby@5.0.0
│ │ │ │ ├── array-union@1.0.2
│ │ │ │ ├── arrify@1.0.1
│ │ │ │ ├─┬ glob@7.1.2
│ │ │ │ │ └── minimatch@3.0.4
│ │ │ │ └── object-assign@4.1.1
│ │ │ ├── is-path-cwd@1.0.0
│ │ │ ├─┬ is-path-in-cwd@1.0.0
│ │ │ │ └── is-path-inside@1.0.0
│ │ │ ├── object-assign@4.1.1
│ │ │ ├── pify@2.3.0
│ │ │ ├─┬ pinkie-promise@2.0.1
│ │ │ │ └── pinkie@2.0.4
│ │ │ └─┬ rimraf@2.6.1
│ │ │ └─┬ glob@7.1.2
│ │ │ └── minimatch@3.0.4
│ │ ├── graceful-fs@4.1.11
│ │ └── write@0.2.1
│ └── object-assign@4.1.1
├─┬ glob@7.1.2
│ ├── fs.realpath@1.0.0
│ └── path-is-absolute@1.0.1
├── globals@9.18.0
├── ignore@3.3.3
├── imurmurhash@0.1.4
├─┬ inquirer@3.1.1
│ ├── ansi-escapes@2.0.0
│ ├─┬ cli-cursor@2.1.0
│ │ └─┬ restore-cursor@2.0.0
│ │ ├─┬ onetime@2.0.1
│ │ │ └── mimic-fn@1.1.0
│ │ └── signal-exit@3.0.2
│ ├── cli-width@2.1.0
│ ├─┬ external-editor@2.0.4
│ │ ├── iconv-lite@0.4.18
│ │ ├── jschardet@1.4.2
│ │ └─┬ tmp@0.0.31
│ │ └── os-tmpdir@1.0.2
│ ├── figures@2.0.0
│ ├── lodash@4.17.4
│ ├── mute-stream@0.0.7
│ ├─┬ run-async@2.3.0
│ │ └── is-promise@2.1.0
│ ├── rx-lite@4.0.8
│ ├── rx-lite-aggregates@4.0.8
│ ├─┬ string-width@2.1.0
│ │ ├── is-fullwidth-code-point@2.0.0
│ │ └─┬ strip-ansi@4.0.0
│ │ └── ansi-regex@3.0.0
│ └── through@2.3.8
├─┬ is-my-json-valid@2.16.0
│ ├── generate-function@2.0.0
│ ├─┬ generate-object-property@1.2.0
│ │ └── is-property@1.0.2
│ └── jsonpointer@4.0.1
├─┬ is-resolvable@1.0.0
│ └── tryit@1.0.3
├─┬ js-yaml@3.8.4
│ ├─┬ argparse@1.0.9
│ │ └── sprintf-js@1.0.3
│ └── esprima@3.1.3
├─┬ json-stable-stringify@1.0.1
│ └── jsonify@0.0.0
├─┬ levn@0.3.0
│ ├── prelude-ls@1.1.2
│ └── type-check@0.3.2
├── lodash@4.17.4
├── minimatch@3.0.4
├── natural-compare@1.4.0
├─┬ optionator@0.8.2
│ ├── deep-is@0.1.3
│ ├── fast-levenshtein@2.0.6
│ └── wordwrap@1.0.0
├── path-is-inside@1.0.2
├── pluralize@4.0.0
├── progress@2.0.0
├─┬ require-uncached@1.0.3
│ ├─┬ caller-path@0.1.0
│ │ └── callsites@0.2.0
│ └── resolve-from@1.0.1
├── strip-json-comments@2.0.1
├─┬ table@4.0.1
│ ├─┬ ajv@4.11.8
│ │ └── co@4.6.0
│ ├── ajv-keywords@1.5.1
│ ├── lodash@4.17.4
│ └── slice-ansi@0.0.4
└── text-table@0.2.0

[12:30:41] Using gulpfile /opt/rockstor-build/gulpfile.js
[12:30:41] Starting 'lint'...
[12:30:43] 
/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/add_pool.js
  251:1  error  Expected indentation of 16 spaces but found 12  indent
  252:1  error  Expected indentation of 20 spaces but found 16  indent
  253:1  error  Expected indentation of 20 spaces but found 16  indent
  254:1  error  Expected indentation of 24 spaces but found 20  indent
  255:1  error  Expected indentation of 24 spaces but found 20  indent
  256:1  error  Expected indentation of 20 spaces but found 16  indent
  257:1  error  Expected indentation of 24 spaces but found 20  indent
  258:1  error  Expected indentation of 24 spaces but found 20  indent
  259:1  error  Expected indentation of 20 spaces but found 16  indent
  260:1  error  Expected indentation of 16 spaces but found 12  indent
  310:1  error  Expected indentation of 12 spaces but found 8   indent
  311:1  error  Expected indentation of 16 spaces but found 12  indent
  312:1  error  Expected indentation of 16 spaces but found 12  indent
  313:1  error  Expected indentation of 16 spaces but found 12  indent
  314:1  error  Expected indentation of 12 spaces but found 8   indent
  315:1  error  Expected indentation of 12 spaces but found 8   indent
  316:1  error  Expected indentation of 16 spaces but found 12  indent
  317:1  error  Expected indentation of 12 spaces but found 8   indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/add_scheduled_task.js
   89:1  error  Expected indentation of 12 spaces but found 8      indent
   90:1  error  Expected indentation of 12 spaces but found 8      indent
   91:1  error  Expected indentation of 12 spaces but found 8      indent
   92:1  error  Expected indentation of 12 spaces but found 8      indent
   93:1  error  Expected indentation of 12 spaces but found 8      indent
   94:1  error  Expected indentation of 12 spaces but found 8      indent
   95:1  error  Expected indentation of 12 spaces but found 8      indent
   96:1  error  Expected indentation of 12 spaces but found 8      indent
   97:1  error  Expected indentation of 12 spaces but found 8      indent
   98:1  error  Expected indentation of 12 spaces but found 8      indent
  100:1  error  Expected indentation of 12 spaces but found 8      indent
  101:1  error  Expected indentation of 12 spaces but found 8      indent
  104:1  error  Expected indentation of 12 spaces but found 8      indent
  105:1  error  Expected indentation of 12 spaces but found 8      indent
  106:1  error  Expected indentation of 12 spaces but found 8      indent
  107:1  error  Expected indentation of 12 spaces but found 8      indent
  108:1  error  Expected indentation of 12 spaces but found 8      indent
  109:1  error  Expected indentation of 12 spaces but found 8      indent
  248:1  error  Expected indentation of 20 spaces but found 33     indent
  267:1  error  Expected indentation of 8 spaces but found 2 tabs  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/disks.js
  77:1  error  Expected indentation of 8 spaces but found 6  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/email.js
  101:55  error  Unnecessary escape character: \-  no-useless-escape
  101:93  error  Unnecessary escape character: \-  no-useless-escape

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/luks_disk.js
  68:1  error  Expected indentation of 12 spaces but found 16  indent
  69:1  error  Expected indentation of 12 spaces but found 16  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/pools.js
  94:1  error  Expected indentation of 16 spaces but found 21  indent
  95:1  error  Expected indentation of 16 spaces but found 21  indent
  96:1  error  Expected indentation of 16 spaces but found 21  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/scheduled_tasks.js
  60:1  error  Expected indentation of 8 spaces but found 2 tabs   indent
  82:1  error  Expected indentation of 12 spaces but found 3 tabs  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/setrole_disks.js
  68:1  error  Expected indentation of 12 spaces but found 16  indent
  69:1  error  Expected indentation of 12 spaces but found 16  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/share_details_layout_view.js
  318:1  error  Expected indentation of 20 spaces but found 16  indent

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/share_usage_module.js
  168:88  error  Unnecessary escape character: \.  no-useless-escape

/opt/rockstor-build/src/rockstor/storageadmin/static/storageadmin/js/views/shares.js
   89:1  error  Expected indentation of 4 spaces but found 0       indent
   96:1  error  Expected indentation of 8 spaces but found 2 tabs  indent
   99:1  error  Expected indentation of 8 spaces but found 2 tabs  indent
  146:1  error  Expected indentation of 4 spaces but found 4 tabs  indent

✖ 56 problems (56 errors, 0 warnings)
  53 errors, 0 warnings potentially fixable with the `--fix` option.

[12:30:43] 'lint' errored after 2.47 s
[12:30:43] ESLintError in plugin 'gulp-eslint'
Message:
    Failed with 56 errors
gulp-eslint: Non zero exit code (1) while running command.
While:
  Installing gulp-eslint.

@maz Hello again.

Great news.

I tend to just re-use a Rockstor install but if you do make sure to uninstall the rockstor rpm and wipe all residual files in /opt/rockstor. I tend to build in /opt/rockstor-dev.

I think the zmq stuff fails over to using a build in variant so don’t think that’s an issue. Been like that for ages.

To the problem:

So this build problem has only recently occurred and our own @Flyer has a fix in a pending pull request:

Hope that gets you up and running. Expect some rpm version check errors in the resulting build’s rockstor.log as it’s obviously not able to access the installed rpm any longer. Ie, code in there intended just for production to inform the user of the ‘up-to-date’ ness of the current rpm version.

Let us know how you get on.