All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Johnson <n3npq@nc.rr.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: "Fedora SELinux support list for users & developers."
	<fedora-selinux-list@redhat.com>, SELinux <SELinux@tycho.nsa.gov>
Subject: Re: New design for policy on disk allowing multiple policy rpms to be simultaniously installed.
Date: Wed, 26 May 2004 20:45:27 -0400	[thread overview]
Message-ID: <40B53A27.9070709@nc.rr.com> (raw)
In-Reply-To: <1085590563.31854.95.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:

>On Tue, 2004-05-25 at 15:18, Jeff Johnson wrote:
>  
>
>>Well, the existing means to handle simultaneous installs of otherwise 
>>mutually exclusive packages is the
>>alternatives mechanism used to handle sendmail vs. postfix and lpd vs. cups.
>>
>>Yes, symlinks, feeble, but that is the existing mechanism, might as well 
>>use if in the distro.
>>    
>>
>
>Can you elaborate on how this works presently?  How do you avoid
>conflicts among multiple packages owning those symlinks?
>
>  
>

Sure.

sendmail and postfix are mutually conflicting because both wish to use 
/usr/lib/sendmail.

So the path is a symlink, conflicts avoided because the symlink is not part
of any package, but rather a side effect of the install:
$ rpm -qf /usr/lib/sendmail
file /usr/lib/sendmail is not owned by any package

See also "man alternatives".

Here are the scripts from the sendmail package, edited to remove "other 
stuff":

$ rpm -q --scripts sendmail

postinstall scriptlet (using /bin/sh):

#
# Set up the alternatives files for MTAs.
#
/usr/sbin/alternatives --install /usr/sbin/sendmail mta 
/usr/sbin/sendmail.sendmail 90 \
        --slave /usr/bin/mailq mta-mailq /usr/bin/mailq.sendmail \
        --slave /usr/bin/newaliases mta-newaliases 
/usr/bin/newaliases.sendmail \
        --slave /usr/bin/rmail mta-rmail /usr/bin/rmail.sendmail \
        --slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.sendmail \
        --slave /etc/pam.d/smtp mta-pam /etc/pam.d/smtp.sendmail \
        --slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman 
/usr/share/man/man8/sendmail.sendmail.8.gz \
        --slave /usr/share/man/man1/mailq.1.gz mta-mailqman 
/usr/share/man/man1/mailq.sendmail.1.gz \
        --slave /usr/share/man/man1/newaliases.1.gz mta-newaliasesman 
/usr/share/man/man1/newaliases.sendmail.1.gz \
        --slave /usr/share/man/man5/aliases.5.gz mta-aliasesman 
/usr/share/man/man5/aliases.sendmail.5.gz \
        --initscript sendmail
 
 

preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
        /usr/sbin/alternatives --remove mta /usr/sbin/sendmail.sendmail
fi
exit 0
postuninstall scriptlet (using /bin/sh):
if [ "$1" -ge "1" ]; then
        mta=`readlink /etc/alternatives/mta`
        if [ "$mta" == "/usr/sbin/sendmail.sendmail" ]; then
                /usr/sbin/alternatives --set mta /usr/sbin/sendmail.sendmail
        fi
fi
exit 0

HTH

73 de Jeff


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2004-05-27  0:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-25 18:47 New design for policy on disk allowing multiple policy rpms to be simultaniously installed Daniel J Walsh
2004-05-25 19:18 ` Jeff Johnson
2004-05-25 19:34   ` Daniel J Walsh
2004-05-26 16:56   ` Stephen Smalley
2004-05-27  0:45     ` Jeff Johnson [this message]
2004-05-25 19:29 ` Jeff Johnson

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=40B53A27.9070709@nc.rr.com \
    --to=n3npq@nc.rr.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=fedora-selinux-list@redhat.com \
    --cc=sds@epoch.ncsc.mil \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.