[MacPorts] #26623: couchdb @1.0.1 may corrupt launchctl files for "re-install"

MacPorts noreply at macports.org
Sat Sep 25 07:16:01 PDT 2010


#26623: couchdb @1.0.1 may corrupt launchctl files for "re-install"
--------------------------------+-------------------------------------------
 Reporter:  llyodall@…          |       Owner:  macports-tickets@…                   
     Type:  defect              |      Status:  new                                  
 Priority:  Normal              |   Milestone:                                       
Component:  ports               |     Version:  1.9.1                                
 Keywords:                      |        Port:                                       
--------------------------------+-------------------------------------------
 This is bad because in general I have been able to uninstall and install
 other MacPort efficiently and effectively. I didn't expect my
 /Library/LaunchDaemons directory to completely disappear on the Uninstall
 of couchdb @1.0.1

 This is what I tried:

 shell > sudo port install couchdb

 shell > sudo port uninstall couchdb

 shell > sudo port install couchdb

 ERROR strings that print on "re-install"
 ......
 Error: reinplace: couldn't read file
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_couchdb/work/destroot/opt/local/Library/LaunchDaemons/org.apache.couchdb.plist":
 no such file or directory
 .....

 WORKAROUND

 shell > sudo mkdir
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_couchdb/work/destroot/opt/local/Library/LaunchDaemons

 shell > sudo touch
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_couchdb/work/destroot/opt/local/Library/LaunchDaemons/org.apache.couchdb.plist

 shell > sudo port install couchdb

 /*** this will succeed, however DO NOT run the launchctl yet ****/

 NOTE: the org.apache.couchdb.plist is created but there is no data. We
 need to add the PLIST data for launchctl.

 shell > sudo vi /Library/LaunchDaemons/org.apache.couchdb.plist

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
   <key>Label</key>
   <string>org.apache.couchdb</string>
   <key>EnvironmentVariables</key>
   <dict>
     <key>HOME</key>
     <string>~</string>


   </dict>
   <key>ProgramArguments</key>
   <array>
     <string>/opt/local/bin/couchdb</string>
   </array>
   <key>UserName</key>
   <string>couchdb</string>
   <key>StandardOutPath</key>
   <string>/dev/null</string>
   <key>StandardErrorPath</key>
   <string>/dev/null</string>
   <key>RunAtLoad</key>
   <true/>
   <key>KeepAlive</key>
   <true/>
 </dict>
 </plist>

 NOTE: Now execute the launchtctl command from the message of the
 couchdb successful install.


 shell > sudo launchctl load -w
 /Library/LaunchDaemons/org.apache.couchdb.plist

 shell > curl http://127.0.0.1:5984

 {"couchdb":"Welcome","version":"1.0.1"}


 Perhaps the install procedure needs to be a little bit proactive in
 creating directories if they do not exist.

 { :-)  (happy (coding)) }

 Jonathan

-- 
Ticket URL: <https://trac.macports.org/ticket/26623>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list