[jira] [Assigned] (KARAF-4835) Add content assist for paths in karaf shell source

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet reassigned KARAF-4835:
--

Assignee: Guillaume Nodet

> Add content assist for paths in karaf shell source
> --
>
> Key: KARAF-4835
> URL: https://issues.apache.org/jira/browse/KARAF-4835
> Project: Karaf
>  Issue Type: Task
>  Components: karaf-shell
>Affects Versions: 4.1.0, 4.0.8
>Reporter: Lijun Liao
>Assignee: Guillaume Nodet
> Fix For: 4.1.0, 4.0.8
>
>
> Add auto-completion of file path to the karaf command "source", like in 
> command "install". 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4181) blacklist.properties is not a properties file

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4181:

Fix Version/s: (was: 4.0.8)

> blacklist.properties is not a properties file
> -
>
> Key: KARAF-4181
> URL: https://issues.apache.org/jira/browse/KARAF-4181
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-profile
>Affects Versions: 4.0.3
>Reporter: Benson Margulies
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0
>
>
> It's confusing that a file named 'blacklist.properties' does not, in fact, 
> contain a properties file. Rather, it's just a list of blacklisted bundles. 
> It seems to me that the name 'blacklist.properties' might be deprecated and 
> the name 'bundle-blacklist.txt' would be more informative.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4181) blacklist.properties is not a properties file

2016-12-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/KARAF-4181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729436#comment-15729436
 ] 

Jean-Baptiste Onofré commented on KARAF-4181:
-

As it's a breaking change, I will do this in next major release.

> blacklist.properties is not a properties file
> -
>
> Key: KARAF-4181
> URL: https://issues.apache.org/jira/browse/KARAF-4181
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-profile
>Affects Versions: 4.0.3
>Reporter: Benson Margulies
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0
>
>
> It's confusing that a file named 'blacklist.properties' does not, in fact, 
> contain a properties file. Rather, it's just a list of blacklisted bundles. 
> It seems to me that the name 'blacklist.properties' might be deprecated and 
> the name 'bundle-blacklist.txt' would be more informative.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729384#comment-15729384
 ] 

ASF GitHub Bot commented on KARAF-4487:
---

Github user asfgit closed the pull request at:

https://github.com/apache/karaf/pull/254


> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8
>
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré reassigned KARAF-4487:
---

Assignee: Jean-Baptiste Onofré

> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8
>
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré resolved KARAF-4487.
-
Resolution: Fixed

> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8
>
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729391#comment-15729391
 ] 

ASF subversion and git services commented on KARAF-4487:


Commit 3ea2830ead794ea065dab39090c5a8cbea85fb07 in karaf's branch 
refs/heads/karaf-4.0.x from [~acartapanis]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=3ea2830 ]

[KARAF-4487] Add support for GSSAPI authentication.


> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8
>
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4487:

Fix Version/s: 4.0.8
   4.1.0

> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
> Fix For: 4.1.0, 4.0.8
>
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729381#comment-15729381
 ] 

ASF subversion and git services commented on KARAF-4487:


Commit 43d3aa6deb7bbe400622f6b5da082af098f90225 in karaf's branch 
refs/heads/master from [~acartapanis]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=43d3aa6 ]

[KARAF-4487] Add support for GSSAPI authentication.


> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4487) LDAPLoginModule and GSSAPI

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729382#comment-15729382
 ] 

ASF subversion and git services commented on KARAF-4487:


Commit e908c4a9b7a9eed347251e3c47250f0fa661f692 in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=e908c4a ]

[KARAF-4487] This closes #254


> LDAPLoginModule and GSSAPI
> --
>
> Key: KARAF-4487
> URL: https://issues.apache.org/jira/browse/KARAF-4487
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-security
>Affects Versions: 4.0.4
>Reporter: Alexandre Cartapanis
>
> LDAPLoginModule is restricted to "simple" or "none" authentication. A support 
> for other method like GSSAPI would be great.
> Note that it is a common enterprise context : access to LDAP directory is not 
> made with username/password but through an other realm (a kerberos one for 
> exemple)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (KARAF-4806) Some shell scripts include bashisms but use a /bin/sh shebang

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet resolved KARAF-4806.

   Resolution: Fixed
Fix Version/s: 3.0.8
   4.0.8
   4.1.0

> Some shell scripts include bashisms but use a /bin/sh shebang
> -
>
> Key: KARAF-4806
> URL: https://issues.apache.org/jira/browse/KARAF-4806
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 3.0.8, 4.0.7
>Reporter: Stephen Kitt
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8, 3.0.8
>
>
> The client, instance and shell scripts use ulimit and type, but these are 
> bashisms.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (KARAF-4815) karaf script fail to locate KARAF_HOME.

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet resolved KARAF-4815.

   Resolution: Fixed
 Assignee: Guillaume Nodet  (was: Jean-Baptiste Onofré)
Fix Version/s: 3.0.8
   4.0.8
   4.1.0

> karaf script fail to locate KARAF_HOME.
> ---
>
> Key: KARAF-4815
> URL: https://issues.apache.org/jira/browse/KARAF-4815
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 3.0.7
> Environment: Linux RedHat 2.6.32-573.18.1.el6.x86_64 #1 SMP Wed Jan 6 
> 11:20:49 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
>Reporter: Terrien Jean-Yves
>Assignee: Guillaume Nodet
> Fix For: 4.1.0, 4.0.8, 3.0.8
>
>
> karaf script fail to locate KARAF_HOME.
> on RedHat 
> REALNAME=`readlink -e "$0" > /dev/null 2>&1` return a blanc string
> and DIRNAME=`dirname "$REALNAME"` return a dot.
> on a side note, I suggest using $(shell comand) instead of `shell command`
> I've found a solution
> {code}
> #!/bin/sh
> #
> #Licensed to the Apache Software Foundation (ASF) under one or more
> #contributor license agreements.  See the NOTICE file distributed with
> #this work for additional information regarding copyright ownership.
> #The ASF licenses this file to You under the Apache License, Version 2.0
> #(the "License"); you may not use this file except in compliance with
> #the License.  You may obtain a copy of the License at
> #
> #   http://www.apache.org/licenses/LICENSE-2.0
> #
> #Unless required by applicable law or agreed to in writing, software
> #distributed under the License is distributed on an "AS IS" BASIS,
> #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> #See the License for the specific language governing permissions and
> #limitations under the License.
> #
> ## FIX PATH Problem
> REALNAME=$(readlink -e "$0") > /dev/null 2>&1
> if [ $? != 0 ]; then
> REALNAME=$0
> fi
> DIRNAME=$(dirname "$REALNAME")
> PROGNAME=$(basename "$REALNAME")
> #
> # Sourcing environment settings for karaf similar to tomcats setenv
> #
> KARAF_SCRIPT="karaf"
> export KARAF_SCRIPT
> if [ -f "$DIRNAME/setenv" ]; then
>   . "$DIRNAME/setenv"
> fi
> #
> # Set up some easily accessible MIN/MAX params for JVM mem usage
> #
> if [ "x$JAVA_MIN_MEM" = "x" ]; then
> JAVA_MIN_MEM=128M
> export JAVA_MIN_MEM
> fi
> if [ "x$JAVA_MAX_MEM" = "x" ]; then
> JAVA_MAX_MEM=512M
> export JAVA_MAX_MEM
> fi
> #
> # Check the mode that initiated the script
> #
> if [ "x$1" != "x" ]; then
> MODE=$1
> fi
> warn() {
> echo "${PROGNAME}: $*"
> }
> die() {
> warn "$*"
> exit 1
> }
> detectOS() {
> # OS specific support (must be 'true' or 'false').
> cygwin=false;
> darwin=false;
> aix=false;
> os400=false;
> case "$(uname)" in
> CYGWIN*)
> cygwin=true
> ;;
> Darwin*)
> darwin=true
> ;;
> AIX*)
> aix=true
> ;;
> OS400*)
> os400=true
> ;;
> esac
> # For AIX, set an environment variable
> if $aix; then
>  export LDR_CNTRL=MAXDATA=0xB000@DSA
>  echo $LDR_CNTRL
> fi
> }
> unlimitFD() {
> # Use the maximum available, or set MAX_FD != -1 to use that
> if [ "x$MAX_FD" = "x" ]; then
> MAX_FD="maximum"
> fi
> # Increase the maximum file descriptors if we can
> if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
> if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
> MAX_FD_LIMIT=$(ulimit -H -n)
> if [ $? -eq 0 ]; then
> # use the system max
> MAX_FD="$MAX_FD_LIMIT"
> else
> warn "Could not query system maximum file descriptor limit: 
> $MAX_FD_LIMIT"
> fi
> fi
> if [ "$MAX_FD" != 'unlimited' ]; then
> ulimit -n $MAX_FD > /dev/null
> if [ $? -ne 0 ]; then
> warn "Could not set maximum file descriptor limit: $MAX_FD"
> fi
> fi
>  fi
> }
> locateHome() {
> if [ "x$KARAF_HOME" = "x" ]; then
>   # In POSIX shells, CDPATH may cause cd to write to stdout
>   (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
>   KARAF_HOME=$(cd "$DIRNAME/.."; pwd)
> fi
> if [ ! -d "$KARAF_HOME" ]; then
> die "KARAF_HOME is not valid: $KARAF_HOME"
> fi
> }
> locateBase() {
> if [ "x$KARAF_BASE" != "x" ]; then
> if [ ! -d "$KARAF_BASE" ]; then
> die "KARAF_BASE is not valid: $KARAF_BASE"
> fi
> else
> KARAF_BASE=$KARAF_HOME
> fi
> }
> locateData() {
> if [ "x$KARAF_DATA" != "x" ]; then
> if [ ! -d 

[jira] [Resolved] (KARAF-4564) Can't start karaf using symbolic link

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet resolved KARAF-4564.

Resolution: Fixed
  Assignee: Guillaume Nodet  (was: Jean-Baptiste Onofré)

>  Can't start karaf using symbolic link
> --
>
> Key: KARAF-4564
> URL: https://issues.apache.org/jira/browse/KARAF-4564
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 3.0.6
> Environment: Ubuntu (Linux vagrant 3.19.0-25-generic 
> #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 
> GNU/Linux)
> OSX (Darwin inocybe.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 
> 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64)
> Solaris (SunOS solaris11.3 5.11 11.3 i86pc i386 i86pc)
>Reporter: Alexis de Talhouët
>Assignee: Guillaume Nodet
> Fix For: 4.1.0, 4.0.8, 3.0.7
>
>
> When using a symbolic link to use the scripts defined here: 
> https://github.com/apache/karaf/tree/karaf-3.0.6/assemblies/features/framework/src/main/filtered-resources/resources/bin
>  e.g. karaf or client and so on, it's failing to start the container and show 
> this error:
> Error: Could not find or load main class org.apache.karaf.main.Main
> This issue is related to the DIRNAME variable and the way it is setup.
> This bug has been found in OpenDaylight, here is the ticket with more 
> information https://bugs.opendaylight.org/show_bug.cgi?id=6027
> I have also propose a candidate fix in ODL: 
> https://git.opendaylight.org/gerrit/#/c/39982/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (KARAF-4865) Karaf startup no longer works on platforms without "readlink"

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet resolved KARAF-4865.

   Resolution: Fixed
 Assignee: Guillaume Nodet  (was: Jean-Baptiste Onofré)
Fix Version/s: 3.0.8

> Karaf startup no longer works on platforms without "readlink"
> -
>
> Key: KARAF-4865
> URL: https://issues.apache.org/jira/browse/KARAF-4865
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-core
>Reporter: Fabian Lange
>Assignee: Guillaume Nodet
> Fix For: 4.1.0, 4.0.8, 3.0.8
>
>
> With KARAF-4564 we used "readlink" to resolve some symlink issues. but this 
> broke karaf now for platforms which do not support "readlink". we should make 
> it optional.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4865) Karaf startup no longer works on platforms without "readlink"

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729007#comment-15729007
 ] 

ASF subversion and git services commented on KARAF-4865:


Commit 299b6fbb7d33d7a901323f6928154738ad285490 in karaf's branch 
refs/heads/karaf-3.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=299b6fb ]

[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link


> Karaf startup no longer works on platforms without "readlink"
> -
>
> Key: KARAF-4865
> URL: https://issues.apache.org/jira/browse/KARAF-4865
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-core
>Reporter: Fabian Lange
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 3.0.8, 4.0.8
>
>
> With KARAF-4564 we used "readlink" to resolve some symlink issues. but this 
> broke karaf now for platforms which do not support "readlink". we should make 
> it optional.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4812) Upgrade to Felix ConfigAdmin 1.8.12

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729006#comment-15729006
 ] 

ASF subversion and git services commented on KARAF-4812:


Commit fa8de135cc303de8aaa4b3ed762d4c2c8f64b49f in karaf's branch 
refs/heads/karaf-3.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=fa8de13 ]

[KARAF-4812] Upgrade to Felix ConfigAdmin 1.8.12


> Upgrade to Felix ConfigAdmin 1.8.12
> ---
>
> Key: KARAF-4812
> URL: https://issues.apache.org/jira/browse/KARAF-4812
> Project: Karaf
>  Issue Type: Dependency upgrade
>Reporter: Guillaume Nodet
>Assignee: Guillaume Nodet
> Fix For: 4.1.0, 4.0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4564) Can't start karaf using symbolic link

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729008#comment-15729008
 ] 

ASF subversion and git services commented on KARAF-4564:


Commit 299b6fbb7d33d7a901323f6928154738ad285490 in karaf's branch 
refs/heads/karaf-3.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=299b6fb ]

[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link


>  Can't start karaf using symbolic link
> --
>
> Key: KARAF-4564
> URL: https://issues.apache.org/jira/browse/KARAF-4564
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 3.0.6
> Environment: Ubuntu (Linux vagrant 3.19.0-25-generic 
> #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 
> GNU/Linux)
> OSX (Darwin inocybe.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 
> 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64)
> Solaris (SunOS solaris11.3 5.11 11.3 i86pc i386 i86pc)
>Reporter: Alexis de Talhouët
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 3.0.7, 4.0.8
>
>
> When using a symbolic link to use the scripts defined here: 
> https://github.com/apache/karaf/tree/karaf-3.0.6/assemblies/features/framework/src/main/filtered-resources/resources/bin
>  e.g. karaf or client and so on, it's failing to start the container and show 
> this error:
> Error: Could not find or load main class org.apache.karaf.main.Main
> This issue is related to the DIRNAME variable and the way it is setup.
> This bug has been found in OpenDaylight, here is the ticket with more 
> information https://bugs.opendaylight.org/show_bug.cgi?id=6027
> I have also propose a candidate fix in ODL: 
> https://git.opendaylight.org/gerrit/#/c/39982/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4865) Karaf startup no longer works on platforms without "readlink"

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729002#comment-15729002
 ] 

ASF subversion and git services commented on KARAF-4865:


Commit 74cc547782989d8b5de82cf8a5db85e3c55149fb in karaf's branch 
refs/heads/karaf-4.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=74cc547 ]

[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link


> Karaf startup no longer works on platforms without "readlink"
> -
>
> Key: KARAF-4865
> URL: https://issues.apache.org/jira/browse/KARAF-4865
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-core
>Reporter: Fabian Lange
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8
>
>
> With KARAF-4564 we used "readlink" to resolve some symlink issues. but this 
> broke karaf now for platforms which do not support "readlink". we should make 
> it optional.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4564) Can't start karaf using symbolic link

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729003#comment-15729003
 ] 

ASF subversion and git services commented on KARAF-4564:


Commit 74cc547782989d8b5de82cf8a5db85e3c55149fb in karaf's branch 
refs/heads/karaf-4.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=74cc547 ]

[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link


>  Can't start karaf using symbolic link
> --
>
> Key: KARAF-4564
> URL: https://issues.apache.org/jira/browse/KARAF-4564
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 3.0.6
> Environment: Ubuntu (Linux vagrant 3.19.0-25-generic 
> #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 
> GNU/Linux)
> OSX (Darwin inocybe.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 
> 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64)
> Solaris (SunOS solaris11.3 5.11 11.3 i86pc i386 i86pc)
>Reporter: Alexis de Talhouët
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 3.0.7, 4.0.8
>
>
> When using a symbolic link to use the scripts defined here: 
> https://github.com/apache/karaf/tree/karaf-3.0.6/assemblies/features/framework/src/main/filtered-resources/resources/bin
>  e.g. karaf or client and so on, it's failing to start the container and show 
> this error:
> Error: Could not find or load main class org.apache.karaf.main.Main
> This issue is related to the DIRNAME variable and the way it is setup.
> This bug has been found in OpenDaylight, here is the ticket with more 
> information https://bugs.opendaylight.org/show_bug.cgi?id=6027
> I have also propose a candidate fix in ODL: 
> https://git.opendaylight.org/gerrit/#/c/39982/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4564) Can't start karaf using symbolic link

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728987#comment-15728987
 ] 

ASF subversion and git services commented on KARAF-4564:


Commit 2af48c557bd6bafb44ae2935e90212c36c416ac2 in karaf's branch 
refs/heads/karaf-4.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=2af48c5 ]

[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link

>  Can't start karaf using symbolic link
> --
>
> Key: KARAF-4564
> URL: https://issues.apache.org/jira/browse/KARAF-4564
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 3.0.6
> Environment: Ubuntu (Linux vagrant 3.19.0-25-generic 
> #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 
> GNU/Linux)
> OSX (Darwin inocybe.local 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 
> 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64)
> Solaris (SunOS solaris11.3 5.11 11.3 i86pc i386 i86pc)
>Reporter: Alexis de Talhouët
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 3.0.7, 4.0.8
>
>
> When using a symbolic link to use the scripts defined here: 
> https://github.com/apache/karaf/tree/karaf-3.0.6/assemblies/features/framework/src/main/filtered-resources/resources/bin
>  e.g. karaf or client and so on, it's failing to start the container and show 
> this error:
> Error: Could not find or load main class org.apache.karaf.main.Main
> This issue is related to the DIRNAME variable and the way it is setup.
> This bug has been found in OpenDaylight, here is the ticket with more 
> information https://bugs.opendaylight.org/show_bug.cgi?id=6027
> I have also propose a candidate fix in ODL: 
> https://git.opendaylight.org/gerrit/#/c/39982/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4865) Karaf startup no longer works on platforms without "readlink"

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728986#comment-15728986
 ] 

ASF subversion and git services commented on KARAF-4865:


Commit 2af48c557bd6bafb44ae2935e90212c36c416ac2 in karaf's branch 
refs/heads/karaf-4.0.x from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=2af48c5 ]

[KARAF-4865] Karaf startup no longer works on platforms without "readlink"
[KARAF-4564] Can't start karaf using symbolic link

> Karaf startup no longer works on platforms without "readlink"
> -
>
> Key: KARAF-4865
> URL: https://issues.apache.org/jira/browse/KARAF-4865
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-core
>Reporter: Fabian Lange
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.0, 4.0.8
>
>
> With KARAF-4564 we used "readlink" to resolve some symlink issues. but this 
> broke karaf now for platforms which do not support "readlink". we should make 
> it optional.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4852) Minor issues with start script

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet updated KARAF-4852:
---
Fix Version/s: (was: 4.0.8)

> Minor issues with start script
> --
>
> Key: KARAF-4852
> URL: https://issues.apache.org/jira/browse/KARAF-4852
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0
>
>
> If a cd command fails in the start script the following behavior is undefined 
> and could potentially cause problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4852) Minor issues with start script

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728945#comment-15728945
 ] 

ASF subversion and git services commented on KARAF-4852:


Commit d7a2185a7c73a06dbe1dfd58528bf854d264f496 in karaf's branch 
refs/heads/master from [~gnt]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=d7a2185 ]

[KARAF-4852] Improve unix shell scripts

> Minor issues with start script
> --
>
> Key: KARAF-4852
> URL: https://issues.apache.org/jira/browse/KARAF-4852
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> If a cd command fails in the start script the following behavior is undefined 
> and could potentially cause problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (KARAF-4852) Minor issues with start script

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré resolved KARAF-4852.
-
Resolution: Fixed

> Minor issues with start script
> --
>
> Key: KARAF-4852
> URL: https://issues.apache.org/jira/browse/KARAF-4852
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> If a cd command fails in the start script the following behavior is undefined 
> and could potentially cause problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4852) Minor issues with start script

2016-12-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728844#comment-15728844
 ] 

ASF GitHub Bot commented on KARAF-4852:
---

Github user asfgit closed the pull request at:

https://github.com/apache/karaf/pull/269


> Minor issues with start script
> --
>
> Key: KARAF-4852
> URL: https://issues.apache.org/jira/browse/KARAF-4852
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> If a cd command fails in the start script the following behavior is undefined 
> and could potentially cause problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4852) Minor issues with start script

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728843#comment-15728843
 ] 

ASF subversion and git services commented on KARAF-4852:


Commit ba9e04bdd2e044d3d4bdd4f93fbb5129636086b0 in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=ba9e04b ]

[KARAF-4852] This closes #269


> Minor issues with start script
> --
>
> Key: KARAF-4852
> URL: https://issues.apache.org/jira/browse/KARAF-4852
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> If a cd command fails in the start script the following behavior is undefined 
> and could potentially cause problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4853:

Component/s: karaf-core

> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré resolved KARAF-4853.
-
Resolution: Fixed

> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728759#comment-15728759
 ] 

ASF subversion and git services commented on KARAF-4853:


Commit f6d9c8bded23d30890aeff77d8c1a8c56d227a5d in karaf's branch 
refs/heads/karaf-4.0.x from [~lkiesow]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=f6d9c8b ]

[KARAF-4853] Option to prevent execution as root in karaf script

Usually, it is not a good idea to run Karaf as root. In some cases, it
might even be harmful. This patch introduces the option `KARAF_NOROOT`
which, if set, will prevent Karaf from being executed as root.

Signed-off-by: Lars Kiesow 


> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728757#comment-15728757
 ] 

ASF GitHub Bot commented on KARAF-4853:
---

Github user asfgit closed the pull request at:

https://github.com/apache/karaf/pull/270


> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728756#comment-15728756
 ] 

ASF subversion and git services commented on KARAF-4853:


Commit 5fab953da350aaadef468b71c55992d09f9a39f3 in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=5fab953 ]

[KARAF-4853] This closes #270


> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728755#comment-15728755
 ] 

ASF subversion and git services commented on KARAF-4853:


Commit b6a6ae5e1c7130c52d21dfdad65dd2ffa7107204 in karaf's branch 
refs/heads/master from [~lkiesow]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=b6a6ae5 ]

[KARAF-4853] Option to prevent execution as root in karaf script

Usually, it is not a good idea to run Karaf as root. In some cases, it
might even be harmful. This patch introduces the option `KARAF_NOROOT`
which, if set, will prevent Karaf from being executed as root.

Signed-off-by: Lars Kiesow 


> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4815) karaf script fail to locate KARAF_HOME.

2016-12-07 Thread Guillaume Nodet (JIRA)

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

Guillaume Nodet updated KARAF-4815:
---
Description: 
karaf script fail to locate KARAF_HOME.
on RedHat 
REALNAME=`readlink -e "$0" > /dev/null 2>&1` return a blanc string
and DIRNAME=`dirname "$REALNAME"` return a dot.

on a side note, I suggest using $(shell comand) instead of `shell command`
I've found a solution
{code}
#!/bin/sh
#
#Licensed to the Apache Software Foundation (ASF) under one or more
#contributor license agreements.  See the NOTICE file distributed with
#this work for additional information regarding copyright ownership.
#The ASF licenses this file to You under the Apache License, Version 2.0
#(the "License"); you may not use this file except in compliance with
#the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
#

## FIX PATH Problem
REALNAME=$(readlink -e "$0") > /dev/null 2>&1
if [ $? != 0 ]; then
REALNAME=$0
fi
DIRNAME=$(dirname "$REALNAME")
PROGNAME=$(basename "$REALNAME")

#
# Sourcing environment settings for karaf similar to tomcats setenv
#
KARAF_SCRIPT="karaf"
export KARAF_SCRIPT
if [ -f "$DIRNAME/setenv" ]; then
  . "$DIRNAME/setenv"
fi

#
# Set up some easily accessible MIN/MAX params for JVM mem usage
#
if [ "x$JAVA_MIN_MEM" = "x" ]; then
JAVA_MIN_MEM=128M
export JAVA_MIN_MEM
fi
if [ "x$JAVA_MAX_MEM" = "x" ]; then
JAVA_MAX_MEM=512M
export JAVA_MAX_MEM
fi

#
# Check the mode that initiated the script
#
if [ "x$1" != "x" ]; then
MODE=$1
fi

warn() {
echo "${PROGNAME}: $*"
}

die() {
warn "$*"
exit 1
}

detectOS() {
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
aix=false;
os400=false;
case "$(uname)" in
CYGWIN*)
cygwin=true
;;
Darwin*)
darwin=true
;;
AIX*)
aix=true
;;
OS400*)
os400=true
;;
esac
# For AIX, set an environment variable
if $aix; then
 export LDR_CNTRL=MAXDATA=0xB000@DSA
 echo $LDR_CNTRL
fi
}

unlimitFD() {
# Use the maximum available, or set MAX_FD != -1 to use that
if [ "x$MAX_FD" = "x" ]; then
MAX_FD="maximum"
fi

# Increase the maximum file descriptors if we can
if [ "$os400" = "false" ] && [ "$cygwin" = "false" ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
MAX_FD_LIMIT=$(ulimit -H -n)
if [ $? -eq 0 ]; then
# use the system max
MAX_FD="$MAX_FD_LIMIT"
else
warn "Could not query system maximum file descriptor limit: 
$MAX_FD_LIMIT"
fi
fi
if [ "$MAX_FD" != 'unlimited' ]; then
ulimit -n $MAX_FD > /dev/null
if [ $? -ne 0 ]; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
fi
 fi
}

locateHome() {
if [ "x$KARAF_HOME" = "x" ]; then
  # In POSIX shells, CDPATH may cause cd to write to stdout
  (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  KARAF_HOME=$(cd "$DIRNAME/.."; pwd)
fi

if [ ! -d "$KARAF_HOME" ]; then
die "KARAF_HOME is not valid: $KARAF_HOME"
fi
}

locateBase() {
if [ "x$KARAF_BASE" != "x" ]; then
if [ ! -d "$KARAF_BASE" ]; then
die "KARAF_BASE is not valid: $KARAF_BASE"
fi
else
KARAF_BASE=$KARAF_HOME
fi
}

locateData() {
if [ "x$KARAF_DATA" != "x" ]; then
if [ ! -d "$KARAF_DATA" ]; then
die "KARAF_DATA is not valid: $KARAF_DATA"
fi
else
KARAF_DATA=$KARAF_BASE/data
fi
}

locateEtc() {
if [ "x$KARAF_ETC" != "x" ]; then
if [ ! -d "$KARAF_ETC" ]; then
die "KARAF_ETC is not valid: $KARAF_ETC"
fi
else
KARAF_ETC=$KARAF_BASE/etc
fi
}

setupNativePath() {
# Support for loading native libraries
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$KARAF_BASE/lib:$KARAF_HOME/lib"

# For Cygwin, set PATH from LD_LIBRARY_PATH
if $cygwin; then
LD_LIBRARY_PATH=$(cygpath --path --windows "$LD_LIBRARY_PATH")
PATH="$PATH;$LD_LIBRARY_PATH"
export PATH
fi
export LD_LIBRARY_PATH
}

pathCanonical() {
dst="${1}"
while [ -h "${dst}" ] ; do
ls=$(ls -ld "${dst}")
link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '/.*' > /dev/null; then
dst="$link"
else
   

[jira] [Work started] (KARAF-4853) Option to prevent execution as root

2016-12-07 Thread JIRA

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

Work on KARAF-4853 started by Jean-Baptiste Onofré.
---
> Option to prevent execution as root
> ---
>
> Key: KARAF-4853
> URL: https://issues.apache.org/jira/browse/KARAF-4853
> Project: Karaf
>  Issue Type: Improvement
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> Usually, it is not a good idea to run Karaf as root. In some cases, it might 
> even be harmful. Hence, it would be nice to introduce an option line 
> KARAF_NOROOT which, if set, will prevent Karaf from being executed as root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4784) OsgiConfiguration for JAAS should fallback to default configuration

2016-12-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728355#comment-15728355
 ] 

ASF GitHub Bot commented on KARAF-4784:
---

Github user asfgit closed the pull request at:

https://github.com/apache/karaf/pull/271


> OsgiConfiguration for JAAS should fallback to default configuration
> ---
>
> Key: KARAF-4784
> URL: https://issues.apache.org/jira/browse/KARAF-4784
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-security
>Affects Versions: 4.0.7
>Reporter: Benjamin Papez
>Assignee: Guillaume Nodet
> Fix For: 4.1.0
>
>
> We will use Karaf embedded in the next version of our Web Application, which 
> means that we still first start the application server 
> (Tomcat/JBoss/Websphere) and then Karaf is started inside. Some of our 
> customers are using a JAAS configuration, mainly Kerberos for SPNEGO. 
> Unfortunately with the step to use Karaf the current default JAAS 
> configuration is no longer picked up and used, because Karaf is setting the 
> {{org.apache.karaf.jaas.config.impl.OsgiConfiguration}} object into 
> {{javax.security.auth.login.Configuration.setConfiguration}} within the 
> {{OsgiConfiguration.init}} method.
> This way all standard/app-server specific ways of JAAS configuration are 
> ignored.
> I would propose a modification to {{OsgiConfiguration}}, with something like:
> {code}
> private Configuration defaultConfiguration;
> public void init() {
> try {
> defaultConfiguration = Configuration.getConfiguration();
> } catch (RuntimeException ex) {
> // default configuration for fallback could not be retrieved - 
> should be logged
> }
> Configuration.setConfiguration(this);
> }
> ...
> public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
> JaasRealm realm = null;
> for (JaasRealm r : realms) {
> if (r.getName().equals(name)) {
> if (realm == null || r.getRank() > realm.getRank()) {
> realm = r;
> }
> }
> }
> if (realm != null) {
> return realm.getEntries();
> } else if (defaultConfiguration != null) {
>return defaultConfiguration.getAppConfigurationEntry(name);
> }
> return null;
> }
> public void refresh() {
> if (defaultConfiguration != null) {
> defaultConfiguration.refresh();
> }
> }
> {code}
> This way if no OSGI configured JAAS realm can find an 
> {{AppConfigurationEntry}}, we would still try to get it from the default JAAS 
> configuration, and our customers could keep the same JAAS configuration as 
> before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4784) OsgiConfiguration for JAAS should fallback to default configuration

2016-12-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728354#comment-15728354
 ] 

ASF subversion and git services commented on KARAF-4784:


Commit 333feab0e2cefcf845f7499ccbd87ff90ac4235b in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=333feab ]

[KARAF-4784] This closes #271


