Ticket #30060 (closed defect: fixed)
maven-ant-tasks: Could not create local repository
| Reported by: | conradwt@… | Owned by: | ian.eure@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.99 |
| Keywords: | lion | Cc: | aminggs@…, ktsujister@…, and.damore@… |
| Port: | maven-ant-tasks |
Description
Hi, the installation failed for port, maven-ant-tasks, when I invoked the following command:
sudo port install leiningen
$ cat /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/main.log
---> Building maven-ant-tasks
Error: Target org.macports.build returned: shell command failed (see log for details)
Error: Failed to install maven-ant-tasks
Log for maven-ant-tasks is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/main.log
Error: The following dependencies were not installed: maven-ant-tasks
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
13:31 ~/clojure.dir/projects/clojure 1.9.2@/Users/conradwt/.rvm/gems/ruby-1.9.2-head [master*] $ cat /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/main.log
version:1
:debug:clean Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/maven-ant-tasks/work
:debug:clean changing euid/egid - current euid: 0 - current egid: 0
:debug:clean egid changed to: 503
:debug:clean euid changed to: 504
:debug:main Executing org.macports.main (maven-ant-tasks)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:archivefetch archivefetch phase started at Wed Jul 6 13:31:00 PDT 2011
:msg:archivefetch ---> Fetching archive for maven-ant-tasks
:debug:archivefetch Executing org.macports.archivefetch (maven-ant-tasks)
:debug:archivefetch Can't run archivefetch on this port without elevated privileges. Escalating privileges back to root.
:debug:archivefetch euid changed to: 0. egid changed to: 0.
:debug:archivefetch changing euid/egid - current euid: 0 - current egid: 0
:debug:archivefetch egid changed to: 503
:debug:archivefetch euid changed to: 504
:info:archivefetch ---> maven-ant-tasks-2.0.10_0.darwin_11.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/software/maven-ant-tasks
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:fetch fetch phase started at Wed Jul 6 13:31:00 PDT 2011
:notice:fetch ---> Fetching maven-ant-tasks
:debug:fetch Can't run fetch on this port without elevated privileges. Escalating privileges back to root.
:debug:fetch euid changed to: 0. egid changed to: 0.
:debug:fetch changing euid/egid - current euid: 0 - current egid: 0
:debug:fetch egid changed to: 503
:debug:fetch euid changed to: 504
:debug:fetch Executing org.macports.fetch (maven-ant-tasks)
:info:fetch ---> maven-ant-tasks-2.0.10-src.tar.gz doesn't seem to exist in /opt/local/var/macports/distfiles/maven-ant-tasks
:debug:fetch Pinging www.apache.org...
:debug:fetch Pinging distfiles.macports.org...
:debug:fetch Pinging aarnet.au.distfiles.macports.org...
:debug:fetch Pinging lil.fr.distfiles.macports.org...
:debug:fetch Pinging sea.us.distfiles.macports.org...
:debug:fetch Pinging ykf.ca.distfiles.macports.org...
:debug:fetch www.apache.org ping time is 59.659
:debug:fetch distfiles.macports.org ping time is 35.461
:debug:fetch aarnet.au.distfiles.macports.org ping time is 190.449
:debug:fetch lil.fr.distfiles.macports.org ping time is 160.043
:debug:fetch sea.us.distfiles.macports.org ping time is 10000
:debug:fetch ykf.ca.distfiles.macports.org ping time is 111.354
:notice:fetch ---> Attempting to fetch maven-ant-tasks-2.0.10-src.tar.gz from http://distfiles.macports.org/maven-ant-tasks
:debug:fetch Privilege de-escalation not attempted as not running as root.
:debug:checksum checksum phase started at Wed Jul 6 13:31:04 PDT 2011
:notice:checksum ---> Verifying checksum(s) for maven-ant-tasks
:debug:checksum Executing org.macports.checksum (maven-ant-tasks)
:info:checksum ---> Checksumming maven-ant-tasks-2.0.10-src.tar.gz
:debug:checksum Correct (md5) checksum for maven-ant-tasks-2.0.10-src.tar.gz
:debug:checksum Privilege de-escalation not attempted as not running as root.
:debug:extract extract phase started at Wed Jul 6 13:31:04 PDT 2011
:notice:extract ---> Extracting maven-ant-tasks
:debug:extract Executing org.macports.extract (maven-ant-tasks)
:info:extract ---> Extracting maven-ant-tasks-2.0.10-src.tar.gz
:debug:extract setting option extract.args to '/opt/local/var/macports/distfiles/maven-ant-tasks/maven-ant-tasks-2.0.10-src.tar.gz'
:debug:extract Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
:debug:extract Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/maven-ant-tasks/maven-ant-tasks-2.0.10-src.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -'
:debug:extract Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/maven-ant-tasks/maven-ant-tasks-2.0.10-src.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -
:debug:extract euid/egid changed to: 0/0
:debug:extract chowned /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work to macports
:debug:extract euid/egid changed to: 504/503
:debug:extract Privilege de-escalation not attempted as not running as root.
:debug:patch patch phase started at Wed Jul 6 13:31:04 PDT 2011
:debug:patch Executing org.macports.patch (maven-ant-tasks)
:debug:patch Privilege de-escalation not attempted as not running as root.
:debug:configure configure phase started at Wed Jul 6 13:31:04 PDT 2011
:notice:configure ---> Configuring maven-ant-tasks
:debug:configure Using compiler 'Mac OS X llvm-gcc 4.2'
:debug:configure Executing org.macports.configure (maven-ant-tasks)
:debug:configure Privilege de-escalation not attempted as not running as root.
:debug:build build phase started at Wed Jul 6 13:31:04 PDT 2011
:notice:build ---> Building maven-ant-tasks
:debug:build Executing org.macports.build (maven-ant-tasks)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10" && mvn package'
:debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10" && mvn package
:info:build [ERROR] Could not create local repository at /var/root/.m2/repository -> [Help 1]
:info:build [ERROR]
:info:build [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
:info:build [ERROR] Re-run Maven using the -X switch to enable full debug logging.
:info:build [ERROR]
:info:build [ERROR] For more information about the errors and possible solutions, please read the following articles:
:info:build [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10" && mvn package " returned error 1
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for maven-ant-tasks): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:error:build Failed to install maven-ant-tasks
:notice:build Log for maven-ant-tasks is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/main.log
Change History
comment:1 Changed 2 years ago by ryandesign@…
- Owner changed from macports-tickets@… to ian.eure@…
- Cc ian.eure@… removed
- Summary changed from Could not create local repository to maven-ant-tasks: Could not create local repository
comment:2 Changed 2 years ago by conradwt@…
I'm invoking the installation command by doing the following on the only account on this machine:
sudo port install leiningen
Next, the account has 'Admin' permission.
comment:3 Changed 2 years ago by ryandesign@…
And are you really running MacPorts 1.9.2, or are you running a beta of MacPorts 2.0.0? Are you using a "MacPorts user"? (2.0.0 does by default.)
comment:4 Changed 2 years ago by conradwt@…
I'm running the following version of MacPorts built from source:
$ port -v MacPorts 1.9.99
comment:5 Changed 2 years ago by conradwt@…
I do not have a MacPorts user setup unless this is something MacPorts create on installation.
comment:6 Changed 2 years ago by ryandesign@…
- Version changed from 1.9.2 to 1.9.99
What does the "macportsuser" line in /opt/local/etc/macports/macports.conf say?
comment:7 Changed 2 years ago by conradwt@…
It's commented out within the source file:
# Set the user to run MacPorts compiles, etc as when privileges are dropped during an install #macportsuser root
comment:8 Changed 2 years ago by conradwt@…
In MacPorts 2.0.0 configuration, /opt/local/etc/macports/macports.conf, should the 'macportsuser' be commented out? For example, I see the following:
# Set the user to run MacPorts compiles, etc as when privileges are dropped during an install #macportsuser root
I pose the question because when I uncommented this line, this port installs without any issues.
comment:10 Changed 22 months ago by alexis@…
I'm seeing the same issue on Snow Leopard.
In Macports v 2.0.1, on OSX 10.6.8, I am getting a consistent install failure. My macports is a standard install, upgraded from an original install a few months ago.
I attach the debug log of the failed install, which I captured with "sudo port -d install maven-ant-tasks &> log"
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/maven-ant-tasks
DEBUG: OS darwin/10.8.0 (Mac OS X 10.6) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: universal_variant is false, so not adding the default universal variant
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
DEBUG: egid changed to: 502
DEBUG: euid changed to: 504
DEBUG: Starting logging for maven-ant-tasks
DEBUG: epoch: in tree: 0 installed: 0
DEBUG: maven2 2.2.1_3 exists in the ports tree
DEBUG: maven2 2.2.1_3 is the latest installed
DEBUG: maven2 2.2.1_3 is active
DEBUG: Merging existing variants '' into variants
DEBUG: new fully merged portvariants:
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/java/maven2
DEBUG: OS darwin/10.8.0 (Mac OS X 10.6) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: Using group file /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/select-1.0.tcl
DEBUG: universal_variant is false, so not adding the default universal variant
DEBUG: No need to upgrade! maven2 2.2.1_3 >= maven2 2.2.1_3
DEBUG: epoch: in tree: 0 installed: 0
DEBUG: maven_select 0.3_1 exists in the ports tree
DEBUG: maven_select 0.3_1 is the latest installed
DEBUG: maven_select 0.3_1 is active
DEBUG: Merging existing variants '' into variants
DEBUG: new fully merged portvariants:
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/maven_select
DEBUG: OS darwin/10.8.0 (Mac OS X 10.6) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: Using group file /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/select-1.0.tcl
DEBUG: universal_variant is false, so not adding the default universal variant
DEBUG: No need to upgrade! maven_select 0.3_1 >= maven_select 0.3_1
---> Computing dependencies for maven-ant-tasks
DEBUG: Searching for dependency: maven2
DEBUG: Found Dependency: receipt exists for maven2
DEBUG: Executing org.macports.main (maven-ant-tasks)
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
DEBUG: egid changed to: 502
DEBUG: euid changed to: 504
DEBUG: Skipping completed org.macports.archivefetch (maven-ant-tasks)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.fetch (maven-ant-tasks)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.checksum (maven-ant-tasks)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.extract (maven-ant-tasks)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.patch (maven-ant-tasks)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.configure (maven-ant-tasks)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: build phase started at Wed Aug 17 12:14:50 BST 2011
---> Building maven-ant-tasks
DEBUG: Executing org.macports.build (maven-ant-tasks)
DEBUG: Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10" && mvn package'
DEBUG: Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10" && mvn package
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/12/maven-parent-12.pom
[WARNING] Failed to create parent directories for resolution tracking file /Users/alexis/.m2/repository/org/apache/maven/maven-parent/12/maven-parent-12.pom.lastUpdated
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.maven:maven-ant-tasks:2.0.10 (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.apache.maven:maven-parent:pom:12 from/to central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /Users/alexis/.m2/repository/org/apache/maven/maven-parent/12 and 'parent.relativePath' points at wrong local POM @ line 25, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/work/maven-ant-tasks-2.0.10" && mvn package " returned error 1
Error: Target org.macports.build returned: shell command failed (see log for details)
DEBUG: Backtrace: shell command failed (see log for details)
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for maven-ant-tasks): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for maven-ant-tasks is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_maven-ant-tasks/maven-ant-tasks/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
comment:13 Changed 21 months ago by and.damore@…
- Status changed from new to closed
- Resolution set to fixed
Adding
build.env-append HOME=${workpath}/home
to Portfile fixes it.
Committed r84645 and closing this ticket.


First, let's be clear that you're running a pre-release of Lion.
Second, the error is "Could not create local repository at /var/root/.m2/repository". Logically only root is allowed to write into root's home directory, but your log also says "Privilege de-escalation not attempted as not running as root". What user are you running MacPorts as, if not root?