adrienverge / copr-couchdb

Unofficial CouchDB 3 RPM packages for Fedora and EPEL
https://copr.fedorainfracloud.org/coprs/adrienverge/couchdb
9 stars 3 forks source link

couchdb for linux ppcle #8

Open ukulanne opened 5 years ago

ukulanne commented 5 years ago

Would it be possible to add a build for Fedora Linux ppcle

# uname -a
Linux localhost 5.0.9-301.fc30.ppc64le #1 SMP Tue Apr 23 23:43:15 UTC 2019 
ppc64le ppc64le ppc64le GNU/Linux

# cat /etc/redhat-release 
Fedora release 30 (Thirty)

of course I am volunteering for any help that might be needed.

adrienverge commented 5 years ago

Hi @ukulanne, sure, I think it's doable; can you try and share the result of building it on your machine?

wget wget http://mirrors.ircam.fr/pub/apache/couchdb/source/2.3.1/apache-couchdb-2.3.1.tar.gz -O ~/rpmbuild/SOURCES/apache-couchdb-2.3.1.tar.gz
cp couchdb.service 0001*.patch usr-bin-couchdb ~/rpmbuild/SOURCES
rpmbuild -bs couchdb.spec
mock -r fedora-30-ppc64le --rebuild ~/rpmbuild/SRPMS/couchdb-2.3.1-1.*.src.rpm
mock -r fedora-31-ppc64le --rebuild ~/rpmbuild/SRPMS/couchdb-2.3.1-1.*.src.rpm
mock -r fedora-rawhide-ppc64le --rebuild ~/rpmbuild/SRPMS/couchdb-2.3.1-1.*.src.rpm
ukulanne commented 5 years ago

For mock -r fedora-30-ppc64le --rebuild ~/rpmbuild/SRPMS/couchdb-2.3.1-1.*.src.rpm

Finish: rpmbuild couchdb-2.3.1-1.fc30.src.rpm

Finish: build phase for couchdb-2.3.1-1.fc30.src.rpm

INFO: Done(/root/rpmbuild/SRPMS/couchdb-2.3.1-1.fc30.src.rpm) Config(fedora-30-ppc64le) 
3 minutes 30 seconds

INFO: Results and/or logs in: /var/lib/mock/fedora-30-ppc64le/result
Finish: run

Full output: couchdb-fedora30.log

ukulanne commented 5 years ago

for mock -r fedora-31-ppc64le --rebuild ~/rpmbuild/SRPMS/couchdb-2.3.1-1.*.src.rpm

Error: Some packages could not be found.
Finish: build setup for couchdb-2.3.1-1.fc30.src.rpm
Finish: build phase for couchdb-2.3.1-1.fc30.src.rpm
ERROR: Exception(/root/rpmbuild/SRPMS/couchdb-2.3.1-1.fc30.src.rpm) 
[couchdb-fedora31.log](https://github.com/adrienverge/copr-couchdb/files/3662810/couchdb-fedora31.log)
Config(fedora-31-ppc64le) 1 minutes 26 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-31-ppc64le/result
ERROR: Command failed: 
 # /usr/bin/dnf builddep --installroot /var/lib/mock/fedora-31-ppc64le/root/ --releasever 31 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk --disableplugin=local --disableplugin=spacewalk /var/lib/mock/fedora-31-ppc64le/root//builddir/build/SRPMS/couchdb-2.3.1-1.fc31.src.rpm --setopt=tsflags=nocontexts
No matches found for the following disable plugin patterns: local, spacewalk
fedora                                                                   17 kB/s | 5.3 kB     00:00    
updates                                                                  15 kB/s | 4.8 kB     00:00    
No matching package to install: 'js-devel'
Not all dependencies satisfied
Error: Some packages could not be found.

Full output: couchdb-fedora31.log

ukulanne commented 5 years ago

For mock -r fedora-rawhide-ppc64le --rebuild ~/rpmbuild/SRPMS/couchdb-2.3.1-1.*.src.rpm

setting SOURCE_DATE_EPOCH=1552867200
Wrote: /builddir/build/SRPMS/couchdb-2.3.1-1.fc32.src.rpm
No matches found for the following disable plugin patterns: local, spacewalk
No matching package to install: 'erlang < 22'
No matching package to install: 'js-devel'
Not all dependencies satisfied
Error: Some packages could not be found.
Finish: build setup for couchdb-2.3.1-1.fc30.src.rpm
Finish: build phase for couchdb-2.3.1-1.fc30.src.rpm
ERROR: Exception(/root/rpmbuild/SRPMS/couchdb-2.3.1-1.fc30.src.rpm) Config(fedora-rawhide-ppc64le) 1 minutes 9 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-ppc64le/result
ERROR: Command failed: 
 # /usr/bin/dnf builddep --installroot /var/lib/mock/fedora-rawhide-ppc64le/root/ --releasever 32 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk --disableplugin=local --disableplugin=spacewalk /var/lib/mock/fedora-rawhide-ppc64le/root//builddir/build/SRPMS/couchdb-2.3.1-1.fc32.src.rpm --setopt=tsflags=nocontexts
No matches found for the following disable plugin patterns: local, spacewalk
No matching package to install: 'erlang < 22'
No matching package to install: 'js-devel'
Not all dependencies satisfied
Error: Some packages could not be found.

Full output: couchdb-fedoraRH.log

adrienverge commented 5 years ago

Anne, thanks for the feedback.

Two things are needed to enable ppc64le builds:

  1. Have couch-js that compiles (see https://github.com/adrienverge/copr-couchdb#custom-couch-js-package, and the fix at https://github.com/apache/couchdb-pkg/pull/55 for Fedora 31+).

    On my machine, cross-compiling couch-js for ppc64le fails because it cannot install ca-certificates-2018.2.26-3.fc30.noarch and libutempter-1.1.6-16.fc30.ppc64leB. I used mock -r fedora-30-ppc64le --rebuild ~/rpmbuild/SRPMS/couch-js-1.8.5-21.fc30.src.rpm.

    To be honest I don't know why this doesn't work, but since I don't have a ppc64le machine, it's hard to know. Maybe it will be easier for you? Feel free to share modifications needed for https://github.com/apache/couchdb-pkg/blob/7768c00/js/rpm/SPECS/js.spec to work.

  2. Have couchdb that compiles. Apparently it starts failing on Fedora 31 and +, because js-devel is not packaged (that's strange... is js packaged on ppc64le?)

Note: it's OK if it doesn't compile on Fedora rawhide (32+). I think it's due to the fact that http://packages.erlang-solutions.com/ hasn't created packages for Fedora 32 yet.