[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-ha-dev
Subject: Re: [Linux-ha-dev] Make install and haclient/hacluster
From: Alan Robertson <alanr () unix ! sh>
Date: 2004-12-28 15:39:27
Message-ID: 41D17E2F.5000806 () unix ! sh
[Download RAW message or body]
David Lee wrote:
> On Tue, 21 Dec 2004, Soffen, Matthew wrote:
>
>
>>OK. I'm getting to a point now that Its annoying me.
>>
>>I see that now when I do a make install on FreeBSD ( and probably Solaris ),
>>I'm getting a warning because its attempting to change ownership of certain
>>files to the non-existent hacluster user .
>
>
> I think the issue will be probably "make install" in general (on any OS,
> not just *BSD or Solaris). But this probably isn't noticed on many Linux
> installations because their procedures typically bypass "make install".
As does Solaris. Anyone with a packaging system probably does the same...
>>I see that for Linux, the user is created in the heartbeat.spec file ( great
>>). But what do we do for everybody else ?
>
>
> Nit-pick: heartbeat.spec is probably only for certain sub-types of Linux
> (e.g Redhat), rather than Linux in general.
RPMs are the standard Linux packaging mechanism, and not just Red Hat packages.
> Debian (Linux) seems to use "debian/heartbeat.postinst".
>
> Solaris (when choosing the pkg, rather than "make install", route) uses
> "pkg/InfoFiles/preinstall.in". (I know that, 'cos I wrote it!)
As I noted above. The uid needs to be added by any packaging mechanism.
Having it in
>>Where in the code should this happen ? I'm thinking in the main body before
>>anything else is done, we do a useradd in heartbeat/Makefile then we do the
>>actual "make install" commands.
>>
>>I know we need to check for the user before we try to add them. Should I
>>write this logic and then send it for review ?
>
>
> Have a look at the existing mechanisms as above.
>
> Does FreeBSD have a pkg/rpm/deb for use in preference to "make install"?
>
> (Note that in Solaris/pkg, I went for pre- (not post-) install, because
> the identifier and group need to be in place before the main pkg stuff
> runs. I don't understand "deb" stuff, but the appearance of the
> equivalent in something named "post" (not "pre") looks a little strange.)
>
> Of course, the underlying problem is that different OSes have different
> preferred mechanisms for installation and maintenance. And where there is
> such a mechanism, "make install" is probably best avoided.
Yes.
> What we've ended up doing is replicating portions of shell script across
> several different places (see list above, and, in theory, at least, in
> "Makefile"). And, of course, these can easily get out of step.
Yes. So, it sucks. We didn't make it suck. We just have to live with it.
> So if your FreeBSD has a non-make mechanism (analogous to rpm/pkg etc.)
> then the quick answer might be to do yet another replicate-and-edit
> operation with such a shell fragment.
>
> A better one (in addition to, not instead of, the non-make mechanism)
> might be to get make to do these shell fragments.
>
> But the nicest solution would probably be if those shell fragments could
> be derived from a common source and pushed into the relevant files
> ("Makefile", "heartbeat.spec", "pkg/InfoFiles/preinstall.in", etc.) at
> configure time. But probably non-trivial to do! (Your mission, should
> you choose to accept it, ...)
And, they're done a little differently, because these different OSes have
slightly different conventions and options to the commands, etc...
--
Alan Robertson <alanr@unix.sh>
"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic