Re: [Rpm-maint] [rpm-software-management/rpm] PVS-Studio Analysis Results for RPM (#1052)

2020-02-05 Thread Igor Gnatenko
It would be much better if you file PR which fixes them, but this is at least 
something. I checked some of them and definitely those can be fixed. Some of 
them seem to be useless.

Also, is there something like travis-ci to run pvs studio?

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


[Rpm-maint] [rpm-software-management/rpm] PVS-Studio Analysis Results for RPM (#1052)

2020-02-05 Thread Alexander Stefanov
I run latest PVS studio checker over RPM rpm-4.15.1
Full log available here
http://repoclosure.openmandriva.org/fullhtml/

Hope it help you to make rpm better

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


Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-05 Thread ニール・ゴンパ
They do nothing as far as I know. I'm pretty sure those are just stubs.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Process scriplets by dependency generators (#1033)

2020-02-05 Thread mikhailnov
```
macros.in:918:#%__spec_autodep_shell%{___build_shell}
macros.in-919-#%__spec_autodep_args %{___build_args}
macros.in-920-#%__spec_autodep_cmd  %{___build_cmd}
macros.in-921-#%__spec_autodep_pre  %{___build_pre}
macros.in-922-#%__spec_autodep_body %{___build_body}
macros.in-923-#%__spec_autodep_post %{___build_post}
```

What is this and what do they do?

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


Re: [Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

2020-02-05 Thread Florian Festi
The popt stuff is still to be done.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

2020-02-05 Thread Florian Festi
ffesti commented on this pull request.



> @@ -126,5 +126,6 @@ extern int fdatasync(int fildes);
 #include "misc/fnmatch.h"
 
 #include 
+#include 

Also gone!

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


Re: [Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

2020-02-05 Thread Florian Festi
ffesti commented on this pull request.



> @@ -8,13 +8,99 @@
 #include "build/rpmbuild_internal.h"
 #include "debug.h"
 
+static int addLinesFromFile(rpmSpec spec, const char * const fn, rpmTagVal tag)
+{
+int nlines = 0;
+int flags = STRIP_COMMENTS | STRIP_TRAILINGSPACE;
+ARGV_t argv = NULL;
+
+int terminate = rpmExpandNumeric(tag == RPMTAG_SOURCE
+? "%{?_empty_sourcelist_terminate_build}"
+: "%{?_empyy_patchlist_terminate_build}");

And is gone!

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


Re: [Rpm-maint] [rpm-software-management/rpm] Make "%patchlist -f patches" work. v2 (#1043)

2020-02-05 Thread Florian Festi
ffesti commented on this pull request.



> @@ -2244,6 +2245,12 @@ int readManifest(rpmSpec spec, const char *path, const 
> char *descr, int flags,
continue;
if (specExpand(spec, lineno, buf, &expanded))
goto exit;
+   if (flags & STRIP_TRAILINGSPACE) {
+   char *end = expanded + strlen(expanded) - 1;
+   while (end >= expanded && isspace((unsigned char)*end))

Done.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Describe how to run single tests (#1051)

2020-02-05 Thread Panu Matilainen
Whaddya know, it passed CI :joy: 

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


Re: [Rpm-maint] [rpm-software-management/rpm] Describe how to run single tests (#1051)

2020-02-05 Thread Panu Matilainen
Merged #1051 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/1051#event-3010193989___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Describe how to run single tests (#1051)

2020-02-05 Thread ニール・ゴンパ
Conan-Kudo approved this pull request.





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


Re: [Rpm-maint] [rpm-software-management/rpm] Describe how to run single tests (#1051)

2020-02-05 Thread Panu Matilainen
pmatilai approved this pull request.

Works for me.



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


Re: [Rpm-maint] [rpm-software-management/rpm] Define milestones for major and minor releases (#636)

2020-02-05 Thread Panu Matilainen
Closed #636.

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


[Rpm-maint] [rpm-software-management/rpm] Describe how to run single tests (#1051)

2020-02-05 Thread Florian Festi
Update tests/README to describe howto use the test suite other than just
running everything.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Describe how to run single tests

-- File Changes --

M tests/README (23)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1051.patch
https://github.com/rpm-software-management/rpm/pull/1051.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/1051
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Define milestones for major and minor releases (#636)

2020-02-05 Thread Panu Matilainen
Oh, there was a ticket for this. Closing, as we are actually using milestones 
now, or at least, trying to.

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


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread Panu Matilainen
pmatilai approved this pull request.

Okay, this is nice and simple.

We can always add sanity-assert-checks later if we want, because that is an 
entirely separate thing anyway. Thanks for persisting :)



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


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread Panu Matilainen
Merged #1039 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/1039#event-3010085044___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] If fork fails in getOutputFrom(), close opened unused pipe fds on err… (#1046)

2020-02-05 Thread Florian Festi
Fixed white space issues.

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


Re: [Rpm-maint] [rpm-software-management/rpm] If fork fails in getOutputFrom(), close opened unused pipe fds on err… (#1046)

2020-02-05 Thread Florian Festi
Merged #1046 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/1046#event-3010060897___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] multiple signatures support? (#189)

2020-02-05 Thread Panu Matilainen
Dusted off an earlier and nearly lost and forgotten work on this in #1050, 
comments and other feedback welcome.

-- 
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/189#issuecomment-582416169___
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 multiple, named OpenPGP signatures per package (#1050)

2020-02-05 Thread Panu Matilainen
Oh and to be clear, this is little more than a draft at this point and ideas + 
suggestions are very welcome.

I originally did this in spring of 2017 but got side-tracked with 4.14 release 
and RHEL 8 and whatnot, and the work very nearly got lost forever (it would 
have, if it wasn't for @ffesti's email archive) so figured I'll just post this 
here for comments to have a safer place than my laptop...

-- 
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/1050#issuecomment-582415295___
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 multiple, named OpenPGP signatures per package (#1050)

2020-02-05 Thread Panu Matilainen
It could be multiple groups or whatever, but certainly not about new 
algorithms. It's kinda intentionally loosely defined to the point of being 
undefined to allow creative use.

The "name" part was called "role" in earlier versions, which might give 
different ideas about its usage, but decided against it because it might mix 
badly with some other, more defined concepts of roles and signatures.

For example, one could use it to "stamp" different stages of production 
pipeline, eg "build", "qe", "ship", or organizations could do similar things 
internally, eg stamped authorized for use in departments org.foo.X and 
org.foo.Y, or different distro versions, or ... I don't know :smile:  The 
naming is both a clue to the user/usage, and allows (but doesn't require) using 
the same key for different purposes. 

Ultimately you'd want some configurable signature policy thingie but that's 
beyond the initial scope.

-- 
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/1050#issuecomment-582413106___
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 multiple, named OpenPGP signatures per package (#1050)

2020-02-05 Thread Michael Schroeder
What's the purpose of the 'name' part? Is this about supporting signatures from 
multiple groups? Or is this about supporting new pubkey algorithms (e.g. 
ed22519)? 

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


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread ニール・ゴンパ
Conan-Kudo commented on this pull request.



> @@ -67,6 +67,20 @@
 #==
 #  Build policy macros.
 #
+
+%__buildroot_clean %{__rm} -rf "%{buildroot}"} \

Oops.

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


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread ニール・ゴンパ
Conan-Kudo commented on this pull request.



> @@ -67,6 +67,20 @@
 #==
 #  Build policy macros.
 #
+
+%__buildroot_clean %{__rm} -rf "%{buildroot}"} \
+%{__mkdir_p} "%{dirname:%{buildroot}}"\
+%{__mkdir} "%{buildroot}"\
+%{nil}
+
+#-
+#  Expanded at beginning of %install scriptlet.
+#
+
+%__spec_install_pre %{___build_pre}\
+   %{?buildroot:%{?__buildroot_clean}}\
+%{nil}
+
 #-

Fixed.

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


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread ニール・ゴンパ
@Conan-Kudo pushed 1 commit.

147fbaf1fda2a9fd8c6dede8e8dc61406d7a20c9  platform: Ensure empty buildroot for 
%install


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1039/files/7058727cc87564bca7074a0d3a779f16a31a8e91..147fbaf1fda2a9fd8c6dede8e8dc61406d7a20c9
___
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 multiple, named OpenPGP signatures per package (#1050)

2020-02-05 Thread lgtm-com[bot]
This pull request **introduces 1 alert** when merging 
cb14ea4623079300c9fffb748a0f63518e64c1b5 into 
d937b04fb1cb5d3ca303bd458169c352a4b52669 - [view on 
LGTM.com](https://lgtm.com/projects/g/rpm-software-management/rpm/rev/pr-23e1bbee5a8ca504ba89111edb6f53d91798e1d8)

**new alerts:**

* 1 for Local variable hides global variable

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


[Rpm-maint] [rpm-software-management/rpm] Add support for multiple, named OpenPGP signatures per package (#1050)

2020-02-05 Thread Panu Matilainen
Add support for multiple, named signatures per package.
Named signatures are stored as a  encoded string array in
RPMTAG_OPENPGPHEADER, name is an arbitrary \0-terminated string
and is part of the signed data (appended after actual package data).

These are always header-only signatures, and can co-exist with
"traditional" signatures: if no name is specified when signing then
the new signature replaces any old traditional signature the package
may have. If name is specified then the signature is merely appended
to RPMTAG_OPENPGPHEADER.

Use:

rpmsign --addsign --name= 

Not implemented yet:
- name sanity checks (limit to alphanumeric and punctuation?)
- named signatures are not checked for duplicates when signing
- there's no way to delete just one named signature
- ...

Misc notes:
We could trivially support signatures without names too in the same
tag, but the question then becomes what to do with "traditional"
signatures when name isn't specified - only putting named signatures
into the new tag makes that simple(r). People will still need those
legacy signatures for some time due to older versions not supporting
the new.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add support for multiple, named OpenPGP signatures per package

-- File Changes --

M lib/package.c (1)
M lib/rpmtag.h (2)
M lib/rpmvs.c (53)
M lib/rpmvs.h (1)
M rpmsign.c (6)
M sign/rpmgensig.c (79)
M sign/rpmsign.h (1)
M tests/rpmgeneral.at (1)
M tests/rpmsigdig.at (38)
M tests/rpmvfylevel.at (1)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1050.patch
https://github.com/rpm-software-management/rpm/pull/1050.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/1050
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] %global expands twice (#1049)

2020-02-05 Thread Panu Matilainen
It's mentioned in https://rpm.org/user_doc/macros.html:
> Note that %define and %global differ in more ways than just scope: the body 
> of a %define’d macro is lazily expanded (ie when used), but the body of 
> %global is expanded at definition time. It’s possible to use %%-escaping to 
> force lazy expansion of %global.

Might even be added by myself, but that's actually a pretty lousy explanation. 
Yes, body of %global is expanded at the time of definition but to use a macro 
is to expand it, so any remaining macros in %global's body will be expanded on 
use. To do anything else would seem strange to me.

As for %{literal:...}, there's already a ticket requesting that functionality 
(#582). Name-bikeshedding aside, I've nothing against adding such a feature.

I can live with %{quotepercent:...} too, I just wonder if there should instead 
be a macro type that does *not* expand on use. Eg

%literal foo %{blablah}

(whether its called %literal, %constant or whatever)

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


Re: [Rpm-maint] [rpm-software-management/rpm] Introduce a new qualifier for meta dependencies (RhBug:1648721) (#1028)

2020-02-05 Thread Panu Matilainen
@pmatilai pushed 1 commit.

b3b2cbabbf737eb175deca8377941ab1b8107286  Introduce a new qualifier for meta 
dependencies (RhBug:1648721)


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


Re: [Rpm-maint] [rpm-software-management/rpm] Introduce a new qualifier for meta dependencies (RhBug:1648721) (#1028)

2020-02-05 Thread Panu Matilainen
Rebased to resolve conflict from #1031

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


[Rpm-maint] [rpm-software-management/rpm] %global expands twice (#1049)

2020-02-05 Thread Michael Schroeder
Oh wow, I knew that %global expands right away when defining the macro, but I 
somehow didn't expect that it expands again when the macro is used:
```
$ rpm --eval '
> %define foo 
> %global bar 
> %foo percent, %bar percent'

%% percent, % percent
```
Is that documented anywhere?

Anyway, I'm pretty sure that changing this will break most packages that use 
%global instead of %define because some guidelines said so, but I'm wondering 
if we should add two new macros to make it easier to use %global in a safe way:
```
%{literal:%foo}   - expands to the unexpanded body, i.e. `%foo`
%{quotepercent:%foo}  - expands the body and then doubles all % chars, i.e. 
''
```
(I do not like the name `quotepercent`, though)

With those macros, `%global foo %{literal:...}` would be exactly like %define 
but at global level, whereas `%global foo %{quotepercent:...}` would only 
expand at the macro definition.



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


Re: [Rpm-maint] [rpm-software-management/rpm] If fork fails in getOutputFrom(), close opened unused pipe fds on err… (#1046)

2020-02-05 Thread Panu Matilainen
Looks correct to me too, only there are some unrelated whitespace changes that 
don't belong.

There are way too many places in this function where these descriptors get 
closed in one path or another but that's out of scope here.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Cleanups for running external programs (#1047)

2020-02-05 Thread Panu Matilainen
Yup, and also there are any number of other places that do rpmlog() after 
forking, so that might call for some more central solution. Whatever that may 
be.

As for MALLOC_CHECK, somebody debugging rpm memory usage with MALLOC_CHECK 
*will* want to turn off tracing into children, whereas somebody tracing 
children memory use specifically under rpm scriptlet execution seems like a 
highly unlikely situation. Not that MALLOC_CHECK manipulation really belongs to 
rpm, so I'm not opposed to dropping it, just the rationale seems dubious.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Cleanups for running external programs (#1047)

2020-02-05 Thread Florian Festi
While not using rpmlog in the forked process is this right thing I am not sure 
if the replacement is good enough. For one it omits the N_("error: ") 
previously printed as rpmlogMsgPrefix for RPMLOG_ERR, second it assumes that 
the message should be printed at all. This is a complicated problem as the  
rpmlogCallback can do whatever it wants with the log entry. We could check 
whether the default handler is installed or just output the message in any case 
(as the patch does right now). Not 100% sure yet what's the best thing to do.

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


Re: [Rpm-maint] [rpm-software-management/rpm] If fork fails in getOutputFrom(), close opened unused pipe fds on err… (#1046)

2020-02-05 Thread Florian Festi
Looks like the right thing to do.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Fix isUnorderedReq() for multiple qualifiers (#1031)

2020-02-05 Thread Panu Matilainen
Just for the record, the bug that gets fixed here actually affects all versions 
of rpm from 4.9 to 4.15 in case pretrans or posttrans qualifier is combined by 
something that requires ordering, eg Requires(pre,posttrans). That'll cause the 
affected versions to simply ignore the whole dependency for ordering purposes. 
Thankfully those combos are not that common.


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


Re: [Rpm-maint] [rpm-software-management/rpm] Combination of unordered and ordered dependencies causes order to be ignored (#1030)

2020-02-05 Thread Panu Matilainen
Closed #1030 via #1031.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Fix isUnorderedReq() for multiple qualifiers (#1031)

2020-02-05 Thread Panu Matilainen
Merged #1031 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/1031#event-3009385834___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Fix isUnorderedReq() for multiple qualifiers (#1031)

2020-02-05 Thread Panu Matilainen
pmatilai approved this pull request.

Okay, thanks, I can live with the Force :)
Even tested manually, we need to add some test-cases for these qualifiers 
sooner than later.





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


Re: [Rpm-maint] [rpm-software-management/rpm] Fix isUnorderedReq() for multiple qualifiers (#1031)

2020-02-05 Thread Florian Festi
Here you go! Tried yet another name for the mask...

Will address the reqIgnoreIfInstalled issue in #1028 if it is needed there.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Fix isUnorderedReq() for multiple qualifiers (#1031)

2020-02-05 Thread Florian Festi
@ffesti pushed 1 commit.

6231dc172653f39d8a9f4ae47e2cdc39618554bc  Fix isUnorderedReq() for multiple 
qualifiers


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1031/files/5e4bdb7ede59198a9fa921dbbab0219f7a6800b2..6231dc172653f39d8a9f4ae47e2cdc39618554bc
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -67,6 +67,20 @@
 #==
 #  Build policy macros.
 #
+
+%__buildroot_clean %{__rm} -rf "%{buildroot}"} \
+%{__mkdir_p} "%{dirname:%{buildroot}}"\
+%{__mkdir} "%{buildroot}"\
+%{nil}
+
+#-
+#  Expanded at beginning of %install scriptlet.
+#
+
+%__spec_install_pre %{___build_pre}\
+   %{?buildroot:%{?__buildroot_clean}}\
+%{nil}
+
 #-

The test whether buildroot is defined is still there.
Oh and one more thing: I think the name "clean" sends the wrong message here, 
it's easily associated with the %clean section when that's not the case at all. 
The simplest way to eliminate the naming question would be just putting this 
all into %__spec_install_pre directly (ie without making it a function). It's 
not like this is going to be useful in any other section.

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


Re: [Rpm-maint] [rpm-software-management/rpm] platform: Ensure empty buildroot for %install (#1039)

2020-02-05 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -67,6 +67,20 @@
 #==
 #  Build policy macros.
 #
+
+%__buildroot_clean %{__rm} -rf "%{buildroot}"} \

There's an extra trailing } there.

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