Bug 183082 - gdm package scripts could use some attention
gdm package scripts could use some attention
Product: Fedora
Classification: Fedora
Component: gdm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2006-02-25 20:58 EST by Michal Jaegermann
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-26 09:53:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
a variant of %post script for 'gdm' package (2.43 KB, text/plain)
2006-02-25 20:58 EST, Michal Jaegermann
no flags Details

  None (edit)
Description Michal Jaegermann 2006-02-25 20:58:35 EST
Description of problem:

Installation scripts in 'gdm' package should be more robust.  The first
problem is that if want to be sure that /etc/gdm/Xsession is replaced
by a link from a package then we have to be sure that a file (link) with
such name is absent or cpio unpacking may leave that alone.  Something
like that in %pre should be good enough in practice

 [ -f $xsess -a ! -h $xsess ] && mv $xsess ${xsess}.rpmsave

possibly with the whole second line replaced simply by 'rm -f $xsess'
(or 'rm' used in place of 'mv' if we want to be more careful).

Proposed %post script is attached.  Changes are reducing a number and complexity
of edit operations (down to zero in a "normal" case).

The whole logic is copied from an existing script but there is some doubt about
an intent.  Do we really seriously want to comment out from an old configuration
file only a very specific "RebootCommand", with any changes in spacing or
ordering giving "no match", or really a corresponding sed action should read 
closer to that:

    -e '/^RebootCommand=/s@^@### @' \

and similar in all cases where substitutions are done with "@#&@"?

Version-Release number of selected component (if applicable):
Comment 1 Michal Jaegermann 2006-02-25 20:58:35 EST
Created attachment 125265 [details]
a variant of %post script for 'gdm' package
Comment 2 Ray Strode [halfline] 2006-02-26 09:53:11 EST

The idea of the sed scripts is to prune out unchanged defaults from the custom
config, so that if the defaults are every changed in the defaults.conf file,
then users will get the updated defaults.

In the cases where a user explicitly edits the config file, the scripts probably
shouldn't try to comment out the users change.  That's the logic behind using
exact strings anyway.  I don't know if it's the best logic.  In hindsight, I
probably shouldn't have tried to migrate settings from gdm.conf to custom.conf
at all.  It only takes a minute to re setup the settings, it's something gdm
users have been used to for a long time anyway, and it would have been a one
time thing.

Anyway, your %post scriplet looks good.  I committed it.  I probably won't build
it until we need to make another change to gdm.

Note You need to log in before you can comment on or make changes to this bug.