Ports Repocopies

Mark Millard marklmi at yahoo.com
Thu Apr 1 08:38:08 UTC 2021



On 2021-Apr-1, at 00:58, Mathieu Arnold <mat at FreeBSD.org> wrote:

> On Wed, Mar 31, 2021 at 11:42:44AM -0700, Cy Schubert wrote:
>> Hi,
>> 
>> Considering git's non-existent copy function, is it safe to say ports 
>> repopcopies are now a thing of the past?
> 
> Note that we stopped doing repocopies when we switched to subversion in
> 2012.

Terminology mismatch vs. committers-guide?

https://docs.freebsd.org/en/articles/committers-guide/ has
use of "repo copy" terminology:

QUOTE
22.4. Repository Copies
22.4.1. When do we need a repository copy?
When you want to add a port that is related to any port that is already in the tree in a separate directory, you have to do a repository copy. Here related means it is a different version or a slightly modified version. Examples are print/ghostscript* (different versions) and x11-wm/windowmaker* (English-only and internationalized version).

Another example is when a port is moved from one subdirectory to another, or when the name of a directory must be changed because the authors renamed their software even though it is a descendant of a port already in a tree.

22.4.2. What do I need to do?
With Subversion, a repo copy can be done by any committer:

	• Doing a repo copy:

	• Verify that the target directory does not exist.

	• Use svn up to make certain the original files, directories, and checkout information is current.

	• Use svn move or svn copy to do the repo copy.

	• Upgrade the copied port to the new version. Remember to add or change the PKGNAMEPREFIX or PKGNAMESUFFIX so there are no duplicate ports with the same name. In some rare cases it may be necessary to change the PORTNAME instead of adding PKGNAMEPREFIX or PKGNAMESUFFIX, but this is only done when it is really needed — for example, using an existing port as the base for a very similar program with a different name, or upgrading a port to a new upstream version which actually changes the distribution name, like the transition from textproc/libxml to textproc/libxml2. In most cases, adding or changing PKGNAMEPREFIX or PKGNAMESUFFIX suffices.

	• Add the new subdirectory to the SUBDIR listing in the parent directory Makefile. You can run make checksubdirs in the parent directory to check this.

	• If the port changed categories, modify the CATEGORIES line of the port’s Makefile accordingly

	• Add an entry to ports/MOVED, if you remove the original port.

	• Commit all changes on one commit.

	• When removing a port:

	• Perform a thorough check of the ports collection for any dependencies on the old port location/name, and update them. Running grep on INDEX is not enough because some ports have dependencies enabled by compile-time options. A full grep -r of the ports collection is recommended.

	• Remove the old port and the old SUBDIR entry.

	• Add an entry to ports/MOVED.

	• After repo moves (“rename” operations where a port is copied and the old location is removed):

	• Follow the same steps that are outlined in the previous two entries, to activate the new location of the port and remove the old one.
END QUOTE

> If you are talking about doing a svn copy/move to record the ancestry of
> a new file, you don't any more, git does not record file moves or
> copies.
> 
> If you are talking about the resurrection of a port, it would be
> possible to achieve the conservation of history by creating a branch
> before the port was removed, updating the port, and merging it back into
> the main branch using a merge strategy keeping the files on the branch
> being merged. But it would probably make reading the logs very ugly, and
> add merges everywhere, which we don't want anyway.
> 


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-git mailing list