Dne 28. 11. 24 v 15:01 Mamoru TASAKA via ruby-sig napsal(a):
Vít Ondruch via ruby-sig wrote on 2024/11/28 18:10:Dne 27. 11. 24 v 1:07 Mamoru TASAKA via ruby-sig napsal(a):Vít Ondruch via ruby-sig wrote on 2024/11/27 0:48:Currently the failures I feel difficult to fix are: * rubygem-websocket https://copr.fedorainfracloud.org/coprs/vondruch/mpb/build/8312136/ Due to https://bugs.ruby-lang.org/issues/20265 change,NEWOBJ macro is removed, then currently rubygem-websocket really fails to compile.For now I have no idea how to replace this macro.I can see just the `base64` issue. Does the NEWOBJ thing pops up once the `base64` issue is fixed?Sorry, I was completely confused. Actually this is rubygem-serialport . https://copr.fedorainfracloud.org/coprs/vondruch/mpb/build/8312122/1) I have asked upstream for migration path: https://bugs.ruby-lang.org/issues/20265#note-5 2) The question is if there is future in this project: https://github.com/hparra/ruby-serialport/discussions/77We have rubygem-serialport in Fedora due to rubygem-icaro dependency. However, this also seems to be dead. Maybe the most meaningful step ATM is to open ticket against rubygem-serialport with all the information and warning we are going to break the packages.I think opening a ticket against rubygem-serialport (on bugzilla) can be the first step for the time being. For now "me" have no idea how to fix rubygem-serialport srpm (even if I have read the above ruby-lang issue/ticket...)
This is patch which I came up with. It builds, but I have no idea if it works, most likely it doesn't 😇
~~~diff --git a/ext/native/posix_serialport_impl.c b/ext/native/posix_serialport_impl.c
index 2f9325e..1afba51 100644
--- a/ext/native/posix_serialport_impl.c
+++ b/ext/native/posix_serialport_impl.c
@@ -80,12 +80,6 @@ int get_fd_helper(obj)
VALUE sp_create_impl(class, _port)
VALUE class, _port;
{
-#ifdef HAVE_RUBY_IO_H
- rb_io_t *fp;
-#else
- OpenFile *fp;
-#endif
-
int fd;
int num_port;
char *port;
@@ -109,10 +103,6 @@ VALUE sp_create_impl(class, _port)
};
struct termios params;
- NEWOBJ(sp, struct RFile);
- OBJSETUP((VALUE) sp, class, T_FILE);
- MakeOpenFile((VALUE) sp, fp);
-
switch(TYPE(_port))
{
case T_FIXNUM:
@@ -166,12 +156,7 @@ VALUE sp_create_impl(class, _port)
rb_sys_fail(sTcsetattr);
}
-#ifdef HAVE_RUBY_IO_H
- fp->fd = fd;
-#else
- fp->f = rb_fdopen(fd, "r+");
-#endif
- fp->mode = FMODE_READWRITE | FMODE_SYNC;
+ VALUE sp = rb_io_open_descriptor(class, fd, FMODE_READWRITE |
FMODE_SYNC, rb_str_new(port, 1), Qnil, NULL);
return (VALUE) sp; } ~~~ Vít
Regards, MamoruThoughts? VítRegards, Mamoru
OpenPGP_signature.asc
Description: OpenPGP digital signature
-- _______________________________________________ ruby-sig mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
