Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508190 - dev-db/mongodb-2.6.1 version bump
Summary: dev-db/mongodb-2.6.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL: http://docs.mongodb.org/master/releas...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-19 21:18 UTC by Mike Limansky
Modified: 2014-05-14 09:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mongodb-2.6.1.ebuild (mongodb-2.6.1.ebuild,3.69 KB, text/plain)
2014-05-06 00:14 UTC, Johan Bergström
Details
mongodb-2.6.1-fix-scons.patch (mongodb-2.6.1-fix-scons.patch,1.34 KB, patch)
2014-05-06 00:14 UTC, Johan Bergström
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Limansky 2014-04-19 21:18:06 UTC
MongoDB 2.6.0 was released on 8th of April. It's a new major release contains a lot of new features. 

Reproducible: Always
Comment 1 Ultrabug gentoo-dev 2014-05-04 16:52:03 UTC
Yes indeed mate, I've been on vacation and tried packaging it before going away but unfortunately they broke the scons building again :(

I'll have to investigate... this takes some time.

@Johan : help would be great if you can spare the time as well, cheers ;)
Comment 2 Johan Bergström 2014-05-05 06:14:20 UTC
@ultrabug: Sure, I'll have a look. Who doesn't like to scour through 1500 lines of Scons? :-D
Comment 3 Johan Bergström 2014-05-05 07:06:03 UTC
I have a working version, but it dies while linking. See upstream issue here https://jira.mongodb.org/browse/SERVER-13829
Comment 4 Johan Bergström 2014-05-06 00:14:31 UTC
Created attachment 376444 [details]
mongodb-2.6.1.ebuild

Gentle(wo)men: In spirit of The Collaborative Effort, here's a work in progress.


## Changes in ebuild:
 - 2.6.0 -> 2.6.1
 - Rebaked -fix-scons.patch. Removed our manual LIBS append since upstream seems to handle this properly now.
 - Remove spidermonkey engine. Dropped upstream.
 - Add memory check (1G is roughly what was consumed while compiling).

 - Lowered build disk dize check (Mine never surpassed 1G).

 - Changed USR disk space check to VAR, and lowered it. The journal is now considerably smaller on first run, at least for me:

   ```
   # du -d1 -h /var/lib/mongodb/
   4.0K	/var/lib/mongodb/_tmp
   20K	/var/lib/mongodb/journal
   81M	/var/lib/mongodb/
   ```

   Perhaps remove check altogether?

 - Split out two more dependencies: snowball-stemmer and yaml-cpp. I've additionally contacted graaff (stemmer maintainer) and asked for a newer version snapshot since current is from 2009.

 - Applied fix to build as referenced in above jira bug .


## Todo/questions:
 - USR -> VAR disk req check: Am I misunderstanding something? Also, verify my check requirements (I'm ~amd64).

 - Need to test IUSE="mms-agent". Also, shouldn't this be hosted via upstream?

 - Consider adding IUSE="debug"?

 - How much do we care about user upgrade path? This is – according to what I've read so far – a bit hairy.

 - Still haven't dwelled into FEATURES=test. Should we also potentially do specific check-reqs for this?

 - src_install seems to do some building/linking, for instance bsondump, mongooplog, etc.

From my end, the bigger issue that I really don't use mongodb for anything production-wise, which potentially can affect ebuild quality/my ability to maintain. As always, Ultrabug is a great maintainer and will probably do the hard work!
Comment 5 Johan Bergström 2014-05-06 00:14:49 UTC
Created attachment 376448 [details, diff]
mongodb-2.6.1-fix-scons.patch
Comment 6 Johan Bergström 2014-05-06 00:37:58 UTC
Update. Just ran the test suite without any errors (!). Here's a disk layout before src_install: 

72M	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/src
428K	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/debian
164K	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/docs
1008M	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/build
7.2M	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/jstests
36K	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/site_scons
3.7M	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/.scons
104K	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/rpm
4.8M	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/buildscripts
72K	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/distsrc
2.3G	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1/unittest
3.7G	/var/tmp/portage/dev-db/mongodb-2.6.1/work/mongodb-src-r2.6.1

..as you can see, we don't need much more than 1,1G to build without test suite and an additional 2.3 if FEATURES=test is run. Not sure if check-reqs should be conditional, but it at least is relevant.
Comment 7 Johan Bergström 2014-05-06 00:42:41 UTC
Additional todo:
 - if IUSE=mms-agent, we need to make sure that python:2.x is installed.
 - the init script of mms-agent uses env python while it should really use python2
 - Rewrite init scripts (mongodb, mongos, mms-agent) to use the modern, simpler syntax (start_stop_daemon_args, command, et al)
Comment 8 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2014-05-06 03:21:55 UTC
Additional TODO:

Get rid of /etc/conf.d/mongodb, and instead point mongodb toward the config file in /etc. Install a default config file that uses the new upstream-preferred YAML support.
Comment 9 Johan Bergström 2014-05-08 00:51:58 UTC
IMO we additionally need a lot of post_install stuff if we're to remove conf.d/mongodb as well as fence against the upgrade. We'd want to summarise steps taken to upgrade and link to upstream as well as making sure people double and triple check that migrating their potential conf.d configs into yaml is correct.
Comment 10 Ultrabug gentoo-dev 2014-05-12 15:12:50 UTC
Hi

Ok guys, I think I've taken all your (good) points into account and I think I'm done with the bump.

I've pushed 2.6.1 in my overlay : ultrabug

Can you please review it and comment if something is not good enough please ? I'd like your input before committing to tree

Thanks
Comment 11 Johan Bergström 2014-05-13 05:36:58 UTC
(In reply to Ultrabug from comment #10)
> Hi
> 
> Ok guys, I think I've taken all your (good) points into account and I think
> I'm done with the bump.
> 
> I've pushed 2.6.1 in my overlay : ultrabug
> 
> Can you please review it and comment if something is not good enough please
> ? I'd like your input before committing to tree
> 
> Thanks

Great job! Compiling/testing now. A few things while we wait:

 - pkg_postint:

  if [[ ${REPLACING_VERSIONS} < 3.6 ]]; then 
                                ~~~ <- should be 2.6?

  ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}": potentially add .conf to filenames?


- check reqs:

  CHECKREQS_DISK_BUILD="2400M" <- is this still relevant? see my above comment
  CHECKREQS_DISK_USR="512M"    <- what do we store in /usr? Shouldn't this be DISK_VAR?

- snowball-stemmer: potentially dep on the newer version in tree

- mongodb.conf-r2: potentially handle pidfiles ourselves? processManagement.pidFilePath
Comment 12 Johan Bergström 2014-05-13 05:53:25 UTC
src_install still seems to do some building/linking. mongotop, mongos, mongos, etc. Not saying this is a bug at our place (I dislike scons not really having build steps  modelled like this), but it's something that bothers me. File upstream bug?
Comment 13 Ultrabug gentoo-dev 2014-05-13 08:31:06 UTC
(In reply to Johan Bergström from comment #11)
>  - pkg_postint:
> 
>   if [[ ${REPLACING_VERSIONS} < 3.6 ]]; then 
>                                 ~~~ <- should be 2.6?
> 
>   ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML
> standard in /etc/${PN}": potentially add .conf to filenames?
> 

Yes, test value and typo, fixed on my local ebuild

> 
> - check reqs:
> 
>   CHECKREQS_DISK_BUILD="2400M" <- is this still relevant? see my above
> comment
>   CHECKREQS_DISK_USR="512M"    <- what do we store in /usr? Shouldn't this
> be DISK_VAR?
> 

No, see https://bugs.gentoo.org/show_bug.cgi?id=495242 please, it's been already discussed and ack'ed

> - snowball-stemmer: potentially dep on the newer version in tree
> 

Doesn't seem to be a problem, any version is okay

> - mongodb.conf-r2: potentially handle pidfiles ourselves?
> processManagement.pidFilePath

For s-s-d sake, I'll leave it as it is
Comment 14 Ultrabug gentoo-dev 2014-05-13 08:32:00 UTC
(In reply to Johan Bergström from comment #12)
> src_install still seems to do some building/linking. mongotop, mongos,
> mongos, etc. Not saying this is a bug at our place (I dislike scons not
> really having build steps  modelled like this), but it's something that
> bothers me. File upstream bug?

Sure mate be my guest but this shouldn't prevent us from bumping should it ?
Comment 15 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2014-05-13 22:18:20 UTC
I'd encourage a bump soon, so long as you've gotten rid of the conf.d file and now ship a default config file in the yaml format.
Comment 16 Jason A. Donenfeld archtester Gentoo Infrastructure gentoo-dev Security 2014-05-13 22:20:44 UTC
Just looked in your overlay. Looks great. Ship it!
Comment 17 Johan Bergström 2014-05-13 22:26:39 UTC
(In reply to Ultrabug from comment #14)
> (In reply to Johan Bergström from comment #12)
> > src_install still seems to do some building/linking. mongotop, mongos,
> > mongos, etc. Not saying this is a bug at our place (I dislike scons not
> > really having build steps  modelled like this), but it's something that
> > bothers me. File upstream bug?
> 
> Sure mate be my guest but this shouldn't prevent us from bumping should it ?

Of course not! I'm good with current state, feel free to commit. Thanks for all the help.
Comment 18 Ultrabug gentoo-dev 2014-05-14 09:18:29 UTC
Thanks a lot for your help and feedback guys, I'm pleased to announce it's in tree now :)

+*mongodb-2.6.1 (14 May 2014)
+
+  14 May 2014; Ultrabug <ultrabug@gentoo.org> +mongodb-2.6.1.ebuild,
+  +files/mongodb-2.6.1-fix-scons.patch, +files/mms-agent.initd-r2,
+  +files/mongodb.conf-r2, +files/mongodb.confd-r2, +files/mongodb.initd-r2,
+  +files/mongos.conf-r2, +files/mongos.confd-r2, +files/mongos.initd-r2:
+  version 2.6.x bump fix #508190 thx to Mike Limansky, Johan Bergstrom and
+  Jason A. Donenfeld
+