Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5A2ED200B36 for ; Wed, 6 Jul 2016 13:35:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 58C52160A64; Wed, 6 Jul 2016 11:35:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9ED9F160A36 for ; Wed, 6 Jul 2016 13:35:39 +0200 (CEST) Received: (qmail 87619 invoked by uid 500); 6 Jul 2016 11:35:38 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 87602 invoked by uid 99); 6 Jul 2016 11:35:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jul 2016 11:35:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CBCF8C03B7 for ; Wed, 6 Jul 2016 11:35:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.802 X-Spam-Level: X-Spam-Status: No, score=-0.802 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id mNEnT3k6Jhd4 for ; Wed, 6 Jul 2016 11:35:35 +0000 (UTC) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B78865F252 for ; Wed, 6 Jul 2016 11:35:34 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id b13so76128290pat.0 for ; Wed, 06 Jul 2016 04:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-transfer-encoding:from:mime-version:date:message-id:subject :references:in-reply-to:to; bh=ld/5ZJWcwyBNvy+GBrXw3uXHHh3YCgij7VA2HeJDoIg=; b=o4sjvSqxmnmI0TzOhDwe13f1jrmxLBDaRjdK5DasExyZOnMy5n75jgVuCpL+Fb/J1Q SXzwAO//zYJAy2OOIzSCJ+85l+Yk/MVWRd1rF1jPUrrHkZ0NfCDa5njd5O/n61n88ERP NxqxdVVzCl06vxGu4IUEVnNaYWy4ghtglHdw/vrH4Jn/S8xgq6hYekkBlDHfmv+03AuB q2OfiAvlnx0gjMsym08v+VY8ZWaRQ8DKF+9HV6sA/hjvq9fD2qvZW0yfnqpoUVfh/l8y Ql6Ajo1zzLHGMXh0NdvLIG+A/OKqpmP2XT5m6F08k+6KnlFkmbg9rIJLH5ppzIIpMCeT Ddrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-transfer-encoding:from:mime-version:date :message-id:subject:references:in-reply-to:to; bh=ld/5ZJWcwyBNvy+GBrXw3uXHHh3YCgij7VA2HeJDoIg=; b=Rklcv9kB71TrFBJwGbvMbeuvY7hIOZgLedh39x6TvqxgQg5ad0jm6joorwLLncqM7z sg+cG5HnT4OBNY6oNKeJH5EkYHPL4LHSZtD2RtLVp8MGwFOVEeRgbaML2JQ3zkNsuQ46 KeVe9iC52cY46NTfkokcjGAo/UpkAtONi/snoTLJBn/iGtfqZjbx99r15LdqILTY/jY5 gm+k+5mh9lRXFYnkBjQM+L9jbi0hfTXXtnS8CCsJJ7GDmWhWHetpyVuBPbtw9Tz8bta9 VKohSZFNT/jQBoJWKp7rQSi92LWNV1sb51wIbUfn6TVnndgtt5w4wefG7klAGLxRKxHI exKw== X-Gm-Message-State: ALyK8tJ3fZKOsSF5l2X5M9w9eXpTmlm7k2I41CSs8BXwHUC0Vq8nD3orVNZaT0yfojMVyQ== X-Received: by 10.66.155.229 with SMTP id vz5mr40800676pab.148.1467804933141; Wed, 06 Jul 2016 04:35:33 -0700 (PDT) Received: from [10.11.2.246] (li1464-64.members.linode.com. [139.162.51.64]) by smtp.gmail.com with ESMTPSA id f138sm3969859pfa.17.2016.07.06.04.35.32 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 04:35:32 -0700 (PDT) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=gb2312 From: Gmail Mime-Version: 1.0 (1.0) Date: Wed, 6 Jul 2016 19:35:30 +0800 Message-Id: Subject: Re: Replace git submodule with git clone + file with commit number? References: In-Reply-To: To: dev@hawq.incubator.apache.org X-Mailer: iPhone Mail (13F69) archived-at: Wed, 06 Jul 2016 11:35:40 -0000 I think the method using git clone is fine.=20 But I suggest we'd better keep the makefile readable. I mean we should not a= dd too trivial shell logic inside makefile itself. For example, write a shel= l or Python script for users. Users should run the script before building HA= WQ if they need to install this libraries. I also wonder what's the typical solution for similar problems of other Apac= he projects. Do they use git sub module? How do they solve this in their rel= ease? xunzhang Send from my iPhone > =D4=DA 2016=C4=EA6=D4=C229=C8=D5=A3=AC18:18=A3=ACGuo Gang =D0=B4=B5=C0=A3=BA >=20 > I'm proposing this change because: >=20 > 1) We are ready to release the first apache release with "source tarball",= > but > submodule is not friendly to source tarball since git submodule > require a git parent. >=20 > 2) With more and more development, I found that submodule mechanism > is not that friendly for development, e.g. >=20 > If the commit number of one submodule is modified, it is hard to detect > this for Makefile. We need to manually update it in an old repo. If > using "git clone", we could easily detect update by set a commit number > file > as dependency and thus easily update the code. >=20 > Some developers have complained the annoying output in "git status" > after building submodules. With "git clone" we can easily mask those > directories via .gitignore. >=20 > It is hard for developers who is not familiar with submodule (Frankly > speaking > I really do not think submodule is friendly) to manipulate related > directories > when necessary. >=20 > While with the "git clone" solution, we save the commit of previous > submodule in a file, > and the related Makefile code change is rather simple, e.g. for gp-xerces.= >=20 > $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp: > $(ORCA_SRC_PATH)/gp-xerces.commit > rm -f $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp >=20 > gp-xerces_prepare: $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp > if [ ! -f $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp ]; then \ > [ "x$(gp_xerces_commit)" !=3D "x" ] || exit 1; \ > cd $(abs_top_srcdir)/$(subdir); mkdir -p gp-xerces; cd gp-xerces; \ > [ ! -d .git ] && git clone > https://github.com/greenplum-db/gp-xerces.git .; \ > git reset --hard $(gp_xerces_commit) || exit 2; \ > touch $(ORCA_BLD_PATH)/gp_xerces_prepare_timestamp; \ > fi >=20 > With above code change, if I update gp-xerces commit number in the commit > file > gp-xerces.commit make will trigger an auto-build, If I messed up the > gp-xerces directory > I can easily remove the whole gp-xerces, or just remove the timestamp file= > gp-xerces_prepare_timestamp to trigger an auto build. >=20 > Any suggestion? Thanks.