|Summary:||ASTERISK-05600: "make install" kills /var making system unusable|
|Reporter:||Andreas Fink (afink)||Labels:|
|Date Opened:||2005-11-14 14:15:11.000-0600||Date Closed:||2011-06-07 14:00:38|
|Description:||do a make install on MacOS X and your /var no longer points to /private/var as in any MacOS X default installation but is a new directory with some asterisk files in it. This makes the system unusable because /var/empty doesnt exist anymore. So you cant ssh to your machine and you lock yourself out totally after a reboot (even from the console).|
Workaround: edit Makefile to install files to /private/var... instead /var.
Second issue somehow related (but by far not as fatal) while make install occurs:
rm -f /private/var/lib/asterisk/sounds/voicemail
rm: /private/var/lib/asterisk/sounds/voicemail: is a directory
thats supposed to be a directory. So why does it try to delete it ?
|Comments:||By: Russell Bryant (russell) 2005-11-14 14:17:42.000-0600|
I am running Mac OSX and do not have this problem. /var stays intact, pointing to /private/var.
How is it being "killed"?
By: Andreas Fink (afink) 2005-11-14 14:24:38.000-0600
by a simple make install. we have seen this now on 3 machines including an intel one. XCode 2.2 on all of them.
(make samples maybe too)
your /var which was symbolic link to private/var is gone and a new /var directory exists with /var/lib/asterisk /var/spool/asterisk and other asterisk files.
All systems where running 10.4.3.
Fix to recover is to rename /var to something else and redo the symbolic link by hand.
By: Russell Bryant (russell) 2005-11-14 15:51:08.000-0600
Well, this sounds like a bug in your version of Mac OSX. All we are doing is "mkdir -p /var/spool/asterisk/voicemail". What version of OSX are you running?
By: twisted (twisted) 2005-11-14 18:20:36.000-0600
I cannot duplicate this issue on my verison of osx (10.4.3) Darwin wsip-24-120-36-183.lv.lv.cox.net 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc
By: Matt O'Gorman (mogorman) 2005-11-14 19:38:45.000-0600
Darwin Liani.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc
worked fine on this box as well
By: Andreas Fink (afink) 2005-11-15 00:20:02.000-0600
about the ""mkdir -p /var/spool/asterisk/voicemail".
This is ok. but when you do a make install on a system who had it already
its doing a rm -f /var/spool/asterisk/voicemail
this should be either a rmdir /var/spool/asterisk/voicemail or rm -rf /var/spool/asterisk/voicemail. Doing that by hand and making the install again works around. This part of the problem is minor. The /var issue is more of a pain. I'm trying to find out what triggers it as it doesnt seem to happen again on my system. But I have seen it on 4 systems, a mac mini whith 10.4.3 which has no additional software installed except XCode 2.2, a Apple Developer Transition Kit, my other developers Laptop and my own Laptop.
By: Andreas Fink (afink) 2005-11-15 00:41:43.000-0600
around line 140 in makefile add:
around line 650:
if [ -n "$(OLDHEADERS)" ]; then \
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/firmware
remove the line
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
By: Andreas Fink (afink) 2005-11-15 00:52:37.000-0600
Note: those problems where all with 1.2.0-rc2. Actually that version is not working at all for me. I can launch asterisk (asterisk; asterisk -r) but then everything I type seems to be accepted but no output whatsoever. Even help just shows the prompt again. typing stop now comes back with the prompt but a second stop now comes back with broken pipe.
I'm checking out CVS now to see if this is the same there. We had a CVS version of 2 weeks ago working without any problem except a $[...] script evaluation which always returned 0. This seems to be fixed in rc2 (at least my Linux box with rc2 doesnt seem to have this issue). Biggest problems are always openh323 which is a pain to compile on MacOS X under dual architecture as openh323 doesnt use any ./configure script and a lot of hand work is needed.
By: Kevin P. Fleming (kpfleming) 2005-11-15 13:50:31.000-0600
/var/asterisk/sounds/voicemail _was_ a symlink when it existed, but we no longer use it, so that's why the Makefile is trying to remove it. Since that is the case, 'rm -f' is the proper command for removing any old symlink that may exist.
By: Russell Bryant (russell) 2005-11-15 13:53:06.000-0600
We shouldn't have to make special paths like that for OSX. If /var is a symlink to /private/var, then it should work just fine. We need to figure out what is messing it up for you. Nobody else seems to be able to reproduce it.
By: John Todd (jtodd) 2005-11-15 13:53:55.000-0600
I just tested this with my laptop. I can't seem to reproduce the problem, but I don't dis-believe that this might be happening.
- checkout and build asterisk
- "make install"
- run Asterisk, works fine (except for the non-functional "asterisk -r" problem; different bug)
- exit Asterisk
- "make install" again
- no problems
My Mac: Darwin zot2.local 8.2.0 Darwin Kernel Version 8.2.0: Fri Jun 24 17:46:54 PDT 2005; root:xnu-792.2.4.obj~3/RELEASE_PPC Power Macintosh powerpc
This is with CVS-HEAD as of about 20 minutes ago.
Can you please include more specific details about how to reproduce this issue?
By: Russell Bryant (russell) 2005-11-15 15:11:22.000-0600
Does this by chance only happen if there is no trace of Asterisk already on the system?
By: twisted (twisted) 2005-11-15 15:37:20.000-0600
my laptop did not have asterisk on it when I tried...
By: John Todd (jtodd) 2005-11-20 22:19:37.000-0600
drumkilla: My laptop started with no trace of Asterisk, so I don't think that is the "trigger." Waiting on the author to supply some additional details with a process for bug reproduction with exact steps.
By: Russell Bryant (russell) 2005-11-21 08:46:47.000-0600
I'm suspending this since nobody else has been able to reproduce the problem.
afink: If you have any additional information that might help us reproduce this, feel free to re-open this bug.