You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "kun-lu20 (via GitHub)" <gi...@apache.org> on 2023/05/24 17:13:27 UTC

[GitHub] [couchdb-pkg] kun-lu20 opened a new pull request, #109: Add s390x cpu support to RPM packages

kun-lu20 opened a new pull request, #109:
URL: https://github.com/apache/couchdb-pkg/pull/109

   <!-- Thank you for your contribution!
   
        Please file this form by replacing the Markdown comments
        with your text. If a section needs no action - remove it.
   
        Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
        of code collaboration. Positive feedback is represented +1 from committers
        and negative is a -1. The -1 also means veto, and needs to be addressed
        to proceed. Once there are no objections, the PR can be merged by a
        CouchDB committer.
   
        See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
   
   ## Overview
   
   <!-- Please give a short brief for the pull request,
        what problem it solves or how it makes things better. -->
   
   Since the multi-arch docker image `apache/couchdbci-centos:8-erlang-24.3.4.10` and `apache/couchdbci-centos:9-erlang-24.3.4.10` which include s390x cpu support have been published, this PR aims to  add s390x support to building RPM packages on RHEL 8/9 clones.
   
   ## Testing recommendations
   
   <!-- Describe how we can test your changes.
        Does it provides any behaviour that the end users
        could notice? -->
   
   https://docs.couchdb.org/en/stable/intro/tour.html
   
   RHEL 8/9 RPM packages can be successfully built for x86_64 and s390x after applying the code change in this PR. The generated packages have been verified by installing them and running couchdb service on both arches.
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [x] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on a diff in pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on code in PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#discussion_r1204597550


##########
build.sh:
##########
@@ -112,6 +112,8 @@ build-all-couch() {
       CONTAINERARCH="${arch}" build-couch ${base}
     done
   done
+  CONTAINERARCH="s390x" build-couch centos-8
+  CONTAINERARCH="s390x" build-couch centos-9

Review Comment:
   @nickva Yes, I think we can also add ubuntu-jammy target here since the multi-arch `apache/couchdbci-ubuntu:jammy-erlang-24.3.4.10` image is available now.
   
   I'll test on the local Intel VM to see if it works.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564914770

   @nickva That's great to hear!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564678920

   I wonder if our recent improvement made the centos 8 package fail. 
   
   https://ci-couchdb.apache.org/blue/organizations/jenkins/jenkins-cm1%2FFullPlatformMatrix/detail/main/720/pipeline/553
   
   It seems to be stuck in a loop in:
   
   ```
   [2023-05-26T16:52:21.188Z] make[3918]: Entering directory '/home/jenkins/workspace/kins-cm1_FullPlatformMatrix_main/centos8/couchdb-pkg'
   
   [2023-05-26T16:52:21.188Z] make `bin/detect-target.sh`
   
   [2023-05-26T16:52:21.534Z] make[3919]: Entering directory '/home/jenkins/workspace/kins-cm1_FullPlatformMatrix_main/centos8/couchdb-pkg'
   
   [2023-05-26T16:52:21.534Z] make `bin/detect-target.sh`
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva commented on a diff in pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#discussion_r1204599044


##########
build.sh:
##########
@@ -112,6 +112,8 @@ build-all-couch() {
       CONTAINERARCH="${arch}" build-couch ${base}
     done
   done
+  CONTAINERARCH="s390x" build-couch centos-8
+  CONTAINERARCH="s390x" build-couch centos-9

Review Comment:
   Oh great, idea @kun-lu20, we can add ubuntu-jammy too now. Thanks for mentioning it!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564847544

   Thanks @nickva , we still need another change in Makefile. Below is my change.
   ```bash
   diff --git a/Makefile b/Makefile
   index 75fdd70..dc94a93 100644
   --- a/Makefile
   +++ b/Makefile
   @@ -177,8 +177,10 @@ centos9: sm-ver-rpm make-rpmbuild centos
    
    # Almalinux 8 is a CentOS 8 alias
    almalinux-8: centos-8
   +almalinux-8.8: centos-8
    # Almalinux 9 is a CentOS 9 alias
    almalinux-9: centos-9
   +almalinux-9.2: centos-9
    # s390x RHEL 8 clone based
    s390x-centos-8: centos-8
    ppc64le-centos-8: centos-8
   diff --git a/bin/build-couchdb-pkg.sh b/bin/build-couchdb-pkg.sh
   index bb54abf..e86f6b3 100755
   --- a/bin/build-couchdb-pkg.sh
   +++ b/bin/build-couchdb-pkg.sh
   @@ -28,7 +28,7 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    
    . ${SCRIPTPATH}/detect-os.sh
    
   -redhats='(rhel|centos|fedora|rocky)'
   +redhats='(rhel|centos|fedora|almalinux)'
    debians='(debian|ubuntu)'
    
    cd /home/jenkins
   diff --git a/bin/build-js.sh b/bin/build-js.sh
   index 5af965f..0625578 100755
   --- a/bin/build-js.sh
   +++ b/bin/build-js.sh
   @@ -40,7 +40,7 @@ fi
    
    cd ${SCRIPTPATH}/..
    
   -redhats='(rhel|centos|fedora|rocky)'
   +redhats='(rhel|centos|fedora|almalinux)'
    debians='(debian|ubuntu)'
    if [[ ${ID} =~ ${redhats} ]]; then
      # it will always place the build path at /root/rpmbuild :(
   diff --git a/bin/detect-os.sh b/bin/detect-os.sh
   index a1c6a10..f296023 100755
   --- a/bin/detect-os.sh
   +++ b/bin/detect-os.sh
   @@ -68,7 +68,7 @@ case "${OSTYPE}" in
        # and finally some rough heuristics
        if [[ -f /etc/redhat-release ]]; then
          # /etc/redhat-release is so inconsistent, we use rpm instead
   -      rhelish=$(rpm -qa '(redhat|sl|slf|centos|centos-linux|oraclelinux|rocky)-release(|-server|-workstation|-client|-computenode)' 2>/dev/null | head -1)
   +      rhelish=$(rpm -qa '(redhat|sl|slf|centos|centos-linux|oraclelinux|almalinux)-release(|-server|-workstation|-client|-computenode)' 2>/dev/null | head -1)
          if [[ $rhelish ]]; then
            ID=${ID:-$(echo ${rhelish} | awk -F'-' '{print tolower($1)}')}
            VERSION_ID=${VERSION_ID:-$(echo ${rhelish} | sed -E 's/([^[:digit:]]+)([[:digit:]]+)(.*)/\2/' )}
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on a diff in pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on code in PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#discussion_r1205634415


##########
build.sh:
##########
@@ -112,6 +112,8 @@ build-all-couch() {
       CONTAINERARCH="${arch}" build-couch ${base}
     done
   done
+  CONTAINERARCH="s390x" build-couch centos-8
+  CONTAINERARCH="s390x" build-couch centos-9

Review Comment:
   Hi @nickva ,
   
   I've added `ubuntu-jammy centos-8 centos-9` target to `XPLAT_BASES` and tested to generate all packages via running command `./build.sh couch-all https://dist.apache.org/repos/dist/release/couchdb/source/3.3.2/apache-couchdb-3.3.2.tar.gz` on an Intel VM.
   
   All packages across various arches were successfully built, except RHEL8 rpm package on arm64, because SpiderMonkey 60 is known broken on ARM 64, so this package is skipped in `build-all-couch()`.
   
   I've verified the generated RHEL 8/9 RPM packages and Ubuntu-jammy package on Intel and s390x VMs, following the instructions in https://docs.couchdb.org/en/stable/intro/tour.html. All packages worked fine.
   
   Please take a look at the code changes when you have some time. Thank you very much!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564845421

   @kun-lu20 oh no worries, sorry for bothering. I tried this PR to fix it: https://github.com/apache/couchdb-pkg/pull/110


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564913347

   @kun-lu20 no problem at all, thanks for very quick fix. The full CI (on main) is green again! https://ci-couchdb.apache.org/blue/organizations/jenkins/jenkins-cm1%2FFullPlatformMatrix/detail/main/721/pipeline
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva commented on a diff in pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#discussion_r1204588407


##########
build.sh:
##########
@@ -112,6 +112,8 @@ build-all-couch() {
       CONTAINERARCH="${arch}" build-couch ${base}
     done
   done
+  CONTAINERARCH="s390x" build-couch centos-8
+  CONTAINERARCH="s390x" build-couch centos-9

Review Comment:
   Would it work to add centos-8 and centos-9 target to `XPLAT_BASES="debian-bullseye ubuntu-focal"` so it would be `XPLAT_BASES="debian-bullseye ubuntu-focal centos-8 centos-9"`
   
   
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1561645563

   Hi @nickva ,
   
   Could you please review this PR when you have some time?
   
   Thank you very much!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva merged pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva merged PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on a diff in pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on code in PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#discussion_r1205634415


##########
build.sh:
##########
@@ -112,6 +112,8 @@ build-all-couch() {
       CONTAINERARCH="${arch}" build-couch ${base}
     done
   done
+  CONTAINERARCH="s390x" build-couch centos-8
+  CONTAINERARCH="s390x" build-couch centos-9

Review Comment:
   Hi @nickva ,
   
   I've added `ubuntu-jammy centos-8 centos-9` target to `XPLAT_BASES` and tested to generate all packages via running command `./build.sh couch-all https://dist.apache.org/repos/dist/release/couchdb/source/3.3.2/apache-couchdb-3.3.2.tar.gz` on an Intel VM.
   
   All packages across various arches were successfully built, except RHEL8 rpm package on arm64, because SpiderMonkey 60 is known broken on ARM 64. Thus this package is skipped in `build-all-couch()`.
   
   I've verified the generated RHEL 8/9 RPM packages and Ubuntu-jammy package on Intel and s390x VMs, following the instructions in https://docs.couchdb.org/en/stable/intro/tour.html. All packages worked fine.
   
   Please take a look at the code changes when you have some time. Thank you very much!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1563372923

   Thanks @nickva !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564813468

   Hi @nickva ,
   
   Sorry for the late response. I was on vacation today. I'll look into this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] kun-lu20 commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "kun-lu20 (via GitHub)" <gi...@apache.org>.
kun-lu20 commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564870976

   @nickva You're very welcome! Sorry for the inconvenience.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb-pkg] nickva commented on pull request #109: Add s390x cpu support to RHEL 8/9 RPM packages

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #109:
URL: https://github.com/apache/couchdb-pkg/pull/109#issuecomment-1564863415

   Oh good find, thank you @kun-lu20!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org