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

[Bundlers] DESCRIPTION field isn't escaped correctly

    XMLWordPrintable

    Details

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

      Ubuntu 14.04 x64

      Description

      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)

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: