Re: [Rpm-maint] [rpm-software-management/rpm] Fix "#pragma omp priority" failure (#1454)

2020-12-02 Thread Michal Domonkos
@dmnks commented on this pull request.



> @@ -22,6 +22,10 @@
 
 #include "debug.h"
 
+#if _OPENMP < 201511
+#define priority(x)

Hmm, now that I think about it - wouldn't this be too brittle a macro? What if 
we define/include a function `priority()` in the future? Wouldn't this replace 
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/1454#pullrequestreview-543044491___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Fix "#pragma omp priority" failure (#1454)

2020-12-02 Thread Michal Domonkos

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

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

-- Commit Summary --

  * Fix
  * Drop dependency on OpenMP 4.5
  * Add conditional for OMP priority clause

-- File Changes --

M INSTALL (7)
M build/pack.c (4)
M configure.ac (23)

-- Patch Links --

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


Re: [Rpm-maint] [rpm-software-management/rpm] Allow database probing if _db_backend is not set (#1451)

2020-12-02 Thread Michael Schroeder
@mlschroe commented on this pull request.



> @@ -97,7 +98,7 @@ dbDetectBackend(rpmdb rdb)
rpmlog(RPMLOG_WARNING,
_("Converting database from %s to %s backend\n"),
ondisk->name, cfg->name);
-   } else {
+   } else if (*db_backend) {

But it is intended. Panu may wish to have a rpmlog(RPMLOG_DEBUG,...) call in 
that case, 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/pull/1451#discussion_r534279709___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Allow database probing if _db_backend is not set (#1451)

2020-12-02 Thread ニール・ゴンパ
@Conan-Kudo requested changes on this pull request.



> @@ -97,7 +98,7 @@ dbDetectBackend(rpmdb rdb)
rpmlog(RPMLOG_WARNING,
_("Converting database from %s to %s backend\n"),
ondisk->name, cfg->name);
-   } else {
+   } else if (*db_backend) {

Does it make sense here to have no final `else` case? This seems not right...

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


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild: Fix `-ts` srpm specfile name (#1397)

2020-12-02 Thread Panu Matilainen
Submitted an alternative solution as #1453 

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


[Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)

2020-12-02 Thread Panu Matilainen
Commit acf5e00281d73a2f8034091241c7b0e2ba00e383 cut a couple of corners
too many, causing the temporary file name used to extract the spec from
the tarball to end up in the src.rpm too.

Revert back to creating %_specdir for tar builds, it might not be
optimal but it's not exactly harmful either (%_sourcedir is different).
The "truly correct" solutions get increasingly complicated for such
a silly thing as this is. In addition to creating the %_specdir, we
also need to rename the file to its proper name, simplify that code
a bit while at it and add a test-case.

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

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

-- Commit Summary --

  * Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts

-- File Changes --

M rpmbuild.c (22)
M tests/rpmbuild.at (15)

-- Patch Links --

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


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild: Fix `-ts` srpm specfile name (#1397)

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



>  FD_t fd = NULL;
 static const char *tryspec[] = { "Specfile", "\\*.spec", NULL };
 
-if (!(fd = rpmMkTempFile(NULL, &specFile)))
+specDir = rpmGetPath("%{_tmppath}", NULL);
+if (!(fd = rpmMkTempFile(NULL, &tmpSpecFile)))

Hmm, using %_tmpdir brings on yet another problem: rename() will then fail 
"randomly" depending on your partitioning scheme and commonly fail because of 
it, which is also not okay. For such a silly little thing this is annoyingly 
complicated and subtle...

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


Re: [Rpm-maint] [rpm-software-management/rpm] Allow database probing if _db_backend is not set (#1451)

2020-12-02 Thread Michael Schroeder
Anyway, as it is so simple to test for readonlyness I added the check.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Allow database probing if _db_backend is not set (#1451)

2020-12-02 Thread Michael Schroeder
@mlschroe pushed 1 commit.

dba89ff2c2134f951115181ddf2beee7b42d8d64  Allow database probing if _db_backend 
is not set


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


Re: [Rpm-maint] [rpm-software-management/rpm] Allow database probing if _db_backend is not set (#1451)

2020-12-02 Thread Michael Schroeder
But is that really a problem? If it detects a known database type, writing 
should stay with the type anyway, so it's not wrong to also do this for a 
misconfigured database type.

And if it doesn't detect a known database type, it'll use dummydb like before.

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


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild: Fix `-ts` srpm specfile name (#1397)

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



>  FD_t fd = NULL;
 static const char *tryspec[] = { "Specfile", "\\*.spec", NULL };
 
-if (!(fd = rpmMkTempFile(NULL, &specFile)))
+specDir = rpmGetPath("%{_tmppath}", NULL);
+if (!(fd = rpmMkTempFile(NULL, &tmpSpecFile)))

...

The other, simpler option would be going back to creating %_specdir if it 
doesn't exist. That was not the main target in the 4.16 change anyway, 
%_sourcedir was. 

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


Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild: Fix `-ts` srpm specfile name (#1397)

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



>  FD_t fd = NULL;
 static const char *tryspec[] = { "Specfile", "\\*.spec", NULL };
 
-if (!(fd = rpmMkTempFile(NULL, &specFile)))
+specDir = rpmGetPath("%{_tmppath}", NULL);
+if (!(fd = rpmMkTempFile(NULL, &tmpSpecFile)))

My main issue with this patch is that it tries to place a "predictable" 
filename into a world-writable directory. This is always gets people going 
about security, but it also can cause unpredictable failures for no good reason 
(two users trying to do the same thing at the same time, stranger things have 
happened). That is a no-go.

So we kinda do need a temporary file for this, but we also need a place to put 
the final spec. The specdir as used by the original code wasn't optimal either 
as you could end up overwriting your own data with zero warning (has actually 
happened to me). One "easy" solution would be just using current directory, but 
with similar risks of overwriting data. So to handle this in a way that cannot 
randomly fail, or overwrite your data, if you happen to have a file by the same 
name around, is to create a temporary *directory* and place the spec (and 
anything else we might need) 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/1397#discussion_r533942962___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint