Unable to create Subversion repository with compiled binaries(version 1.10.2) on AiX 7.2 machine

*爱你&永不变心* 提交于 2019-12-24 21:00:32

问题


We have compiled subversion 1.10.2 on AiX machine using the compile command :-

./configure CFLAGS="-I/temp1110/subversion/zlib" --without-berkeley-db --with-apr=/temp1110/subversion/apr --with-apr-util=/temp1110/subversion/apr-util --with-lz4=internal --with-utf8proc=internal --disable-nls

Whereas, after generating the required files using "make" command. We are unable to create a repository. After passing the command ./svnadmin create /temp1110/home/Repo_test", we get the error:

svnadmin: E000009: Can't write '/temp1110/home/Repo_test/db/current' atomically svnadmin: E000009: Can't flush file '/temp1110/home/Repo_test/db' to disk: Bad file number

Any idea how to resolve this?


回答1:


Well, you cannot solve this, this is a bug in subversion.

Or rather an AIX-specific problem: fsync(2) called on a directory returns errno=EBADF which makes subverions/libsvn_subr/io.c:svn_io_flush_to_disk sad.

This can be fixed with the following patch:

--- subversion/libsvn_subr/io.cold  2018-01-19 05:00:11.000000000 +0100
+++ subversion/libsvn_subr/io.c     2018-12-22 20:25:42.000000000 +0100
@@ -4286,7 +4286,13 @@
      return svn_error_wrap_apr(status, _("Can't move '%s' to '%s'"),
                                svn_dirent_local_style(from_path, pool),
                                svn_dirent_local_style(to_path, pool));
- 
+ #if !defined(_AIX)
+     /* on Aix, you cannot do fsync(2) on a directory,
+        also you cannot open a file for APR_WRITE
+        if its access bits are 444
+        Nonetheless this is a very useful peace of code,
+        just not for AIX.
+     */
  #if defined(SVN_ON_POSIX)
    if (flush_to_disk)
      {
@@ -4314,7 +4320,7 @@
        SVN_ERR(svn_io_file_close(file, pool));
      }
  #endif
- 
+ #endif
    return SVN_NO_ERROR;
  }


来源:https://stackoverflow.com/questions/53882162/unable-to-create-subversion-repository-with-compiled-binariesversion-1-10-2-on

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!