public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] ibacm: Fixes to ACM package to support distros
Date: Thu, 05 Apr 2012 15:21:56 -0400	[thread overview]
Message-ID: <4F7DF0D4.5040101@redhat.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A823734519B048-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3420 bytes --]

On 04/05/2012 03:10 PM, Hefty, Sean wrote:
> 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.

configure --prefix=/usr --sysconfdir=/etc && make && make install

> 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,

Which means some time it got installed there, either by an rpm or
something else.

> but not /usr/local/sbin where it ended up being installed.
> I'm not sure how to fix that.

Do an actual rpm build and install from the rpm.  Or use the command I
listed above to get the configure directories correct (configure
defaults to /usr/local).  But it's generally best to have your files
tracked by rpm.  It makes upgrades and uninstalls work much more
smoothly.  And the rpmbuild program and the macros in the spec file
processing get all your directories correct for you too.  Assuming you
have an rpm based system that you are running from of course.  In that
case, it's fairly simple to do something like the following:

make dist
rpmbuild --rebuild <name_of_tarball>
rpm -Uvh ~/rpmbuild/RPMS/<arch>/<rpmlist>

You might need this in your ~/.rpmmacros file:

%_topdir %(echo $HOME)/rpmbuild


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD
	      http://people.redhat.com/dledford



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]

  parent reply	other threads:[~2012-04-05 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 19:10 [PATCH] ibacm: Fixes to ACM package to support distros Hefty, Sean
     [not found] ` <1828884A29C6694DAF28B7E6B8A823734519A805-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-04-05 16:10   ` Doug Ledford
     [not found]     ` <4F7DC3F8.2030406-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-04-05 19:10       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A823734519B048-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-04-05 19:15           ` Bart Van Assche
2012-04-05 19:21           ` Doug Ledford [this message]
     [not found]             ` <4F7DF0D4.5040101-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-04-06  4:43               ` Hefty, Sean
2012-04-05 20:40           ` Jason Gunthorpe
     [not found]             ` <20120405204038.GA6575-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-04-06  4:35               ` Hefty, Sean
2012-04-17 16:33               ` Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7DF0D4.5040101@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox