[Rpm-maint] [rpm-software-management/rpm] RFE: Ability to have a file in %files via a command (macro) evaluated at buildtime (#894)

2019-10-10 Thread Miro HronĨok
I'd like to have a macro, that sees the files after `%install` is finished and 
can do stuff with the files in `%buildroot` and `$PWD`, and I like to use the 
macro in the `%files` section.

Minimal (not so useful) example with a command:

This works:

```
%files
%(echo /foo)
```

This doesn't:

```
%build
echo /foo > ./special_file
...

%files
%(cat ./special_file)
```

I know that the above could be achieved  via `%files -f special_file`, but 
imagine the macro I want to put in there is not simply catting a file, but 
doing some logic.

Currently, the usual workflow is:

1. get the command/macro output a file
2. use that file in `-f`

```
%{our_files} > special_file

%files -f special_file
```

However I want to avoid this step and be able to use:

```
%files
%{our_files}
```

What's needed to make this happen?

-- 
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/894___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory (#888)

2019-10-10 Thread Panu Matilainen
Oh, and thanks for reporting too.

-- 
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/888#issuecomment-540585783___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Avoid using types from Lua includes in rpmlua.h again (#893)

2019-10-10 Thread Panu Matilainen
Merged #893 into master.

-- 
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/pull/893#event-2702742763___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Avoid using types from Lua includes in rpmlua.h again (#893)

2019-10-10 Thread Panu Matilainen
As per 
https://github.com/rpm-software-management/rpm/issues/888#issuecomment-540578117...

-- 
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/pull/893#issuecomment-540584461___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory (#888)

2019-10-10 Thread Panu Matilainen
Excellent. Thanks for testing and confirming.

-- 
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/888#issuecomment-540584119___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory (#888)

2019-10-10 Thread KOLANICH
Closed #888.

-- 
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/888#event-2702699440___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory (#888)

2019-10-10 Thread KOLANICH
Thanks, it really fixes this.

-- 
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/888#issuecomment-540578117___
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: Store built binary rpms info in source rpm (#642)

2019-10-10 Thread Panu Matilainen
There's now a potential implementation in #891 

-- 
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/642#issuecomment-540553839___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory (#888)

2019-10-10 Thread Panu Matilainen
Should be fixed by #893 (doesn't help with the pkgconfig module name though)

-- 
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/888#issuecomment-540534280___
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 NEVR provides for all packages that would be built into source rpms (#891)

2019-10-10 Thread Panu Matilainen
Hmm. Provides for autocreated sub-packages could be flagged with 
RPMSENSE_FIND_PROVIDES to differentiate from manual ones. This would be quite 
similar to how other spec parsed items behave (eg if you query the spec, you'll 
only see manual dependencies, you need a full build to get autogenerated deps)

-- 
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/pull/891#issuecomment-540529010___
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 NEVR provides for all packages that would be built into source rpms (#891)

2019-10-10 Thread Panu Matilainen
That's a fair point, certainly. It would only be possible to populate those 
when binaries were produced as a part of the build as well. Only adding the 
provides on actual builds was something I did consider for this, but landed on 
parse-time as that seems quite useful on its own.

-- 
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/pull/891#issuecomment-540528157___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Avoid using types from Lua includes in rpmlua.h again (#893)

2019-10-10 Thread Panu Matilainen
rpmlua.h was originally written in a way that allows it to be included
regardless of whether Lua is actually enabled in rpm or not, or where
Lua headers are, specifically to isolate the rest of rpm from these
details. That was changed in commit 62bd62286aa888c60145daf315a938dd87eadc89
when lauxlib.h started getting included in rpmlua.h, which leaks to
places like librpmbuild which do not directly use Lua.

The way Lua typedefs the luaL_Reg struct to itself defies my C fu for
for handling this in some nicer typesafe way, fix this all by just using
a void pointer instead, this is just an internal API where buyer can be
expected to beware.

Fixes #888
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Avoid using types from Lua includes in rpmlua.h again

-- File Changes --

M lib/rpmliblua.c (1)
M rpmio/rpmlua.c (3)
M rpmio/rpmlua.h (8)

-- Patch Links --

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

-- 
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/pull/893
___
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 NEVR provides for all packages that would be built into source rpms (#891)

2019-10-10 Thread Igor Gnatenko
I'm curious how this would work against @ffesti's idea about dynamic 
subpackages.

-- 
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/pull/891#issuecomment-540509041___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Don't insert rpmlib() dependencies for dynamic buildrequires (#878)

2019-10-10 Thread Panu Matilainen
Oh, we can't design rpm features based on what's available via the flawed 
repodata format. Really.

-- 
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/pull/878#issuecomment-540508364___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] ../rpmio/rpmlua.h:5:10: fatal error: lauxlib.h: No such file or directory (#888)

2019-10-10 Thread Panu Matilainen
Oh, *now* I see the problem: commit 62bd62286aa888c60145daf315a938dd87eadc89 
added the lauxlib.h include to the rpmlua.h header which used to be independent 
of lua headers, and thus gets included from places where LUA_CFLAGS are not 
enabled. Will fix.

-- 
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/888#issuecomment-540507558___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Don't insert rpmlib() dependencies for dynamic buildrequires (#878)

2019-10-10 Thread Igor Gnatenko
Ok, so finally I have some free time.

So the requerements were that you should be able to easily (by having just rpm 
metadata, aka primary.xml) do following:

* Whether SRPM uses DynamicBuildRequires feature
* Whether SRPM has DynamicBuildRequires inserted into it

-- 
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/pull/878#issuecomment-540507375___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Always execute file trigger scriptlet callbacks with owning header (#892)

2019-10-10 Thread Panu Matilainen
This is part II of commit 6d610e9b9a906548ce44265d7f36199441ea8bca which
missed one but common case where the element with matches gets passed
to the callback instead of the owning one, as pointed out in RhBug:1724779.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Always execute file trigger scriptlet callbacks with owning header

-- File Changes --

M lib/rpmtriggers.c (2)

-- Patch Links --

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

-- 
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/pull/892
___
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 NEVR provides for all packages that would be built into source rpms (#891)

2019-10-10 Thread Panu Matilainen
@pmatilai pushed 1 commit.

120e980fb65b32e6d3a4dba83770770cfabc6941  Add NEVR provides for all packages 
that would be built into source rpms


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/891/files/480fe0d5756693290f51d7f4721f25ce2ffc46ee..120e980fb65b32e6d3a4dba83770770cfabc6941
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Add NEVR provides for all packages that would be built into source rpms (#891)

2019-10-10 Thread Panu Matilainen
Since requires in source rpms are buildrequires, with the same logic
provides in source rpms are buildprovides, and what does a build
provide if its not the names of the packages to be generated.

This seems like a natural fit, should be useful for various purposes, and
eliminates the need for a special rpmspecQuery() with RPMQV_SPECBUILTRPMS
to get that information.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add NEVR provides for all packages that would be built into source rpms

-- File Changes --

M build/parseSpec.c (11)
M tests/data/SPECS/foo.spec (13)
M tests/rpmspec.at (16)

-- Patch Links --

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

-- 
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/pull/891
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint