From ambari-dev-return-358-apmail-incubator-ambari-dev-archive=incubator.apache.org@incubator.apache.org Thu Dec 22 06:07:00 2011 Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3C999373 for ; Thu, 22 Dec 2011 06:07:00 +0000 (UTC) Received: (qmail 49920 invoked by uid 500); 22 Dec 2011 06:07:00 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 49898 invoked by uid 500); 22 Dec 2011 06:06:59 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 49890 invoked by uid 99); 22 Dec 2011 06:06:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2011 06:06:58 +0000 X-ASF-Spam-Status: No, hits=0.1 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eric818@gmail.com designates 209.85.216.175 as permitted sender) Received: from [209.85.216.175] (HELO mail-qy0-f175.google.com) (209.85.216.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2011 06:06:52 +0000 Received: by qcqw6 with SMTP id w6so4617645qcq.6 for ; Wed, 21 Dec 2011 22:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=3dk2MnqAu3qZqxnG2A+nXWKhHSFogEQ5iWw7ulnj6LI=; b=e5AJe8A+lyD6EiXaTnnyrnPHd19SHFfueEhzcQYPHrVSKfc3VC9/loQBAL3Dc1Czcn km+1MPcyUx1t3HbSvAFoOfYXUpbdXk1PBn/x1ORnGzVNPPguwhhO/o5a8lZb149B6Zdj hgKzvSxvWXNjGIV8F4y5yvhg06UVuVHUZQx9g= MIME-Version: 1.0 Received: by 10.229.75.149 with SMTP id y21mr3647232qcj.69.1324533991660; Wed, 21 Dec 2011 22:06:31 -0800 (PST) Received: by 10.229.247.196 with HTTP; Wed, 21 Dec 2011 22:06:31 -0800 (PST) In-Reply-To: <784B2F97FD8E4B66A7370D70E0D87712@china.huawei.com> References: <6C04CEB8-A8E3-458C-B530-0AB228D9ADDD@gmail.com> <784B2F97FD8E4B66A7370D70E0D87712@china.huawei.com> Date: Wed, 21 Dec 2011 22:06:31 -0800 Message-ID: Subject: Re: Build Error while running build script From: Eric Yang To: ambari-dev@incubator.apache.org, rohithsharmaks@huawei.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I think I have some clue why this is happening. We are using python setup tools to generate a tarball which contains binaries for the compiled OS. On redhat, it would generate a tarball with filename pattern: ambari-agent-0.1.0-linux-*.tar.gz It appears that on SUSE, it may not be following the same filename pattern. When rpmbuild process tries to expand the source tarball, it doesn't exist. Hence the follow up action to "cd usr" f= ails. Could you check target/ambari-agent-0.1.0/dist and see if there is a tarball? It would help us to refine the file name pattern to match the source tarball for rpm to repackage. Thanks regards, Eric On Wed, Dec 21, 2011 at 8:51 PM, RohithSharma w= rote: > Hi Eric, > > Thanks for the quick response. > >>Is Python executable located outside of /usr? > No Eric, Python is installed in /usr itself. > >>The rpm spec file expect the output of artifact to live in a directory >>called usr. =A0Python output on suse is generated outside of usr. > > In my machine, the Python output is generated inside usr (stacktrace > attached), but I am not sure why this problem still persists and fails wi= th > [rpm] RPM build errors: > =A0 =A0 =A0 =A0[rpm] + cd usr > =A0 =A0 =A0 =A0[rpm] /var/tmp/rpm-tmp.94888: line 26: cd: usr: No such fi= le or > =A0 =A0 =A0 =A0 directory > > > _________________________________________________________________________= ___ > > The snippet from var/tmp/rpm-tmp.94888 script which is failing giving the > above error. > > RPM_BUILD_ROOT=3D"/home/isap/.hudson/jobs/Ambari/workspace/agent/target/r= pm/am > bari/BUILD" > export RPM_BUILD_ROOT > set -x > umask 022 > cd "/home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUIL= D" > /bin/rm -rf "$RPM_BUILD_ROOT" > /bin/mkdir -p `dirname "$RPM_BUILD_ROOT"` > /bin/mkdir "$RPM_BUILD_ROOT" > > cd 'usr' > if [ -d ${RPM_BUILD_DIR}/var/log/ambari ]; then > =A0rm -rf ${RPM_BUILD_DIR}/var/log/ambari > fi > > _________________________________________________________________________= ___ > > > Additional trace: > > =A0 =A0 =A0[rpm] -rw-r--r-- root/root =A0 =A0 10613 2011-12-21 14:23 > ./usr/local/lib/python2.6/site-packages/ambari_component/package.py > =A0 =A0 =A0[rpm] -rw-r--r-- root/root =A0 =A0 =A01667 2011-12-21 14:23 > ./usr/local/lib/python2.6/site-packages/ambari_component/__init__.pyc > =A0 =A0 =A0[rpm] -rw-r--r-- root/root =A0 =A0 =A01751 2011-12-21 14:23 > ./usr/local/lib/python2.6/site-packages/ambari_component/main.py > =A0 =A0 =A0[rpm] drwxr-xr-x root/root =A0 =A0 =A0 =A0 0 2011-12-21 14:23 = ./usr/local/bin/ > > =A0 =A0 =A0[rpm] -rwxr-xr-x root/root =A0 =A0 =A0 295 2011-12-21 14:23 > ./usr/local/bin/ambari-agent > =A0 =A0 =A0[rpm] -rwxr-xr-x root/root =A0 =A0 =A0 317 2011-12-21 14:23 > ./usr/local/bin/ambari-torrent-callback > =A0 =A0 =A0[rpm] ++ /usr/bin/id -u > =A0 =A0 =A0[rpm] + '[' 0 =3D 0 ']' > =A0 =A0 =A0[rpm] + /bin/chgrp -Rhf root . > =A0 =A0 =A0[rpm] + /bin/chmod -Rf a+rX,u+w,g-w,o-w . > =A0 =A0 =A0[rpm] + exit 0 > =A0 =A0 =A0[rpm] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.94888 > =A0 =A0 =A0[rpm] + umask 022 > =A0 =A0 =A0[rpm] + cd > /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD > =A0 =A0 =A0[rpm] + /bin/rm -rf > /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD > =A0 =A0 =A0[rpm] ++ dirname > /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD > =A0 =A0 =A0[rpm] + /bin/mkdir -p > /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari > =A0 =A0 =A0[rpm] + /bin/mkdir > /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD > =A0 =A0 =A0[rpm] > =A0 =A0 =A0[rpm] > =A0 =A0 =A0[rpm] RPM build errors: > =A0 =A0 =A0[rpm] + cd usr > _________________________________________________________________________= ___ > > Thanks & Regards > > Rohith Sharma K S > > > > -----Original Message----- > From: Eric Yang [mailto:eric818@gmail.com] > Sent: Wednesday, December 21, 2011 10:31 PM > To: ambari-dev@incubator.apache.org > Subject: Re: Build Error while running build script > > Rpm build is design to build on redhat only. =A0Is Python executable loca= ted > outside of /usr? =A0The rpm spec file expect the output of artifact to li= ve in > a directory called usr. =A0Python output on suse is generated outside of = usr. > Hence the build procedure fails. =A0There should be debian and suse packa= ge > build process in the future, but the project is not there yet. =A0There i= s > also plan to make one artifact for all components. =A0It may be a while b= efore > Debian and suse are supported. > > Sent from my iPhone > > On Dec 21, 2011, at 4:53 AM, RohithSharma wro= te: > >> Hi >> >> >> >> Thank you for response..! >> >> >> >> I am trying to build on LInux : SuSe-11 SP0 >> >> >> >> >> >> Thanks & Regards >> >> RohithSharma K S >> >> >> >> >> >> From: Ahmed Fathalla [mailto:afathalla@gmail.com] >> Sent: Wednesday, December 21, 2011 4:30 PM >> To: ambari-dev@incubator.apache.org; rohithsharmaks@huawei.com >> Subject: Re: Build Error while running build script >> >> >> >> This happened to me when I tried to build the rpm on Ubuntu, are you usi= ng > a >> Debian based system? >> >> On Wed, Dec 21, 2011 at 12:45 PM, RohithSharma >> wrote: >> >> Hi Everyone, >> >> >> >> =A0 I am trying to build Ambari from svn following instructions given in >> read me, as there is no Ambari distribution available in the Apache. >> >> >> >> Following are the steps performed >> >> >> >> Installed Python2.6 and its dependencies. >> >> >> >> Executed the command "mvn clean package -P rpm -DskipTests -X" in the >> Ambari_Home folder. >> >> >> >> While RPM task execution , it failed. =A0Appreciate if you can tell me w= hat >> I'm doing wrong >> >> >> >> =A0 =A0 [rpm] -rwxr-xr-x root/root =A0 =A0 =A0 295 2011-12-21 14:23 >> ./usr/local/bin/ambari-agent >> =A0 =A0 [rpm] -rwxr-xr-x root/root =A0 =A0 =A0 317 2011-12-21 14:23 >> ./usr/local/bin/ambari-torrent-callback >> =A0 =A0 [rpm] ++ /usr/bin/id -u >> =A0 =A0 [rpm] + '[' 0 =3D 0 ']' >> =A0 =A0 [rpm] + /bin/chgrp -Rhf root . >> =A0 =A0 [rpm] + /bin/chmod -Rf a+rX,u+w,g-w,o-w . >> =A0 =A0 [rpm] + exit 0 >> =A0 =A0 [rpm] Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.94888 >> =A0 =A0 [rpm] + umask 022 >> =A0 =A0 [rpm] + cd >> /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD >> =A0 =A0 [rpm] + /bin/rm -rf >> /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD >> =A0 =A0 [rpm] ++ dirname >> /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD >> =A0 =A0 [rpm] + /bin/mkdir -p >> /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari >> =A0 =A0 [rpm] + /bin/mkdir >> /home/isap/.hudson/jobs/Ambari/workspace/agent/target/rpm/ambari/BUILD >> =A0 =A0 [rpm] >> =A0 =A0 [rpm] >> =A0 =A0 [rpm] RPM build errors: >> =A0 =A0 [rpm] + cd usr >> =A0 =A0 [rpm] /var/tmp/rpm-tmp.94888: line 26: cd: usr: No such file or >> directory >> =A0 =A0 [rpm] error: Bad exit status from /var/tmp/rpm-tmp.94888 (%build= ) >> =A0 =A0 [rpm] =A0 =A0 Bad exit status from /var/tmp/rpm-tmp.94888 (%buil= d) >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Reactor Summary: >> [INFO] >> [INFO] agent ............................................. FAILURE > [19.360s] >> >> [INFO] ambari ............................................ SKIPPED >> [INFO] client ............................................ SKIPPED >> [INFO] controller ........................................ SKIPPED >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] BUILD FAILURE >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Total time: 20.854s >> [INFO] Finished at: Wed Dec 21 14:23:14 IST 2011 >> [INFO] Final Memory: 5M/15M >> [INFO] >> ------------------------------------------------------------------------ >> [ERROR] Failed to execute goal >> org.apache.maven.plugins:maven-antrun-plugin:1.6:run (build-rpm) on > project >> ambari-agent: An Ant BuildException has occured: The following error >> occurred while executing this line: >> [ERROR] >> /home/isap/.hudson/jobs/Ambari/workspace/agent/src/packages/build.xml:94= : >> '/usr/bin/rpmbuild' failed with exit code 1 >> [ERROR] -> [Help 1] >> [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/MojoExecutionException >> >> >> >> >> >> >> >> Thanks & Regards >> >> Rohith Sharma K S >> >> >> >> >> -- >> Ahmed Fathalla >> >