Hadoop Common
  1. Hadoop Common
  2. HADOOP-7610

/etc/profile.d does not exist on Debian


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s:, 0.23.0
    • Fix Version/s:, 0.23.0
    • Component/s: scripts
    • Labels:
    • Environment:

      Java 6, Debian

    • Hadoop Flags:


      As part of post installation script, there is a symlink created in /etc/profile.d/hadoop-env.sh to source /etc/hadoop/hadoop-env.sh. Therefore, users do not need to configure HADOOP_* environment. Unfortunately, /etc/profile.d only exists in Ubuntu. Section 9.9 of the Debian Policy states:

      A program must not depend on environment variables to get reasonable defaults. (That's because these environment variables would have to be set in a system-wide configuration file like /etc/profile, which is not supported by all shells.)

      If a program usually depends on environment variables for its configuration, the program should be changed to fall back to a reasonable default configuration if these environment variables are not present. If this cannot be done easily (e.g., if the source code of a non-free program is not available), the program must be replaced by a small "wrapper" shell script which sets the environment variables if they are not already defined, and calls the original program.

      Here is an example of a wrapper script for this purpose:

           export BAR
           exec /usr/lib/foo/foo "$@"

      Furthermore, as /etc/profile is a configuration file of the base-files package, other packages must not put any environment variables or other commands into that file.

      Hence the default environment setup should skip for Debian.

      1. HADOOP-7610-branch-0.20-security.patch
        0.9 kB
        Eric Yang
      2. HADOOP-7610.patch
        1 kB
        Eric Yang


        Matt Foley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Giridharan Kesavan made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Giridharan Kesavan made changes -
        Hadoop Flags [Reviewed]
        Eric Yang made changes -
        Attachment HADOOP-7610-branch-0.20-security.patch [ 12493190 ]
        Eric Yang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s [ 12316390 ]
        Fix Version/s 0.23.0 [ 12315569 ]
        Eric Yang made changes -
        Field Original Value New Value
        Attachment HADOOP-7610.patch [ 12493189 ]
        Eric Yang created issue -


          • Assignee:
            Eric Yang
            Eric Yang
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: