{"thread":{"id":"18587","subject":"[PATCH] Two RPM building improvements","startedAt":"2009-03-27T12:32:14Z","lastAt":"2009-03-27T19:43:17Z","messageCount":5,"participants":["Niels Basjes","Jakub Narebski","Michael J Gruber","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"109638","messageId":"1238157134-27558-1-git-send-email-Niels@Basjes.nl","threadId":"18587","inReplyTo":null,"subject":"[PATCH] Two RPM building improvements","fromName":"Niels Basjes","fromEmail":"niels@basjes.nl","sentAt":"2009-03-27T12:32:14Z","receivedAt":"2009-03-27T12:32:14Z","isPatch":true,"sender":{"key":"niels@basjes.nl","avatar":"https://gravatar.com/avatar/1a1e9443d32983849de0a7a64aaad3fd2e238ca69bccbaa71a914d8edbd84ed5?d=mp&s=160"},"body":"Two RPM building improvements:\n  - Building the RPMs can now be done by a non-root user.\n  - The additional target all-rpms now builds the RPMs for a multitude of target platforms.\n\nSigned-off-by: Niels Basjes <Niels@Basjes.nl>\n---\n .gitignore |    1 +\n Makefile   |   26 ++++++++++++++++++++++++--\n 2 files changed, 25 insertions(+), 2 deletions(-)\n\ndiff --git a/.gitignore b/.gitignore\nindex 1c57d4c..2f2554b 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -173,3 +173,4 @@ configure\n tags\n TAGS\n cscope*\n+RPM_BUILDING\ndiff --git a/Makefile b/Makefile\nindex 7867eac..d9f5e04 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1564,7 +1564,29 @@ dist: git.spec git-archive$(X) configure\n \tgzip -f -9 $(GIT_TARNAME).tar\n \n rpm: dist\n-\t$(RPMBUILD) -ta $(GIT_TARNAME).tar.gz\n+\t-@mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}\n+\t$(RPMBUILD) --define=\"_topdir `pwd`/RPM_BUILDING\" -ta $(GIT_TARNAME).tar.gz\n+\t-@echo \"\"\n+\t-@echo \"=================================================================\"\n+\t-@echo \"Generated RPMS and SRPMS:\"\n+\t-@find `pwd`/RPM_BUILDING/ -type f -name '$(distdir)*.rpm' | xargs -n 1 -iXXX echo \"- XXX\"\n+\t-@echo \"=================================================================\"\n+\t-@echo \"\"\n+\n+all-rpms: dist\n+\t-@mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}\n+\t$(RPMBUILD) --define=\"_topdir `pwd`/RPM_BUILDING\" -ta $(GIT_TARNAME).tar.gz --target i386\n+\t$(RPMBUILD) --define=\"_topdir `pwd`/RPM_BUILDING\" -ta $(GIT_TARNAME).tar.gz --target i686\n+\t$(RPMBUILD) --define=\"_topdir `pwd`/RPM_BUILDING\" -ta $(GIT_TARNAME).tar.gz --target x86_64\n+\t$(RPMBUILD) --define=\"_topdir `pwd`/RPM_BUILDING\" -ta $(GIT_TARNAME).tar.gz --target ia32\n+\t$(RPMBUILD) --define=\"_topdir `pwd`/RPM_BUILDING\" -ta $(GIT_TARNAME).tar.gz --target ppc\n+\t-@echo \"\"\n+\t-@echo \"=================================================================\"\n+\t-@echo \"Generated RPMS and SRPMS:\"\n+\t-@find `pwd`/RPM_BUILDING/ -type f -name '$(distdir)*.rpm' | xargs -n 1 -iXXX echo \"- XXX\"\n+\t-@echo \"=================================================================\"\n+\t-@echo \"\"\n+\n \n htmldocs = git-htmldocs-$(GIT_VERSION)\n manpages = git-manpages-$(GIT_VERSION)\n@@ -1613,7 +1635,7 @@ ifndef NO_TCLTK\n endif\n \t$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS\n \n-.PHONY: all install clean strip\n+.PHONY: all install clean strip rpm all-rpms\n .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell\n .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS\n .PHONY: .FORCE-GIT-BUILD-OPTIONS\n-- \n1.6.2\n"},{"id":"109646","messageId":"m3k56b2hy2.fsf@localhost.localdomain","threadId":"18587","inReplyTo":"1238157134-27558-1-git-send-email-Niels@Basjes.nl","subject":"Re: [PATCH] Two RPM building improvements","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-03-27T13:50:36Z","receivedAt":"2009-03-27T13:50:36Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Niels Basjes <Niels@Basjes.nl> writes:\n\n> Two RPM building improvements:\n\nTwo _unrelated_ RPM building improvements squashed in one commit.\n\n>   - Building the RPMs can now be done by a non-root user.\n\nIt was always possible, you only have to configure rpm / rpmbuild,\nnamely put path to where you want your RPM_BUILDING directory in\n~/.rpmmacros as %_topdir, for example:\n\n  $ cat ~/.rpmmacros\n  %_topdir        /home/local/builddir\n\nPlease RTFM first, before going to solve non-problem in (ugh) fairly\ncomplicated way.\n\n>   - The additional target all-rpms now builds the RPMs for a multitude of target platforms.\n\nPlease wrap commit messages at 72-76 columns, at most at 80 columns.\nNo such overly long lines, please.\n\nBut the all-rpms target looks like a good idea\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"109651","messageId":"49CCE681.5050503@drmicha.warpmail.net","threadId":"18587","inReplyTo":"m3k56b2hy2.fsf@localhost.localdomain","subject":"Re: [PATCH] Two RPM building improvements","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-03-27T14:45:21Z","receivedAt":"2009-03-27T14:45:21Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jakub Narebski venit, vidit, dixit 27.03.2009 14:50:\n> Niels Basjes <Niels@Basjes.nl> writes:\n> \n>> Two RPM building improvements:\n> \n> Two _unrelated_ RPM building improvements squashed in one commit.\n> \n>>   - Building the RPMs can now be done by a non-root user.\n> \n> It was always possible, you only have to configure rpm / rpmbuild,\n> namely put path to where you want your RPM_BUILDING directory in\n> ~/.rpmmacros as %_topdir, for example:\n> \n>   $ cat ~/.rpmmacros\n>   %_topdir        /home/local/builddir\n> \n> Please RTFM first, before going to solve non-problem in (ugh) fairly\n> complicated way.\n\nAlso, the \"solution\" from the patch overrides any user choice from\n.rpmmacros, AFAICS.\n\n> \n>>   - The additional target all-rpms now builds the RPMs for a multitude of target platforms.\n> \n> Please wrap commit messages at 72-76 columns, at most at 80 columns.\n> No such overly long lines, please.\n> \n> But the all-rpms target looks like a good idea\n> \n"},{"id":"109660","messageId":"7vvdpvdjj4.fsf@gitster.siamese.dyndns.org","threadId":"18587","inReplyTo":"m3k56b2hy2.fsf@localhost.localdomain","subject":"Re: [PATCH] Two RPM building improvements","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-27T16:20:47Z","receivedAt":"2009-03-27T16:20:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Niels Basjes <Niels@Basjes.nl> writes:\n>\n>> Two RPM building improvements:\n>\n> Two _unrelated_ RPM building improvements squashed in one commit.\n>\n>>   - Building the RPMs can now be done by a non-root user.\n>\n> It was always possible, you only have to configure rpm / rpmbuild,\n> namely put path to where you want your RPM_BUILDING directory in\n> ~/.rpmmacros as %_topdir, for example:\n>\n>   $ cat ~/.rpmmacros\n>   %_topdir        /home/local/builddir\n>\n> Please RTFM first, before going to solve non-problem in (ugh) fairly\n> complicated way.\n\nThat might be a bit too harsh to somebody who genuinely wished to share\nhis improvement with others.\n\nBeing RPM novice, the first thing I asked around immediately after taking\nthe maintainership over was the ~/.rpmmacros trick.  We really should\nmention it in _our_ documentation, even just a sentence or two would be\nsufficient.\n"},{"id":"109674","messageId":"49CD2C55.8020502@drmicha.warpmail.net","threadId":"18587","inReplyTo":"7vvdpvdjj4.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Two RPM building improvements","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-03-27T19:43:17Z","receivedAt":"2009-03-27T19:43:17Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 27.03.2009 17:20:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n>> Niels Basjes <Niels@Basjes.nl> writes:\n>>\n>>> Two RPM building improvements:\n>>\n>> Two _unrelated_ RPM building improvements squashed in one commit.\n>>\n>>>   - Building the RPMs can now be done by a non-root user.\n>>\n>> It was always possible, you only have to configure rpm / rpmbuild,\n>> namely put path to where you want your RPM_BUILDING directory in\n>> ~/.rpmmacros as %_topdir, for example:\n>>\n>>   $ cat ~/.rpmmacros\n>>   %_topdir        /home/local/builddir\n>>\n>> Please RTFM first, before going to solve non-problem in (ugh) fairly\n>> complicated way.\n> \n> That might be a bit too harsh to somebody who genuinely wished to share\n> his improvement with others.\n> \n> Being RPM novice, the first thing I asked around immediately after taking\n> the maintainership over was the ~/.rpmmacros trick.  We really should\n> mention it in _our_ documentation, even just a sentence or two would be\n> sufficient.\n\nI assumed everyone building rpms would use rpmdev-setuptree from\nrpmdevtools, but apparently not ;) I'm not sure whether non-Redhat\nrpm-based distros have that, though.\n\nI'm wondering a bit about the all-rpms target. How does this work\nwithout mock? All build requirements installed for all platforms?? I\nthink it really calls for a mock build/vm (unless i386 on x86_64).\n\nMichael\n"}]}