Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8096385

[Bundlers] DESCRIPTION field isn't escaped correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8u20
    • deploy
    • 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)

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

              Created:
              Updated:
              Resolved:
              Imported: