You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by alrick87 <gi...@git.apache.org> on 2016/04/12 14:01:54 UTC

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

GitHub user alrick87 opened a pull request:

    https://github.com/apache/brooklyn-dist/pull/33

    Fix deb package java dependencies

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alrick87/brooklyn-dist fix_deb_java_dependencies

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-dist/pull/33.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #33
    
----
commit bf354e4f2bada30bf80e534600299d950c448473
Author: alrick87 <so...@gmail.com>
Date:   2016-04-12T12:00:38Z

    Fix deb package java dependencies

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208922028
  
    Also observe the following deploying on `15.10`, suspect the same on xenial.
    
    Which distros did you test the change on?
    ```
    sudo gdebi apache-brooklyn_0.10.0-SNAPSHOT_all.deb
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Reading state information... Done
    Requires the installation of the following packages: ca-certificates-java default-jre-headless java-common libasyncns0 libflac8 libogg0 libpcsclite1 libpulse0 libsctp1 libsndfile1 libvorbis0a libvorbisenc2 lksctp-tools openjdk-7-jre-headless tzdata-java
    
    Apache Brooklyn is a framework for modeling, monitoring, and managing applications through autonomic blueprints.
    Do you want to install the software package? [y/N]:y
    Get:1 http://archive.ubuntu.com/ubuntu/ wily/main libasyncns0 amd64 0.8-5build1 [12.3 kB]
    Get:2 http://archive.ubuntu.com/ubuntu/ wily/main libogg0 amd64 1.3.2-1 [17.2 kB]
    Get:3 http://archive.ubuntu.com/ubuntu/ wily/main libsctp1 amd64 1.0.16+dfsg-2 [8414 B]
    Get:4 http://archive.ubuntu.com/ubuntu/ wily/main libvorbis0a amd64 1.3.4-2 [87.3 kB]
    Get:5 http://archive.ubuntu.com/ubuntu/ wily/main libvorbisenc2 amd64 1.3.4-2 [70.4 kB]
    Get:6 http://archive.ubuntu.com/ubuntu/ wily/main java-common all 0.52 [131 kB]
    Get:7 http://archive.ubuntu.com/ubuntu/ wily/main default-jre-headless amd64 2:1.7-52 [4086 B]
    Get:8 http://archive.ubuntu.com/ubuntu/ wily/main ca-certificates-java all 20140324 [12.3 kB]
    Get:9 http://archive.ubuntu.com/ubuntu/ wily/main tzdata-java all 2015g-1 [69.1 kB]
    Get:10 http://archive.ubuntu.com/ubuntu/ wily/main libpcsclite1 amd64 1.8.14-1ubuntu1 [21.4 kB]
    Get:11 http://archive.ubuntu.com/ubuntu/ wily/main libflac8 amd64 1.3.1-4 [210 kB]
    Get:12 http://archive.ubuntu.com/ubuntu/ wily-updates/main libsndfile1 amd64 1.0.25-9.1ubuntu0.15.10.1 [138 kB]
    Get:13 http://archive.ubuntu.com/ubuntu/ wily/main libpulse0 amd64 1:6.0-0ubuntu13 [243 kB]
    Err http://archive.ubuntu.com/ubuntu/ wily-updates/main openjdk-7-jre-headless amd64 7u95-2.6.4-0ubuntu0.15.10.1
      404  Not Found
    Get:14 http://archive.ubuntu.com/ubuntu/ wily/main lksctp-tools amd64 1.0.16+dfsg-2 [41.9 kB]
    Err http://security.ubuntu.com/ubuntu/ wily-security/main openjdk-7-jre-headless amd64 7u95-2.6.4-0ubuntu0.15.10.1
      404  Not Found
    Fetched 1067 kB in 0s (0 B/s)
    Error during install: 'Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-7/openjdk-7-jre-headless_7u95-2.6.4-0ubuntu0.15.10.1_amd64.deb 404  Not Found
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208892962
  
    @alrick87 I don't think its that simple, if you look at what mysql does for example they actually check if any owned files still exist on the system before purging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#discussion_r59369022
  
    --- Diff: deb-packaging/src/deb/control/postrm ---
    @@ -15,4 +15,6 @@
     # KIND, either express or implied.  See the License for the
     # specific language governing permissions and limitations
     # under the License.
    -/usr/sbin/userdel brooklyn
    +if /usr/bin/getent passwd brooklyn; then
    +    /usr/sbin/userdel brooklyn
    --- End diff --
    
    Do we really want to purge the user? Looking at postgresql and mysql they don't appear to delete the users when you remove/purge.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#discussion_r59369834
  
    --- Diff: deb-packaging/src/deb/control/postrm ---
    @@ -15,4 +15,6 @@
     # KIND, either express or implied.  See the License for the
     # specific language governing permissions and limitations
     # under the License.
    -/usr/sbin/userdel brooklyn
    +if /usr/bin/getent passwd brooklyn; then
    +    /usr/sbin/userdel brooklyn
    --- End diff --
    
    OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210057231
  
    @johnmccabe I'm in favor with any solution which the majority will accept. Also I think having two separate packages is easier to create and maintain. Plus I can reuse the upstart script to have an RPM package for Centos 6.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-dist/pull/33


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208914189
  
    Also, notice that debug logging appears to be on by default in the logback.xml, I think debug should be off by default, INFO level and above seems sensible. @aledsage wdyt


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208910165
  
    Tried building and noticed the following:
    - deb package is not being output to `target` dir in the deb-packaging module, instead its output to brooklyn-dist/target
    You should edit the pom.xml and change:
    ```
    <deb>target/apache-brooklyn_${project.version}_all.deb</deb>
    ```
    to
    ```
    <deb>${basedir}/target/apache-brooklyn_${project.version}_all.deb</deb>
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208918063
  
    thanks @m4rkmckenna I'd just picked the var in use elsewhere in the `pom.xml`, looks like there are other occurrences of `${basedir}` throughout brooklyn that'll need addressed separately to this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210475430
  
    Changes look good. Merging.
    Having a single `.deb` sounds good to me. Easier to support for us and less confusion for users.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208893587
  
    @johnmccabe dpkg checks if the directories with config files are empty and if not it doesn't delete them. I thought it is enough.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210072240
  
    @alrick87 re:Centos6 you'd need to check the version of upstart supplied, you may have have feature parity between the CentOS and Ubuntu releases


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210008739
  
    Regarding running as non-root on Ubuntu Trusty 14.04 LTS, it ships with upstart, I tried locally with the following and it does the job, respawning on failure, running as brooklyn etc. Is there a reason why upstart hasn't been considered for 14.04?:
    ```bash
    description "rough upstart script for apache-brooklyn"
    
    start on started networking
    stop on runlevel [016]
    respawn
    respawn limit 5 10
    
    setuid brooklyn
    setgid brooklyn
    
    console output
    
    pre-start script
        logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Starting Apache Brooklyn"
    end script
    
    script
    BROOKLYN_HOME=/opt/brooklyn/
    JAVA_OPTS="-Dbrooklyn.location.localhost.address=127.0.0.1 -Xms256m -Xmx1g -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC"
    INITIAL_CLASSPATH=${BROOKLYN_HOME}/conf:${BROOKLYN_HOME}/lib/patch/*:${BROOKLYN_HOME}/lib/wars:${BROOKLYN_HOME}/lib/brooklyn/*:${BROOKLYN_HOME}/lib/dropins/*
    
    export BROOKLYN_HOME JAVA_OPTS INITIAL_CLASSPATH
    exec java ${JAVA_OPTS} -cp "${INITIAL_CLASSPATH}" org.apache.brooklyn.cli.Main launch
    end script
    
    pre-stop script
      logger -i -t "$UPSTART_JOB" "[`date -u +%Y-%m-%dT%T.%3NZ`] Stopping Apache Brooklyn"
    end script
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208897828
  
    @johnmccabe in this iteration for nothing, as I didn't find an easy way to run brooklyn as a non-root user within the init script.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208919665
  
    @m4rkmckenna @johnmccabe 
    thanks, I'll make an update in a moment


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210010005
  
    @johnmccabe I went with SysV to cover all the Ubuntu and Debian versions with one script. If we go with Upstart, we will also have to make another package with systemd script for Ubuntu starting from 15.04 and Debian 8


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by m4rkmckenna <gi...@git.apache.org>.
Github user m4rkmckenna commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208915346
  
    @johnmccabe @alrick87 
    ```
    <deb>${project.build.directory}/apache-brooklyn_${project.version}_all.deb</deb>
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208925755
  
    @johnmccabe please run "sudo apt-get update first" then you won't experience any 404 errors (at least that worked for me on all the Ubuntu distros)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#discussion_r59369362
  
    --- Diff: deb-packaging/src/deb/control/postrm ---
    @@ -15,4 +15,6 @@
     # KIND, either express or implied.  See the License for the
     # specific language governing permissions and limitations
     # under the License.
    -/usr/sbin/userdel brooklyn
    +if /usr/bin/getent passwd brooklyn; then
    +    /usr/sbin/userdel brooklyn
    --- End diff --
    
    @johnmccabe If you think we shouldn't delete the user, I will delete the whole postrm file then.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-208897028
  
    what is the user being used for?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by alrick87 <gi...@git.apache.org>.
Github user alrick87 commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210003484
  
    > Also, notice that debug logging appears to be on by default in the logback.xml, I think debug should be off by default, INFO level and above seems sensible.
    
    @johnmccabe I think changing logging level is out of scope for this PR


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by johnmccabe <gi...@git.apache.org>.
Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#issuecomment-210054785
  
    @aledsage @alrick87 I think having 2 debian packages is acceptable, when we get repos up and running it'll be transparent to the end user. wdyt?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request: Fix deb package java dependencies

Posted by m4rkmckenna <gi...@git.apache.org>.
Github user m4rkmckenna commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/33#discussion_r59369611
  
    --- Diff: deb-packaging/src/deb/control/postrm ---
    @@ -15,4 +15,6 @@
     # KIND, either express or implied.  See the License for the
     # specific language governing permissions and limitations
     # under the License.
    -/usr/sbin/userdel brooklyn
    +if /usr/bin/getent passwd brooklyn; then
    +    /usr/sbin/userdel brooklyn
    --- End diff --
    
    IMO its better to leave the user alone ... what if it had been created before install?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---