Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154729 - mythtv-0.20_p11626 overwrites bash_profile and xinitrc
Summary: mythtv-0.20_p11626 overwrites bash_profile and xinitrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-10 13:32 UTC by ra
Modified: 2006-12-17 18:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ra 2006-11-10 13:32:13 UTC
The latest patch release of MythTV overwrites mythtv user's .bash_profile and .xinitrc - without warning!

This new change means that it will overwrite any local changes made to these files, and more bizarrely, it will try to launch evilwm, even though that is not a dependency of the package.

Please either check to make sure its not overwriting any local files within the mythtv home directory, or make it an optional extra, and not mandatory.
Comment 1 Steve Herber 2006-11-14 00:49:48 UTC
Even worse, this release requires you to have a writeable ~mythtv home directory.  I run the frontenv under my own UID and my entry for mythtv looks like this:

# grep myth /etc/passwd /etc/group
/etc/passwd:mythtv:x:103:27:added by portage for mythtv:/dev/null:/usr/sbin/nologin
/etc/group:tty:x:5:mythtv
/etc/group:audio:x:18:mythtv,vdr
/etc/group:video:x:27:root,mythtv,vdr

I would recommend the elimination of this recent ebuild change:
>       insinto /home/mythtv
>       newins "${FILESDIR}"/bash_profile .bash_profile
>       newins "${FILESDIR}"/xinitrc .xinitrc

Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2006-11-15 15:01:00 UTC
The user is a user created by the ebuild for the purpose of dropping privileges from root which is the default insecure way of running MythTV. If you don't like it, do something else. It's as is provided by the package. 
Comment 3 ra 2006-11-15 16:01:06 UTC
I don't have a problem with the mythtv user. I think you misunderstand.

What I am saying is that .xinitrc and .bash_profile files are configuration files and should not be overwritten everytime an emerge happens, just like /etc files aren't overwritten.

Also, the current .xinitrc file assumes that we have evilwm installed and wish to use mythfrontend.

I personally use fvwm2 and mythwelcome on my setup, and having this overwritten everytime I emerge mythtv is not very nice.
Comment 4 ra 2006-11-23 14:31:29 UTC
Seem to have found a solution to this.

echo 'CONFIG_PROTECT="/home/mythtv"' > /etc/env.d/10mythtv-config

Then run env-update. Maybe add this to the ebuild?
Comment 5 James Bevan 2006-12-01 15:49:25 UTC
This new behaviour is also incompatible with environments (like mine) where /home is NFS-mounted & the export isn't root-writeable.  The emerge naturally fails at the point where ~mythtv is being populated with .bashrc and .xinitrc.  Unless this step can somehow be made to run under the mythtv user account?
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2006-12-17 18:58:45 UTC
Fixed in mythtv-0.20_p12172. You will actually need to install the version first, which will overwrite your bash_profile and xinitrc again. But from then on out, it will protect those files.