Opened 11 years ago

Closed 11 years ago

#38497 closed enhancement (fixed)

rethinkdb: version update + other changes

Reported by: anatol (Anatol Pomozov) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: rethinkdb

Description

Changes:

  • updated to 1.4.1
  • added separate user "rethinkdb" used for service ("launchctl load..")
  • added and tested startup item, although it requires additional steps

Issues need be resolved:

  • rethinkdb by default uses /var/lib/rethinkdb for data, but other db (e.g. mongo) use /var/db/XXX. What is more correct directory?
  • check if possible to replace set of "xinstall ..." with "make install DESTROOT=xxx"
  • startupitem uses default database that should be created first time it is used. Currently port just shows instructions to user and user should run them manually. Is it possible to create config file and default database automatically on first install?

Attachments (1)

rethinkdb_update.diff (3.8 KB) - added by anatol (Anatol Pomozov) 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by anatol (Anatol Pomozov)

One more change: moved coffee-script to build deps. It seems this is required only for optimizing web assets. Other deps (boost and v8) are needed during compilation.

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

  • You shouldn't use a post-activate block to show ui_msgs. Instead, use notes.
  • I agree databases should go in ${prefix}/var/db/${name}.
  • Regarding "make install DESTDIR=${destroot}" (I assume you mean DESTDIR and not DESTROOT), you can try it out and see what happens. That's what the default MacPorts destroot does, so try removing the custom destroot block.
  • Service user accounts should have names beginning with an underscore. Apple made this change in OS X 10.5. In some ports, we've emulated this change, by using the username beginning with the underscore on 10.5 and later, and not doing that on 10.4. See e.g. the mysql5-server port, which does:
    if {"darwin" == ${os.platform} && ${os.major} > 8} {
        set mysqluser       _mysql
    } else {
        set mysqluser       mysql
    }
    add_users ${mysqluser} group=${mysqluser} realname=MySQL\ Server
    
    But that's probably primarily so that upgrading users on Tiger don't end up with two user accounts for the same thing. For a new port, or one that doesn't support Tiger (which I believe includes rethinkdb because it requires nodejs which requires Snow Leopard or newer), it's probably fine to always use the underscore-prefixed name.

comment:3 Changed 11 years ago by anatol (Anatol Pomozov)

Updates since previous patch:

  • use 'notes' instead of ui_msgs
  • use _rethinkdb user
  • /var/db/rethinkdb as a default place for database

Tested running "rethinkdb" and loading the service.

Please review the patch.

I added todos to Portfile:

  • explore using "make install DESTDIR=xxx" instead of manual copying files
  • think about creating default database and config file if they are absent (it means the package is installed first time). Or do it first time we load the service.

I'll check it later when I have more time. Example how to do it (especially item #2) are welcome.

Changed 11 years ago by anatol (Anatol Pomozov)

Attachment: rethinkdb_update.diff added

comment:4 Changed 11 years ago by anatol (Anatol Pomozov)

Friendly ping. Could you please review the patch and submit if it is ok?

comment:5 Changed 11 years ago by anatol (Anatol Pomozov)

Is there anything I can do to move this ticket forward?

comment:6 Changed 11 years ago by mf2k (Frank Schima)

Port: rethinkdb added
Type: defectenhancement
Version: 2.1.3

comment:7 Changed 11 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.