reinplace permission denied mariadb-server
Bradley Giesbrecht
pixilla at macports.org
Fri Oct 7 13:46:58 PDT 2016
> On Oct 7, 2016, at 8:09 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
>
>> On Oct 7, 2016, at 9:48 AM, Bradley Giesbrecht <pixilla at macports.org> wrote:
>>
>> Hi,
>>
>>
>> mariadb-server is a support of mariadb.
>>
>>
>> In post-extract I copy a file from filespath and in post-patch I patch the file with reinplace:
>> port cat mariadb-server:
>> ...
>> post-extract {
>> file mkdir ${worksrcpath}/macports
>> copy ${filespath}/org.macports.mysql-server.plist ${worksrcpath}/macports/org.macports.${subport}.plist
>> }
>>
>> post-patch {
>> reinplace "s|@NAME@|${subport}|g" \
>> ${worksrcpath}/macports/org.macports.${subport}.plist
>> reinplace "s|@PREFIX@|${prefix}|g" \
>> ${worksrcpath}/macports/org.macports.${subport}.plist
>> reinplace "s|@NAMEMYSQL@|${name_mysql}|g" \
>> ${worksrcpath}/macports/org.macports.${subport}.plist
>> }
>> …
>>
>>
>> During post-patch I am getting a permission denied error:
>> sudo port patch mariadb-server
>> Error: reinplace: error copying "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_databases_mariadb/mariadb-server/work/.tmp/org.macports.mariadb-server.plist.sed.rypaXG9w" to "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_databases_mariadb/mariadb-server/work/mariadb-5.5.52/macports/org.macports.mariadb-server.plist": permission denied
>>
>>
>> ls -la ./files/org.macports.mysql-server.plist ./work/mariadb-5.5.52/macports/org.macports.mariadb-server.plist
>> -rw-r--r-- 1 brad admin 805 Oct 6 08:10 ./files/org.macports.mysql-server.plist
>> -rw-r--r-- 1 macports admin 805 Oct 6 08:10 ./work/mariadb-5.5.52/macports/org.macports.mariadb-server.plist
>>
>>
>> Is there an error in my file copy for reinplace patching?
>
> This is the bug:
>
> https://trac.macports.org/ticket/50918
>
> You can work around it by copying the file in pre-extract instead of post-extract.
Thanks Ryan, changing to pre-extract does not solve the problem nor does coping the file to $worksrcpath instead of $worksrcpath/macports. This port has no distfiles so $worksrcpath has to be created in the portfile resulting in the same permissions problem.
Coping the file to $workpath is working.
—
Brad
More information about the macports-dev
mailing list