Re: incorrect docs for forge macro extension, when using 'unknown' scm source (e.g., git.kernel.org) ?

2020-07-10 Thread PGNet Dev

On 7/10/20 1:26 AM, Nicolas Mailhot wrote:

Le jeudi 09 juillet 2020 à 09:40 -0700, PGNet Dev a écrit :

I'm working on a spec, pulling source with forgemeta/scm

With known/supported scm sources (e.g., github), it works as
expected, with no issues.


involves writing the lua equivalent of regexpes that
contruct the variables forgesetup will use from forgeurl and
tag/commit/whatever (you can check in redhat-rpmc-config history how
pagure and gitea support was added, they’re the two last supported
sources)


That something needs to be added/written/worked-around is clear.

To do that effectively, I've simply asked

> (1) Are there up-to-date/correct docs for 'Extending the macro' ?
>
> (2) Is there an explcit example for use with 'git.kernel.org' sources?


In other circumstances, the someone might be me, but I’m getting fed up
with everyone else in the project not doing their part and blaming me
for doing things alone. So, right now, very unlikely that I will invest
more in Fedora without others doing their parts.


I don't know you to 'blame you', and certainly haven't here.

If your issue is with others, then perhaps you might take it up with _them_?
___
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


Re: incorrect docs for forge macro extension, when using 'unknown' scm source (e.g., git.kernel.org) ?

2020-07-10 Thread Nicolas Mailhot via devel
Le jeudi 09 juillet 2020 à 09:40 -0700, PGNet Dev a écrit :
> I'm working on a spec, pulling source with forgemeta/scm
> 
> With known/supported scm sources (e.g., github), it works as
> expected, with no issues.

Because every forge hosting service out there is inventing its own
archive export API, it is not possible for the macro to process an
unknown source without being taught how this particular service works.

That, basically involves writing the lua equivalent of regexpes that
contruct the variables forgesetup will use from forgeurl and
tag/commit/whatever (you can check in redhat-rpmc-config history how
pagure and gitea support was added, they’re the two last supported
sources)

So, either your need is a one-off, and you can workaround things by
setting all the variables forgemeta would have computed if it knew your
source, or it’s something generally useful for the long term, and
someone needs to add the regexpes

In other circumstances, the someone might be me, but I’m getting fed up
with everyone else in the project not doing their part and blaming me
for doing things alone. So, right now, very unlikely that I will invest
more in Fedora without others doing their parts.

Regards,

-- 
Nicolas Mailhot
___
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


incorrect docs for forge macro extension, when using 'unknown' scm source (e.g., git.kernel.org) ?

2020-07-09 Thread PGNet Dev
I'm working on a spec, pulling source with forgemeta/scm

With known/supported scm sources (e.g., github), it works as expected, with no 
issues.

Atm, I'm trying to pull from a different source,

git.kernel.org

with this 'ofono-test.spec'

%global forgeurl
https://git.kernel.org/pub/scm/network/ofono/ofono.git
%global commit  aeeb321a72d0b84c0fe5008dc7c49f0707582ca0

%forgemeta -i -a

Name:  ofono
Version:   0
Release:   %{dist}
Summary:   ofono
License:   GPL-2.0

URL:   %{forgeurl}
Source:%{forgesource}

BuildRequires: git

%description
ofono

%prep
%forgesetup

%build

%install

%files

%changelog


"build through %prep" stage fails

rpmbuild --clean --verbose -bp ofono-test.spec
Packaging variables read or set by %forgemeta
  forgeurl0: 
https://git.kernel.org/pub/scm/network/ofono/ofono.git
  forgesource0:  #/.%{archiveext0}
  forgesetupargs0:   -c -n %{archivename0}
  extractdir0:   %{archivename0}
  commit0:   aeeb321a72d0b84c0fe5008dc7c49f0707582ca0
  distprefix0:   .%{scm0}aeeb321
  dist:  .%{scm0}aeeb321.fc32
  (snapshot date is either manually supplied or computed once 
%{_sourcedir}/%{archivename0}.%{archiveext0} is available)
warning: line 8: Possible unexpanded macro in: Release: 
  .%{scm0}aeeb321.fc32
error: Bad source: /root/rpmbuild/SOURCES/.%{archiveext0}: No 
such file or directory

Not at all clear what the actual problem is.  Since it _does_ work with 
gitbub/gitlab sources, I'd _guess_ it's a URL/source string format issue ...

Reading at


https://fedoraproject.org/wiki/Forge-hosted_projects_packaging_automation#Extending_the_macro

states

"locate the latest version of the forgemeta macro (it should be 
installed in /usr/lib/rpm/macros.d/macros.forge-srpm by fedora-rpm-macros)"

the package is installed

dnf list --installed fedora-rpm-macros
Installed Packages
fedora-rpm-macros.noarch26-8.fc32@fedora

there's no such file

ls -al /usr/lib/rpm/macros.d/macros.forge-srpm
ls: cannot access '/usr/lib/rpm/macros.d/macros.forge-srpm': No 
such file or directory

checking

rpm -ql fedora-rpm-macros
/usr/lib/rpm/macros.d/macros.fedora

and, the file's empty

cat /usr/lib/rpm/macros.d/macros.fedora
# Miscellaneous Fedora-related RPM macros.

# Currently there is nothing here.


(1) Are there up-to-date/correct docs for 'Extending the macro' ?

(2) Is there an explcit example for use with 'git.kernel.org' sources?
___
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