{"id":573,"date":"2014-09-28T09:16:18","date_gmt":"2014-09-28T09:16:18","guid":{"rendered":"http:\/\/www.selinuxplus.com\/?p=573"},"modified":"2015-01-15T03:08:27","modified_gmt":"2015-01-15T03:08:27","slug":"573","status":"publish","type":"post","link":"http:\/\/www.selinuxplus.com\/?p=573","title":{"rendered":"El7 mock\u73af\u5883\u7f16\u8bd1coreutils\u7684patch"},"content":{"rendered":"<p>\u7f16\u8bd1\u65f6\u7684\u62a5\u9519\u4e3a\uff1a<\/p>\n<pre class=\"lang:default decode:true\">See .\/tests\/test-suite.log\r\nPlease report to bug-coreutils@gnu.org\r\n============================================================================\r\nmake[4]: Leaving directory `\/builddir\/build\/BUILD\/coreutils-8.22'\r\nmake[3]: Leaving directory `\/builddir\/build\/BUILD\/coreutils-8.22'\r\nmake[2]: Leaving directory `\/builddir\/build\/BUILD\/coreutils-8.22'\r\nmake[1]: Leaving directory `\/builddir\/build\/BUILD\/coreutils-8.22'\r\nRPM build errors:\r\nmake[4]: *** [tests\/test-suite.log] Error 1\r\nmake[3]: *** [check-TESTS] Error 2\r\nmake[2]: *** [check-am] Error 2\r\nmake[1]: *** [check-recursive] Error 1\r\nmake: *** [check] Error 2\r\nerror: Bad exit status from \/var\/tmp\/rpm-tmp.GWApW9 (%check)\r\n    Bad exit status from \/var\/tmp\/rpm-tmp.GWApW9 (%check)\r\nChild return code was: 1\r\nEXCEPTION: Command failed. See logs for output.<\/pre>\n<p>\u95ee\u9898\u4e3b\u8981\u8868\u73b0\u5728\uff1add \u6d4b\u8bd5dd if=file.in of=file.out bs=1M conv=sparse\u6ca1\u6709notrunc\u4e0d\u622a\u8f93\u51fa\u6587\u4ef6\u4e0a<\/p>\n<pre class=\"lang:default decode:true\">[root@localhost coreutils]# cat dd-sparse-qfong.patch \r\n--- coreutils-8.22\/tests\/dd\/sparse.sh   2014-07-28 14:36:49.919025875 +0800\r\n+++ coreutils-patch-8.22\/tests\/dd\/sparse.sh     2014-07-28 14:37:20.871025455 +0800\r\n@@ -60,9 +60,11 @@ if test $(kb_alloc file.in) -gt 3000; th\r\n   # Here, with a 2MiB block size, dd's conv=sparse must *not* introduce a hole.\r\n   dd if=file.in of=file.out bs=2M conv=sparse\r\n   test 2500 -lt $(kb_alloc file.out) || fail=1\r\n+  rm file.out\r\n+  truncate --size=3M file.out\r\n\r\n   # Ensure that this 1MiB string of NULs *is* converted to a hole.\r\n-  dd if=file.in of=file.out bs=1M conv=sparse\r\n+  dd if=file.in of=file.out bs=1M conv=sparse,notrunc\r\n   test $(kb_alloc file.out) -lt 2500 || fail=1\r\n\r\n fi<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7f16\u8bd1\u65f6\u7684\u62a5\u9519\u4e3a\uff1a See .\/tests\/test&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[117,108,111,85],"_links":{"self":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/573"}],"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=573"}],"version-history":[{"count":2,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions"}],"predecessor-version":[{"id":642,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions\/642"}],"wp:attachment":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}