Re: [Rpm-maint] [rpm-software-management/rpm] rpm-4.16.0a regression in rpmbuild: "Tag takes single token only" (#1167)

2020-04-14 Thread ニール・ゴンパ
@soig As an aside, we really should fix that typo... `%_vendor` not being 
`mageia` bites me in a lot of surprising places... :(

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1167#issuecomment-613490745___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm-4.16.0a regression in rpmbuild: "Tag takes single token only" (#1167)

2020-04-08 Thread soig
Damns you're right:
$ rpm -q rpm
rpm-4.15.1-3.mga8
$ rpm --eval %mkrel
%{1}.mga8
$  sudo urpmi --auto-select
(…)
$ rpm -q rpm
rpm-4.15.90-0.git14971.0.3.mga8.x86_64
$ rpm --eval %mkrel
%mkrel

Here's the output of rpm --showrc|grep ^Macro for both:
-Macro path: 
/usr/lib/rpm/macros:/usr/lib/rpm/macros.d/macros.*:/usr/lib/rpm/platform/%{_target}/macros:/usr/lib/rpm/fileattrs/*.attr:/usr/lib/rpm/mageia/macros:/etc/rpm/macros.d/*.macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros
+Macro path: 
/usr/lib/rpm/macros:/usr/lib/rpm/macros.d/macros.*:/usr/lib/rpm/platform/%{_target}/macros:/usr/lib/rpm/fileattrs/*.attr:/usr/lib/rpm/Mageia/macros:/etc/rpm/macros.d/*.macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros

The actual difference being:
-/usr/lib/rpm/mageia/macros
+/usr/lib/rpm/Mageia/macros

Because I added:
--with-vendor=%{_vendor} \
However:
$ rpm --eval %_vendor
Mageia

You're right again…

My mess :-(

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1167#issuecomment-610922387___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm-4.16.0a regression in rpmbuild: "Tag takes single token only" (#1167)

2020-04-08 Thread soig
Closed #1167.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1167#event-3213830018___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm-4.16.0a regression in rpmbuild: "Tag takes single token only" (#1167)

2020-04-08 Thread Panu Matilainen
Also with copy-pasting the %mkrel macro to my ~/.rpmmacros it works just fine. 
It's a matter of rpm not looking in the place that %mkrel is defined.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1167#issuecomment-610866342___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] rpm-4.16.0a regression in rpmbuild: "Tag takes single token only" (#1167)

2020-04-08 Thread Panu Matilainen
I'm don't know what such a change would be.

You're getting that error because %mkrel is undefined, for whatever reason - 
the error message clearly shows its not getting expanded at all.

This is trivial to demonstrate:
```
[pmatilai︎lumikko SPECS]$ cat relmacro.spec 
Name: relmacro
Version: 1.0
Release: %{mkrel 1}
Summary: %{name}
License: foo
%description
%files 
[pmatilai︎lumikko SPECS]$ rpmbuild -bb relmacro.spec 
error: line 3: Tag takes single token only: Release: %{mkrel 1}
[pmatilai︎lumikko SPECS]$ rpmbuild -bb --define "mkrel() 1 2" relmacro.spec 
error: line 3: Tag takes single token only: Release: 1 2
[pmatilai︎lumikko SPECS]$ rpmbuild -bb --define "mkrel() 1" relmacro.spec 
Processing files: relmacro-1.0-1.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files 
/home/pmatilai/rpmbuild/BUILDROOT/relmacro-1.0-1.x86_64
Wrote: /home/pmatilai/rpmbuild/RPMS/x86_64/relmacro-1.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.BTxnVn
+ umask 022
+ cd /home/pmatilai/rpmbuild/BUILD
+ /usr/bin/rm -rf /home/pmatilai/rpmbuild/BUILDROOT/relmacro-1.0-1.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0
```

As to why it's not getting defined I dont know, there aren't any macro path etc 
changes in 4.16 that I can remember. I don't know where Mageia defines that 
macro, but --with-vendor= to configure is one thing that could affect it. 

I'm not ruling out a bug, I just can't think of anything even remotely related 
in 4.16.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1167#issuecomment-610862773___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] rpm-4.16.0a regression in rpmbuild: "Tag takes single token only" (#1167)

2020-04-08 Thread soig
Hi
There's a regression in rpmbuild in 4.16.0 alpha:
$ rpmbuild -ba ~/rpmbuild/SPECS/foobar.spec
error: line 5: Tag takes single token only: Release:%{mkrel 1}

This basically breaks building all of 13 000 packages in Mageia because all of 
them use this:
Release: %mkrel 1

Which expands to a nicely formatted release number according to the distro 
version (similar to %{dist} in Fedora).

Mkrel is defined as:
%mkrel(c:) %{-c: 
0.%{-c*}.}%{1}%{?subrel:.%subrel}%{?dist:%dist}%{?!dist:%__dist_ident}%([ 
"%{__distro_section}" != "core" ] && echo .%__distro_section)

Can you please rollback that change?
Thanks

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1167___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint