{"action":"created","issue":{"url":"https://api.github.com/repos/lkardos/test/issues/5","labels_url":"https://api.github.com/repos/lkardos/test/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/lkardos/test/issues/5/comments","events_url":"https://api.github.com/repos/lkardos/test/issues/5/events","html_url":"https://github.com/lkardos/test/issues/5","id":71552912,"number":5,"title":"rpm fails with \"cannot open Packages database\"","user":{"login":"lkardos","id":7781878,"avatar_url":"https://avatars.githubusercontent.com/u/7781878?v=3","gravatar_id":"","url":"https://api.github.com/users/lkardos","html_url":"https://github.com/lkardos","followers_url":"https://api.github.com/users/lkardos/followers","following_url":"https://api.github.com/users/lkardos/following{/other_user}","gists_url":"https://api.github.com/users/lkardos/gists{/gist_id}","starred_url":"https://api.github.com/users/lkardos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkardos/subscriptions","organizations_url":"https://api.github.com/users/lkardos/orgs","repos_url":"https://api.github.com/users/lkardos/repos","events_url":"https://api.github.com/users/lkardos/events{/privacy}","received_events_url":"https://api.github.com/users/lkardos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lkardos","id":7781878,"avatar_url":"https://avatars.githubusercontent.com/u/7781878?v=3","gravatar_id":"","url":"https://api.github.com/users/lkardos","html_url":"https://github.com/lkardos","followers_url":"https://api.github.com/users/lkardos/followers","following_url":"https://api.github.com/users/lkardos/following{/other_user}","gists_url":"https://api.github.com/users/lkardos/gists{/gist_id}","starred_url":"https://api.github.com/users/lkardos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkardos/subscriptions","organizations_url":"https://api.github.com/users/lkardos/orgs","repos_url":"https://api.github.com/users/lkardos/repos","events_url":"https://api.github.com/users/lkardos/events{/privacy}","received_events_url":"https://api.github.com/users/lkardos/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-28T10:45:46Z","updated_at":"2015-04-28T10:45:48Z","closed_at":null,"body":"rpm -i <package> fails with \"cannot open Packages database\" error on GNU/Hurd system. After quick debugging problem is in rpmdb.c:openDatabase function. It has this code there:    if (mode & O_WRONLY)    return 1;    Main problem is that GNU/Hurd has this O_RDWR definition:    #define O_RDWR          (O_RDONLY|O_WRONLY)    so rpm fails even if O_RDWR is set. POSIX says:    \"In historical implementations the value of O_RDONLY is zero. Because of that_ it is not possible to detect the presence of O_RDONLY and another option. Future implementations should encode O_RDONLY and O_WRONLY as bit flags so that:    O_RDONLY | O_WRONLY == O_RDWR  \"    I'm not sure what will be the proper patch because Linux has O_RDONLY == 0. It seems that \"#ifdef __linux__\" will help or that condition will be eliminated."},"comment":{"url":"https://api.github.com/repos/lkardos/test/issues/comments/97012650","html_url":"https://github.com/lkardos/test/issues/5#issuecomment-97012650","issue_url":"https://api.github.com/repos/lkardos/test/issues/5","id":97012650,"user":{"login":"lkardos","id":7781878,"avatar_url":"https://avatars.githubusercontent.com/u/7781878?v=3","gravatar_id":"","url":"https://api.github.com/users/lkardos","html_url":"https://github.com/lkardos","followers_url":"https://api.github.com/users/lkardos/followers","following_url":"https://api.github.com/users/lkardos/following{/other_user}","gists_url":"https://api.github.com/users/lkardos/gists{/gist_id}","starred_url":"https://api.github.com/users/lkardos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkardos/subscriptions","organizations_url":"https://api.github.com/users/lkardos/orgs","repos_url":"https://api.github.com/users/lkardos/repos","events_url":"https://api.github.com/users/lkardos/events{/privacy}","received_events_url":"https://api.github.com/users/lkardos/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T10:45:47Z","updated_at":"2015-04-28T10:45:47Z","body":"_Imported from trac issue 5.  Created by atkac on 2008-11-01T22:45:42, last modified: 2008-11-04T09:01:50_\n"}}