Re: [Rpm-maint] [rpm-software-management/rpm] Fix data race in packageBinaries() function (#1264)

2020-06-09 Thread ニール・ゴンパ
@ffesti I'd appreciate this being pulled into rpm-4.16 since this is going to 
be needed for OpenMandriva.

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


[Rpm-maint] [rpm-software-management/rpm] Fix data race in packageBinaries() function (#1264)

2020-06-09 Thread Tom Stellard
The pkg variable used in the parallel loop was declared outside
of the omp parallel construct, so it was shared among tasks.  This
had the potential to cause a data race.  The gcc openmp implementation
did not hit this problem, but I uncovered it while trying to compile with
clang.  My best guess as to what was happening is that after the last
task was launched, all tasks had the same value of pkg and were operating
on the same data at the same time.

This patch marks the variable as firstprivate, so each tasks gets its
own copy of the variable.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix data race in packageBinaries() function

-- File Changes --

M build/pack.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1264.patch
https://github.com/rpm-software-management/rpm/pull/1264.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/1264
___
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 OrderWithRequires dependency generation (32e2bc5)

2020-06-09 Thread Florian Festi
Yes, sure. This is a dependency as all the others and does support the same 
features. The only difference is that OrderWithRequires is ignored during the 
dependency check and only used for ordering.

-- 
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/commit/32e2bc50cff9db05729349ff6645a0251d5719fb#commitcomment-39776284___
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 OrderWithRequires dependency generation (32e2bc5)

2020-06-09 Thread mikhailnov
Does this mean that constructions like "OrderWithRequires: >= VERSION" are 
supported?

-- 
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/commit/32e2bc50cff9db05729349ff6645a0251d5719fb#commitcomment-39775833___
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 OrderWithRequires dependency generation (#1257)

2020-06-09 Thread mikhailnov
OrderWithRequires(pre) would probably be better for the use case which is 
described in this PR, but OrderWithRequires without pre also worked. This is 
probably some undocumented behaviour in dependency resolution, probably it 
tries to install required packages before the package which requires them, but 
I'm not sure.

```
# rpm -E %systemd_ordering
OrderWithRequires(post): systemd 
OrderWithRequires(preun): systemd 
OrderWithRequires(postun): systemd 
```

Implemention of Requires(pre) etc. generators will be ugly because it will 
requires to add each RPMTAG separately. It would be nice if the generator could 
print e.g. `post: xxx` to stdout, but it cannot be implemented with the current 
architecture of generators as far as I understand.
Scriptlets can be converted into files 
(https://github.com/rpm-software-management/rpm/issues/1033#issuecomment-583142300),
 it would easify making generators for them.

@Conan-Kudo pointed that most scriptlets are designed to fail silently, e.g. 
scriptlets that call `systemctl` fail silently if systemd is not installed, 
what allows to make a minmal system aithout systemd. Adding 'Requires(pre): 
systemd' will break this usecase. 'OrderWithRequires(pre): systemd' would solve 
that. In some other cases it is useful to make sure that the binary which is 
called is already installed and has all its dependencies satisfied when the 
scriptlet is executed. `bash --rpm-requires` can be used to generate 
(OrderWith)Requires for scriptlets.

Maybe generatore 'Provides: cmd(xxx)' for files inside /sbin /usr/sbin /bin 
/usr/bin and convert the output of `bash --rpm-requires` to 
'OrderWithRequires(scriptlet type): cmd(xxx)'

These are just some thoughts...

-- 
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/1257#issuecomment-641245796___
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 OrderWithRequires dependency generation (32e2bc5)

2020-06-09 Thread Florian Festi
*sigh* Fixed in #1263


-- 
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/commit/32e2bc50cff9db05729349ff6645a0251d5719fb#commitcomment-39775202___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix tag mixup in 32e2bc50cff9db05729349ff6645a0251d5719fb (#1263)

2020-06-09 Thread Florian Festi
Hit merge just a little bit too quickly on this one...
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix tag mixup in 32e2bc50cff9db05729349ff6645a0251d5719fb

-- File Changes --

M build/rpmfc.c (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1263.patch
https://github.com/rpm-software-management/rpm/pull/1263.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/1263
___
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 OrderWithRequires dependency generation (32e2bc5)

2020-06-09 Thread mikhailnov
@ffesti I see that you added "RPMTAG_ORDERNAME, RPMTAG_ORDERVERSION, 
RPMTAG_ORDERFLAGS," ( 
https://github.com/rpm-software-management/rpm/pull/1262/files#diff-ddf4f9f570183f31f3d5ba0a715a954fR1406
 ), but I added "RPMTAG_ORDERNAME, RPMTAG_ORDERFLAGS,". I actually did not test 
%__find_orderwithrequires because I am not sure how it should work, probably 
off the internal dependency generator and define this macro? Which variant is 
correct?

-- 
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/commit/32e2bc50cff9db05729349ff6645a0251d5719fb#commitcomment-39774778___
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 OrderWithRequires dependency generation (#1257)

2020-06-09 Thread Florian Festi
This is indeed not possible. The argument here is (except that it is simply not 
implemented) that those dependencies are generated from files in the package 
and not the scriptlets. So qualifiers should not be needed. But I am pretty 
sure people could come up with some valid use cases.

There is https://github.com/rpm-software-management/rpm/projects/11 There are 
quite a few things that I would like to see improved with dependency generators 
in the 4.17, 4.18 time frame.

-- 
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/1257#issuecomment-641227025___
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 OrderWithRequires dependency generation (#1257)

2020-06-09 Thread mikhailnov
Thanks. One question: do I understand correctly that currently there is no way 
to make a generator of Requires(pre), Requires(post), Requires(postun), 
OrderWithRequires(pre) etc.?

-- 
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/1257#issuecomment-641206157___
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 OrderWithRequires dependency generation (#1257)

2020-06-09 Thread Florian Festi
Yes, not having a dependency generator for OrderWithRequires is clearly an 
oversight. Details on what generators are a valid use case are not relevant 
here.

Thanks for the patch!

-- 
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/1257#issuecomment-641202025___
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 OrderWithRequires dependency generation (#1257)

2020-06-09 Thread Florian Festi
Merged #1257 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/1257#event-3424224260___
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 dependency generators for RPMTAG_ORDERNAME (#1262)

2020-06-09 Thread Florian Festi
Closed #1262.

-- 
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/1262#event-3424205732___
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 dependency generators for RPMTAG_ORDERNAME (#1262)

2020-06-09 Thread Florian Festi
*arg* I didn't even realize #1257 is a PR with a patch attached already. Please 
disregard.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Fail the build if %_build_pkgcheck_set failed (#1258)

2020-06-09 Thread Florian Festi
Looks good to me. Should probably also go into 4.16.

-- 
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/1258#issuecomment-641198193___
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 dbus-announce plugin (#1255)

2020-06-09 Thread Florian Festi
> Is there any coordination between this and the work to add dbus to libdnf in 
> [rpm-software-management/libdnf#941](https://github.com/rpm-software-management/libdnf/pull/941)
>  for example?

Well, we add this on request of the DNF team that need to be notified if 
something else (rpm cli) changes the rpmdb underneath their daemon. Note that 
this is very different from the lib dnf thing even if it also uses DBus. RPM 
will not offer a DBUS interface that can be queried or send commands to. All 
this does is sending out signals that notify who ever is interested that the 
rpmdb is changing.
I will probably even drop the second patch providing more detailed information 
until there are real use cases. So all this is going to do is sending out a 
ping at the start and the end of every transaction.

> For rpm-ostree we are already a DBus daemon, and having multiple other 
> libraries in the stack also going out and talking to DBus is going to be a 
> bit problematic.
> Binding this to the systemd-inhibit plugin makes sense because we already 
> turn that off for rpm-ostree (because it's transactional, there's no reason 
> to inhibit).

So this is going to be a plugin that can be disabled or just plainly not be 
installed in the first place. We will probably not integrate this into the 
systemd-inhibit plugin but have it as a separate plugin that is very similar 
and comes in it's own sub package.

Can you please elaborate on why sending some DBus signals should be problematic?

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