git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] Two RPM building improvements
@ 2009-03-27 16:07 Niels Basjes
  0 siblings, 0 replies; 6+ messages in thread
From: Niels Basjes @ 2009-03-27 16:07 UTC (permalink / raw)
  To: git

Hi Jakub,

----- Jakub Narebski <jnareb@gmail.com> wrote:
> Niels Basjes <Niels@Basjes.nl> writes:
> 
> > Two RPM building improvements:
> Two _unrelated_ RPM building improvements squashed in one commit.

Hmm, well, ok. You're right.

> >   - Building the RPMs can now be done by a non-root user.
> 
> It was always possible, you only have to configure rpm / rpmbuild,
> namely put path to where you want your RPM_BUILDING directory in
> ~/.rpmmacros as %_topdir, for example:
> 
>   $ cat ~/.rpmmacros
>   %_topdir        /home/local/builddir

Yes, you're right. It has always been possible.
That works fine if you want all RPMS of multiple project to be thrown 
in one heap and have to spent time figuring out which rpms were built by 
which project.
I've always preferred forcing the rpmbuilding to be done in a subdirectory 
of the current source checkout. That way I can easily remove all old stuff 
of _this_ project (simply remove the entire subdirectory) and easily know 
what has been created by this project.

> Please RTFM first, 

I read the RTFM (really I did).

> before going to solve non-problem in (ugh) fairly complicated way.

What makes this complicated? 
It's only different from what you're used to.

> >   - The additional target all-rpms now builds the RPMs for a
> > multitude of target platforms.
> 
> Please wrap commit messages at 72-76 columns, at most at 80 columns.
> No such overly long lines, please.

Ok.

> But the all-rpms target looks like a good idea

Ok, discard this patch. I'll submit new (splitout) patches.

-- 
Met vriendelijke groeten,

Niels Basjes

ir. drs. Niels Basjes  -  http://niels.basj.es/  -  VCV 20000302
mailto:`echo 'Niels Basjes'|sed 's/\(.*\)\(..\)/\1.\2/g;s/ /@/g'`

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Two RPM building improvements
  2009-03-27 16:20   ` Junio C Hamano
@ 2009-03-27 19:43     ` Michael J Gruber
  0 siblings, 0 replies; 6+ messages in thread
From: Michael J Gruber @ 2009-03-27 19:43 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jakub Narebski, Niels Basjes, git

Junio C Hamano venit, vidit, dixit 27.03.2009 17:20:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
>> Niels Basjes <Niels@Basjes.nl> writes:
>>
>>> Two RPM building improvements:
>>
>> Two _unrelated_ RPM building improvements squashed in one commit.
>>
>>>   - Building the RPMs can now be done by a non-root user.
>>
>> It was always possible, you only have to configure rpm / rpmbuild,
>> namely put path to where you want your RPM_BUILDING directory in
>> ~/.rpmmacros as %_topdir, for example:
>>
>>   $ cat ~/.rpmmacros
>>   %_topdir        /home/local/builddir
>>
>> Please RTFM first, before going to solve non-problem in (ugh) fairly
>> complicated way.
> 
> That might be a bit too harsh to somebody who genuinely wished to share
> his improvement with others.
> 
> Being RPM novice, the first thing I asked around immediately after taking
> the maintainership over was the ~/.rpmmacros trick.  We really should
> mention it in _our_ documentation, even just a sentence or two would be
> sufficient.

I assumed everyone building rpms would use rpmdev-setuptree from
rpmdevtools, but apparently not ;) I'm not sure whether non-Redhat
rpm-based distros have that, though.

I'm wondering a bit about the all-rpms target. How does this work
without mock? All build requirements installed for all platforms?? I
think it really calls for a mock build/vm (unless i386 on x86_64).

Michael

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Two RPM building improvements
  2009-03-27 13:50 ` Jakub Narebski
  2009-03-27 14:45   ` Michael J Gruber
@ 2009-03-27 16:20   ` Junio C Hamano
  2009-03-27 19:43     ` Michael J Gruber
  1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2009-03-27 16:20 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Niels Basjes, git

Jakub Narebski <jnareb@gmail.com> writes:

> Niels Basjes <Niels@Basjes.nl> writes:
>
>> Two RPM building improvements:
>
> Two _unrelated_ RPM building improvements squashed in one commit.
>
>>   - Building the RPMs can now be done by a non-root user.
>
> It was always possible, you only have to configure rpm / rpmbuild,
> namely put path to where you want your RPM_BUILDING directory in
> ~/.rpmmacros as %_topdir, for example:
>
>   $ cat ~/.rpmmacros
>   %_topdir        /home/local/builddir
>
> Please RTFM first, before going to solve non-problem in (ugh) fairly
> complicated way.

That might be a bit too harsh to somebody who genuinely wished to share
his improvement with others.

Being RPM novice, the first thing I asked around immediately after taking
the maintainership over was the ~/.rpmmacros trick.  We really should
mention it in _our_ documentation, even just a sentence or two would be
sufficient.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Two RPM building improvements
  2009-03-27 13:50 ` Jakub Narebski
@ 2009-03-27 14:45   ` Michael J Gruber
  2009-03-27 16:20   ` Junio C Hamano
  1 sibling, 0 replies; 6+ messages in thread
From: Michael J Gruber @ 2009-03-27 14:45 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Niels Basjes, git

Jakub Narebski venit, vidit, dixit 27.03.2009 14:50:
> Niels Basjes <Niels@Basjes.nl> writes:
> 
>> Two RPM building improvements:
> 
> Two _unrelated_ RPM building improvements squashed in one commit.
> 
>>   - Building the RPMs can now be done by a non-root user.
> 
> It was always possible, you only have to configure rpm / rpmbuild,
> namely put path to where you want your RPM_BUILDING directory in
> ~/.rpmmacros as %_topdir, for example:
> 
>   $ cat ~/.rpmmacros
>   %_topdir        /home/local/builddir
> 
> Please RTFM first, before going to solve non-problem in (ugh) fairly
> complicated way.

Also, the "solution" from the patch overrides any user choice from
.rpmmacros, AFAICS.

> 
>>   - The additional target all-rpms now builds the RPMs for a multitude of target platforms.
> 
> Please wrap commit messages at 72-76 columns, at most at 80 columns.
> No such overly long lines, please.
> 
> But the all-rpms target looks like a good idea
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Two RPM building improvements
  2009-03-27 12:32 Niels Basjes
@ 2009-03-27 13:50 ` Jakub Narebski
  2009-03-27 14:45   ` Michael J Gruber
  2009-03-27 16:20   ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Jakub Narebski @ 2009-03-27 13:50 UTC (permalink / raw)
  To: Niels Basjes; +Cc: git

Niels Basjes <Niels@Basjes.nl> writes:

> Two RPM building improvements:

Two _unrelated_ RPM building improvements squashed in one commit.

>   - Building the RPMs can now be done by a non-root user.

It was always possible, you only have to configure rpm / rpmbuild,
namely put path to where you want your RPM_BUILDING directory in
~/.rpmmacros as %_topdir, for example:

  $ cat ~/.rpmmacros
  %_topdir        /home/local/builddir

Please RTFM first, before going to solve non-problem in (ugh) fairly
complicated way.

>   - The additional target all-rpms now builds the RPMs for a multitude of target platforms.

Please wrap commit messages at 72-76 columns, at most at 80 columns.
No such overly long lines, please.

But the all-rpms target looks like a good idea

-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Two RPM building improvements
@ 2009-03-27 12:32 Niels Basjes
  2009-03-27 13:50 ` Jakub Narebski
  0 siblings, 1 reply; 6+ messages in thread
From: Niels Basjes @ 2009-03-27 12:32 UTC (permalink / raw)
  To: git; +Cc: Niels Basjes

Two RPM building improvements:
  - Building the RPMs can now be done by a non-root user.
  - The additional target all-rpms now builds the RPMs for a multitude of target platforms.

Signed-off-by: Niels Basjes <Niels@Basjes.nl>
---
 .gitignore |    1 +
 Makefile   |   26 ++++++++++++++++++++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1c57d4c..2f2554b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -173,3 +173,4 @@ configure
 tags
 TAGS
 cscope*
+RPM_BUILDING
diff --git a/Makefile b/Makefile
index 7867eac..d9f5e04 100644
--- a/Makefile
+++ b/Makefile
@@ -1564,7 +1564,29 @@ dist: git.spec git-archive$(X) configure
 	gzip -f -9 $(GIT_TARNAME).tar
 
 rpm: dist
-	$(RPMBUILD) -ta $(GIT_TARNAME).tar.gz
+	-@mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+	$(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz
+	-@echo ""
+	-@echo "================================================================="
+	-@echo "Generated RPMS and SRPMS:"
+	-@find `pwd`/RPM_BUILDING/ -type f -name '$(distdir)*.rpm' | xargs -n 1 -iXXX echo "- XXX"
+	-@echo "================================================================="
+	-@echo ""
+
+all-rpms: dist
+	-@mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+	$(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target i386
+	$(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target i686
+	$(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target x86_64
+	$(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target ia32
+	$(RPMBUILD) --define="_topdir `pwd`/RPM_BUILDING" -ta $(GIT_TARNAME).tar.gz --target ppc
+	-@echo ""
+	-@echo "================================================================="
+	-@echo "Generated RPMS and SRPMS:"
+	-@find `pwd`/RPM_BUILDING/ -type f -name '$(distdir)*.rpm' | xargs -n 1 -iXXX echo "- XXX"
+	-@echo "================================================================="
+	-@echo ""
+
 
 htmldocs = git-htmldocs-$(GIT_VERSION)
 manpages = git-manpages-$(GIT_VERSION)
@@ -1613,7 +1635,7 @@ ifndef NO_TCLTK
 endif
 	$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
 
-.PHONY: all install clean strip
+.PHONY: all install clean strip rpm all-rpms
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
 .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
 .PHONY: .FORCE-GIT-BUILD-OPTIONS
-- 
1.6.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-27 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-27 16:07 [PATCH] Two RPM building improvements Niels Basjes
  -- strict thread matches above, loose matches on Subject: below --
2009-03-27 12:32 Niels Basjes
2009-03-27 13:50 ` Jakub Narebski
2009-03-27 14:45   ` Michael J Gruber
2009-03-27 16:20   ` Junio C Hamano
2009-03-27 19:43     ` Michael J Gruber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).