[jira] Created: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
-------------------------------------------------

                 Key: OFBIZ-1084
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
             Project: OFBiz
          Issue Type: Bug
    Affects Versions: Release Branch 4.0
         Environment: Fedora 5, Fedora 6.
            Reporter: Shi Yusen


The following line in $OFBIZ_HOME/rc.ofbiz:
if [ "$UID" = "0" ]; then

Is it should be
if [ "$UID" != "0" ]; then

BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.

Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527703 ]

Jacopo Cappellato commented on OFBIZ-1084:
------------------------------------------

Is there anyone interested in this patch and willing to use it / test it and review it? This would really help the committers.

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534543 ]

Jacques Le Roux commented on OFBIZ-1084:
----------------------------------------

Shi,

AFAIK SVN should be platform agnostic and I thought that even if you commit a *nix file from an other platform (Windows I guess) it should be rendered in the format you use when you check it out. Could you please confirm that I was wrong ?

Thanks

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534616 ]

Jonathon Wong commented on OFBIZ-1084:
--------------------------------------

Jacques,

Yes, I think SVN is platform-agnostic. The problem is that some people open a *nix file in Windows, but change it and then save it in Windows format (MS newlines). If this new file gets committed, it will enter SVN "as if", ie as a Windows-format file.

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534644 ]

David E. Jones commented on OFBIZ-1084:
---------------------------------------

Actually no, SVN is platform aware. If I check in a file with Unix line endings and you check it out on Windows the SVN client will convert it to Windows line endings. In other words, the line endings are normalized by SVN.

However, if I check out a file on my Mac with unix line endings and then copy it to my Windows box it will have a problem because it will still have unix line endings. On the other hand, if I use zip it up on a Mac (or Linux) and unzip it on Windows the zip program will change the line endings and take care of the problem...

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534656 ]

Jacques Le Roux commented on OFBIZ-1084:
----------------------------------------

Thanks for confirmation David :o)

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534711 ]

Christian Geisert commented on OFBIZ-1084:
------------------------------------------

Some info about the svn:eol-style property:
http://svnbook.red-bean.com/en/1.4/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style

If .sh files should *always* have Unix line endings (and i think they should - for example if the release will be built on windows) then the svn:eol-style should be set to LF.


Ok, back now to the original issue...

The part of the script is:

# If root is running this script, su to $OFBIZ_USER first
if [ "$UID" = "0" ]; then
    exec su - $OFBIZ_USER -c "$0 $1"
fi

So the script does exactly what the comment says and shouldn't be changed.

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux closed OFBIZ-1084.
----------------------------------

       Resolution: Invalid
    Fix Version/s: Release Branch 4.0
                   SVN trunk
         Assignee: Jacques Le Roux

Thanks Christian,

I commited changes on Linux specific files suiving your suggestion, trunk 584688  release 584689

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1084) if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535038 ]

Jonathon Wong commented on OFBIZ-1084:
--------------------------------------

> Actually no, SVN is platform aware.

Hmm. Then that will cause a problem. In CVS, there was an option to always store EOL markers in a standardized format (LF only). As per David's elaborations, there seems to be problems in the case where multiple SVN users use different OS (Windows and Unix).

> Some info about the svn:eol-style property:

Oh, then that does it. Note the following:

"Note that Subversion will actually store the file in the repository using normalized LF EOL markers regardless of the operating system. This is basically transparent to the user, though."

So there really is a canonical representation in the SVN repository. Then the above problem will not exist.

For Windows users who check out OFBiz on Windows boxes, simply do a dos2unix for all .sh files when deploying to Unix.

> if [ "$UID" = "0" ]; then in $OFBIZ_HOME/rc.ofbiz
> -------------------------------------------------
>
>                 Key: OFBIZ-1084
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1084
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 4.0
>         Environment: Fedora 5, Fedora 6.
>            Reporter: Shi Yusen
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> The following line in $OFBIZ_HOME/rc.ofbiz:
> if [ "$UID" = "0" ]; then
> Is it should be
> if [ "$UID" != "0" ]; then
> BTW, I have to run dos2unix for this file, I guess this is a *nix script, it would be better if it's in the right format in SVN.
> Shi Yusen/Beijing Langhua Ltd.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.