Bug 198355 - databases/riak: update to 2.0.5
Summary: databases/riak: update to 2.0.5
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bartek Rutkowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-06 14:08 UTC by nbari
Modified: 2015-03-24 20:25 UTC (History)
1 user (show)

See Also:
robak: maintainer-feedback-


Attachments
diff (19.91 KB, patch)
2015-03-06 14:08 UTC, nbari
no flags Details | Diff
update patch (19.73 KB, patch)
2015-03-06 14:35 UTC, nbari
no flags Details | Diff
using %%ETCDIR%% (19.71 KB, patch)
2015-03-06 15:05 UTC, nbari
no flags Details | Diff
diff -ruN riak.orig riak (fixed previous patch) (20.09 KB, patch)
2015-03-06 20:24 UTC, nbari
no flags Details | Diff
fixed BASH dependency (20.92 KB, patch)
2015-03-07 22:51 UTC, nbari
no flags Details | Diff
poudriere pass (24.39 KB, patch)
2015-03-10 09:57 UTC, nbari
no flags Details | Diff
removed yokozuna (21.94 KB, patch)
2015-03-10 19:31 UTC, nbari
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nbari 2015-03-06 14:08:59 UTC
Created attachment 153901 [details]
diff

Update databases/riak: update to 2.0.5
Comment 1 nbari 2015-03-06 14:35:46 UTC
Created attachment 153902 [details]
update patch

USE_GCC=yes and removed post-install
Comment 2 nbari 2015-03-06 15:05:57 UTC
Created attachment 153907 [details]
using  %%ETCDIR%%

Update patch to use %%ETCDIR%%
Comment 3 nbari 2015-03-06 20:24:20 UTC
Created attachment 153931 [details]
diff -ruN riak.orig riak  (fixed previous patch)

Patch created using: 

    diff -ruN riak.orig riak

To use it:

    cd /usr/ports/databases/riak
    patch -E -p1 < /path/to/riak.diff
    find . -name "*.orig" -exec rm -f {} \;
    
One patched it should compile and install:

    make install clean
Comment 4 commit-hook freebsd_committer 2015-03-07 10:53:47 UTC
A commit references this bug:

Author: robak
Date: Sat Mar  7 10:52:49 UTC 2015
New revision: 380681
URL: https://svnweb.freebsd.org/changeset/ports/380681

Log:
  graphics/converseen: update 0.9.0 -> 0.9.1

  PR:		198355
  Submitted by:	Nicolas de Bari Embriz <nbari@dalmp.com>

Changes:
  head/graphics/converseen/Makefile
  head/graphics/converseen/distinfo
Comment 5 Bartek Rutkowski freebsd_committer 2015-03-07 10:55:18 UTC
(In reply to commit-hook from comment #4)

This ended up in this PR by mistake - the above message is for PR 198319.
Comment 6 Bartek Rutkowski freebsd_committer 2015-03-07 17:53:27 UTC
Hi,

The patch you've sent is failing to build:

http://pd.valinor.palantiri.org/data/101amd64-default/2015-03-07_17h58m01s/logs/errors/riak-2.0.5.log

You might want to look at the current port, what it was doing to get rid of things like 'bash' dependency.

Kind regards,
Bartek Rutkowski
Comment 7 nbari 2015-03-07 22:11:09 UTC
What about using:

BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash


?
Comment 8 nbari 2015-03-07 22:51:09 UTC
Created attachment 153981 [details]
fixed BASH dependency

Fixed BASH dependecy
Comment 9 Bartek Rutkowski freebsd_committer 2015-03-07 23:46:35 UTC
Adding bash as a port dependency, while would make that particular disappear, is wrong solution, because the port doesnt realy rely on the bash and bash its too big otherwise to force users to have it, just because it 'fixes' that error. The proper solution is to follow the original riak port (again, study it please, it does the thing it does for valid reasons) and read the Porters Handbook on how to handle such problems.

Also, what's the reason for using GCC?
Comment 10 Bartek Rutkowski freebsd_committer 2015-03-07 23:54:10 UTC
Your latest patch fails to build:

http://pd.valinor.palantiri.org/data/101amd64-default/2015-03-08_00h43m54s/logs/errors/riak-2.0.5.log

Could you please test the patch with Poudriere and Portlint and submit it when all reported errors are gone?
Comment 11 nbari 2015-03-08 10:58:10 UTC
I am using GCC since port needs gmake otherwise won't compile, any other idea how how to test the port before setting up Poudriere?
Comment 12 nbari 2015-03-10 09:57:27 UTC
Created attachment 154128 [details]
poudriere pass

Ugly patch to make the port work.

pending stuff is how to remove the solr dependency 

please check and give me more advices of how to improve it.

regards.
Comment 13 Bartek Rutkowski freebsd_committer 2015-03-10 12:09:11 UTC
At first glance (portlint and poudriere build tests):

* MASTER_SITES entries are underintented
* DISTFILES are overindented
* Line 25 has spaces instead of tabs
* Why are you forcing the usage of GCC?
* The port should not use Solr downloaded from the internet - there is Solr in ports (if it needs it in first place - it might be possible that Riak Search should be a separate port)
* The port doesnt handle sample files properly
* The port do-install and post-install phases are redundant
* The port fails to build: http://pd.valinor.palantiri.org/data/84amd64-default/2015-03-10_12h54m50s/logs/errors/riak-2.0.5.log

Given this is a rather large update, have you actually tried out the port? Does it work, does it start the Riak database, and if it does, does that database works (as in, you can connect to it, write data and so on), does it stop cleanly?
Comment 14 nbari 2015-03-10 13:22:50 UTC
This is the steps I follow in order to make poudriere compile the port:

1. download the patch from: https://bz-attachments.freebsd.org/attachment.cgi?id=154128

2. patch -E -p1 < /tmp/patch

3. find . -iname "*.orig" -exec rm -f {} \;

4. poudriere testport -j 10amd64 -p development -o databases/riak


I am using gcc because of this: https://github.com/basho/riak/issues/496


meanwhile I will test riak, so far starts,restarts,stops as expected.
Comment 15 Bartek Rutkowski freebsd_committer 2015-03-10 14:14:40 UTC
Please, address all the point mentioned in my comment, before sending a new patch for testing.
Comment 16 nbari 2015-03-10 19:31:37 UTC
Created attachment 154161 [details]
removed yokozuna

removed yokozuna dependency 

Cleaned port to use only do-install

port passed poudriere testport -j 10amd64 -p development -o databases/riak

please check it and let me know what else to improve.

maybe later we could have a <category>/yokozuna port
Comment 17 Mathieu Arnold freebsd_committer 2015-03-11 16:17:09 UTC
(In reply to nbari from comment #16)

Still the @sample got lost in translation.
Comment 18 nbari 2015-03-11 18:18:14 UTC
Hi, I fixed the @sample here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198517

because of the dependencies and since bashio is maintaining both riak 1.4.x and riak 2.0.x maybe is good to have both ports riak1 and riak2 respectively 


Also some security features not working on version 2 of the riak2 port I submitted since I am not using bashio-erlang.

What could be the best way of create the port ?
Comment 19 Bartek Rutkowski freebsd_committer 2015-03-24 20:25:04 UTC
I am rejecting this PR because it shouldnt be an update to existing Riak 1.4.x port, but rather a separate port PR, and it turns out one has already been submitted in PR 198517.