Re: [Rpm-maint] [rpm-software-management/rpm] Add documentation for %getncpus macro (#707)

2019-05-16 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -66,6 +66,7 @@ to perform useful operations. The current list is
%trace  toggle print of debugging information before/after
expansion
%dump   print the active (i.e. non-covered) macro table
+   %getncpus   return the number of CPUs

It's not a function, it doesn't really "return" anything, it expands to the 
number of CPUs, and more precisely CPUs *available to the current process*, 
which is not necessarily the same thing as total number of processors on the 
system. Fix those and its an obvious keeper.

-- 
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/707#pullrequestreview-238251416___
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 documentation for %getncpus macro (#707)

2019-05-16 Thread Florian Festi
Merged #707 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/707#event-2345667434___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Run binary package generation via thread pools (#226)

2019-05-16 Thread Florian Festi
Closed #226.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Run binary package generation via thread pools (#226)

2019-05-16 Thread Florian Festi
As #695 supersedes this I am closing this PRs.
Thanks for your work and pushing this issue forwards. Those PRs clearly 
wouldn't be there if it wasn't for you!

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


Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: don't reorder sections (#565)

2019-05-16 Thread Panu Matilainen
Closed #565.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/565#event-2345640600___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] debugedit: don't reorder sections (#565)

2019-05-16 Thread Panu Matilainen
As per discussion in #423 , this appears to be a bug in libelf instead. 
Closing, but thanks for the help with testing and tracking it down.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/565#issuecomment-492971208___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Add documentation for %getncpus macro (#707)

2019-05-16 Thread pavlinamv

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

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

-- Commit Summary --

  * Add documentation for %getncpus macro

-- File Changes --

M doc/manual/macros (1)

-- Patch Links --

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


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Build Dependencies (#593)

2019-05-16 Thread Panu Matilainen
As the GH interface doesn't allow commenting on individual commits, I'll just 
make a general comment... In the "Pass rpmts object to rpmSpecBuild()" commit, 
there are two minor issues:
- a stray empty line added before buildSpec()
- a change to rpmbuild.c that belongs to the next commit (move to library, 
return 11 on missing buildrequires)

Other than that, and the missing tests, it's looking quite okay now.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Build Dependencies (#593)

2019-05-16 Thread Panu Matilainen
pmatilai commented on this pull request.



> @@ -273,20 +287,6 @@ static struct poptOption optionsTable[] = {
POPT_TABLEEND
 };
 
-static int checkSpec(rpmts ts, rpmSpec spec)
-{
-int rc;
-rpmps ps = rpmSpecCheckDeps(ts, spec);
-
-if (ps) {
-   rpmlog(RPMLOG_ERR, _("Failed build dependencies:\n"));
-   rpmpsPrint(NULL, ps);
-}
-rc = (ps != NULL);
-rpmpsFree(ps);
-return rc;
-}
-

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


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Build Dependencies (#593)

2019-05-16 Thread Panu Matilainen
pmatilai commented on this pull request.



>   * @param spec   spec file control structure
  * @param buildArgsbuild arguments
- * @return RPMRC_OK on success
+ * @return 0 on success, 1 on build error,
+ * RPMRC_MISSINGBUILDREQUIRES on missing build

The return values are bit of a mishmash, some numeral and some RPMRC_ value 
that's not really an RPMRC afterall. Would be more consistent to return RPMRC_* 
constants for everything (but keep return type as int because of 
RPMRC_MISSINGBUILDREQUIRES). That, or just talk about numbers.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Build Dependencies (#593)

2019-05-16 Thread Panu Matilainen
pmatilai commented on this pull request.



> +freeStringBuf(sb_stdout);
+free(output);
+return rc;
+}
+
+static rpmRC doCheckBuildRequires(rpmts ts, rpmSpec spec, int test)
+{
+rpmRC rc = RPMRC_OK;
+rpmps ps = rpmSpecCheckDeps(ts, spec);
+
+if (ps) {
+   rpmlog(RPMLOG_ERR, _("Failed build dependencies:\n"));
+   rpmpsPrint(NULL, ps);
+}
+if (ps != NULL)
+   rc = RPMRC_MISSINGBUILDREQUIRES;

This latter (ps != NULL) is redundant, just move the rc setting to the if (ps) 
case above. Sorry for missing on the previous rounds.

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


Re: [Rpm-maint] [rpm-software-management/rpm] Dynamic Build Dependencies (#593)

2019-05-16 Thread Panu Matilainen
pmatilai commented on this pull request.



>   (what & ~RPMBUILD_RMSOURCE) |
(x ? 0 : (what & RPMBUILD_PACKAGESOURCE) {
goto exit;
}
}
 } else {
int didBuild = (what & (RPMBUILD_PREP|RPMBUILD_BUILD|RPMBUILD_INSTALL));
+   int sourceOnly = ((what & RPMBUILD_PACKAGESOURCE) &&
+  !(what & (RPMBUILD_BUILD|RPMBUILD_INSTALL|RPMBUILD_PACKAGEBINARY)));
+
+   if (!spec->buildrequires && sourceOnly){

There's a missing space between ) and { (clearly, getting to the bottom of 
things...)

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


Re: [Rpm-maint] [rpm-software-management/rpm] Warn if %else is after %else (#649)

2019-05-16 Thread pavlinamv
Commit message is corrected.

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


Re: [Rpm-maint] [rpm-software-management/rpm] %buildarch does not reflect architecture of current %package declaration (#689)

2019-05-16 Thread Panu Matilainen
There may be legit use-cases for knowing that arch, but the point is the macro 
created from the spec tag is not it. Hence it's better not define it at all. 
Ditto for several other tags for which macros are no longer created as of 
commit c62d91a56fa75fcabc3ab4b0d2f7822ddffbbeb5

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