From: Junio C Hamano <gitster@pobox.com>
To: Niels Basjes <Niels@basjes.nl>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Build RPMs locally unless overruled in ~/.rpmmacros
Date: Wed, 01 Apr 2009 23:47:55 -0700 [thread overview]
Message-ID: <7vfxgrimas.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1238425839-6337-1-git-send-email-Niels@Basjes.nl
Niels Basjes <Niels@basjes.nl> writes:
> From: Niels Basjes <niels@basjes.nl>
>
> Signed-off-by: Niels Basjes <niels@basjes.nl>
I am not opposed to have an option to build RPM binary packages in-tree,
and RPM_BUILDING might be an already accepted name for the directory (even
though it looks too loud to my eyes, you may have chosen it because it is
a common practice in the RPM land---I am not an RPM person so I wouldn't
know).
But I thought somebody already pointed out a possible regression scenario.
If one has been running 'make rpm' with RPMBUILD that invokes rpmbuild
command with a custom yet not $HOME/.rpmmacos file via --macros option, or
has been running it as a user that can write into system-wide rpm
workplaces, this patch would break such an established workflow.
Perhaps something along this line might work just as well, without
breaking things for people?
ifdef RPM_BUILD_HERE
RPMBUILDOPTS = --define="_topdir $(pwd)/RPM_BUILDING"
rpmprep:
mkdir RPM_BUILDING
mkdir RPM_BUILDING/BUILD
mkdir RPM_BUILDING/RPMS
mkdir RPM_BUILDING/SOURCES
mkdir RPM_BUILDING/SPECS
mkdir RPM_BUILDING/SRPMS
else
RPMBUILDOPTS =
rpmprep:
: nothing
endif
rpm: dist rpmprep
$(RPMBUILD) $(RPMBUILDOPTS) -ta $(GIT_TARNAME).tar.gz
By the way, as far as I can tell, you do not need to have SOURCES
directory in order to run "make rpm" in git.git.
> +RPMBUILDOPTS = $(shell if [ "`grep '^%_topdir' $(HOME)/.rpmmacros`" == "" ]; \
> + then \
> + mkdir -p RPM_BUILDING/{BUILD,RPMS,SOURCES,SPECS,SRPMS}; \
Not everybody runs bash.
> + echo '--define="_topdir `pwd`/RPM_BUILDING"' ; \
> + fi \
> + )
> +RPMBUILD = rpmbuild $(RPMBUILDOPTS)
> TCL_PATH = tclsh
> TCLTK_PATH = wish
> PTHREAD_LIBS = -lpthread
You need to have "make clean" remove RPM_BUILDING.
prev parent reply other threads:[~2009-04-02 6:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 15:10 [PATCH] Build RPMs locally unless overruled in ~/.rpmmacros Niels Basjes
2009-04-02 6:47 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfxgrimas.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Niels@basjes.nl \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.