[oi-dev] Feature 1768 - add dovecot to oi-build

Alasdair Lumsden alasdairrr at gmail.com
Sat Nov 19 22:28:03 UTC 2011


Hi Colin,

On 11/19/11 10:00 PM, Colin Ellis wrote:
> https://bitbucket.org/cellis_oidev/oi-build/changeset/d7b944645d37

Great stuff! You're going to hate me though... I have more work for you! 
:-D If you don't have time or would prefer me to do it just say and I'll 
do it.

In the Makefile, you've put multiple flags on the same configure line. 
Would you mind splitting them out so it's one configuration option per 
CONFIGURE_OPTION ? I tend to group into clusters, so you'd have:

CONFIGURE_OPTIONS       += --enable-shared
CONFIGURE_OPTIONS       += --disable-static
CONFIGURE_OPTIONS       += --enable-header-install

CONFIGURE_OPTIONS       += --sysconfdir=$(ETCDIR)
CONFIGURE_OPTIONS       += --localstatedir=/var
CONFIGURE_OPTIONS       += --with-rundir=/var/run/$(COMPONENT_NAME)

CONFIGURE_OPTIONS       += --with-solr
CONFIGURE_OPTIONS       += --with-gssapi
CONFIGURE_OPTIONS       += --with-sqlite
CONFIGURE_OPTIONS       += --with-mysql
CONFIGURE_OPTIONS       += --with-pgsql
CONFIGURE_OPTIONS       += --with-ldap=plugin
CONFIGURE_OPTIONS       += --with-sql=plugin

I was surprised to see /var hardcoded, thinking it would be in 
shared-macros.mk, but it appears it's missing! Do any other oi-builders 
think we should add a VARDIR= macro to shared-macros.mk?

You should change /usr/lib to $(USRLIBDIR) and /usr to $(USRDIR) - this 
includes inside the LDFLAGS definitions.

I'd also recommend refactoring the versioning, to:

COMPONENT_MAJOR_VER=      2.0
COMPONENT_MINOR_VER=      15
COMPONENT_VERSION=      $(COMPONENT_MAJOR_VER).$(COMPONENT_MINOR_VER)

So that you can have:

COMPONENT_ARCHIVE_URL= 
http://www.dovecot.org/releases/$(COMPONENT_MAJOR_VER)/$(COMPONENT_ARCHIVE)

(Perhaps I'm being too anal!)

For the SMF service, I'd recommend ditching the start method script and 
do the start/stop stuff in the manifest itself. I have no idea why so 
many services have one of these when they're often completely unnecessary.

The "if [ -f /etc/dovecot/dovecot.conf ]" check can be turned into an 
SMF dependency, a la:

                 <dependency
                     name='configuration-file'
                     grouping='require_all'
                     restart_on='refresh'
                     type='path'>
                         <service_fmri
 
value='file://localhost/etc/dovecot/dovecot.conf' />
                 </dependency>

(I think that's correct - I'm not 100% sure on the restart_on)

For the start method, you can just directly have "/usr/sbin/dovecot", 
for the refresh method you can use the lovely SMF macro, ":kill -HUP", 
and for stop you can use ":kill"

I'd also recommend changing "enabled='true'" to "enabled='false'" so it 
doesn't get automatically started when dovecot is installed.

You'll also want to add the Illumos CDDL header to the manifest file, 
along with your own copyright line. You can ditch the "ident" GPG line.

You also committed the removal of components/gcc46/gcc.p5m in that 
commit which you probably didn't want to do! Not an issue though we can 
work around it when we commit this to the main repo.

Last nitpick is the .la files are still there - I'd recommend dropping 
these by adding the following transform near the top:

<transform file path=.+/lib/.+\.la -> drop>

(This is better than removing them manually - it makes maintaining the 
.p5m file easier as someone else can do "make sample-manifest" and diff 
them).

Apart from these cosmetic changes, it's looking good! Great work Colin 
and thanks for your hard work :-) Looking forward to doing the full commit.

Cheers,

Alasdair

>
> On Tue, Nov 15, 2011 at 12:43 AM, Josef 'Jeff' Sipek
> <jeffpc at josefsipek.net <mailto:jeffpc at josefsipek.net>> wrote:
>
>     On Sat, Nov 12, 2011 at 11:17:10PM +0000, Colin Ellis wrote:
>      > bitbucket here:
>      > https://bitbucket.org/cellis_oidev/oi-build/changeset/d7c2addf18b7
>
>     Awesome, this one was on my todo list.  Less work for me :)
>
>     1) no need to set --prefix & --sbindir yourself
>
>     2) $(ETCDIR) instead of /etc
>
>     3) did the `gmake publish` not complain about the missing
>        info.classification?
>
>     4) Do we really need to ship all those .a and .la files?  Solaris likes
>        shared libs a lot - and handles them pretty well too.
>
>     5) Do the files in usr/share/doc have the doc facet?  (They should;
>     you can
>        check the published manifest.)
>
>     6) Is there an SMF manifest?
>
>     Thanks!
>
>     Jeff.
>
>     --
>     All parts should go together without forcing.  You must remember
>     that the
>     parts you are reassembling were disassembled by you.  Therefore, if you
>     can’t get them together again, there must be a reason.  By all
>     means, do not
>     use a hammer.
>                     — IBM Manual, 1925
>
>     _______________________________________________
>     oi-dev mailing list
>     oi-dev at openindiana.org <mailto:oi-dev at openindiana.org>
>     http://openindiana.org/mailman/listinfo/oi-dev
>
>
>
>
> _______________________________________________
> oi-dev mailing list
> oi-dev at openindiana.org
> http://openindiana.org/mailman/listinfo/oi-dev





More information about the oi-dev mailing list