Re: [Rpm-maint] [rpm-software-management/rpm] Standardize on OCI images in test-suite (PR #2733)

2023-10-27 Thread Michal Domonkos
Fixed version pushed:

* Don't build local test files if we're in non-native mode (this fixes the 
above issue)
* Drop the Buildah dependency (was trivial in the end)
* Rename to `mktree.oci`
* Remove the confusing `mktree.docker` symlink, use an env var instead
* Minor fixups that I've found along the way

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2733#issuecomment-1783174271
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] Standardize on OCI images in test-suite (PR #2733)

2023-10-27 Thread Michal Domonkos
@dmnks pushed 13 commits.

37ad8e12a5d81293876edd742fc4a62b5e94be93  Refactor rpmtests wrapper
d516179bb1435f8dd971bdc26c2f3b77e2acca03  Add --shell command to rpmtests 
wrapper
487ca4342ca2033062b8422c83da5d08e1e8af7c  Use the new --shell command in 
mktree.podman
05ed0341fd4c2a1e42e1cfd3cfdbd0eb841ffa5e  Use --log only if running from source 
dir
3385972d1afaacd50a153d30a7f1060860e7a5b8  Bind mount $PWD at /srv in test 
container
a172a0eed0a857abc10c671b837060343e63f25e  Only rebuild the RPM test layer
29bc6f47c3b3f956e24601e6dcdbb457d162f971  Add Dockerfile.fedora
e4f1f75ae427a312a0d0836b1adb5b99dd10329c  Add native mode to mktree.podman
5401b1c591db4240c97201a1633e025581234d9c  Standardize on OCI images in 
test-suite
0a0e507df2c5fde21ca7dba45f68dc0101c2  Move snapshot() back to atlocal
78d8f8830c81020a132a38e0866bd3e52d41e384  Remove function keywords from atlocal
9c5c5ac6edf00598fbc2647df68cfdaefbbc84fa  Remove sudo from GH workflow
c764e3962d4cfefb70fa167bbdc1626318aba9ad  Rename mktree.podman to mktree.oci

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2733/files/50f731def4e6ff764f01c055872d6ebdcee0dc82..c764e3962d4cfefb70fa167bbdc1626318aba9ad
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread Maxwell G
It would be nice if we could also use this system to generate a 
`%generate_buildrequires` section in addition to generating static 
BuildRequires.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620#issuecomment-1783160849
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread ニール・ゴンパ
It does probably make sense to pull the CMake macros into rpm so we can build 
ourselves from what is provided by rpm itself...  

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620#issuecomment-1783016528
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] The debuginfo machinery breaks if %install follows directly after %prep or preamble (Issue #1870)

2023-10-27 Thread Panu Matilainen
Closed #1870 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1870#event-10791621455
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] The debuginfo machinery breaks if %install follows directly after %prep or preamble (Issue #1870)

2023-10-27 Thread Panu Matilainen
Fixed by https://github.com/rpm-software-management/rpm/pull/2730

And no, don't ask for backports (see the part about sacrifices in the PR). This 
will only be in rpm >= 4.20.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1870#issuecomment-1782892219
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] RFE: Allow slicing sources list (Issue #2180)

2023-10-27 Thread Panu Matilainen
Even shorter, using bash arrays:

```
read -r -a SRC <<< "%{sources}"
cp -a ${SRC[@]:1} .
```

Technically it'd be possible to add min and max parameters to the %sources and 
%patches macros similar to %autopatch, but the added complexity doesn't seem 
warranted here because there are already tools to achieve this using generally 
available tools.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2180#issuecomment-1782874698
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] Add support for macro aliases (PR #2722)

2023-10-27 Thread Panu Matilainen
Hmm, of course this would be far more powerful if it supported arguments and 
all, similar to eg bash aliases.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2722#issuecomment-1782663797
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread Panu Matilainen
Also, if we ship any default autobuild macros at all, we'll need to include 
something for cmake too. Shipping autotools macros but no cmake macros, in a 
cmake project, would look a bit odd :sweat_smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620#issuecomment-1782599343
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread Panu Matilainen
@pmatilai pushed 1 commit.

8ab9805b2275bfd0e1481b416b00d0fd35f846d6  Implement autobuild "template" system 
(prototype)

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620/files/e2b5b92efeecfde25f6a17437f70da9c0648cba1..8ab9805b2275bfd0e1481b416b00d0fd35f846d6
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread Panu Matilainen
@pmatilai pushed 1 commit.

e2b5b92efeecfde25f6a17437f70da9c0648cba1  Implement autobuild "template" system 
(prototype)

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620/files/2002ed7a4d06fda5fab3835165b50f4d216fc8d2..e2b5b92efeecfde25f6a17437f70da9c0648cba1
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread Panu Matilainen
Rebased on current master and updated the test-case to showcase a more 
real-world use scenario with %build -a.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620#issuecomment-1782577470
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] Implement a declarative autobuild system (prototype) (PR #2620)

2023-10-27 Thread Panu Matilainen
@pmatilai pushed 2 commits.

ed59d17c0599163c89e9b8afdb3a48940618437b  Refactor the processing logic out of 
parseGeneratedSpecs() for reuse
2002ed7a4d06fda5fab3835165b50f4d216fc8d2  Implement autobuild "template" system 
(prototype)

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2620/files/4a879f0c6d2ec0196c84cf7b6d2a03a6aed12ef8..2002ed7a4d06fda5fab3835165b50f4d216fc8d2
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] Add "local_generator" (PR #2734)

2023-10-27 Thread Vít Ondruch
> If `local_generator.attr` file exists then `local_generator` created twice.

This is good point. Not sure if this is real problem though.

> Why not simply create an empty `local_generator.attr` file instead?

I have proposed this earlier in 
https://github.com/rpm-software-management/rpm/issues/782#issuecomment-1747200612
 and put this idea into practice for 
[Fedora](https://src.fedoraproject.org/rpms/rpm-local-generator-support). I 
have no preference.

I just wanted to move this forward a bit ;) now I stand by waiting for guidance 
(i.e. the right implementation and the acceptable name).



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2734#issuecomment-1782567947
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] Add support for macro aliases (PR #2722)

2023-10-27 Thread Panu Matilainen
It should be more obvious once I rebase the autobuild thing on top of this all.

But shortly, in the autobuild context, we have these __foo_build, __bar_build, 
__zap_build etc macros defined for various different buildsystems. Those are 
all usable in standalone format by calling the explicit lengthy name, but when 
one uses Autobuild: tag, there should be a shortcut to the active build type, 
eg in the spec you only then need to use %autobuild_install if you manually 
need to invoke it for whatever reason. That should also simplify the rpm 
implementation side of the autobuild a bit. And you can't really achieve this 
(parametric macro semantics and all) with regular macro definitions. One could 
make a copy, but we don't have support for that either. 

In other words, maybe it helps to think of aliases as a means to achieve 
"alternatives" in the macro space.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2722#issuecomment-1782534859
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] Add support for macro aliases (PR #2722)

2023-10-27 Thread Florian Festi
I am still a bit puzzled on what this can do that you can't do with a simple 
macro definition. I mean I have a  rough idea. But may be the docs should make 
a bit more of an effort to explain what to use in which case.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2722#issuecomment-1782509152
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] Add support for macro aliases (PR #2722)

2023-10-27 Thread Panu Matilainen
Rebase on top of the other recent stuff.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2722#issuecomment-1782498197
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] Add support for macro aliases (PR #2722)

2023-10-27 Thread Panu Matilainen
@pmatilai pushed 4 commits.

3848c6054ffdc6859df9e0a328fb0d9d513b33ea  Make macro name first character check 
more obvious
cddb14c0a540ad32974a6e29b09d56448fa41b3d  Validate the entire macro name in 
validName()
8d326b07cf12b957da10e2dc50d14d9817fedd11  Add support for macro aliases
27d0776425b4692c056e06b520a586fdd3adf993  Add proper documentation about our 
different macro types and scopes

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2722/files/3a404fedb10c33a55bd13c7befacd555099026da..27d0776425b4692c056e06b520a586fdd3adf993
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] Implement prepend and append modes for all our normal build scriptlets (PR #2728)

2023-10-27 Thread Panu Matilainen
Merged #2728 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2728#event-10788604256
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] Implement prepend and append modes for all our normal build scriptlets (PR #2728)

2023-10-27 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -461,6 +461,13 @@ when name is omitted, the description refers to the main 
> package.
 Package build is divided into multiple separate steps, each executed
 in a separate shell.
 
+Only one of each section can be present in a spec, but all build scriptlets
+except for `%prep` accept options `-a` and `-p`, for append and prepend mode.
+Append and prepend append or prepend lines to the section in the order they

Hopefully significantly less hideous now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2728#discussion_r1374195978
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] Implement prepend and append modes for all our normal build scriptlets (PR #2728)

2023-10-27 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -461,6 +461,13 @@ when name is omitted, the description refers to the main 
> package.
 Package build is divided into multiple separate steps, each executed
 in a separate shell.
 
+Only one of each section can be present in a spec, but all build scriptlets
+except for `%prep` accept options `-a` and `-p`, for append and prepend mode.
+Append and prepend append or prepend lines to the section in the order they
+appear in the spec. Both append and prepend can be used multiple times and
+without other restrictions, but a section without either mode can only
+appear first (eg `%build` cannot follow `%build -p`).

I mentioned the reason in the new version of the manual.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2728#discussion_r1374195540
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] Implement prepend and append modes for all our normal build scriptlets (PR #2728)

2023-10-27 Thread Panu Matilainen
Thanks @ffesti, but I ended up rewriting that from scratch now that the `%prep` 
exception is gone. It still isn't a great piece of literature exactly but 
hopefully passable for a reference manual now.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2728#issuecomment-1782455997
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] Implement prepend and append modes for all our normal build scriptlets (PR #2728)

2023-10-27 Thread Panu Matilainen
@pmatilai pushed 1 commit.

3864c8996e1f4b60ee731fcd91c6f744455ebabd  Implement prepend and append modes 
for all build scriptlets

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2728/files/a8b4e5be21cae2f980e75bc528bff0405ec64689..3864c8996e1f4b60ee731fcd91c6f744455ebabd
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] Turn %prep into a normal build script (Issue #2205)

2023-10-27 Thread Panu Matilainen
Closed #2205 as completed via #2730.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2205#event-10788055422
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] Convert %prep into a regular build scriptlet (PR #2730)

2023-10-27 Thread Panu Matilainen
Merged #2730 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2730#event-10788055285
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] Convert %prep into a regular build scriptlet (PR #2730)

2023-10-27 Thread Panu Matilainen
So... if we're going to do this then lets just get on with it, because this is 
blocking or at least affecting so many other developments at this point. Like 
noted, if this turns out to be an utter PR disaster (in the other meaning of 
PR), it'll still be possible to add a different kind of hack to restore %patchN 
for one release more.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2730#issuecomment-1782409188
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