[MacPorts] #29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync()
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ---------------------------------+------------------------------------------ Reporter: gnwiii@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: policykit fdatasync | Port: policykit ---------------------------------+------------------------------------------ In polkitagenthelperprivate.c there are two calls to fdatasync(). This results in a build failure (unsatfisfied external). According the linux man page {{{ On POSIX systems on which fdatasync() is available, _POSIX_SYNCHRONIZED_IO is defined in <unistd.h> to a value greater than 0. }}} Here, Leopard and Snow Leopard {{{/usr/include/unistd.h}}} as well as the Developer/SDK versions all have: {{{ #define _POSIX_SYNCHRONIZED_IO (-1) }}} As a workaround, I just edited the file to replace fdatasync with fdata and the build succeeded. A Google search suggests that some OS X systems do have fdatasync, but that the headers don't provide a prototype. -- Ticket URL: <https://trac.macports.org/ticket/29279> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) * keywords: policykit fdatasync => fdatasync * owner: macports-tickets@… => devans@… Comment: The build succeeded for me on Snow Leopard, but not Leopard or Tiger, so that's what I wrote in the [https://bugs.freedesktop.org/show_bug.cgi?id=36603 bug report] I submitted to the developers. -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Changes (by ryandesign@…): * cc: pheonix@… (added) Comment: Has duplicate #29282. -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by chris@…): I think gnwiii may have meant he replaced fdatasync with fsync, not fdata. When I replaced with fdata I got an error, but with fsync it worked. Also, this page says fdatasync and fsync should be the same: http://pubs.opengroup.org/onlinepubs/009695399/functions/fdatasync.html -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Changes (by jmr@…): * cc: rmstonecipher@… (added) -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by hraban@…): ACK: When I replace "fdatasync" with "fsync" in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_policykit/work/polkit-0.101/src/polkitagent/polkitagenthelperprivate.c it works for me on OSX 10.5.8 Intel. -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by gnwiii@…): Replying to [comment:4 chris@…]:
I think gnwiii may have meant he replaced fdatasync with fsync, not fdata. When I replaced with fdata I got an error, but with fsync it worked. Also, this page says fdatasync and fsync should be the same:
http://pubs.opengroup.org/onlinepubs/009695399/functions/fdatasync.html
You are right -- I meant to type "fsync", not "fdata". The two functions may not be the same, as fdatasync only claims "synchronized I/O data integrity completion", so fsync may be slower (I would think policykit should err on the side of portability over performance): 3.375 Synchronized I/O Data Integrity Completion For read, [...]. For write, when the operation has been completed or diagnosed if unsuccessful. The write is complete only when the data specified in the write request is successfully transferred and all file system information required to retrieve the data is successfully transferred. File attributes that are not necessary for data retrieval (access time, modification time, status change time) need not be successfully transferred prior to returning to the calling process. 3.376 Synchronized I/O File Integrity Completion Identical to a synchronized I/O data integrity completion with the addition that all file attributes relative to the I/O operation (including access time, modification time, status change time) are successfully transferred prior to returning to the calling process. {{{ http://pubs.opengroup.org/onlinepubs/009604599/basedefs/xbd_chap03.html }}} -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by Peter_Dyballa@…): Replying to [comment:7 hraban@…]:
ACK: When I replace "fdatasync" with "fsync" in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_policykit/work/polkit-0.101/src/polkitagent/polkitagenthelperprivate.c it works for me on OSX 10.5.8 Intel.
Same here with 10.5.8 PPC. -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by blair@…): If someone wants to create a patch that applies the changes to polkitagenthelperprivate.c and modifies Portfile to apply the patch only on OSes older than Snow Leopard, I can commit it to MacPorts. -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by kgalinsky@…): Attached a diff for a portfile that fixes the issue. It uses reinplace rather than applying a patch for older OSes (reinplace was already being run on other files for OSes older than Snow Leopard). -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by giby_the_kid@…): I tried to change fdatasync by fsync in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_policykit/work/polkit-0.101/src/polkitagent/polkitagenthelperprivate.c it hasn't work... -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Comment(by gnwiii@…): Replying to [comment:16 giby_the_kid@…]:
I tried to change fdatasync by fsync in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_policykit/work/polkit-0.101/src/polkitagent/polkitagenthelperprivate.c it hasn't work...
Not much to go here, but now that there are a couple proposed patches, why not create a local portfile repository {{{http://guide.macports.org/#development.local-repositories}}} and test one of the proposed fixes? -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() ------------------------------+--------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: fdatasync | Port: policykit ------------------------------+--------------------------------------------- Changes (by jmr@…): * cc: blair@… (added) -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29279: policykit build fails -- polkitagenthelperprivate.c uses fdatasync() -------------------------------+-------------------------------------------- Reporter: gnwiii@… | Owner: devans@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: fdatasync Port: policykit | -------------------------------+-------------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Thanks; r78414. -- Ticket URL: <https://trac.macports.org/ticket/29279#comment:19> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts