Re: rpm 4.16 landed -> errors!

2021-03-16 Thread Elan Ruusamäe


On 16.03.2021 16:45, Elan Ruusamäe wrote:


the automatic upgrade is failing:

- https://gitlab.com/pld-linux/pld/-/jobs/1094531330#L214


oh, and user is left without rpmdb:


[@46a17bd0ade9 /]# rpm -q rpm poldek
warning: Found bdb Packages database while attempting sqlite backend: 
using bdb backend.

warning: Generating 6 missing index(es), please wait...
package rpm is not installed
package poldek is not installed

[@46a17bd0ade9 /]# rpm -q rpm poldek
warning: Found bdb Packages database while attempting sqlite backend: 
using bdb backend.

package rpm is not installed
package poldek is not installed
[@46a17bd0ade9 /]#


___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/poldek] skip /usr/lib/.build-id when processing obsoletes

2021-03-16 Thread Jan Palus
On 16.03.2021 13:31, atler wrote:
> commit aba59b953581b330457d7e6f0ea3e1ab648f80a7
> Author: Jan Palus 
> Date:   Tue Mar 16 13:28:50 2021 +0100
> 
> skip /usr/lib/.build-id when processing obsoletes
> 
> fixes major performance regression when changing (downgrade, obsolete)
> package with build-id to one that doesn't
> 
>  poldek.spec  |  2 ++
>  skip-buildid-obsoletes.patch | 11 +++
>  2 files changed, 13 insertions(+)
...
> diff --git a/skip-buildid-obsoletes.patch b/skip-buildid-obsoletes.patch
> new file mode 100644
> index 000..1b2e7c1
> --- /dev/null
> +++ b/skip-buildid-obsoletes.patch
> @@ -0,0 +1,11 @@
> +--- poldek-0.42.2/install3/obsoletes.c.orig  2020-01-25 22:59:59.0 
> +0100
>  poldek-0.42.2/install3/obsoletes.c   2021-03-16 13:14:05.667576984 
> +0100
> +@@ -188,6 +188,8 @@
> + "/usr/share/doc/*",
> + "/usr/share/man/*.[0-9]",
> + "/usr/src/examples/*",
> ++"/usr/lib/.build-id",
> ++"/usr/lib/.build-id/*",
> + "*.desktop",
> + "*.mo",
> + "*.gz",

Note that it's just half of the solution, the other one is to fix
find-debuginfo.sh to exclude any dir ownership. Currently every binary
package built with rpm4 owns /usr/lib/.build-id and its subdirectories
while only symlinks should be owned. If someone is up for this please be
my guest.
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: rpm 4.16 landed -> errors!

2021-03-16 Thread Elan Ruusamäe

On 16.03.2021 14:54, Elan Ruusamäe wrote:


i see rpm 4.16 is in th main.

please add a news entry to frontpage!


the automatic upgrade is failing:

- https://gitlab.com/pld-linux/pld/-/jobs/1094531330#L214

to reproduce run poldek upgrade dist:


```

docker run 
registry.gitlab.com/pld-linux/pld:latest@sha256:3bf9e65ba27f6d2e254d37e5219d5ff38b8e6f86c214ae0d8c730b2868775931 
poldek --up --upgrade-dist


```

Backup of the rpm database has been created in 
/var/lib/rpm.rpmbackup-4.16.1.2-6 If poldek aborts after migration with 
rpmdb error, this is expected behaviour, you should ignore it and 
restart poldek warning: Converting database from bdb to sqlite backend 
error: failed to replace old database with new database! error: replace 
files in /var/lib/rpm with files from /var/lib/rpmrebuilddb.40 to 
recover rpm database conversion failed! You have to run '/usr/bin/rpmdb 
--rebuilddb' manually error: %posttrans(rpm-4.16.1.2-6.x86_64) scriptlet 
failed, exit status 1



___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


rpm 4.16 landed?

2021-03-16 Thread Elan Ruusamäe

i see rpm 4.16 is in th main.

please add a news entry to frontpage!

___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/crossmingw32-pango] - rpm.org+meson combo require to redefine all dirs

