~mcepl

https://floss.social/@mcepl

Trackers

~mcepl/m2crypto

Last active 3 days ago

~mcepl/moldavite

Last active 5 days ago

~mcepl/json_diff

Last active 3 months ago

#18 perl dependencies 10 hours ago

Comment by ~mcepl on ~mcepl/moldavite

The first two were actually removed a long time ago.

The third one is https://bugzilla.suse.com/show_bug.cgi?id=1216537

#341 ASN1_Time is all fouled up on 32bit architectures 2 days ago

Comment by ~mcepl on ~mcepl/m2crypto

On Sat Jun 22, 2024 at 8:27 AM CEST, ~Adam Williamson wrote:

I mean, personally I'd just declare you no longer support 32-bit platforms and go for a beer. :)

That you can do in Fedora, but the main purpose of M2Crypto as a project is to support legacy applications (https://xkcd.com/2347/ comes to mind), and there are still plenty of for example routers and IoT things, which are 32bit.

And, of course, then there is Windows. I have never found good numbers on the proportion of 32bit or 64bit Windows right now.

#341 ASN1_Time is all fouled up on 32bit architectures 2 days ago

on ~mcepl/m2crypto

On Sat, 2024-06-22 at 06:16 +0000, ~mcepl wrote:

On Fri Jun 21, 2024 at 11:41 PM CEST, ~Adam Williamson wrote:

I don't know why, but it seems like you might want to know. I guess we'll have to patch out the expected-failure decorator.

It is all about Y2038-problem and time_t definition. We have never agreed on one solution to this problem, every hardware chip, every operating system (I know about Windows and Linux, I don’t even have any idea what Mac OS X or *BSD do with it), and even on Linux every library (namely glibc and musl libc, and there is Alpine Linux, so we cannot ignore it) are doing something different, and the result is absolute XXXX (I cannot use any polite word about it). It is horrible to deal with it in C (by using some esoteric macros), but it is even worse in Python, where I cannot use those macros.

We have https://www.gnu.org/software/libc/manual/html_node/Time-Types.html and https://musl.libc.org/time64.html which are very hard to reconile.

Look at https://gitlab.com/m2crypto/m2crypto/-/jobs/7118074934 this is on i386/alpine and this test (using just standard Python API, socket.setsockopts and struct.struct, there is actually not even M2Crypto truly involved!) I just cannot make work on it. In desperation I switched back to i386/debian Docker container, and we have back test_date_after_2050_working and test_date_reference_counting failing.

I have tendency in desperation just to skip those tests on 32bit (and then there is test_mkcert, which is suddenly not failing [1]), but that be just an admission that M2Crypto is broken (see that those failing tests are actually a bit important and part of the core mission of M2Crypto) and I don’t want to give up on that yet.

And let me just not mention that we don’t have a fool-proof definition of what actually 32bit is: (struct.calcsize("P") * 8) == 32 and sys.maxsize > 2**32 are I suspect again subtly different on different platforms).

Let me just go to the corner and cry.

[1] https://gitlab.com/m2crypto/m2crypto/-/jobs/7154396846

#I mean, personally I'd just declare you no longer support 32-bit platforms and go for a beer. :)

Adam Williamson (he/him/his) Fedora QA Fedora Chat: @adamwill:fedora.im | Mastodon: @adamw@fosstodon.org https://www.happyassassin.net

#341 ASN1_Time is all fouled up on 32bit architectures 2 days ago

Comment by ~mcepl on ~mcepl/m2crypto

On Fri Jun 21, 2024 at 11:41 PM CEST, ~Adam Williamson wrote:

I don't know why, but it seems like you might want to know. I guess we'll have to patch out the expected-failure decorator.

It is all about Y2038-problem and time_t definition. We have never agreed on one solution to this problem, every hardware chip, every operating system (I know about Windows and Linux, I don’t even have any idea what Mac OS X or *BSD do with it), and even on Linux every library (namely glibc and musl libc, and there is Alpine Linux, so we cannot ignore it) are doing something different, and the result is absolute XXXX (I cannot use any polite word about it). It is horrible to deal with it in C (by using some esoteric macros), but it is even worse in Python, where I cannot use those macros.

We have https://www.gnu.org/software/libc/manual/html_node/Time-Types.html and https://musl.libc.org/time64.html which are very hard to reconile.

Look at https://gitlab.com/m2crypto/m2crypto/-/jobs/7118074934 this is on i386/alpine and this test (using just standard Python API, socket.setsockopts and struct.struct, there is actually not even M2Crypto truly involved! It is all about definition of timeval struct, which is again … what? ... ambiguous) I just cannot make work on it. In desperation I switched back to i386/debian Docker container, and we have back test_date_after_2050_working and test_date_reference_counting failing.

I have tendency in desperation just to skip those tests on 32bit (and then there is test_mkcert, which is suddenly not failing), but that be just an admission that M2Crypto is broken (see that those failing tests are actually a bit important and part of the core mission of M2Crypto) and I don’t want to give up on that yet.

And let me just not mention that we don’t have a fool-proof definition of what actually 32bit is: (struct.calcsize("P") * 8) == 32 and sys.maxsize > 2**32 are I suspect again subtly different on different platforms).

Let me just go to the corner and cry.

(note: this is Markdown, so adjust your expectations accordingly)

#353 IRC reports only succesful builds 3 days ago

Ticket created by ~mcepl on ~mcepl/m2crypto

When the build fails, that task terminates and our IRC bot doesn’t get a chance.

#352 ASN1_* classes have completely wrong signatures 3 days ago

milestone-0.42 added by ~mcepl on ~mcepl/m2crypto

#352 ASN1_* classes have completely wrong signatures 3 days ago

Ticket created by ~mcepl on ~mcepl/m2crypto

class ASN1_Integer(object):

    def __init__(self, asn1int: ASN1_Integer, _pyfree: int = 0):
        self.asn1int = asn1int
        self._pyfree = _pyfree

is just wrong: we have to keep stable API, but could we at least optionally accept plain str, int, etc.?

#341 ASN1_Time is all fouled up on 32bit architectures 3 days ago

Comment by ~mcepl on ~mcepl/m2crypto

I see so the whole problem between failing and non-failing test_date_after_2050_working and test_date_reference_counting is in the difference between muslc, which uses 64-bit time_t, and glibc which (sometimes?) uses 32bit time_t on i386.

#341 ASN1_Time is all fouled up on 32bit architectures 3 days ago

Comment by ~mcepl on ~mcepl/m2crypto

The same problem [?] in OpenWrt https://github.com/openwrt/packages/issues/23438.

#9 Python dependencies? 5 days ago

Comment by ~mcepl on ~mcepl/moldavite

Specifically:

transactional update # zypper rm python311-selinux
Reading installed packages...
Resolving package dependencies...

The following 3 packages are going to be REMOVED:
  policycoreutils-python-utils python311-policycoreutils python311-selinux

3 packages to remove.
After the operation, 6.3 MiB will be freed.

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): n
transactional update # rpm -qal policycoreutils|grep bin
/usr/bin/secon
/usr/bin/semodule_expand
/usr/bin/semodule_link
/usr/bin/semodule_package
/usr/bin/semodule_unpackage
/usr/bin/sestatus
/usr/sbin/fixfiles
/usr/sbin/genhomedircon
/usr/sbin/load_policy
/usr/sbin/open_init_pty
/usr/sbin/restorecon
/usr/sbin/restorecon_xattr
/usr/sbin/run_init
/usr/sbin/semodule
/usr/sbin/sestatus
/usr/sbin/setfiles
/usr/sbin/setsebool
transactional update #