Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic generator generates "invalid" srpm (Issue #3096)

2024-06-12 Thread Panu Matilainen
Closed #3096 as completed via 882c75b5a8cef5e1dc7ec6a81abca7ef7e0b93bb.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3096#event-13130779073
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic generator generates "invalid" srpm (Issue #3096)

2024-05-14 Thread Panu Matilainen
Summary is a mandatory field on rpm packages, we cannot very well write illegal 
packages.
If we don't have a meaningful value we need to stick *something* in it.

That said, this is probably a bridge too far and seems easily avoided by 
requiring the mandatory base tags to be supplied by the spec. They are not that 
many.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3096#issuecomment-2109839116
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic generator generates "invalid" srpm (Issue #3096)

2024-05-14 Thread Vít Ondruch
I have used "valid" in a sense that I would not be allowed to create SRPM 
without e.g. summary. So apparently, this does not use the same code paths 
which is concerning.

Also, when I saw the test case in 
https://github.com/rpm-software-management/rpm/commit/5d288554719095d1c67fd87cad65224743152d06,
 I though that would allow to have different preamble between SRPM / RPM, which 
would be nice (see #3046). But if that is not the case, I would rather if the 
possibility to generate the main package preamble was dropped, because 
otherwise it provides confusing results. And TBH, the test case with defining 
some macro is very artificial.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3096#issuecomment-2109476389
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic generator generates "invalid" srpm (Issue #3096)

2024-05-13 Thread Florian Festi
One way to make the SRPM "valid" is ofc just adding a dummy description (and 
summary, ...). This won't make the difference between the `rpmbuild -bs` and 
`rpmbuild -ba` SRPMs go away. Looks like all this dynamic stuff is not very 
kind to the SRPMs - the dynamic BuildRequires are similar in nature.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3096#issuecomment-2109376801
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic generator generates "invalid" srpm (Issue #3096)

2024-05-13 Thread Florian Festi
Good to see someone is actually testing these kind of things!

This is kind of intentional. I guess I need to meditate a bit on how 
intentional. The Summary being dynamic (aka determined during build) ofc means 
it is not available during `rpmbuild -bs`. May be this is just the price to pay 
- may be this is just a bridge too far.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3096#issuecomment-2109367909
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Dynamic generator generates "invalid" srpm (Issue #3096)

2024-05-13 Thread Vít Ondruch
~~~
$ curl -OL 
https://github.com/rpm-software-management/rpm/raw/master/tests/data/SPECS/dynamic.spec
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
100  1695  100  16950 0   3367  0 --:--:-- --:--:-- --:--:--  3367

# rpmbuild -D "_sourcedir ." -D "_srcrpmdir ." -D "FULLDYNAMIC 1" -bs 
dynamic.spec dynamic.spec
setting SOURCE_DATE_EPOCH=1666569600
Wrote: ./dynamic-1.0-1.src.rpm
Wrote: ./dynamic-1.0-1.src.rpm

$ rpm -q --info dynamic-1.0-1.src.rpm 
Name: dynamic
Version : 1.0
Release : 1
Architecture: noarch
Install Date: (not installed)
Group   : (none)
Size: 1695

Signature   : (none)
Source RPM  : (none)
Build Date  : Mon May 13 18:20:44 2024
Build Host  : fedora
Summary : (none)
Description :
Simple rpm demonstration.
~~~

I don't think it would be possible to generate RPM without e.g. `Summary`. It 
also differs to SRPM generated with `-ba`, which contains the summary just fine:

~~~
$ rpm -q --info dynamic-1.0-1.src.rpm 
Name: dynamic
Version : 1.0
Release : 1
Architecture: noarch
Install Date: (not installed)
Group   : Utilities
Size: 1695
License : GPL
Signature   : (none)
Source RPM  : (none)
Build Date  : Mon May 13 18:22:44 2024
Build Host  : fedora
URL : http://rpm.org
Summary : dynamic hello -- hello, world rpm
Description :
Simple rpm demonstration.

~~~



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3096
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint