Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-11 Thread Shengjing Zhu
On Sat, Sep 9, 2023 at 9:21 PM Nicolas Mora  wrote:
>
> Le 2023-09-08 à 02 h 51, Samuel Thibault a écrit :
> >>> is the only exposure, and that file is not installed, so there is no way
> >>> for another package to produce a reference to it. I did check on the
> >>> archive in the amd64 case, no package does.
> >>>
> >>
> >> Thanks, that's indeed not possible to use.
> >
> > That being said, like #1043184 you will need to make libevent-core-2.1-7
> > Break the previous versions of the other libevent packages, to make sure
> > they get upgraded to the version that doesn't use event_strlcpy_ any
> > more.
> >
>
> Thanks, therefore adding 'Breaks: libevent-2.1-7 (<= 2.1.12-stable-8)'
> in the d/control file will make the other packages rebuild then.
>

It looks like there is no need for Breaks.

$ apt rdepends libevent-core-2.1-7 |grep libevent
libevent-core-2.1-7
  Depends: libevent-dev (= 2.1.12-stable-8)
  Depends: libevent-pthreads-2.1-7 (= 2.1.12-stable-8)
  Depends: libevent-openssl-2.1-7 (= 2.1.12-stable-8)
  Depends: libevent-extra-2.1-7 (= 2.1.12-stable-8)

All these packages have strict equal dependency on libevent-core-2.1-7.

-- 
Shengjing Zhu



Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-09 Thread Nicolas Mora

Le 2023-09-08 à 02 h 51, Samuel Thibault a écrit :

is the only exposure, and that file is not installed, so there is no way
for another package to produce a reference to it. I did check on the
archive in the amd64 case, no package does.



Thanks, that's indeed not possible to use.


That being said, like #1043184 you will need to make libevent-core-2.1-7
Break the previous versions of the other libevent packages, to make sure
they get upgraded to the version that doesn't use event_strlcpy_ any
more.



Thanks, therefore adding 'Breaks: libevent-2.1-7 (<= 2.1.12-stable-8)' 
in the d/control file will make the other packages rebuild then.


/Nicolas



Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-07 Thread Samuel Thibault
Shengjing Zhu, le ven. 08 sept. 2023 13:39:10 +0800, a ecrit:
> On Fri, Sep 8, 2023 at 1:10 AM Samuel Thibault  wrote:
> >
> > Shengjing Zhu, le ven. 08 sept. 2023 00:05:23 +0800, a ecrit:
> > > On Sun, Aug 06, 2023 at 10:30:38AM +0200, Samuel Thibault wrote:
> > > > Source: libevent
> > > > Version: 2.1.12-stable-8
> > > > Severity: important
> > > > Tags: patch
> > > >
> > > > Hello,
> > > >
> > > > libevent fails to build against glibc 2.38:
> > > >
> > > > --- debian/libevent-core-2.1-7.symbols.original 2023-08-06 
> > > > 10:17:18.031636016 +0200
> > > > +++ debian/libevent-core-2.1-7.symbols  2023-08-06 
> > > > 10:17:28.135665241 +0200
> > > > @@ -310,7 +310,6 @@
> > > >   event_set_mem_functions@Base 2.1.8-stable
> > > >   event_sock_err@Base 2.1.8-stable
> > > >   event_sock_warn@Base 2.1.8-stable
> > > > - (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
> > > >   event_warn@Base 2.1.8-stable
> > > >   event_warnx@Base 2.1.8-stable
> > >
> > > I don't understand why it's safe to drop this symbol.
> >
> > Because it's not exposed in the API to other packages:
> >
> > ./strlcpy-internal.h:#define strlcpy event_strlcpy_
> >
> > is the only exposure, and that file is not installed, so there is no way
> > for another package to produce a reference to it. I did check on the
> > archive in the amd64 case, no package does.
> >
> 
> Thanks, that's indeed not possible to use.

That being said, like #1043184 you will need to make libevent-core-2.1-7
Break the previous versions of the other libevent packages, to make sure
they get upgraded to the version that doesn't use event_strlcpy_ any
more.

Samuel



Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-07 Thread Shengjing Zhu
On Fri, Sep 8, 2023 at 1:10 AM Samuel Thibault  wrote:
>
> Shengjing Zhu, le ven. 08 sept. 2023 00:05:23 +0800, a ecrit:
> > On Sun, Aug 06, 2023 at 10:30:38AM +0200, Samuel Thibault wrote:
> > > Source: libevent
> > > Version: 2.1.12-stable-8
> > > Severity: important
> > > Tags: patch
> > >
> > > Hello,
> > >
> > > libevent fails to build against glibc 2.38:
> > >
> > > --- debian/libevent-core-2.1-7.symbols.original 2023-08-06 
> > > 10:17:18.031636016 +0200
> > > +++ debian/libevent-core-2.1-7.symbols  2023-08-06 10:17:28.135665241 
> > > +0200
> > > @@ -310,7 +310,6 @@
> > >   event_set_mem_functions@Base 2.1.8-stable
> > >   event_sock_err@Base 2.1.8-stable
> > >   event_sock_warn@Base 2.1.8-stable
> > > - (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
> > >   event_warn@Base 2.1.8-stable
> > >   event_warnx@Base 2.1.8-stable
> >
> > I don't understand why it's safe to drop this symbol.
>
> Because it's not exposed in the API to other packages:
>
> ./strlcpy-internal.h:#define strlcpy event_strlcpy_
>
> is the only exposure, and that file is not installed, so there is no way
> for another package to produce a reference to it. I did check on the
> archive in the amd64 case, no package does.
>

Thanks, that's indeed not possible to use.

-- 
Shengjing Zhu



Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-07 Thread Nicolas Mora

Hello,

Le 2023-09-07 12:05, Shengjing Zhu a écrit :


I don't understand why it's safe to drop this symbol.

I think the bug is same as https://bugs.debian.org/1023284, which needs
workaround to keep the exported symbol with new glibc.


According to libevent's source code, the function event_strlcpy_ isn't 
used anywhere in libevent, it's only exported, so the change may break 
other packages.


Although as in #1023284, I'll ask the question upstream first to get 
their opinion on this.


Thanks!

/Nicolas



Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-07 Thread Samuel Thibault
Shengjing Zhu, le ven. 08 sept. 2023 00:05:23 +0800, a ecrit:
> On Sun, Aug 06, 2023 at 10:30:38AM +0200, Samuel Thibault wrote:
> > Source: libevent
> > Version: 2.1.12-stable-8
> > Severity: important
> > Tags: patch
> > 
> > Hello,
> > 
> > libevent fails to build against glibc 2.38:
> > 
> > --- debian/libevent-core-2.1-7.symbols.original 2023-08-06 
> > 10:17:18.031636016 +0200
> > +++ debian/libevent-core-2.1-7.symbols  2023-08-06 10:17:28.135665241 
> > +0200
> > @@ -310,7 +310,6 @@
> >   event_set_mem_functions@Base 2.1.8-stable
> >   event_sock_err@Base 2.1.8-stable
> >   event_sock_warn@Base 2.1.8-stable
> > - (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
> >   event_warn@Base 2.1.8-stable
> >   event_warnx@Base 2.1.8-stable
> 
> I don't understand why it's safe to drop this symbol.

Because it's not exposed in the API to other packages:

./strlcpy-internal.h:#define strlcpy event_strlcpy_

is the only exposure, and that file is not installed, so there is no way
for another package to produce a reference to it. I did check on the
archive in the amd64 case, no package does.

> I think the bug is same as https://bugs.debian.org/1023284, which needs
> workaround to keep the exported symbol with new glibc.

Yes, because evutil_secure_rng_add_bytes was really exposed in the API,
in /usr/include/event2/util.h

Samuel



Bug#1043108: libevent: fails to build against glibc 2.38

2023-09-07 Thread Shengjing Zhu
X-Debbugs-CC: sthiba...@debian.org

Hi,

On Sun, Aug 06, 2023 at 10:30:38AM +0200, Samuel Thibault wrote:
> Source: libevent
> Version: 2.1.12-stable-8
> Severity: important
> Tags: patch
> 
> Hello,
> 
> libevent fails to build against glibc 2.38:
> 
> --- debian/libevent-core-2.1-7.symbols.original   2023-08-06 
> 10:17:18.031636016 +0200
> +++ debian/libevent-core-2.1-7.symbols2023-08-06 10:17:28.135665241 
> +0200
> @@ -310,7 +310,6 @@
>   event_set_mem_functions@Base 2.1.8-stable
>   event_sock_err@Base 2.1.8-stable
>   event_sock_warn@Base 2.1.8-stable
> - (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
>   event_warn@Base 2.1.8-stable
>   event_warnx@Base 2.1.8-stable

I don't understand why it's safe to drop this symbol.

I think the bug is same as https://bugs.debian.org/1023284, which needs
workaround to keep the exported symbol with new glibc.

-- 
Shengjing Zhu



Bug#1043108: libevent: fails to build against glibc 2.38

2023-08-06 Thread Samuel Thibault
Source: libevent
Version: 2.1.12-stable-8
Severity: important
Tags: patch

Hello,

libevent fails to build against glibc 2.38:

dpkg-gensymbols: error: some symbols or patterns disappeared in the symbols 
file: see diff output below
dpkg-gensymbols: warning: debian/libevent-core-2.1-7/DEBIAN/symbols doesn't 
match completely debian/libevent-core-2.1-7.symbols
--- debian/libevent-core-2.1-7.symbols 
(libevent-core-2.1-7_2.1.12-stable-8_hurd-amd64)
+++ dpkg-gensymbols1xbUd2   2023-08-06 03:24:48.473512483 +
@@ -309,7 +309,7 @@
  event_set_mem_functions@Base 2.1.8-stable
  event_sock_err@Base 2.1.8-stable
  event_sock_warn@Base 2.1.8-stable
- (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
+#MISSING: 2.1.12-stable-8# (arch=!musl-linux-any)event_strlcpy_@Base 
2.1.8-stable
  event_warn@Base 2.1.8-stable
  event_warnx@Base 2.1.8-stable
  evmap_check_integrity_@Base 2.1.8-stable

(and similar for libevent-2.1-7.symbols)

strlcpy was indeed added to glibc in version 2.38, so it's not
surprising that libevent-core doesn't define its internal version any
more, and the attached patch can probably be applied?

Samuel

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 
'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 
'oldoldstable-proposed-updates'), (500, 'oldoldstable'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.4.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
--- debian/libevent-core-2.1-7.symbols.original 2023-08-06 10:17:18.031636016 
+0200
+++ debian/libevent-core-2.1-7.symbols  2023-08-06 10:17:28.135665241 +0200
@@ -310,7 +310,6 @@
  event_set_mem_functions@Base 2.1.8-stable
  event_sock_err@Base 2.1.8-stable
  event_sock_warn@Base 2.1.8-stable
- (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
  event_warn@Base 2.1.8-stable
  event_warnx@Base 2.1.8-stable
  evmap_check_integrity_@Base 2.1.8-stable
--- ./debian/libevent-2.1-7.symbols.original2023-08-06 10:23:18.224687297 
+0200
+++ ./debian/libevent-2.1-7.symbols 2023-08-06 10:23:19.176690101 +0200
@@ -366,7 +366,6 @@
  event_set_mem_functions@Base 2.1.8-stable
  event_sock_err@Base 2.1.8-stable
  event_sock_warn@Base 2.1.8-stable
- (arch=!musl-linux-any)event_strlcpy_@Base 2.1.8-stable
  event_warn@Base 2.1.8-stable
  event_warnx@Base 2.1.8-stable
  evhttp_accept_socket@Base 2.1.8-stable