You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by orhankislal <gi...@git.apache.org> on 2018/08/02 17:36:39 UTC

[GitHub] madlib pull request #306: Ubuntu support

GitHub user orhankislal opened a pull request:

    https://github.com/apache/madlib/pull/306

    Ubuntu support

    

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

    $ git pull https://github.com/madlib/madlib ubuntu-support

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

    https://github.com/apache/madlib/pull/306.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 #306
    
----
commit be33d4df22e13a80f5d4824d44d0b5d45bd3e892
Author: Nandish Jayaram <nj...@...>
Date:   2018-07-25T00:27:59Z

    Ubuntu support for MADlib
    
    JIRA: MADLIB-1256
    
    Adds support for compiling on Ubuntu as well as creating a deb package.
    
    Co-authored-by: Domino Valdano <dv...@pivotal.io>
    Co-authored-by: Jingyi Mei<jm...@pivotal.io>
    Co-authored-by: Orhan Kislal <ok...@apache.org>

commit 1b9deaf88c82e98a3549adb5eac3ce93bdc485fd
Author: Orhan Kislal <ok...@...>
Date:   2018-08-01T23:47:57Z

    rename cmakelists

commit c6045c63c155fca153f2d245654c1bf2dbb66676
Author: Orhan Kislal <ok...@...>
Date:   2018-08-02T17:36:43Z

    Fix licenses

----


---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/639/



---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/637/



---

[GitHub] madlib pull request #306: Ubuntu support

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

    https://github.com/apache/madlib/pull/306#discussion_r207707634
  
    --- Diff: deploy/DEB/postinst ---
    @@ -0,0 +1,46 @@
    +#!/bin/sh
    +#
    +# coding=utf-8
    +#
    +# 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.
    +
    +# Source debconf library.
    +. /usr/share/debconf/confmodule
    +
    +MADLIB_VERSION="1.15-dev"
    +MADLIB_INSTALL_PATH="InstallPathNotFound"
    +
    +# Fetching configuration from debconf
    +db_get madlib/installpath
    +MADLIB_INSTALL_PATH=$RET
    +
    +# Remove existing soft links
    --- End diff --
    
    It would be nice to move the post-install/post-remove bash commands to its own function and make it common between deb and rpm. 


---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/632/



---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/635/



---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/641/



---

[GitHub] madlib pull request #306: Ubuntu support

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

    https://github.com/apache/madlib/pull/306


---

[GitHub] madlib pull request #306: Ubuntu support

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

    https://github.com/apache/madlib/pull/306#discussion_r207707589
  
    --- Diff: deploy/CMakeLists.txt ---
    @@ -10,13 +10,29 @@ if(APPLE)
             PackageMaker
         )
     elseif(UNIX)
    -    list(APPEND CPACK_GENERATOR
    -        RPM
    -    )
    +    debian_version(DEB_VERSION)
    +    if(NOT (DEB_VERSION STREQUAL "DEB_VERSION-NOTFOUND"))
    +      set(IS_DEBIAN "True")
    +    endif()
    +    rh_version(REDHAT)
    +    if(NOT (RH_VERSION STREQUAL "RH_VERSION-NOTFOUND"))
    +      set(IS_REDHAT "True")
    +    endif()
    +    if(IS_REDHAT)
    +        message(STATUS "Detected RH version ${RH_VERSION}")
    +        list(APPEND CPACK_GENERATOR
    +            RPM
    +        )
    +    elseif(IS_DEBIAN)
    +        message(STATUS "Detected Debian version ${DEB_VERSION}")
    +        list(APPEND CPACK_GENERATOR
    +            DEB
    +        )
    +    endif()
     endif()
     
     
    -# -- General settings for all/multiple packages generators ---------------------
    +# -- General settings for ll/multiple packages generators ---------------------
    --- End diff --
    
    Accidental delete?


---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/636/



---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/643/



---

[GitHub] madlib pull request #306: Ubuntu support

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

    https://github.com/apache/madlib/pull/306#discussion_r208064138
  
    --- Diff: deploy/DEB/postinst ---
    @@ -0,0 +1,46 @@
    +#!/bin/sh
    +#
    +# coding=utf-8
    +#
    +# 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.
    +
    +# Source debconf library.
    +. /usr/share/debconf/confmodule
    +
    +MADLIB_VERSION="1.15-dev"
    +MADLIB_INSTALL_PATH="InstallPathNotFound"
    +
    +# Fetching configuration from debconf
    +db_get madlib/installpath
    +MADLIB_INSTALL_PATH=$RET
    +
    +# Remove existing soft links
    --- End diff --
    
    It seems this is not as trivial as it seems. CPackDeb takes a few extra files (`postinst, postrm` etc.) but not any arbitrary file. We would have to put the common file into a different folder such as `/usr/share/madlib`, since we have to access this file after madlib is removed.


---

[GitHub] madlib issue #306: Ubuntu support

Posted by orhankislal <gi...@git.apache.org>.
Github user orhankislal commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    Thanks for the comments, Rahul. I am currently testing the new changes, no need to test these temporary commits.


---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/638/



---

[GitHub] madlib pull request #306: Ubuntu support

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

    https://github.com/apache/madlib/pull/306#discussion_r207707579
  
    --- Diff: cmake/LinuxUtils.cmake ---
    @@ -10,3 +10,37 @@ macro(rh_version OUT_VERSION)
         endif(EXISTS "/etc/redhat-release")
     endmacro(rh_version)
     
    +# Get the Debian version
    +# DEB_OUT_VERSION will have a number if /etc/issue exists, with an entry for Debian.
    +# DEB_OUT_VERSION will have 'DEB_OUT_VERSION-NOTFOUND' if /etc/issue does not exist.
    +# DEB_OUT_VERSION will be empty if some distribution which has /etc/issue, but not Debian in it. 
    +macro(debian_version DEB_OUT_VERSION)
    +    if(EXISTS "/etc/issue")
    +        file(READ "/etc/issue" _DEB_RELEASE_CONTENT)
    +        string(REGEX REPLACE "Debian[^0-9.]*([0-9.]+)[^0-9.]*\$" "\\1"
    +        ${DEB_OUT_VERSION}
    +            "${_DEB_RELEASE_CONTENT}"
    +        )
    +    else(EXISTS "/etc/issue")
    +        set(${DEB_OUT_VERSION} "${DEB_OUT_VERSION}-NOTFOUND")
    +    endif(EXISTS "/etc/issue")
    +endmacro(debian_version)
    +        
    +#macro(debian_version DEB_OUT_VERSION)
    --- End diff --
    
    We can delete the backup function. 


---

[GitHub] madlib pull request #306: Ubuntu support

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

    https://github.com/apache/madlib/pull/306#discussion_r207707569
  
    --- Diff: CMakeLists.txt ---
    @@ -124,10 +124,29 @@ else()
     set(M4_ARGUMENTS "--prefix-builtins")
     endif()
     
    +# -- Local includes ------------------------------------------------------------
    +
    +list(APPEND CMAKE_MODULE_PATH
    +    "${MAD_BUILD_TOOLS}")
    +
    +# -- Include all parts ---------------------------------------------------------
    +
    +include(Utils)
    +include(LinuxUtils)
    +include(OSXUtils)
    +include(Options)
    +
    +# -- Get madlib version info ----------------------------------------------------
     # Read and parse Version.yml file
     file(READ "${MADLIB_VERSION_YML}" _MADLIB_VERSION_CONTENTS)
     string(REGEX REPLACE "^.*version:[ \t]*([^\n]*)\n.*" "\\1" MADLIB_VERSION_STRING "${_MADLIB_VERSION_CONTENTS}")
    -string(REPLACE "-" "_" MADLIB_VERSION_STRING_NO_HYPHEN "${MADLIB_VERSION_STRING}")
    +rh_version(RH_VERSION)
    +debian_version(DEB_VERSION)
    +if(APPLE OR (NOT (RH_VERSION STREQUAL "RH_VERSION-NOTFOUND")))
    --- End diff --
    
    Couple of concerns: 
    - Can we use the `IS_REDHAT` flag instead of making the string comparison here? 
    - This switch makes the `MADLIB_VERSION_STRING_NO_HYPHEN` a misnomer since it will have hyphen in the case of Debian. Instead do you think it's better to move this switch to the place where `MADLIB_VERSION_STRING_NO_HYPHEN` is used and use it only for RPM (which was the intended reason, IIRC)? 


---

[GitHub] madlib issue #306: Ubuntu support

Posted by iyerr3 <gi...@git.apache.org>.
Github user iyerr3 commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    Rat check failing for following files: 
    ```
    - .../deploy/DEB/templates
    - .../deploy/DEB/config
    ```


---

[GitHub] madlib issue #306: Ubuntu support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit commented on the issue:

    https://github.com/apache/madlib/pull/306
  
    
    Refer to this link for build results (access rights to CI server needed): 
    https://builds.apache.org/job/madlib-pr-build/640/



---