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@xxxxxxxxxx> GPG KeyID: 0E572FDD http://people.redhat.com/dledford
Attachment:
signature.asc
Description: OpenPGP digital signature