Breadcrumbs

Quick dirty patch in source files of AUR package with Yay

By ValkaTR, 12 August, 2023

squeak! i finally learned how to modify source files (not pkgbuild!) of broken AUR packages and compile the shit finally. quick dirty fix

i shall share this knowledge, because it's difficult to find in the internets
the trouble was this:

waiting 300 seconds for server to start: .httpd: Syntax error on line 283 of /builddir/build/BUILD/mod_perl-2.0.12/t/conf/httpd.conf: Cannot load /builddir/build/BUILD/mod_perl-2.0.12/src/modules/perl/mod_perl.so into server: /builddir/build/BUILD/mod_perl-2.0.12/src/modules/perl/mod_perl.so: undefined symbol: do_open9

do_open9 is one of removed deprecated C functions. The removing was done in Perl 5.37.1 [1]

Replace using do_open9() by do_openn()

    sv_setref_pv(sv, "Apache2::RequestRec", (void*)r);
-    status = do_open9(handle, mode == O_RDONLY ? "<:Apache2" : ">:Apache2",
-                      9, FALSE, mode, 0, (PerlIO *)NULL, sv, 1);
+    status = do_openn(handle, mode == O_RDONLY ? "<:Apache2" : ">:Apache2",
+                      9, FALSE, mode, 0, (PerlIO *)NULL, &sv, 1);
    if (status == 0) {
        Perl_croak(aTHX_ "Failed to open STD%s: %" SVf,
                   mode == O_RDONLY ? "IN" : "OUT", get_sv("!", TRUE));

i did the change in ~/.cache/yay/mod_perl/src/modules/perl/modperl_io.c and just

yay --mflags="--noextract" -S mod_perl

but it wasn't enough! the tests were failing miserably after build. so this helped to screw the tests:

yay --mflags="--noextract --nocheck" -S mod_perl

and... it worked! glory to the allarchitect *relief sigh*

Comments