> OsgiConfiguration for JAAS should fallback to default configuration
> ---
>
> Key: KARAF-4784
> URL: https://issues.apache.org/jira/browse/KARAF-4784
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-security
>Affects Versions: 4.0.7
>Reporter: Benjamin Papez
>Assignee: Guillaume Nodet
> Fix For: 4.1.0
>
>
> We will use Karaf embedded in the next version of our Web Application, which 
> means that we still first start the application server 
> (Tomcat/JBoss/Websphere) and then Karaf is started inside. Some of our 
> customers are using a JAAS configuration, mainly Kerberos for SPNEGO. 
> Unfortunately with the step to use Karaf the current default JAAS 
> configuration is no longer picked up and used, because Karaf is setting the 
> {{org.apache.karaf.jaas.config.impl.OsgiConfiguration}} object into 
> {{javax.security.auth.login.Configuration.setConfiguration}} within the 
> {{OsgiConfiguration.init}} method.
> This way all standard/app-server specific ways of JAAS configuration are 
> ignored.
> I would propose a modification to {{OsgiConfiguration}}, with something like:
> {code}
> private Configuration defaultConfiguration;
> public void init() {
> try {
> defaultConfiguration = Configuration.getConfiguration();
> } catch (RuntimeException ex) {
> // default configuration for fallback could not be retrieved - 
> should be logged
> }
> Configuration.setConfiguration(this);
> }
> ...
> public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
> JaasRealm realm = null;
> for (JaasRealm r : realms) {
> if (r.getName().equals(name)) {
> if (realm == null || r.getRank() > realm.getRank()) {
> realm = r;
> }
> }
> }
> if (realm != null) {
> return realm.getEntries();
> } else if (defaultConfiguration != null) {
>return defaultConfiguration.getAppConfigurationEntry(name);
> }
> return null;
> }
> public void refresh() {
> if (defaultConfiguration != null) {
> defaultConfiguration.refresh();
> }
> }
> {code}
> This way if no OSGI configured JAAS realm can find an 
> {{AppConfigurationEntry}}, we would still try to get it from the default JAAS 
> configuration, and our customers could keep the same JAAS configuration as 
> before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (KARAF-4880) Can't use Client from a script when passwords are encrypted

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré reassigned KARAF-4880:
---

Assignee: Jean-Baptiste Onofré

> Can't use Client from a script when passwords are encrypted
> ---
>
> Key: KARAF-4880
> URL: https://issues.apache.org/jira/browse/KARAF-4880
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Paul McCulloch
>Assignee: Jean-Baptiste Onofré
>
> Without the old -p option there is no straightforward way to use the client 
> to connect to a karaf using encrypted password authentication.
> With clear text passwords client reads the passwords from users.properties.
> My use case is an (izpack) installer which uses the client to add features & 
> apply configurations. The installer prompts the user for admin account 
> details & should pass these to the client. 
> Using SSH keys is problematic I believe. I would need the user (or the 
> installer) to keep a copy of the key generated on initial installation for 
> use in subsequent upgrades.
> My installer is cross platform, so relying on open SSH etc. as a workaround 
> is problematic.
> The -p option was removed from client as part of KARAF-1475 
> (https://github.com/apache/karaf/commit/d6838dd5a12a13b99c534981273abdbbee5b7f22)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (KARAF-4881) Deleting the only user from a group deletes the group in users.properties

2016-12-07 Thread JIRA

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

Jean-Baptiste Onofré reassigned KARAF-4881:
---

Assignee: Jean-Baptiste Onofré

> Deleting the only user from a group deletes the group in users.properties
> -
>
> Key: KARAF-4881
> URL: https://issues.apache.org/jira/browse/KARAF-4881
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-security
>Affects Versions: 4.0.7
>Reporter: Paul McCulloch
>Assignee: Jean-Baptiste Onofré
>
> In a fresh Karaf issue:
> >jaas:realm-manage --realm karaf --module 
> >org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
> >jaas:user-delete karaf
> >jaas:update
> users.properties is now essentially empty & the group definition for 
> admingroup is gone. 
> My use case is setting the karaf user password by deleting and re-adding the 
> karaf user.
> The workaround is to add a temporary user to the admin group before deleting 
> the karaf user.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4852) Minor issues with start script

2016-12-07 Thread Guillaume Nodet (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728151#comment-15728151
 ] 

Guillaume Nodet commented on KARAF-4852:


There are some platforms where bash is not installed.  I think the scripts 
should work on those too.
For the ulimit case, it should be conditioned by the $(command -v ulimit), but 
I'll double check with {{ShellCheck}}.

> Minor issues with start script
> --
>
> Key: KARAF-4852
> URL: https://issues.apache.org/jira/browse/KARAF-4852
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.7
>Reporter: Lars Kiesow
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.1.0, 4.0.8
>
>
> If a cd command fails in the start script the following behavior is undefined 
> and could potentially cause problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)