[Bundlers] DESCRIPTION field isn't escaped correctly

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8u20
    • Affects Version/s: 8u20
    • Component/s: deploy
    • Environment:

      Ubuntu 14.04 x64

      Bundling DEB with SERVICE_HINT set to true and DESCRIPTION set to something containing bash-incorrect symbols, leads to errors in /etc/init.d/<name> :

      Steps to reproduce:
      1) add {SERVICE_HINT: true} and {DESCRIPTION: "Caramba service!"} to the params map
      2) bundle deb (LinuxDebBundler)
      3)
      $ sudo dpkg --install /path/to/pkg.deb

      Here we see this line in the output:
      [STDERR]: /etc/init.d/app1: 15: /etc/init.d/app1: service!: not found

      looking at 15-th line of /etc/init.d/app1:
      $ cat /etc/init.d/app1 | head -n 15 | tail -n 1
      DESC=Caramba service!

      The description is not escaped properly and that leads to the error messages and incorrect init script.

      Possible solution:
      fix "DESC=APPLICATION_DESCRIPTION" in template.deb.init.script to
      "DESC='APPLICATION_DESCRIPTION'" (add single quotes)

            Assignee:
            Danno Ferrin (Inactive)
            Reporter:
            Dmitry Ginzburg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: