[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Building wx from trunk

From: Vadim Zeitlin
Subject: Re: [lmi] Building wx from trunk
Date: Mon, 20 Oct 2014 22:31:16 +0200
Date: Mon, 20 Oct 2014 22:01:31 +0200

On Mon, 20 Oct 2014 15:48:06 +0000 Greg Chicares <address@hidden> wrote:

GC> (1) Clone the wx repository--only need to do this once.
GC> cd /opt/lmi
GC> git clone https://github.com/wxWidgets/wxWidgets.git


 Just a note: you've previously mentioned that access to some domains may
be restricted from some developers machines, I hope you can add github.com
to the white list of allowed domains. This would be as important as having
sourceforge.net in it, as almost everything is available from github
nowadays and if something is not, it is always possible to set up a git
mirror of the upstream repository there.

GC> (2) Build wx from repository.
GC> cd /opt/lmi/wxWidgets
GC> git archive --prefix=wxWidgets-3.1.0/ HEAD | bzip2 > 
GC> cd /lmi/src/lmi
GC> md5sum /cache_for_lmi/downloads/wxWidgets-3.1.0.tar.bz2
GC> [...copy the 32-character md5sum where indicated...]
GC> make wx_version=3.1.0 wx-3.1.0-md5=COPY_MD5_HERE $coefficiency -f 
install_wx.make >../log 2>&1
GC> [I realize that 'install_wx.make' rebuilds from scratch, which
GC> is not efficient for frequent updates--but it is robust.]

 Just in case you want to consider a different approach, you can always use
the git working copy directly, without archiving it into a tarball and
immediately unpacking it, because it's trivial to ensure that it's in
pristine condition by performing the following two commands:

        git clean -dfx # Remove *all* files not tracked by git
        git reset --hard HEAD # Undo all local changes.

The second command is unnecessary if you never modified any files in the
first place, of course. You can check whether any files are modified by
running "git status".

 Of course, please be warned that "clean" and "reset --hard" are two of the
very few examples of git commands which are really destructive and cannot
be undone (on the bright side, whatever else you do with the repository,
not involving these commands, can be undone), so please ensure that you
don't have any changes you'd want to keep before doing them.

GC> Here's my question: It would be best for me and my US coworkers to
GC> use the same revision, but wx trunk changes often, and we aren't
GC> all likely to 'git pull' at the same time. Is there an easy way to
GC> specify an as-of date with 'pull' or (more likely) 'archive'?

 Before answering, please let me start by saying that this is perhaps not
the right question to ask. With git (but, to be fair, even with svn, using
its "externals" mechanism), an IMHO better idea would be to fork wxWidgets
into your own repository -- hosted either on Github or anywhere else -- and
use that fork, which would be always pinned to the revision you deemed to
be the right one to use.

 Practically speaking, it's trivial to create LMI organization on Github
right now (if you don't have an account there and don't want to create one,
I can do it) and make a fork under this organization. The instructions
above would work exactly in the same way except that you'd use
https://github.com/LMI/wxWidgets.git URI. Please let me know if you'd like
me to do this or if you need more details before doing it yourself.

GC> I did try to find the answer myself. 'man git-archive' mentions a
GC> <tree-ish> option: "The tree or commit to produce an archive for".
GC> Do I need to go looking for the SHA1 of a particular revision?
GC> I can't make the time to master 'git' now, so I'm kind of lost.

 Now for the promised answer: the canonical way to identify a commit it git
is indeed by using its SHA1. To find the SHA1 you want to use, you can
use "git log" (to see just the latest commit, "git log -1"). But you may
also use any of the ways documented under "SPECIFYING REVISIONS" section of
https://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html such as
"<refname>@{<date>}" syntax, e.g. you could use "address@hidden" to
get the latest revision before the given date (time may also be specified,
of course). You can also use "WX_3_0_BRANCH" instead of "master" with the
expected meaning.

 I hope this helps but please let me know if you need more details,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]