2021-03-16 Thread Jakub Bogusz
On Sun, Mar 14, 2021 at 10:31:25PM +0100, qboosh wrote:
> commit f5e59fe05417d0d72ef5e99cb896e81fdb32885a
> Author: Jakub Bogusz 
> Date:   Sun Mar 14 22:32:30 2021 +0100
> 
> - rpm.org+meson combo require to redefine all dirs; disable debug packages
> 
>  crossmingw32-pango.spec | 9 +
>  1 file changed, 9 insertions(+)
> ---
> diff --git a/crossmingw32-pango.spec b/crossmingw32-pango.spec
> index b0b1e43..5d32499 100644
> --- a/crossmingw32-pango.spec
> +++ b/crossmingw32-pango.spec
> @@ -45,6 +45,14 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
>  %define  _libdir %{_prefix}/lib
>  %define  _pkgconfigdir   %{_prefix}/lib/pkgconfig
>  %define  _dlldir /usr/share/wine/windows/system
> +# rpm.org needs redefining these (redefining _prefix don't change them)
> +%define  _bindir %{_prefix}/bin
> +%define  _sbindir%{_prefix}/sbin
> +%define  _includedir %{_prefix}/include
> +%define  _libexecdir %{_prefix}/libexec
> +%define  _datadir%{_prefix}/share
> +%define  _infodir%{_datadir}/info
> +%define  _mandir %{_datadir}/man
>  %define  __pkgconfig_provides%{nil}
>  %define  __pkgconfig_requires%{nil}
>  # for meson 0.50+, keep __cc/__cxx as host compiler and pass %{target}-* in 
> meson-cross.txt

In rpm5 packaging _*dir macros were defined relative to _prefix.
In rpm.org rpm/platform/*-linux/macros files define absolute _*dir macros
(instead of relative to %{_prefix}):

| #  configure macros.
| #
| %_prefix/usr
| %_exec_prefix   /usr
| %_bindir/usr/bin
| %_sbindir   /usr/sbin
| %_libexecdir/usr/libexec
| %_datarootdir   %{_prefix}/share
| %_datadir   /usr/share
| %_sysconfdir/etc
| %_sharedstatedir/var/lib
| %_localstatedir /var
| %_lib   lib
| %_libdir/usr/lib
| %_includedir/usr/include
| %_oldincludedir /usr/include
| %_infodir   /usr/share/info
| %_mandir/usr/share/man

Is it intentional change?

meson doesn't allow --{bin,sbin,include,libexec,data,info,man}dir outside 
--prefix,
so in case of cross* packages I needed to additionally redefine more macros, 
even
though some dirs are not actually used (just %meson macro passes them).


-- 
Jakub Boguszhttp://qboosh.pl/
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: rpm 4.16 landed -> errors!

2021-03-16 Thread Jan Rękorajski
On Tue, 16 Mar 2021, Elan Ruusamäe wrote:

> 
> On 16.03.2021 16:45, Elan Ruusamäe wrote:
> >
> > the automatic upgrade is failing:
> >
> > - https://gitlab.com/pld-linux/pld/-/jobs/1094531330#L214
> >
> oh, and user is left without rpmdb:
> 
> 
> [@46a17bd0ade9 /]# rpm -q rpm poldek
> warning: Found bdb Packages database while attempting sqlite backend: 
> using bdb backend.
> warning: Generating 6 missing index(es), please wait...
> package rpm is not installed
> package poldek is not installed
> 
> [@46a17bd0ade9 /]# rpm -q rpm poldek
> warning: Found bdb Packages database while attempting sqlite backend: 
> using bdb backend.
> package rpm is not installed
> package poldek is not installed
> [@46a17bd0ade9 /]#

First, regarding lost database.
You do have a backup of the database from before the update:

Backup of the rpm database has been created in /var/lib/rpm.rpmbackup-4.16.1.2-6

There is also the new database, that rpm was unable to move:

error: replace files in /var/lib/rpm with files from /var/lib/rpmrebuilddb.42 
to recover

Is /var/lib/rpm a mountpoint? That would be the explanation that comes
to mind. There must be something that prevented rpm from renaming temporary
directory in /var/lib to rpm.

I've been (live) testing upgrade path and I assumed it does work.
Never encountered problems after squashing rpm5 oddities.

I've been also asking over and over for testing and no one came with any
issues like this.

-- 
Jan Rękorajski| PLD/Linux
SysAdm | bagginspld-linux.org | http://www.pld-linux.org/
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: rpm 4.16 landed -> errors!

2021-03-16 Thread Neal Gompa
On Tue, Mar 16, 2021 at 1:39 PM Jan Rękorajski  wrote:
>
> On Tue, 16 Mar 2021, Elan Ruusamäe wrote:
>
> >
> > On 16.03.2021 16:45, Elan Ruusamäe wrote:
> > >
> > > the automatic upgrade is failing:
> > >
> > > - https://gitlab.com/pld-linux/pld/-/jobs/1094531330#L214
> > >
> > oh, and user is left without rpmdb:
> >
> >
> > [@46a17bd0ade9 /]# rpm -q rpm poldek
> > warning: Found bdb Packages database while attempting sqlite backend:
> > using bdb backend.
> > warning: Generating 6 missing index(es), please wait...
> > package rpm is not installed
> > package poldek is not installed
> >
> > [@46a17bd0ade9 /]# rpm -q rpm poldek
> > warning: Found bdb Packages database while attempting sqlite backend:
> > using bdb backend.
> > package rpm is not installed
> > package poldek is not installed
> > [@46a17bd0ade9 /]#
>
> First, regarding lost database.
> You do have a backup of the database from before the update:
>
> Backup of the rpm database has been created in 
> /var/lib/rpm.rpmbackup-4.16.1.2-6
>
> There is also the new database, that rpm was unable to move:
>
> error: replace files in /var/lib/rpm with files from /var/lib/rpmrebuilddb.42 
> to recover
>
> Is /var/lib/rpm a mountpoint? That would be the explanation that comes
> to mind. There must be something that prevented rpm from renaming temporary
> directory in /var/lib to rpm.
>
> I've been (live) testing upgrade path and I assumed it does work.
> Never encountered problems after squashing rpm5 oddities.
>
> I've been also asking over and over for testing and no one came with any
> issues like this.
>

This is probably an overlayfs specific issue, I've seen various
problems with renames (which is what rpm does for rebuilding
databases) in containers.



-- 
真実はいつも一つ!/ Always, there's only one truth!
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/crossmingw32-pango] - rpm.org+meson combo require to redefine all dirs

2021-03-16 Thread Jan Rękorajski
On Tue, 16 Mar 2021, Jakub Bogusz wrote:

> On Sun, Mar 14, 2021 at 10:31:25PM +0100, qboosh wrote:
> > commit f5e59fe05417d0d72ef5e99cb896e81fdb32885a
> > Author: Jakub Bogusz 
> > Date:   Sun Mar 14 22:32:30 2021 +0100
> > 
> > - rpm.org+meson combo require to redefine all dirs; disable debug 
> > packages
> > 
> >  crossmingw32-pango.spec | 9 +
> >  1 file changed, 9 insertions(+)
> > ---
> > diff --git a/crossmingw32-pango.spec b/crossmingw32-pango.spec
> > index b0b1e43..5d32499 100644
> > --- a/crossmingw32-pango.spec
> > +++ b/crossmingw32-pango.spec
> > @@ -45,6 +45,14 @@ BuildRoot:   %{tmpdir}/%{name}-%{version}-root-%(id 
> > -u -n)
> >  %define_libdir %{_prefix}/lib
> >  %define_pkgconfigdir   %{_prefix}/lib/pkgconfig
> >  %define_dlldir /usr/share/wine/windows/system
> > +# rpm.org needs redefining these (redefining _prefix don't change them)
> > +%define_bindir %{_prefix}/bin
> > +%define_sbindir%{_prefix}/sbin
> > +%define_includedir %{_prefix}/include
> > +%define_libexecdir %{_prefix}/libexec
> > +%define_datadir%{_prefix}/share
> > +%define_infodir%{_datadir}/info
> > +%define_mandir %{_datadir}/man
> >  %define__pkgconfig_provides%{nil}
> >  %define__pkgconfig_requires%{nil}
> >  # for meson 0.50+, keep __cc/__cxx as host compiler and pass %{target}-* 
> > in meson-cross.txt
> 
> In rpm5 packaging _*dir macros were defined relative to _prefix.
> In rpm.org rpm/platform/*-linux/macros files define absolute _*dir macros
> (instead of relative to %{_prefix}):
> 
> | #  configure macros.
> | #
> | %_prefix/usr
> | %_exec_prefix   /usr
> | %_bindir/usr/bin
> | %_sbindir   /usr/sbin
> | %_libexecdir/usr/libexec
> | %_datarootdir   %{_prefix}/share
> | %_datadir   /usr/share
> | %_sysconfdir/etc
> | %_sharedstatedir/var/lib
> | %_localstatedir /var
> | %_lib   lib
> | %_libdir/usr/lib
> | %_includedir/usr/include
> | %_oldincludedir /usr/include
> | %_infodir   /usr/share/info
> | %_mandir/usr/share/man
> 
> Is it intentional change?
> 
> meson doesn't allow --{bin,sbin,include,libexec,data,info,man}dir outside 
> --prefix,
> so in case of cross* packages I needed to additionally redefine more macros, 
> even
> though some dirs are not actually used (just %meson macro passes them).

Side effect. We had this defined in our macros.pld.in, in rpm.org it's
in the per-platform definitions created by the rpm.

I believe it should be pretty straighforward to patch platform.in to use
relative defs. Just add a patch.

-- 
Jan Rękorajski| PLD/Linux
SysAdm | bagginspld-linux.org | http://www.pld-linux.org/
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en