1. 11 Nov, 2024 1 commit
    • Kirill Smelkov's avatar
      pygolang/pyprog: Fix handling of multi-line eggs list · 7e067278
      Kirill Smelkov authored
      pyprog macro, added in 0ee52376 (Generalize how nxdtest python script is
      generated into pyprog recipe macro) works by generating buildout code at
      runtime in text form. This way it should be careful when substituting strings,
      because if those strings contain \n, then intended control flow might become broken.
      
      For example when using pyprog with eggs = ${eggs:eggs} from stack/erp5/ ,
      buildout breaks because erp5 defines eggs as multiline list:
      
          INFO     self.buildout.parse("""
          INFO   File "/srv/slapgrid/slappart47/srv/runner/software/7f1663e8148f227ce3c6a38fc52796e2/eggs/zc.buildout-2.7.1+slapos020-py3.9.egg/zc/buildout/buildout.py", line 1352, in parse
          INFO     sections = zc.buildout.configparser.parse(
          INFO   File "/srv/slapgrid/slappart47/srv/runner/software/7f1663e8148f227ce3c6a38fc52796e2/eggs/zc.buildout-2.7.1+slapos020-py3.9.egg/zc/buildout/configparser.py", line 241, in parse
          INFO     raise e
          INFO zc.buildout.configparser.ParsingError: File contains parsing errors:
          INFO         [line 18]: 'python-barcode\n'
          INFO         [line 19]: 'SOAPpy-py3\n'
          INFO         [line 20]: 'suds-py3\n'
          INFO         [line 21]: 'neoppod[admin, ctl, master]\n'
          INFO         [line 22]: 'cython-zstd\n'
          INFO         [line 23]: 'msgpack\n'
          INFO         [line 24]: 'mysqlclient\n'
          INFO         [line 25]: 'PyMySQL\n'
          INFO         [line 26]: 'ZODB\n'
          INFO         [line 27]: 'zodbtools\n'
          INFO         [line 28]: 'psutil\n'
               ...
      
      -> Fix it via indenting eggs list like we already do with pyinit code.
      
      /cc @kazuhiko, @jerome
      7e067278
  2. 10 Nov, 2024 4 commits
  3. 08 Nov, 2024 11 commits
  4. 07 Nov, 2024 4 commits
  5. 06 Nov, 2024 2 commits
  6. 05 Nov, 2024 1 commit
  7. 04 Nov, 2024 4 commits
  8. 03 Nov, 2024 4 commits
  9. 01 Nov, 2024 1 commit
  10. 31 Oct, 2024 1 commit
  11. 29 Oct, 2024 2 commits
  12. 24 Oct, 2024 2 commits
  13. 22 Oct, 2024 2 commits
  14. 21 Oct, 2024 1 commit
    • Jérome Perrin's avatar
      random: fix password recipe when using storage-path and passwd · 280370c7
      Jérome Perrin authored
      As discussed on nexedi/slapos@bb841a7b (comment 219278)
      when using storage-path and passwd option, the storage file could not
      be updated to the new format because of AttributeError _needs_migration.
      
      This changes to no longer try to detect if the storage needs migration,
      but just compare the expected content of the storage file during install
      and overwrite the file if it is different.
      
      This new approach also fix a behavior that re-running buildout with
      storage-path option and a different passwd option did not update the
      storage file. Now it is also updated.
      
      ( this also fixes a potential encoding problem on py2 )
      280370c7