* [Drbd-dev] drbd-latest introduces new build dependency on subversion
@ 2004-08-04 11:27 Lars Marowsky-Bree
2004-08-04 12:36 ` Lars Ellenberg
0 siblings, 1 reply; 4+ messages in thread
From: Lars Marowsky-Bree @ 2004-08-04 11:27 UTC (permalink / raw)
To: drbd-dev
Is that really necessary just for calling svnversion?
Sincerely,
Lars Marowsky-Brée <lmb@suse.de>
--
High Availability & Clustering \ ever tried. ever failed. no matter.
SUSE Labs, Research and Development | try again. fail again. fail better.
SUSE LINUX AG - A Novell company \ -- Samuel Beckett
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] drbd-latest introduces new build dependency on subversion
2004-08-04 11:27 [Drbd-dev] drbd-latest introduces new build dependency on subversion Lars Marowsky-Bree
@ 2004-08-04 12:36 ` Lars Ellenberg
2004-08-04 13:41 ` Lars Ellenberg
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ellenberg @ 2004-08-04 12:36 UTC (permalink / raw)
To: drbd-dev
/ 2004-08-04 13:27:39 +0200
\ Lars Marowsky-Bree:
> Is that really necessary just for calling svnversion?
not exactly. if you get the tgz,
svnversion should never be called,
I checked that.
(well, as long as you don't rm drbd_buildtag.c)
if you don't get the tgz, you obviously have svn.
ok?
lge
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] drbd-latest introduces new build dependency on subversion
2004-08-04 12:36 ` Lars Ellenberg
@ 2004-08-04 13:41 ` Lars Ellenberg
[not found] ` <20040816120202.GB21836@marowsky-bree.de>
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ellenberg @ 2004-08-04 13:41 UTC (permalink / raw)
To: drbd-dev
/ 2004-08-04 14:36:14 +0200
\ Lars Ellenberg:
> / 2004-08-04 13:27:39 +0200
> \ Lars Marowsky-Bree:
> > Is that really necessary just for calling svnversion?
>
> not exactly. if you get the tgz,
> svnversion should never be called,
> I checked that.
> (well, as long as you don't rm drbd_buildtag.c)
>
> if you don't get the tgz, you obviously have svn.
>
> ok?
to be even more exact, drbd_buildtag.c is generated thus:
[ moved lengthy explanation of code you were not concerned about anyways
to the end of this mail.
while writing that, I understand that probably mean: ]
the tgz, and therefore the rpm target does not work in and extracted tarball...
since the .filelist depends now on svn...
ok, so I remove the .filelist dependency from the tgz target,
but leave it in for the tarball target
(which is used to create the distribution tarballs)
.filelist is only removed by distclean, so that should work.
I just now did a successfull "make rpm" in a tar xvzf drbd-0.7.1.tgz.
now, does it work for you again?
Lars Ellenberg
----
the other use of svn in our makefiles is here,
and I took the svn-havenots intoconsideration
from the very beginning:
# update of drbd_buildtag.c is forced:
.PHONY: drbd/drbd_buildtag.c
drbd/drbd_buildtag.c:
I like to call it by name, to here we have a boolean value:
@is_tarball=`test -e .svn/. && echo false || echo true`;
whatever goes to stdout from now on goes to drbd_buildtag.c.new
set -e; exec > $@.new;
echo -e "/* automatically generated. DO NOT EDIT. */";
echo -e "const char * drbd_buildtag(void)\n{"; \
if $$is_tarball; then
if ! test -e $@ ; then
can only happen when you rm drbd_buildtag.c; if you did, just:
echo >&2 "your DRBD source tree is broken. unpack again.";
exit 1;
fi;
this is the reason, why I split the string constant
in drbd_buildtag.c into two lines: I just grep the
svn version tag from the previous drbd_buildtag.c:
grep return $@ ;
so you are expected to never modify the code in a tgz, if you do,
we lose that information ("M" postfix on the svn version).
else
not $$is_tarball, i.e. .svn/ exists,
generate a new version line, with correct "version:otherversion[MS]" structure:
echo -ne "\treturn \"SVN Revision: "; svnversion -n .; echo \";
fi ;
echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}";
mv $@{.new,}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] drbd-latest introduces new build dependency on subversion
[not found] ` <20040816120202.GB21836@marowsky-bree.de>
@ 2004-08-16 12:33 ` Lars Ellenberg
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ellenberg @ 2004-08-16 12:33 UTC (permalink / raw)
To: Lars Marowsky-Bree; +Cc: drbd-dev
/ 2004-08-16 14:02:02 +0200
\ Lars Marowsky-Bree:
> On 2004-08-04T15:41:47,
> Lars Ellenberg <Lars.Ellenberg@linbit.com> said:
>
> > .filelist is only removed by distclean, so that should work.
> > I just now did a successfull "make rpm" in a tar xvzf drbd-0.7.1.tgz.
> >
> > now, does it work for you again?
>
> I don't use make rpm; I our buildsystem gets the source files + a spec
> file to build everything from, but for various reasons build from svn
> sources.
>
> Now as the drbd specfile also generates the km_drbd package which holds
> the external module which is needed to build the kernel, this means that
> I try to keep the dependency chain short. Introducing subversion meant
> that essentially the kernel got build after subversion->drbd, which
> wasn't good. I've now replaced the call to svnversion with a perl one
> liner to grab it from the .svn/dir-wcprops file. ;)
which is the same only for the special case
of an unmodified svn checkout.
>
> Maybe I really should generate the source tarball for building using
> make tgz though instead of simply tarring the svn dir up...
if you do so, please use "make tarball".
make tgz lacks some preparation steps...
tarball additionally makes sure that there are no modifications pending,
that the changelogs are up-to-date, that documentation is build (ok, *you*
won't need that in the tarball), the .filelist is regenerated, and then
calls make tgz, which just generates the tgz.
tarring up the .svn working dir should work the same, too.
you'd need to "make drbd/drbd_buildtag.c" before you tar it,
and you apply this patch with the preparation step in your
drbd.spec:
--- Makefile (revision 1490)
+++ Makefile (working copy)
@@ -96,7 +96,7 @@
# update of drbd_buildtag.c is forced:
.PHONY: drbd/drbd_buildtag.c
drbd/drbd_buildtag.c:
- @is_tarball=`test -e .svn/. && echo false || echo true`; \
+ @is_tarball=true; \
set -e; exec > $@.new; \
echo -e "/* automatically generated. DO NOT EDIT. */"; \
echo -e "const char * drbd_buildtag(void)\n{"; \
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-16 12:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-04 11:27 [Drbd-dev] drbd-latest introduces new build dependency on subversion Lars Marowsky-Bree
2004-08-04 12:36 ` Lars Ellenberg
2004-08-04 13:41 ` Lars Ellenberg
[not found] ` <20040816120202.GB21836@marowsky-bree.de>
2004-08-16 12:33 ` Lars Ellenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox