[MacPorts] #66244: db46 failed in patching mp/mp_region.c on osx 13 Ventura

MacPorts noreply at macports.org
Thu Dec 29 04:12:51 UTC 2022


#66244: db46 failed in patching mp/mp_region.c on osx 13 Ventura
----------------------+---------------------
  Reporter:  dlamija  |      Owner:  kencu
      Type:  defect   |     Status:  closed
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.8.0
Resolution:  fixed    |   Keywords:  ventura
      Port:  db46     |
----------------------+---------------------

Comment (by kencu):

 You are right, copying that patch file to the files directory and then
 converting it to UNIX format allows patch to work on Ventura.

 I tried using the "--binary" option to patch, which some said worked for
 this, but it didn't work here on Ventura for me.

 One of the patches is fairly large, the last one:
 {{{
 % ls -la
 total 23320
 drwxr-xr-x  7 macports  wheel       224 28 Dec 19:20 .
 drwxr-xr-x  3 root      wheel        96 28 Dec 19:20 ..
 -rw-r--r--  1 macports  wheel  11881885 28 Dec 19:20 db-4.6.21.tar.gz
 -rw-r--r--  1 macports  wheel      2475 28 Dec 19:20 patch.4.6.21.1
 -rw-r--r--  1 macports  wheel       892 28 Dec 19:20 patch.4.6.21.2
 -rw-r--r--  1 macports  wheel      1911 28 Dec 19:20 patch.4.6.21.3
 -rw-r--r--  1 macports  wheel     41501 28 Dec 19:20 patch.4.6.21.4
 }}}
 and downloading that one at least seems desirable. The .1, .2, and .3
 patches could be moved into the files directory, or just the .2 patch
 moved in there.

 It's a bit confusing no matter which option is picked.

 this didn't work:
 {{{
 depends_patch-append port:dos2unix
 pre-patch {
     system "${prefix}/bin/dos2unix [shellescape
 ${distpath}/patch.${version}.2]"
 }
 }}}

 {{{
 Executing:  cd "/opt/local/var/macports/build
 /_opt_macportsofficial_macports-ports_databases_db46/db46/work" &&
 /usr/bin/gzip -dc
 '/opt/local/var/macports/distfiles/db4/4.6.21_6/db-4.6.21.tar.gz' |
 /usr/bin/tar -xf -
 dos2unix: Failed to open temporary output file: Operation not permitted
 dos2unix: problems converting file
 /opt/local/var/macports/distfiles/db4/4.6.21_6/patch.4.6.21.2
 Command failed: /opt/local/bin/dos2unix
 /opt/local/var/macports/distfiles/db4/4.6.21_6/patch.4.6.21.2
 Exit code: 1
 Error: Failed to patch db46: command execution failed
 }}}

 but this does work:
 {{{
 if {${os.platform} eq "darwin" && ${os.major} >=22 } {
     depends_patch-append port:gpatch
     patch.cmd   ${prefix}/bin/gpatch
     patch.pre_args-append --read-only=ignore
 }
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/66244#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list