From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 10 Jan 2010 01:31:25 +0300 From: "Dmitry V. Levin" To: ALT Devel discussion list Message-ID: <20100109223125.GA14247@wo.int.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <4B48E735.6040908@altlinux.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <4B48E735.6040908@altlinux.ru> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [devel] git submodules vs gear X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2010 22:31:25 -0000 Archived-At: List-Archive: List-Post: --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 09, 2010 at 11:29:41PM +0300, Alexey Gladkov wrote: > On 09.01.2010 23:19, Max Ivanov wrote: > > How to deal with git submodules? Upstream uses them in some places and > > I don't know how to put their content in the final source tree prior > > to %build stage. Is it even possible? >=20 > I did support for submodules, but gear's upstream don't want it. >=20 > http://git.altlinux.org/people/legion/packages/gear.git?p=3Dgear.git;a=3D= shortlog;h=3Drefs/heads/submodule The main idea behind GIT submodule is that it allows weak references. These objects (gitlink tree entries) refer to commit objects which are allowed to be missing from the git repository. Regular git tools like git-fetch, git-push and their derivatives do not follow such references. To complete a full git checkout for a tree containing submodules, additional commands (e.g. "git submodule update") need to be executed to fetch required commit objects from external git repositories. For example, GNU coreutils project uses gnulib submodule: http://git.savannah.gnu.org/cgit/coreutils.git/plain/.gitmodules The main idea behind gear is to reproducibly extract archive from a given git repository. gear (in its basic form) takes a git repository, a commit id, and outputs a tarball. Every commit object referenced by the given commit id must be extractable from the given git repository. Now imagine that this commit id uses submodules and required external commit objects are missing, because no git repository that uses submodules is required to be self-contained. In this case, gear would have to attempt to fetch these commits from internet. This is NOT reliable, and gear would not be able to guarantee reproducibly. As you see, there is a fundamental problem: GIT submodule breaks repository completeness, but gear requires git repositories to be self-contained. I have no idea how to avoid this problem. --=20 ldv --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAktJA70ACgkQfKvmrJ41Nh58awCcDaO+Kpq86PdMLWs5BpL8j/b3 048AoKhviThKB6d3EFFQfiYj+phPJq7d =LKgJ -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--