RE: [PATCH] ibacm: Fixes to ACM package to support distros

Hefty, Sean
2012-04-05T19:10:25Z

I've incorporated most of the changes, but see below.

> > -EXTRA_DIST = src/acm_mad.h src/libacm.h \
> > - linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) acm_opts.cfg \
> > - acm_addr.cfg
> > +EXTRA_DIST = src/acm_mad.h src/libacm.h ibacm.init \
> > + linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) ibacm_opts.cfg
> \
> > + ibacm_addr.cfg
> > +
> > +install-exec-hook:
> > + if ! test -d $(DESTDIR)$(sysconfdir); then \
> > + mkdir -p $(DESTDIR)$(sysconfdir); \
> > + fi; \
> > + if ! test -d $(DESTDIR)$(sysconfdir)/rdma; then \
> > + mkdir -p $(DESTDIR)$(sysconfdir)/rdma; \
> > + fi; \
> > + if ! test -d $(DESTDIR)$(sysconfdir)/init.d; then \
> > + mkdir -p $(DESTDIR)$(sysconfdir)/init.d; \
> > + fi; \
> > + install -m 755 ibacm.init $(DESTDIR)$(sysconfdir)/init.d/ibacmd;
>
> I'm curious why you didn't just do install -D -m 755 ibacm.init
> $(DESTDIR)$(sysconfdir)/init.d/ibacmd instead of all the individual
> calls to mkdir.

ignorance on the existence of the '-D' option :)

> > +PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>
> I'm not very keen on including /usr/local in the search path on system
> binaries. It can be done, but we would patch it out (and I imagine SuSE
> would too). It's a support issue. Having /usr/local override the
> system installed binaries means that you can end up with strange things
> happening, and support scratching their head and going "what the hell is
> causing that" and in the end it's because a different binary than the
> one RPM installed is actually running.

I create a .tar.gz package using 'make dist', copy it to another system, then install it using 'configure && make install'. When I do that, sysconfdir defaults to /usr/local/etc, sbindir /usr/local/sbin, and bindir to /usr/local/bin. I added /usr/local to PATH, so that the init script would work. Otherwise I get a 'command not found' error when running the script. On a side note, my ibacm configuration files end up in /usr/local/etc/rdma.

To say that I'm not sure what autotools and the init scripts are doing is an understatement... The init script finds ibacm in /usr/sbin, but not /usr/local/sbin where it ended up being installed. I'm not sure how to fix that.

- Sean