Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-14 Thread Lyes Saadi

Oh, wow ! Thank you so much !

Didn't expect for it to be solved this quickly when giving up :P !

Le 13/09/2023 à 16:51, Jerry James a écrit :

On Tue, Sep 12, 2023 at 10:02 PM Jerry James  wrote:

I looked at blueprint-compiler tonight, and found 2 bugs with the
handling of bitfields.  Sadly, fixing those still doesn't make the
test suite pass, so there is at least one more bug lurking somewhere.
Still, I think the package is probably fixable.  If you can wait just
a little longer, I will try to find the next bug tomorrow.

Bug 3 was on the line right next to bug 2. :-)  I have opened
https://gitlab.gnome.org/jwestman/blueprint-compiler/-/merge_requests/143.
That patch does not apply cleanly to version 0.6.0, but the attached
version does.

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-13 Thread Dan Horák
On Wed, 13 Sep 2023 08:51:16 -0600
Jerry James  wrote:

> On Tue, Sep 12, 2023 at 10:02 PM Jerry James  wrote:
> > I looked at blueprint-compiler tonight, and found 2 bugs with the
> > handling of bitfields.  Sadly, fixing those still doesn't make the
> > test suite pass, so there is at least one more bug lurking somewhere.
> > Still, I think the package is probably fixable.  If you can wait just
> > a little longer, I will try to find the next bug tomorrow.
> 
> Bug 3 was on the line right next to bug 2. :-)  I have opened
> https://gitlab.gnome.org/jwestman/blueprint-compiler/-/merge_requests/143.
> That patch does not apply cleanly to version 0.6.0, but the attached
> version does.

as usually, great job, Jerry, thanks a lot


Dan
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-13 Thread Jerry James
On Tue, Sep 12, 2023 at 10:02 PM Jerry James  wrote:
> I looked at blueprint-compiler tonight, and found 2 bugs with the
> handling of bitfields.  Sadly, fixing those still doesn't make the
> test suite pass, so there is at least one more bug lurking somewhere.
> Still, I think the package is probably fixable.  If you can wait just
> a little longer, I will try to find the next bug tomorrow.

Bug 3 was on the line right next to bug 2. :-)  I have opened
https://gitlab.gnome.org/jwestman/blueprint-compiler/-/merge_requests/143.
That patch does not apply cleanly to version 0.6.0, but the attached
version does.
-- 
Jerry James
http://www.jamezone.org/
--- blueprint-compiler-v0.6.0/blueprintcompiler/gir.py.orig	2022-11-26 16:14:49.0 -0700
+++ blueprint-compiler-v0.6.0/blueprintcompiler/gir.py	2023-09-13 08:32:20.150427956 -0600
@@ -603,8 +603,8 @@ class Repository(GirNode):
 return self.lookup_namespace(ns).get_type(dir_entry.DIR_ENTRY_NAME)
 
 def _resolve_type_id(self, type_id: int):
-if type_id & 0xFF == 0:
-type_id = (type_id >> 27) & 0x1F
+if type_id & (0xFF if sys.byteorder == "little" else 0xFF00) == 0:
+type_id = ((type_id >> 27) if sys.byteorder == "little" else type_id) & 0x1F
 # simple type
 if type_id == typelib.TYPE_BOOLEAN:
 return BoolType()
--- blueprint-compiler-v0.6.0/blueprintcompiler/typelib.py.orig	2022-11-26 16:14:49.0 -0700
+++ blueprint-compiler-v0.6.0/blueprintcompiler/typelib.py	2023-09-13 08:47:24.479850483 -0600
@@ -61,7 +61,14 @@ class Field:
 def __init__(self, offset, type, shift=0, mask=None):
 self._offset = offset
 self._type = type
-self._shift = shift
+if not mask or sys.byteorder == "little":
+self._shift = shift
+elif self._type == "u8" or self._type == "i8":
+self._shift = 7 - shift
+elif self._type == "u16" or self._type == "i16":
+self._shift = 15 - shift
+else:
+self._shift = 31 - shift
 self._mask = (1 << mask) - 1 if mask else None
 self._name = f"{offset}__{type}__{shift}__{mask}"
 
@@ -160,7 +167,7 @@ class Typelib:
 OBJ_FINAL = Field(0x02, "u16", 3, 1)
 OBJ_GTYPE_NAME = Field(0x08, "string")
 OBJ_PARENT = Field(0x10, "dir_entry")
-OBJ_GTYPE_STRUCT = Field(0x14, "string")
+OBJ_GTYPE_STRUCT = Field(0x12, "string")
 OBJ_N_INTERFACES = Field(0x14, "u16")
 OBJ_N_FIELDS = Field(0x16, "u16")
 OBJ_N_PROPERTIES = Field(0x18, "u16")
@@ -241,7 +248,11 @@ class Typelib:
 return self._typelib_file[loc:end].decode("utf-8")
 
 def _int(self, size, signed):
-return int.from_bytes(self._typelib_file[self._offset:self._offset + size], sys.byteorder)
+return int.from_bytes(
+self._typelib_file[self._offset:self._offset + size],
+sys.byteorder,
+signed=signed,
+)
 
 
 class TypelibHeader(Typelib):
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-12 Thread Jerry James
On Tue, Sep 12, 2023 at 11:11 AM Lyes Saadi  wrote:
> Oh woops, answered to Jerry James privately instead to the whole devel
> mailing list. It's indeed about blueprint-compiler.

I looked at blueprint-compiler tonight, and found 2 bugs with the
handling of bitfields.  Sadly, fixing those still doesn't make the
test suite pass, so there is at least one more bug lurking somewhere.
Still, I think the package is probably fixable.  If you can wait just
a little longer, I will try to find the next bug tomorrow.
-- 
Jerry James
http://www.jamezone.org/
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-12 Thread Stephen Gallagher
On Tue, Sep 12, 2023 at 1:11 PM Lyes Saadi  wrote:
>
> Oh woops, answered to Jerry James privately instead to the whole devel
> mailing list. It's indeed about blueprint-compiler.
>
> Le 12/09/2023 à 19:03, Dan Horák a écrit :
> > On Tue, 12 Sep 2023 10:08:57 -0600
> > Jerry James  wrote:
> >
> >> On Tue, Sep 12, 2023 at 10:03 AM Lyes Saadi  
> >> wrote:
> >>> I have a noarch package which faces an issue with one of its arches
> >>> (s390x), and which happens to have multiple noarch packages depending on
> >>> it, and they won't build either if they were built on that same arch
> >>> (but, they will still work normally when installed on that arch). And
> >>> so, I plan on adding an ExcludeArch, as per
> >>> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_arch_specific_runtime_and_build_time_dependencies.
> >>>
> >>> But, I don't know if I need to also ask maintainers of every dependency
> >>> to add ExcludeArch themselves. Indeed, the guideline says :
> >>>   > You can limit both the architectures used to build a noarch package,
> >>> *and the repositories to which the built noarch package will be added*
> >>>
> >>> So, am I correct in assuming that if my noarch package uses ExcludeArch,
> >>> every other dependent package, when building, will not build on that
> >>> Arch as well ?
> >> You will indeed have to ask the maintainers of consuming packages to
> >> add that ExcludeArch too.  What package is it and what is the nature
> >> of the problem on s390x?  Maybe it can be fixed.
> > I believe it's about blueprint-compiler, which has some big endian
> > issues, please see https://bugzilla.redhat.com/show_bug.cgi?id=2169892

The classic way to do this is to request a macro like
`%{blueprint_arches}` which can be passed to any package requiring the
blueprint compiler. We have several interpreted languages that do
this, if the interpreter isn't available on all arches.


```
$ rpm --showrc|grep _arches
-13: GNAT_arches %{GPRbuild_arches} ia64 ppc alpha %{arm} riscv64
-13: GPRbuild_arches %{ix86} x86_64 %{power64} s390x aarch64
-13: fpc_arches %{ix86} %{arm} x86_64 ppc64le aarch64
-13: gap_arches aarch64 ppc64le s390x x86_64
-13: gccgo_arches mips mipsel mipsr6 mipsr6el mips64 mips64el mips64r6
mips64r6el
-13: ghc_arches %{ix86} x86_64 armv7hl ppc64le aarch64 s390x
-13: go_arches %{golang_arches} %{gccgo_arches}
-13: golang_arches i386 i486 i586 i686 pentium3 pentium4 athlon geode
x86_64 armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l
armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl
aarch64 ppc64le s390x
-13: golang_arches_future x86_64 armv3l armv4b armv4l armv4tl armv5tl
armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l
armv8hl armv8hnl armv8hcnl aarch64 ppc64le s390x
  exclusive_arches = "%{golang_arches}"
  exclusive_arches = "%{golang_arches_future}"
print(rpm.expand("ExclusiveArch: " .. exclusive_arches .. "\n"))
-13: java_arches aarch64 ppc64le s390x x86_64
-13: kernel_arches x86_64 s390x ppc64le aarch64 %{arm}
-13: ldc_arches %{ix86} x86_64 %{arm} aarch64
-13: mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} aarch64
alpha s390x ppc ppc64 ppc64le
-13: nodejs_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x
-13: openblas_arches x86_64 %{ix86} armv7hl %{power64} aarch64 s390x
-13: qt5_qtwebengine_arches %{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el
-13: rust_arches x86_64 %{ix86} armv7hl aarch64 ppc64 ppc64le riscv64 s390x
-13: valgrind_arches %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
```

When relying on e.g. Node.js, one is expected to do:
ExclusiveArch: %{nodejs_arches}
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-12 Thread Lyes Saadi
Oh woops, answered to Jerry James privately instead to the whole devel 
mailing list. It's indeed about blueprint-compiler.


Le 12/09/2023 à 19:03, Dan Horák a écrit :

On Tue, 12 Sep 2023 10:08:57 -0600
Jerry James  wrote:


On Tue, Sep 12, 2023 at 10:03 AM Lyes Saadi  wrote:

I have a noarch package which faces an issue with one of its arches
(s390x), and which happens to have multiple noarch packages depending on
it, and they won't build either if they were built on that same arch
(but, they will still work normally when installed on that arch). And
so, I plan on adding an ExcludeArch, as per
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_arch_specific_runtime_and_build_time_dependencies.

But, I don't know if I need to also ask maintainers of every dependency
to add ExcludeArch themselves. Indeed, the guideline says :
  > You can limit both the architectures used to build a noarch package,
*and the repositories to which the built noarch package will be added*

So, am I correct in assuming that if my noarch package uses ExcludeArch,
every other dependent package, when building, will not build on that
Arch as well ?

You will indeed have to ask the maintainers of consuming packages to
add that ExcludeArch too.  What package is it and what is the nature
of the problem on s390x?  Maybe it can be fixed.

I believe it's about blueprint-compiler, which has some big endian
issues, please see https://bugzilla.redhat.com/show_bug.cgi?id=2169892


Dan
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-12 Thread Dan Horák
On Tue, 12 Sep 2023 10:08:57 -0600
Jerry James  wrote:

> On Tue, Sep 12, 2023 at 10:03 AM Lyes Saadi  
> wrote:
> > I have a noarch package which faces an issue with one of its arches
> > (s390x), and which happens to have multiple noarch packages depending on
> > it, and they won't build either if they were built on that same arch
> > (but, they will still work normally when installed on that arch). And
> > so, I plan on adding an ExcludeArch, as per
> > https://docs.fedoraproject.org/en-US/packaging-guidelines/#_arch_specific_runtime_and_build_time_dependencies.
> >
> > But, I don't know if I need to also ask maintainers of every dependency
> > to add ExcludeArch themselves. Indeed, the guideline says :
> >  > You can limit both the architectures used to build a noarch package,
> > *and the repositories to which the built noarch package will be added*
> >
> > So, am I correct in assuming that if my noarch package uses ExcludeArch,
> > every other dependent package, when building, will not build on that
> > Arch as well ?
> 
> You will indeed have to ask the maintainers of consuming packages to
> add that ExcludeArch too.  What package is it and what is the nature
> of the problem on s390x?  Maybe it can be fixed.

I believe it's about blueprint-compiler, which has some big endian
issues, please see https://bugzilla.redhat.com/show_bug.cgi?id=2169892


Dan
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-12 Thread Jerry James
On Tue, Sep 12, 2023 at 10:03 AM Lyes Saadi  wrote:
> I have a noarch package which faces an issue with one of its arches
> (s390x), and which happens to have multiple noarch packages depending on
> it, and they won't build either if they were built on that same arch
> (but, they will still work normally when installed on that arch). And
> so, I plan on adding an ExcludeArch, as per
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#_arch_specific_runtime_and_build_time_dependencies.
>
> But, I don't know if I need to also ask maintainers of every dependency
> to add ExcludeArch themselves. Indeed, the guideline says :
>  > You can limit both the architectures used to build a noarch package,
> *and the repositories to which the built noarch package will be added*
>
> So, am I correct in assuming that if my noarch package uses ExcludeArch,
> every other dependent package, when building, will not build on that
> Arch as well ?

You will indeed have to ask the maintainers of consuming packages to
add that ExcludeArch too.  What package is it and what is the nature
of the problem on s390x?  Maybe it can be fixed.
-- 
Jerry James
http://www.jamezone.org/
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Will noarch packages "inherit" ExcludeArch from another noarch package

2023-09-12 Thread Lyes Saadi

Hello !

I have a noarch package which faces an issue with one of its arches 
(s390x), and which happens to have multiple noarch packages depending on 
it, and they won't build either if they were built on that same arch 
(but, they will still work normally when installed on that arch). And 
so, I plan on adding an ExcludeArch, as per 
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_arch_specific_runtime_and_build_time_dependencies.


But, I don't know if I need to also ask maintainers of every dependency 
to add ExcludeArch themselves. Indeed, the guideline says :
> You can limit both the architectures used to build a noarch package, 
*and the repositories to which the built noarch package will be added*


So, am I correct in assuming that if my noarch package uses ExcludeArch, 
every other dependent package, when building, will not build on that 
Arch as well ?


Greetings,
Lyes Saadi
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue