rpms/java-1.5.0-gcj/devel aot-compile-rpm.patch, NONE, 1.1 java-1.5.0-gcj.spec, 1.20, 1.21

Tom Callaway (spot) fedora-extras-commits at redhat.com
Wed Oct 17 13:16:57 UTC 2007


Author: spot

Update of /cvs/pkgs/rpms/java-1.5.0-gcj/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27718

Modified Files:
	java-1.5.0-gcj.spec 
Added Files:
	aot-compile-rpm.patch 
Log Message:

fix aot-compile-rpm to compile outside of the buildroot, then copy in


aot-compile-rpm.patch:

--- NEW FILE aot-compile-rpm.patch ---
--- java-gcj-compat-1.0.76/aot-compile-rpm	5 Sep 2006 15:04:01 -0000	1.4
+++ java-gcj-compat-1.0.76/aot-compile-rpm	12 Oct 2007 08:05:58 -0000
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-## Copyright (C) 2005, 2006 Red Hat, Inc.
+## Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
 ## Written by Gary Benson <gbenson at redhat.com>
 ##
 ## This program is free software; you can redistribute it and/or modify
@@ -28,6 +28,12 @@
         raise aotcompile.Error, "%s: unexpected output" % cmd
     return dir
 
+def copy(srcdir, dstdir, suffix):
+    srcdir = os.path.join(srcdir, suffix.lstrip(os.sep))
+    dstdir = os.path.join(dstdir, suffix.lstrip(os.sep))
+    os.makedirs(os.path.dirname(dstdir))
+    aotcompile.system(("/bin/cp", "-a", srcdir, dstdir))
+
 try:
     name = os.environ.get("RPM_PACKAGE_NAME")
     if name is None:
@@ -38,9 +44,12 @@
     srcdir = os.environ.get("RPM_BUILD_ROOT")
     if srcdir in (None, "/"):
         raise aotcompile.Error, "bad $RPM_BUILD_ROOT"
+    tmpdir = os.path.join(os.getcwd(), "aot-compile-rpm")
+    if os.path.exists(tmpdir):
+        raise aotcompile.Error, "%s exists" % tmpdir
     dstdir = os.path.join(libdir(), "gcj", name)
 
-    compiler = aotcompile.Compiler(srcdir, dstdir, srcdir)
+    compiler = aotcompile.Compiler(srcdir, dstdir, tmpdir)
     compiler.gcjflags[0:0] = os.environ.get("RPM_OPT_FLAGS", "").split() 
 
     # XXX: This script should not accept options, because having
@@ -64,6 +73,7 @@
         sys.exit(1)
 
     compiler.compile()
+    copy(tmpdir, srcdir, dstdir)
 
 except aotcompile.Error, e:
     print >>sys.stderr, "%s: error: %s" % (


Index: java-1.5.0-gcj.spec
===================================================================
RCS file: /cvs/pkgs/rpms/java-1.5.0-gcj/devel/java-1.5.0-gcj.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- java-1.5.0-gcj.spec	17 Oct 2007 01:56:26 -0000	1.20
+++ java-1.5.0-gcj.spec	17 Oct 2007 13:16:24 -0000	1.21
@@ -55,13 +55,14 @@
 
 Name:    %{name}
 Version: %{javaver}.%{buildver}
-Release: 16%{?dist}
+Release: 17%{?dist}
 Summary: JPackage runtime compatibility layer for GCJ
 Group:   Development/Languages
 
 License: GPL
 URL:     http://sources.redhat.com/rhug/java-gcj-compat.html
 Source0: ftp://sources.redhat.com/pub/rhug/java-gcj-compat-%{jgcver}.tar.gz
+Patch0:  aot-compile-rpm.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -262,6 +263,7 @@
 
 %prep
 %setup -q -n java-gcj-compat-%{jgcver}
+%patch0 -p1
 
 %build
 %configure --disable-symlinks --with-arch-directory=%{_arch} \
@@ -716,6 +718,9 @@
 %endif
 
 %changelog
+* Wed Oct 17 2007 Tom "spot" Callaway <tcallawa at redhat.com> - 1.5.0.0-17
+- fix aot-compile-rpm to not run inside the buildroot
+
 * Tue Oct 16 2007 Dennis Gilmore <dennis at ausil.us> - 1.5.0.0-16
 - add sparc64 to the list of 64 bit archs
 




More information about the fedora-extras-commits mailing list