Hadoop Common
  1. Hadoop Common
  2. HADOOP-7610

/etc/profile.d does not exist on Debian

    Details

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

      Java 6, Debian

    • Hadoop Flags:
      Reviewed

      Description

      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:

           #!/bin/sh
           BAR=${BAR:-/var/lib/fubar}
           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.patch
        1 kB
        Eric Yang
      2. HADOOP-7610-branch-0.20-security.patch
        0.9 kB
        Eric Yang

        Activity

        Hide
        Eric Yang added a comment -

        Detect /etc/profile.d prior to making hadoop-env.sh as part of default environment.

        Show
        Eric Yang added a comment - Detect /etc/profile.d prior to making hadoop-env.sh as part of default environment.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12493190/HADOOP-7610-branch-0.20-security.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/141//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12493190/HADOOP-7610-branch-0.20-security.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/141//console This message is automatically generated.
        Hide
        Giridharan Kesavan added a comment -

        +1 looks good

        Show
        Giridharan Kesavan added a comment - +1 looks good
        Hide
        Giridharan Kesavan added a comment -

        Thanks Eric, I just committed this patch to trunk and 20-security branch

        Show
        Giridharan Kesavan added a comment - Thanks Eric, I just committed this patch to trunk and 20-security branch
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #876 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/876/)
        HADOOP-7610. Fix for hadoop debian package. Contributed by Eric Yang

        gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #876 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/876/ ) HADOOP-7610 . Fix for hadoop debian package. Contributed by Eric Yang gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #942 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/942/)
        HADOOP-7610. Fix for hadoop debian package. Contributed by Eric Yang

        gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #942 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/942/ ) HADOOP-7610 . Fix for hadoop debian package. Contributed by Eric Yang gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #865 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/865/)
        HADOOP-7610. Fix for hadoop debian package. Contributed by Eric Yang

        gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #865 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/865/ ) HADOOP-7610 . Fix for hadoop debian package. Contributed by Eric Yang gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #789 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/789/)
        HADOOP-7610. Fix for hadoop debian package. Contributed by Eric Yang

        gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #789 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/789/ ) HADOOP-7610 . Fix for hadoop debian package. Contributed by Eric Yang gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #813 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/813/)
        HADOOP-7610. Fix for hadoop debian package. Contributed by Eric Yang

        gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #813 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/813/ ) HADOOP-7610 . Fix for hadoop debian package. Contributed by Eric Yang gkesavan : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1167428 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/packages/update-hadoop-env.sh
        Hide
        Matt Foley added a comment -

        Closed upon release of 0.20.205.0

        Show
        Matt Foley added a comment - Closed upon release of 0.20.205.0

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development