From owner-freebsd-questions@freebsd.org Thu Mar 4 12:13:38 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 767BB56F5D1; Thu, 4 Mar 2021 12:13:38 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a05:fc87:1:5::15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.spoerlein.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrqXL0Jqjz3PKb; Thu, 4 Mar 2021 12:13:37 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from localhost (acme.spoerlein.net [IPv6:2a05:fc87:1:5:0:0:0:15]) by acme.spoerlein.net (8.16.1/8.15.2) with ESMTPS id 124CDFFM023671 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 4 Mar 2021 13:13:17 +0100 (CET) (envelope-from uqs@freebsd.org) Date: Thu, 4 Mar 2021 13:13:15 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Michael Grimm Cc: freebsd-git@freebsd.org, freebsd-questions@freebsd.org Subject: Re: ports and git, first steps Message-ID: Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Michael Grimm , freebsd-git@freebsd.org, freebsd-questions@freebsd.org References: <6996AB6C-B178-48C2-94D4-1F7D62E59998@ellael.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.0.3 (2020-12-04) X-Rspamd-Queue-Id: 4DrqXL0Jqjz3PKb X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:39540, ipnet:2a05:fc87::/32, country:CH] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 12:13:38 -0000 On Wed, 2021-03-03 at 16:10:15 +0100, Michael Grimm wrote: >[CC'd to freebsd-questions] > >Ulrich Spörlein wrote: >> On Tue, 2021-03-02 at 13:23:56 +0100, Michael Grimm wrote: > >>> I am running STABLE-13 and use poudriere (svn+https) to compile my ports of interest. >>> >>> Disclaimer: I do consider myself a newbie with regard to git. >>> >>> After my migration from svn to git regarding sources, I recently installed a git repository for ports sources. It is working as expected, good. >>> >>> But then I added some local ports to the ports directory, which I added to .git/info/exclude. Ok, that worked out. >>> >>> Now I had had to modify the Makefile of www/wordpress like I did before in the svn ports tree. Now git complained: >>> >>> mwn> git status >>> On branch master >>> Your branch is up to date with 'origin/master'. >>> >>> Changes not staged for commit: >>> (use "git add ..." to update what will be committed) >>> (use "git restore ..." to discard changes in working directory) >>> modified: www/wordpress/Makefile >>> >>> It took 3.44 seconds to enumerate untracked files. 'status -uno' >>> may speed it up, but you have to be careful not to forget to add >>> new files yourself (see 'git help status'). >>> no changes added to commit (use "git add" and/or "git commit -a") >>> >>> Thus I applied 'git commit': >>> >>> mwn> git commit -a -m "modified to compile wordpress without llvm" >>> [master 39b5d0652] modified to compile wordpress without llvm >>> Committer: admin mer-waases.net >>> Your name and email address were configured automatically based >>> on your username and hostname. Please check that they are accurate. >>> You can suppress this message by setting them explicitly. Run the >>> following command and follow the instructions in your editor to edit >>> your configuration file: >>> >>> git config --global —edit >>> >>> After doing this, you may fix the identity used for this commit with: >>> >>> git commit --amend --reset-author >>> >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> Now, 'git status' shows: >>> >>> mwn> git status >>> On branch master >>> Your branch is ahead of 'origin/master' by 1 commit. >>> (use "git push" to publish your local commits) >>> >>> >>> It took 3.17 seconds to enumerate untracked files. 'status -uno' >>> may speed it up, but you have to be careful not to forget to add >>> new files yourself (see 'git help status'). >>> nothing to commit, working tree clean >>> >>> Well, that looks fine for a git newbie, But there are some questions left for me: >>> >>> 1) Will my commited Makefile become overwritten if the master Makefile becomes modified in the future? (I hope so) >> >> No, due to how I think (!) poudriere works, your change should remain. >> >>> 2) Will all upcoming modifications in 'remote.origin.url=git://github.com/freebsd/freebsd-ports.git' be pulled, >>> although 'Your branch is ahead of 'origin/master' by 1 commit.'? >> >> I think poudriere does a `git pull --rebase` always, which fetches upstream and then rebases your changes on top. So your local changes will always be there, but they can of course come into conflict with upstream changes at which point you'll need to resolve those conflicts. > >Does anyone know if poudriere is using 'git pull —rebase' as default? It's just a bunch of shell scripts, so easy to check: % git grep GIT_CMD src/share/poudriere/common.sh:: ${GIT_CMD:=git} src/share/poudriere/jail.sh: ${GIT_CMD} clone ${GIT_DEPTH} -q -b ${VERSION} ${GIT_FULLURL} ${SRC_BASE} || err 1 " fail" src/share/poudriere/jail.sh: ${GIT_CMD} -C ${SRC_BASE} pull --rebase -q || err 1 " fail" src/share/poudriere/jail.sh: ${GIT_CMD} checkout -q "${TORELEASE}" || err 1 " fail" src/share/poudriere/jail.sh: git_sha=$(${GIT_CMD} -C ${SRC_BASE} rev-parse --short HEAD) src/share/poudriere/ports.sh: ${GIT_CMD} clone --depth=1 --single-branch ${quiet} -b ${BRANCH} ${GIT_FULLURL} ${PTMNT} || err 1 " fail" src/share/poudriere/ports.sh: ${GIT_CMD} -C ${PORTSMNT:-${PTMNT}} pull --rebase ${quiet} Besides, `git pull --rebase` is pretty much the only sane choice for poudriere anyway. Cheers Uli