Bug 51947 - .profile broken after installing mono
Summary: .profile broken after installing mono
Status: RESOLVED FIXED
Alias: None
Product: Installers
Classification: Mono
Component: macOS Installer ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alexis Christoforides
URL:
Depends on:
Blocks:
 
Reported: 2017-01-30 07:18 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-06-07 01:07 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Rolf Bjarne Kvinge [MSFT] 2017-01-30 07:18:17 UTC
Repro:

* Put something in ~/.profile
* Install latest mono 4.8 (4.8.0.472 in my case).
* Open a new terminal window.
* Check that what you put in ~/.profile wasn't executed.

This is because the mono packager creates ~/.bash_profile, which overrides ~/.profile.

Also the mono packager creates ~/.bash_profile as root:

$ ls -la ~/.bash_profile 
-rw-r--r--  1 root  staff  36 Jan 30 07:53 /Users/rolf/.bash_profile

which is all kinds of bad.

$ mono --version
Mono JIT compiler version 4.8.0 (mono-4.8.0-branch/6f90ed1 Sat Jan 21 09:40:15 EST 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          yes(3.6.0svn-mono-master/8b1520c)
	GC:            sgen
Comment 1 kkurz 2017-02-01 17:42:53 UTC
Also seeing this issue and it's tremendously annoying. Following on this ticket to increase visibility.
Comment 2 mcundiff 2017-02-01 17:48:11 UTC
Thirded.  Also getting this issue and finding it frustrating.
Comment 3 James Moore 2017-02-01 17:56:52 UTC
+1.  This is a tool for developers; just tell us what you'd like to add to the environment and we'll do it where and how we want.  Don't muck around with my .bashrc or .profile or anything else like that.
Comment 4 Alexander Köplinger [MSFT] 2017-06-07 01:07:16 UTC
This was fixed in https://github.com/xamarin/bockbuild/commit/ea5675a397326eaf524c6910ecc4ff92121b4553 before the stable Mono 4.8 release.