{"id":435,"date":"2014-02-24T03:22:06","date_gmt":"2014-02-24T03:22:06","guid":{"rendered":"http:\/\/www.selinuxplus.com\/?p=435"},"modified":"2014-02-24T04:58:04","modified_gmt":"2014-02-24T04:58:04","slug":"ceph-%e5%88%b6%e4%bd%9crpm%e8%bf%87%e7%a8%8b%ef%bc%88%e6%8e%92%e9%94%99%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.selinuxplus.com\/?p=435","title":{"rendered":"ceph \u5236\u4f5crpm\u8fc7\u7a0b\uff08\u6392\u9519\uff09"},"content":{"rendered":"<p>1<strong> ceph0.72<\/strong>\u4ee5\u540e\u7684\u6e90\u7801\u5236\u4f5c\u6210rpm\u5305\u65f6\uff0c\u4f1a\u51fa\u73b0\u9519\u8bef\uff1b\u9519\u8bef\u539f\u56e0\u4e3b\u8981\u4e3a\uff1a\u63d0\u4f9b\u7684cpec\u6587\u4ef6\u5185\uff1b%file\u6587\u4ef6found\uff0c\u4f46\u6ca1\u6709\u5728spec\u7684%file\u6587\u4ef6\u5185\u6dfb\u52a0\uff0c\u6dfb\u52a0\u540e\u5373\u53ef\u4ee5\u6b63\u5e38\u7f16\u8bd1\uff1b<br \/>\n2 <strong>ceph0.61.9<\/strong>\u7248\u672c\u4e2d\u51fa\u73b0\u7684\u95ee\u9898\u8f83\u591a\uff1b\u4e3b\u8981\u95ee\u9898\u4e3a\uff1a1 ceph\u6e90\u7801\u6784\u5efarpm\u5305\uff0c\u5728ubuntu\u7cfb\u7edf\u4e0a\u6784\u5efa\u7684\uff0c\u5728centos\u7cfb\u7edf\u4e2d\u51fa\u73b0\u4ee5\u4e0b\u95ee\u9898\uff1a<br \/>\n\u62a5\u9519\u4e3a\uff1a    <\/p>\n<pre class=\"lang:default decode:true \" >Processing files: cephfs-java-0.61.9-0.el6.x86_64\r\nerror: File not found: \/root\/rpmbuild\/BUILDROOT\/ceph-0.61.9-0.el6.x86_64\/usr\/share\/java\/libcephfs-test.jar<\/pre>\n<p>\u4f46\u5728centos\u7684\u67b6\u6784\u4e0b\u5206\u6790\u539f\u56e0\uff1a<br \/>\n\u5728src\/java\/Makefile.am\u6587\u4ef6\u4e0b\uff1a<\/p>\n<pre class=\"lang:default decode:true \" > if HAVE_JUNIT4\r\n65 \r\n66 JAVA_TEST_CLASSES = $(JAVA_TEST_SRC:test\/%.java=%.class)\r\n67 ESCAPED_JAVA_TEST_CLASSES = com\/ceph\/fs\/CephAllTests\\$$1.class\r\n68 \r\n69 CEPH_TEST_PROXY=test\/com\/ceph\/fs\/CephMountTest.class\r\n70 \r\n71 $(CEPH_TEST_PROXY): $(JAVA_TEST_SRC) $(CEPH_PROXY)\r\n72 \u25b8       export CLASSPATH=$(CLASSPATH):$(EXTRA_CLASSPATH_JAR):java\/:test\/ ; \\\r\n73 \u25b8       $(JAVAC) -source 1.5 -target 1.5 -Xlint:-options test\/com\/ceph\/fs\/*.java\r\n74 \r\n75 libcephfs-test.jar: $(CEPH_TEST_PROXY)\r\n76 \u25b8       $(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %) $(ESCAPED_JAVA_TEST_CLASSES:%=-C test %)\r\n77 \r\n78 java_DATA += libcephfs-test.jar\r\n79 \r\n80 CLEANFILES += test\/com\/ceph\/fs\/*.class libcephfs-test.jar\r\n81 endif # HAVE_JUNIT4 (includes WITH_DEBUG)<\/pre>\n<p> \u53ef\u4ee5\u5224\u65ad\uff0c\u5982\u679c\u8981\u751f\u6210libcephfs-test.jar\u9700\u8981HAVE_JUNIT4\u4e3a\u771f\uff1b<br \/>\n\u5728configure\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff1a<\/p>\n<pre class=\"lang:default decode:true \" >17838 \u25b8       # setup defaults for Debian default-jdk package (without --with-jdk-dir)\r\n17839 \u25b8       if test -z \"$with_jdk_dir\"; then :\r\n17840 \r\n17841 \u25b8       \u25b8          # This works with Debian's default-jdk package\r\n17842 \u25b8       \u25b8          dir='\/usr\/lib\/jvm\/default-java\/'\r\n17843 \u25b8       \u25b8          javac_prog=`find $dir -name javac | head -n 1`\r\n17844 \u25b8       \u25b8          if test -x \"$javac_prog\"; then :\r\n17845 \r\n17846 \u25b8       \u25b8       \u25b8       \u25b8         EXTRA_JDK_BIN_DIR=`dirname $javac_prog`\r\n17847 fi\r\n17848 \u25b8       \u25b8          jnih=`find $dir -name jni.h | head -n 1`\r\n17849 \u25b8       \u25b8          if test -r \"$jnih\"; then :\r\n17850 \r\n17851 \u25b8       \u25b8       \u25b8       \u25b8         EXTRA_JDK_INC_DIR=`dirname $jnih`\r\n17852 fi<\/pre>\n<p>\u6211\u4eec\u8981\u628a   dir=&#8217;\/usr\/lib\/jvm\/default-java\/&#8217; \u6539\u4e3acentos\u7684   dir=&#8217;\/usr\/lib\/jvm\/java\/&#8217; \u6216\u8005\u505a\u4e2a\u8d85\u94fe\u63a5\uff1b\u4f46\u91cd\u65b0\u6d4b\u8bd5\u540e\uff0c\u8fd8\u662f\u4f1a\u53d1\u73b0<\/p>\n<pre class=\"lang:default decode:true \" > Processing files: cephfs-java-0.61.9-0.el6.x86_64\r\nerror: File not found: \/root\/rpmbuild\/BUILDROOT\/ceph-0.61.9-0.el6.x86_64\/usr\/share\/java\/libcephfs-test.jar\u3002<\/pre>\n<p>\u7f51\u4e0a\u7684\u8d44\u6599\u4e3a\uff1a<br \/>\n\u4e3b\u8981\u539f\u56e0\u4e3a\u6ca1\u6709\u6dfb\u52a0\uff1a<br \/>\nRequires:       junit4<br \/>\nBuildRequires:  junit4<br \/>\n\u6dfb\u52a0\u540e\uff0c\u95ee\u9898\u4f9d\u65e7\uff0c\u4ed4\u7ec6\u5206\u6790configure\u6587\u4ef6\uff0c\u53d1\u73b0\uff1a<\/p>\n<pre class=\"lang:default decode:true \" > else\r\n18600 \r\n18601 \u25b8       \u25b8       { $as_echo \"$as_me:${as_lineno-$LINENO}: Could not find org.junit.rules.ExternalRe      source\" &gt;&amp;5\r\n18602 $as_echo \"$as_me: Could not find org.junit.rules.ExternalResource\" &gt;&amp;6;}\r\n18603 \u25b8       \u25b8       have_junit4=0\r\n18604 fi<\/pre>\n<p>HAVE-JUNIT4\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51fa\u73b0\u95ee\u9898\uff1b<br \/>\n\u5206\u6790\u540e\u5f97\u51fa\uff1acentos\u73af\u5883\u4e0b\uff1a\u53d1\u73b0junit4-4.5-5.3.el6.noarch\u7684\u7248\u672c\u4e3a4.5\u592a\u4f4e\u4e86\uff0c\u662f4\u5e74\u524d\u7684\u7248\u672c\uff1b\u800cubuntu\u7684\u7248\u672c\u4e3a4.8.2\uff1b<br \/>\n\u540e\u53d1\u73b0org.junit.rules.ExternalResource\u4e0d\u662f\u7279\u522b\u4f9d\u8d56\u7684\u8d44\u6e90\uff0cremove\u540e\u8fdb\u884c\u6d4b\u8bd5\uff0c\u53d1\u73b0\u8fd0\u884c\u6b63\u5e38\uff1b<br \/>\n\u7136\u540e\u5bf9ceph-0.61.9\u7684tar\u5305\u505apatch\u5904\u7406\uff1a<br \/>\npatch\u4e3a\uff08ceph-create-rpm.patch\uff09\uff1a<\/p>\n<pre class=\"lang:default decode:true \" >diff -Naur ceph-0.61.9\/configure.ac ..\/SOURCES\/ceph-0.61.9\/configure.ac\r\n--- ceph-0.61.9\/configure.ac\t2013-10-17 12:26:29.000000000 +0800\r\n+++ ..\/SOURCES\/ceph-0.61.9\/configure.ac\t2014-02-19 21:11:50.451378431 +0800\r\n@@ -302,7 +302,7 @@\r\n \t# setup defaults for Debian default-jdk package (without --with-jdk-dir)\r\n \tAS_IF([test -z \"$with_jdk_dir\"], [\r\n \t\t   # This works with Debian's default-jdk package\r\n-\t\t   dir='\/usr\/lib\/jvm\/default-java\/'\r\n+\t\t   dir='\/usr\/lib\/jvm\/java\/'\r\n \t\t   javac_prog=`find $dir -name javac | head -n 1`\r\n \t\t   AS_IF([test -x \"$javac_prog\"], [\r\n \t\t\t\t  EXTRA_JDK_BIN_DIR=`dirname $javac_prog`])\r\n@@ -336,10 +336,10 @@\r\n         CLASSPATH=$CLASSPATH:$EXTRA_CLASSPATH_JAR\r\n         export CLASSPATH\r\n         AC_MSG_NOTICE([classpath - $CLASSPATH])\r\n-        AS_IF([test \"$have_junit4\" = \"1\"], [\r\n-\t\tAC_CHECK_CLASS([org.junit.rules.ExternalResource], [], [\r\n-\t\tAC_MSG_NOTICE(Could not find org.junit.rules.ExternalResource)\r\n-\t\thave_junit4=0])])\r\n+        #AS_IF([test \"$have_junit4\" = \"1\"], [\r\n+\t#\tAC_CHECK_CLASS([org.junit.rules.ExternalResource], [], [\r\n+\t#\tAC_MSG_NOTICE(Could not find org.junit.rules.ExternalResource)\r\n+\t#\thave_junit4=0])])\r\n \r\n         # Check for jni.h\r\n \tCPPFLAGS_save=$CPPFLAGS\r\ndiff -Naur ceph-0.61.9\/src\/java\/Makefile.am ..\/SOURCES\/ceph-0.61.9\/src\/java\/Makefile.am\r\n--- ceph-0.61.9\/src\/java\/Makefile.am\t2013-10-17 12:26:29.000000000 +0800\r\n+++ ..\/SOURCES\/ceph-0.61.9\/src\/java\/Makefile.am\t2014-02-19 21:12:59.257377496 +0800\r\n@@ -64,7 +64,7 @@\r\n if HAVE_JUNIT4\r\n \r\n JAVA_TEST_CLASSES = $(JAVA_TEST_SRC:test\/%.java=%.class)\r\n-ESCAPED_JAVA_TEST_CLASSES = com\/ceph\/fs\/CephAllTests\\$$1.class\r\n+#ESCAPED_JAVA_TEST_CLASSES = com\/ceph\/fs\/CephAllTests\\$$1.class\r\n \r\n CEPH_TEST_PROXY=test\/com\/ceph\/fs\/CephMountTest.class\r\n \r\n@@ -73,7 +73,7 @@\r\n \t$(JAVAC) -source 1.5 -target 1.5 -Xlint:-options test\/com\/ceph\/fs\/*.java\r\n \r\n libcephfs-test.jar: $(CEPH_TEST_PROXY)\r\n-\t$(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %) $(ESCAPED_JAVA_TEST_CLASSES:%=-C test %)\r\n+\t$(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %) \r\n \r\n java_DATA += libcephfs-test.jar\r\n \r\ndiff -Naur ceph-0.61.9\/src\/java\/Makefile.in ..\/SOURCES\/ceph-0.61.9\/src\/java\/Makefile.in\r\n--- ceph-0.61.9\/src\/java\/Makefile.in\t2013-10-17 12:27:16.000000000 +0800\r\n+++ ..\/SOURCES\/ceph-0.61.9\/src\/java\/Makefile.in\t2014-02-19 21:13:52.643376770 +0800\r\n@@ -543,7 +543,7 @@\r\n @ENABLE_CEPHFS_JAVA_TRUE@@HAVE_JUNIT4_TRUE@\t$(JAVAC) -source 1.5 -target 1.5 -Xlint:-options test\/com\/ceph\/fs\/*.java\r\n \r\n @ENABLE_CEPHFS_JAVA_TRUE@@HAVE_JUNIT4_TRUE@libcephfs-test.jar: $(CEPH_TEST_PROXY)\r\n-@ENABLE_CEPHFS_JAVA_TRUE@@HAVE_JUNIT4_TRUE@\t$(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %) $(ESCAPED_JAVA_TEST_CLASSES:%=-C test %)\r\n+@ENABLE_CEPHFS_JAVA_TRUE@@HAVE_JUNIT4_TRUE@\t$(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %) \r\n \r\n # Tell versions [3.59,3.63) of GNU make to not export all variables.\r\n # Otherwise a system limit (for SysV at least) may be exceeded.\r\ndiff -Naur ceph-0.61.9\/src\/java\/test\/com\/ceph\/fs\/CephAllTests.java ..\/SOURCES\/ceph-0.61.9\/src\/java\/test\/com\/ceph\/fs\/CephAllTests.java\r\n--- ceph-0.61.9\/src\/java\/test\/com\/ceph\/fs\/CephAllTests.java\t2013-10-17 12:26:29.000000000 +0800\r\n+++ ..\/SOURCES\/ceph-0.61.9\/src\/java\/test\/com\/ceph\/fs\/CephAllTests.java\t2014-02-19 21:15:34.229375390 +0800\r\n@@ -23,7 +23,7 @@\r\n import java.io.IOException;\r\n import java.util.UUID;\r\n import org.junit.*;\r\n-import org.junit.rules.ExternalResource;\r\n+\/\/import org.junit.rules.ExternalResource;\r\n import org.junit.runners.Suite;\r\n import org.junit.runner.RunWith;\r\n import static org.junit.Assert.*;\r\n@@ -42,16 +42,16 @@\r\n  *\/\r\n public class CephAllTests{\r\n \r\n-  @Rule\r\n-  public static ExternalResource testRule = new ExternalResource(){\r\n-    @Override\r\n-    protected void before() throws Throwable{\r\n-      \/\/ Add debugging messages or setup code here\r\n-    };\r\n-\r\n-    @Override\r\n-    protected void after(){\r\n-      \/\/ Add debugging messages or cleanup code here\r\n-    };\r\n-  };\r\n+\/\/  @Rule\r\n+\/\/  public static ExternalResource testRule = new ExternalResource(){\r\n+\/\/    @Override\r\n+\/\/    protected void before() throws Throwable{\r\n+\/\/      \/\/ Add debugging messages or setup code here\r\n+\/\/    };\r\n+\/\/\r\n+\/\/   @Override\r\n+\/\/    protected void after(){\r\n+\/\/      \/\/ Add debugging messages or cleanup code here\r\n+\/\/    };\r\n+ \/\/ };\r\n }\r\n<\/pre>\n<p><strong>patch github source :https:\/\/github.com\/qfong\/ceph-create-rpm.patch.git<\/strong><br \/>\n\u6267\u884c\u547d\u4ee4\uff1a<br \/>\npatch -p1 <..\/ceph-create-rpm.patch\n\u7f16\u8bd1rpm\u5305\uff1a\nrpmbuild ceph.spec\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 ceph0.72\u4ee5\u540e\u7684\u6e90\u7801\u5236\u4f5c\u6210rpm\u5305\u65f6\uff0c\u4f1a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[84,83,5],"tags":[180,86,85],"_links":{"self":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/435"}],"collection":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=435"}],"version-history":[{"count":4,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions"}],"predecessor-version":[{"id":440,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions\/440"}],"wp:attachment":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}