Re: [Rpm-maint] [rpm-software-management/rpm] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Panu Matilainen
At least for now, these are just macros that can be defined anywhere. But I do 
fail to see the point of a spec defined buildsystem.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#issuecomment-1822232591
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -1352,5 +1352,16 @@ end
 end
 }
 
+# buildsystem defaults
+%buildsystem_default_prep() %autosetup -p1
+
+# example buildsystem macros for autotools

"Defaults" seems ambiguous in this context of %buildsystem_default_*. But 
assuming you mean whether autotools is prominent enough to have macros for it 
shipped with rpm itself... it really is, isn't it? Also, we're carrying 
%configure and all that, it'd seem strange to not to have the boilerplate-free 
counterparts too. As the sole buildsystem shipped with rpm it does seem 
strange, but as discussed elsewhere, we need to ship a cmake buildsystem too.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#discussion_r1401604671
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Panu Matilainen
@pmatilai commented on this pull request.



> @@ -1352,5 +1352,16 @@ end
 end
 }
 
+# buildsystem defaults
+%buildsystem_default_prep() %autosetup -p1

Right, I'll need to document it. %buildsystem_default_* is just something a 
spec using Buildsystem: will fall back to if the buildsystem doesn't override 
it. So for the hands-free experience you'll want %autosetup as the default 
%prep, always. Whether this is useful for the other slots remains to be seen.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#discussion_r1401601076
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] File conflicts: Symlinked directories -> same file replaced by real directories -> unique files (#1458)

2023-11-21 Thread Michal Domonkos
There's also another BZ report of the same (including a reproducer which is 
almost identical to the one above): 
https://bugzilla.redhat.com/show_bug.cgi?id=1835424

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1458#issuecomment-1821095859
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Vít Ondruch
> And in relation to #782, is it possible to define the 'buildsystem' inside of 
> the .spec file?

Although admittedly, not sure what would be the utility 樂

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#issuecomment-1821076512
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Vít Ondruch
And in relation to #782, is it possible to define the 'buildsystem' inside of 
the .spec file?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#issuecomment-1821074359
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Vít Ondruch
@voxik commented on this pull request.



> @@ -1352,5 +1352,16 @@ end
 end
 }
 
+# buildsystem defaults
+%buildsystem_default_prep() %autosetup -p1
+
+# example buildsystem macros for autotools

Is autotools really so prominent to be part of defaults?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#pullrequestreview-1742207782
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Vít Ondruch
@voxik commented on this pull request.



> @@ -1352,5 +1352,16 @@ end
 end
 }
 
+# buildsystem defaults
+%buildsystem_default_prep() %autosetup -p1

I don't see this to be documented. Is it something one should use for something?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2774#pullrequestreview-1742203368
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] Test image cleanups (Issue #2775)

2023-11-21 Thread Michal Domonkos
These came up in a discussion about the test-suite related to #2611:
* [ ] Rename the `rpm` image to something less ambiguous (and not conflicting 
with our earlier Autotools-based CI setup which used the same name)
* [ ] Instead of `--privileged`, use only the specific capabilities required 
(see: https://www.redhat.com/sysadmin/podman-inside-container)
* [ ] (stretch goal) Add support for running inside of 
[Toolbox](https://github.com/containers/toolbox) containers
* [ ] (stretch goal) Maybe drop the whole `mktree` "backend" setup and just use 
a single script?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2775
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] Consolidate some legacy test constructs (Issue #2773)

2023-11-21 Thread Michal Domonkos
OK, I've updated the description accordingly, thanks!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2773#issuecomment-1820825818
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] Consolidate some legacy test constructs (Issue #2773)

2023-11-21 Thread Panu Matilainen
After it's renamed, it may not be a bad idea to actually add RPMTEST_SETUP that 
does, for now, nothing more than wrap AT_SETUP. Just to make the whole thing 
more consistent.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2773#issuecomment-1820815322
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: Declarative build system support (#1087)

2023-11-21 Thread Panu Matilainen
The above specification is now implemented in #2774, more or less.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1087#issuecomment-1820808980
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] Consolidate some legacy test constructs (Issue #2773)

2023-11-21 Thread Michal Domonkos
Yup, good point. It *could* be made into an `AT_SETUP` wrapper and just take 
some kind of argument that says "I need write access to `/`" but that would 
require a *lot* of (even if automated) search & replace across all the test 
files...

In any case, `RPMTEST_INIT` works for me.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2773#issuecomment-1820807025
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] Declarative buildsystem, take II (PR #2774)

2023-11-21 Thread Panu Matilainen
Building on the feedback from the #2620 draft, this seems more like it. Now 
even with documentation :smile:
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2774

-- Commit Summary --

  * Add support for retrieving %generate_buildrequires section from the spec
  * Use rpmSpecGetSection() internally where appropriate
  * Store spec section string buffers as an array
  * Implement declarative buildsystem support

-- File Changes --

M build/build.c (25)
M build/pack.c (5)
M build/parsePreamble.c (28)
M build/parseSpec.c (130)
M build/rpmbuild_internal.h (25)
M build/spec.c (41)
A docs/manual/buildsystem.md (87)
M docs/manual/index.md (1)
M docs/manual/spec.md (6)
M include/rpm/rpmtag.h (2)
M macros.in (11)
A tests/data/SOURCES/amhello-1.0.tar.gz (0)
A tests/data/SPECS/amhello.spec (34)
M tests/rpmbuild.at (39)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2774.patch
https://github.com/rpm-software-management/rpm/pull/2774.diff

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

Message ID: rpm-software-management/rpm/pull/2...@github.com
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Consolidate some legacy test constructs (Issue #2773)

2023-11-21 Thread Panu Matilainen
The problem with RPMTEST_SETUP name is that it relates AT_SETUP when it 
doesn't. Especially as we have RPMTEST_CLEANUP which relates to AT_CLEANUP. 
Maybe RPMTEST_INIT?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2773#issuecomment-1820790973
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] Consolidate some legacy test constructs (Issue #2773)

2023-11-21 Thread Michal Domonkos
> * Perhaps `RPMTEST_SETUP` isn't very descriptive, choose a better name? 
> Its purpose is to initialize a writable tree and mount it at `$RPMTEST`

Hmm, actually  this is probably a good name after all :smile: It literally says 
"setup RPMTEST (directory)"...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2773#issuecomment-1820782344
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] Consolidate some legacy test constructs (Issue #2773)

2023-11-21 Thread Michal Domonkos
* We don't really need an explicit `RPMDB_INIT`, just merge it into 
`RPMTEST_SETUP`.
* Perhaps `RPMTEST_SETUP` isn't very descriptive, choose a better name? Its 
purpose is to initialize a writable tree and mount it at `$RPMTEST`
* Drop `run()`, it's not needed anymore (only as part of `rundebug()` so move 
it there perhaps)

Thanks @pmatilai for the ideas! :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2773
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] Document new test-suite backend (Issue #2611)

2023-11-21 Thread Panu Matilainen
Closed #2611 as completed via #2772.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2611#event-11023278992
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] Extend test README (PR #2772)

2023-11-21 Thread Panu Matilainen
Merged #2772 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2772#event-11023278759
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] Extend test README (PR #2772)

2023-11-21 Thread Michal Domonkos
@dmnks commented on this pull request.



>  
 make check
 
-The number of tests performed depends on features enabled at configure time,
-at least `--with-`/`--without-lua` and `--enable-`/`--disable-python`.
-See also the [INSTALL](../INSTALL) file for more information.
+The number of tests performed depends on features enabled at configure time, at
+least `--with-`/`--without-lua` and `--enable-`/`--disable-python`.  See also

Heh indeed, fixed :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2772#discussion_r1400450835
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] Extend test README (PR #2772)

2023-11-21 Thread Michal Domonkos
@dmnks pushed 1 commit.

f1e03b50be3ef1dab133929a1f87cab79f593520  Extend test README

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2772/files/4649c91b5c7468450217e1c776e4e873edde1039..f1e03b50be3ef1dab133929a1f87cab79f593520
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] Extend test README (PR #2772)

2023-11-21 Thread Panu Matilainen
@pmatilai commented on this pull request.



>  
 make check
 
-The number of tests performed depends on features enabled at configure time,
-at least `--with-`/`--without-lua` and `--enable-`/`--disable-python`.
-See also the [INSTALL](../INSTALL) file for more information.
+The number of tests performed depends on features enabled at configure time, at
+least `--with-`/`--without-lua` and `--enable-`/`--disable-python`.  See also

Lua is no longer an optional dependency so that can't affect the number of 
tests. Also, --enable/--disable and the like are autotools-era switches :smile: 
 The cmake counterpart for Python would be -DENABLE_PYTHON=ON/OFF.  

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2772#pullrequestreview-1741693590
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] Extend test README (PR #2772)

2023-11-21 Thread Michal Domonkos
@dmnks pushed 1 commit.

4649c91b5c7468450217e1c776e4e873edde1039  Extend test README

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2772/files/bf6d35297171b73d5361aa97086e5c6436a57805..4649c91b5c7468450217e1c776e4e873edde1039
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] Extend test README (PR #2772)

2023-11-21 Thread Michal Domonkos
Fixes: #2611
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2772

-- Commit Summary --

  * Extend test README

-- File Changes --

M tests/README.md (141)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2772.patch
https://github.com/rpm-software-management/rpm/pull/2772.diff

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

Message ID: rpm-software-management/rpm/pull/2...@github.com
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint