hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giridharan Kesavan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-7610) /etc/profile.d does not exist on Debian
Date Sat, 10 Sep 2011 01:11:09 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-7610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Giridharan Kesavan updated HADOOP-7610:

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

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

> /etc/profile.d does not exist on Debian
> ---------------------------------------
>                 Key: HADOOP-7610
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7610
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>    Affects Versions:, 0.23.0
>         Environment: Java 6, Debian
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>             Fix For:, 0.23.0
>         Attachments: HADOOP-7610-branch-0.20-security.patch, HADOOP-7610.patch
> 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|http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.9]
> {quote}
> 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
> Here is an example of a wrapper script for this purpose:
> {noformat}
>      #!/bin/sh
>      BAR=${BAR:-/var/lib/fubar}
>      export BAR
>      exec /usr/lib/foo/foo "$@"
> {noformat}
> 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.
> {quote}
> Hence the default environment setup should skip for Debian.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message