- Add information about Subversion

PR:		docs/169771
Submitted by:	myself, modified by wblock
Approved by:	wblock
This commit is contained in:
Beat Gaetzi 2012-07-15 19:27:17 +00:00
parent 9e29aa6651
commit dde18e8c3c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=39216
2 changed files with 51 additions and 66 deletions

View file

@ -143,7 +143,7 @@ USE_IMAKE= yes
<para>See if you can figure it out. Do not worry about the <para>See if you can figure it out. Do not worry about the
contents of the <literal>&dollar;FreeBSD&dollar;</literal> contents of the <literal>&dollar;FreeBSD&dollar;</literal>
line, it will be filled in automatically by CVS when the port line, it will be filled in automatically by SVN when the port
is imported to our main ports tree. You can find a more is imported to our main ports tree. You can find a more
detailed example in the <link detailed example in the <link
linkend="porting-samplem">sample Makefile</link> linkend="porting-samplem">sample Makefile</link>
@ -716,7 +716,7 @@ PLIST_DIRS= lib/X11/oneko</programlisting>
<filename>patch-ab</filename> etc, always mention the path and <filename>patch-ab</filename> etc, always mention the path and
file name in patch names.</para> file name in patch names.</para>
<para>Do not put RCS strings in patches. CVS will mangle them <para>Do not put RCS strings in patches. SVN will mangle them
when we put the files into the ports tree, and when we check when we put the files into the ports tree, and when we check
them out again, they will come out different and the patch them out again, they will come out different and the patch
will fail. RCS strings are surrounded by dollar will fail. RCS strings are surrounded by dollar
@ -747,7 +747,7 @@ PLIST_DIRS= lib/X11/oneko</programlisting>
take a working piece of functionality from one project to fix take a working piece of functionality from one project to fix
similar areas in another, please be careful: the resulting similar areas in another, please be careful: the resulting
line patch may be full of non-functional changes. It not only line patch may be full of non-functional changes. It not only
increases the size of the CVS repository but makes it hard to increases the size of the SVN repository but makes it hard to
find out what exactly caused the problem and what you changed find out what exactly caused the problem and what you changed
at all.</para> at all.</para>
@ -4144,7 +4144,7 @@ ${MANPREFIX}/man/de/man3/baz.3.gz</programlisting>
<para>These variables are designed to be set by the system <para>These variables are designed to be set by the system
administrator. There are many that are standardized in administrator. There are many that are standardized in
the <ulink the <ulink
url="http://www.freebsd.org/cgi/cvsweb.cgi/ports/KNOBS?rev=HEAD&amp;content-type=text/x-cvsweb-markup"><filename>ports/KNOBS</filename></ulink> url="http://svn.FreeBSD.org/ports/head/KNOBS?view=markup"><filename>ports/KNOBS</filename></ulink>
file.</para> file.</para>
<para>When creating a port, do not make knob names specific <para>When creating a port, do not make knob names specific
@ -4224,7 +4224,7 @@ ${MANPREFIX}/man/de/man3/baz.3.gz</programlisting>
for the benefit of end-users and to help keep the number for the benefit of end-users and to help keep the number
of knob names down. A list of popular knob names can be of knob names down. A list of popular knob names can be
found in the <ulink found in the <ulink
url="http://www.freebsd.org/cgi/cvsweb.cgi/ports/KNOBS?rev=HEAD&amp;content-type=text/x-cvsweb-markup">KNOBS</ulink> url="http://svn.FreeBSD.org/ports/head/KNOBS?view=markup"><filename>KNOBS</filename></ulink>
file.</para> file.</para>
<para>Knob names should reflect what the knob is and does. <para>Knob names should reflect what the knob is and does.
@ -6951,8 +6951,8 @@ QT_COMPONENTS= moc_build qmake_build rcc_build uic_build</programlisting>
section are implemented in <filename>bsd.java.mk</filename>. section are implemented in <filename>bsd.java.mk</filename>.
If you ever think that your port needs more sophisticated If you ever think that your port needs more sophisticated
Java support, please first have a look at the <ulink Java support, please first have a look at the <ulink
url="http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.java.mk"> url="http://svn.FreeBSD.org/ports/head/Mk/bsd.java.mk?view=markup">bsd.java.mk
bsd.java.mk CVS log</ulink> as it usually takes some time SVN log</ulink> as it usually takes some time
to document the latest features. Then, if you think the to document the latest features. Then, if you think the
support you are lacking would be beneficial to many other support you are lacking would be beneficial to many other
Java ports, feel free to discuss it on the &a.java;.</para> Java ports, feel free to discuss it on the &a.java;.</para>
@ -9066,8 +9066,7 @@ CFLAGS+= -DLUA_VERSION_STRING="${VER_STR}"
</table> </table>
<para>More details are available in <ulink <para>More details are available in <ulink
url="http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.database.mk"> url="http://svn.FreeBSD.org/ports/head/Mk/bsd.database.mk?view=markup">bsd.database.mk</ulink>.</para>
bsd.database.mk</ulink>.</para>
</sect1> </sect1>
<sect1 id="rc-scripts"> <sect1 id="rc-scripts">
@ -10204,8 +10203,8 @@ as .putsy.conf and edit it.</programlisting>
<screen>&prompt.user; <userinput>/usr/bin/diff something.orig something > something.diff</userinput></screen> <screen>&prompt.user; <userinput>/usr/bin/diff something.orig something > something.diff</userinput></screen>
</informalexample> </informalexample>
<para>Otherwise, you should either use the <command>cvs <para>Otherwise, you should either use the <command>svn
diff</command> method (<xref linkend="cvs-diff">) or copy the diff</command> method (<xref linkend="svn-diff">) or copy the
contents of the port to an entire different directory and use contents of the port to an entire different directory and use
the result of the recursive &man.diff.1; output of the new and the result of the recursive &man.diff.1; output of the new and
old ports directories (e.g., if your modified port directory is old ports directories (e.g., if your modified port directory is
@ -10244,7 +10243,7 @@ as .putsy.conf and edit it.</programlisting>
<quote>Class</quote> of your PR should be <quote>Class</quote> of your PR should be
<literal>change-request</literal>. Please mention any added or <literal>change-request</literal>. Please mention any added or
deleted files in the message, as they have to be explicitly deleted files in the message, as they have to be explicitly
specified to &man.cvs.1; when doing a commit. If the diff is specified to &man.svn.1; when doing a commit. If the diff is
more than about 20KB, please compress and uuencode it; more than about 20KB, please compress and uuencode it;
otherwise, just include it in the PR as is.</para> otherwise, just include it in the PR as is.</para>
@ -10273,11 +10272,11 @@ as .putsy.conf and edit it.</programlisting>
<para>Now that you have done all that, you will want to read about <para>Now that you have done all that, you will want to read about
how to keep up-to-date in <xref linkend="keeping-up">.</para> how to keep up-to-date in <xref linkend="keeping-up">.</para>
<sect1 id="cvs-diff"> <sect1 id="svn-diff">
<title>Using <literal>CVS</literal> to Make Patches</title> <title>Using <literal>SVN</literal> to Make Patches</title>
<para>If you can, please submit a &man.cvs.1; diff; they are <para>If you can, please submit a &man.svn.1 diff; they are easier to
easier to handle than diffs between <quote>new and old</quote> handle than diffs between <quote>new and old</quote>
directories. Plus it is easier for you to see what you have directories. Plus it is easier for you to see what you have
changed and to update your diff if something is modified in changed and to update your diff if something is modified in
the Ports Collection from when you started to work on it until the Ports Collection from when you started to work on it until
@ -10285,7 +10284,7 @@ as .putsy.conf and edit it.</programlisting>
something.</para> something.</para>
<screen>&prompt.user; <userinput>cd ~/my_wrkdir</userinput> <co id="my-wrkdir"> <screen>&prompt.user; <userinput>cd ~/my_wrkdir</userinput> <co id="my-wrkdir">
&prompt.user; <userinput>cvs -d R_CVSROOT co pdnsd</userinput> <co id="R-CVSROOT"> <co id="module-name"> &prompt.user; <userinput>svn co svn://svn.FreeBSD.org/ports/head/dns/pdnsd</userinput> <co id="svn-FreeBSD-org">
&prompt.user; <userinput>cd ~/my_wrkdir/pdnsd</userinput></screen> &prompt.user; <userinput>cd ~/my_wrkdir/pdnsd</userinput></screen>
<calloutlist> <calloutlist>
@ -10296,53 +10295,38 @@ as .putsy.conf and edit it.</programlisting>
class="directory">/usr/ports/</filename>.</para> class="directory">/usr/ports/</filename>.</para>
</callout> </callout>
<callout arearefs="R-CVSROOT"> <callout arearefs="svn-FreeBSD-org">
<para>R_CVSROOT is any public cvs server, see how to use cvs <para><ulink url="http://svn.FreeBSD.org/">svn.FreeBSD.org</ulink>
in the <ulink is a public <literal>SVN</literal> server.</para>
url="&url.books.handbook;/anoncvs.html">&os;
Handbook</ulink>.</para>
</callout>
<callout arearefs="module-name">
<para>pdnsd is the module name for the port; it is generally
the name of the port, although there are some exceptions,
notably for language-specific categories (<filename
role="package">german/selfhtml</filename> has the module
name de-selfhtml); you can either look up the module name
via the <ulink
url="&url.base;/cgi/cvsweb.cgi/ports">cvsweb
interface</ulink> or use the whole path, in our example
<filename
class="directory">ports/dns/pdnsd</filename>.</para>
</callout> </callout>
</calloutlist> </calloutlist>
<para>While in the working directory, make any changes that you <para>While in the working directory, make any changes that you
would usually make to the port. If you add or remove a file, would usually make to the port. If you add or remove a file,
use <command>cvs</command> to track these changes:</para> use <command>svn</command> to track these changes:</para>
<screen>&prompt.user; <userinput>cvs add new_file</userinput> <screen>&prompt.user; <userinput>svn add new_file</userinput>
&prompt.user; <userinput>cvs remove deleted_file</userinput></screen> &prompt.user; <userinput>svn remove deleted_file</userinput></screen>
<para>Make sure that you check the port using the checklist in <para>Make sure that you check the port using the checklist in
<xref linkend="porting-testing"> and <xref linkend="porting-testing"> and
<xref linkend="porting-portlint">.</para> <xref linkend="porting-portlint">.</para>
<screen>&prompt.user; <userinput>cvs status</userinput> <screen>&prompt.user; <userinput>svn status</userinput>
&prompt.user; <userinput>cvs update</userinput> <co id="cvs-update"></screen> &prompt.user; <userinput>svn update</userinput> <co id="svn-update"></screen>
<calloutlist> <calloutlist>
<callout arearefs="cvs-update"> <callout arearefs="svn-update">
<para>This will try to merge the differences between your <para>This will try to merge the differences between your
patch and current CVS; watch the output carefully. The patch and current SVN; watch the output carefully. The
letter in front of each file name indicates what was done letter in front of each file name indicates what was done
with it. See <xref linkend="table-cvs-up"> for a complete with it. See <xref linkend="table-svn-up"> for a complete
list.</para> list.</para>
</callout> </callout>
</calloutlist> </calloutlist>
<table pgwide="1" frame="none" id="table-cvs-up"> <table pgwide="1" frame="none" id="table-svn-up">
<title><literal>CVS</literal> Update File Prefixes</title> <title><literal>SVN</literal> Update File Prefixes</title>
<tgroup cols="2"> <tgroup cols="2">
<tbody> <tbody>
@ -10352,7 +10336,7 @@ as .putsy.conf and edit it.</programlisting>
</row> </row>
<row> <row>
<entry>P</entry> <entry>G</entry>
<entry>The file was updated without problems (you will <entry>The file was updated without problems (you will
only see this when working against a remote only see this when working against a remote
repository).</entry> repository).</entry>
@ -10374,17 +10358,17 @@ as .putsy.conf and edit it.</programlisting>
</table> </table>
<para>If you get <literal>C</literal> as a result of <para>If you get <literal>C</literal> as a result of
<literal>cvs update</literal> it means something changed in <command>svn update</command> it means something changed in
the CVS and &man.cvs.1; was not able to merge your local the SVN repository and &man.svn.1; was not able to merge your
changes and those from CVS. It is always a good idea to local changes and those from the repository. It is always a good idea
inspect the changes anyway, since <command>cvs</command> does to inspect the changes anyway, since &man.svn.1;
not know anything about how a port should be, so it might (and does not know anything about how a port should be, so it might
probably will) merge things that do not make sense.</para> (and probably will) merge things that do not make sense.</para>
<para>The last step is to make a unified &man.diff.1; <para>The last step is to make a unified &man.diff.1;
of the files against CVS:</para> of the files against SVN:</para>
<screen>&prompt.user; <userinput>cvs diff -uN &gt; ../`basename ${PWD}`.diff</userinput></screen> <screen>&prompt.user; <userinput>svn diff -N &gt; ../`basename ${PWD}`.diff</userinput></screen>
<note> <note>
<para>It is important to use <option>-N</option> to ensure <para>It is important to use <option>-N</option> to ensure
@ -11028,7 +11012,7 @@ Reference: &lt;http://www.freebsd.org/ports/portaudit/74a9541d-5d6c-11d8-80e3-00
<para>The preferred way to tell 4.3BSD/Reno (1990) and newer <para>The preferred way to tell 4.3BSD/Reno (1990) and newer
versions of the BSD code apart is by using the versions of the BSD code apart is by using the
<literal>BSD</literal> macro defined in <ulink <literal>BSD</literal> macro defined in <ulink
url="http://cvsweb.freebsd.org/src/sys/sys/param.h">sys/param.h</ulink>. url="http://svnweb.freebsd.org/base/head/sys/sys/param.h?view=markup">sys/param.h</ulink>.
Hopefully that file is already included; if not, add the Hopefully that file is already included; if not, add the
code:</para> code:</para>
@ -11132,7 +11116,7 @@ Reference: &lt;http://www.freebsd.org/ports/portaudit/74a9541d-5d6c-11d8-80e3-00
<para>Here is a convenient list of <para>Here is a convenient list of
<literal>__FreeBSD_version</literal> values as defined in <literal>__FreeBSD_version</literal> values as defined in
<ulink <ulink
url="http://cvsweb.freebsd.org/src/sys/sys/param.h">sys/param.h</ulink>:</para> url="http://svnweb.FreeBSD.org/base/head/sys/sys/param.h?view=markup">sys/param.h</ulink>:</para>
<table frame="none"> <table frame="none">
<title><literal>__FreeBSD_version</literal> Values</title> <title><literal>__FreeBSD_version</literal> Values</title>
@ -15782,7 +15766,7 @@ exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@"</programlisting>
<title><filename>README.html</filename></title> <title><filename>README.html</filename></title>
<para>Do not include the <filename>README.html</filename> file. <para>Do not include the <filename>README.html</filename> file.
This file is not part of the cvs collection but is generated This file is not part of the SVN collection but is generated
using the <command>make readme</command> command.</para> using the <command>make readme</command> command.</para>
<note> <note>
@ -16198,9 +16182,9 @@ not be changed when upgrading the port later.]
# Whom: Satoshi Asami &lt;asami@FreeBSD.org&gt; # Whom: Satoshi Asami &lt;asami@FreeBSD.org&gt;
# #
# &dollar;FreeBSD&dollar; # &dollar;FreeBSD&dollar;
[ ^^^^^^^^^ This will be automatically replaced with RCS ID string by CVS [ ^^^^^^^^^ This will be automatically replaced with RCS ID string by SVN
when it is committed to our repository. If upgrading a port, do not alter when it is committed to our repository. If upgrading a port, do not alter
this line back to "&dollar;FreeBSD&dollar;". CVS deals with it automatically.] this line back to "&dollar;FreeBSD&dollar;". SVN deals with it automatically.]
# #
[section to describe the port itself and the master site - PORTNAME [section to describe the port itself and the master site - PORTNAME
@ -16311,20 +16295,20 @@ pre-install:
commits.</para> commits.</para>
</sect1> </sect1>
<sect1 id="cvsweb"> <sect1 id="svnweb">
<title>The Web Interface to the Source Repository</title> <title>The Web Interface to the Source Repository</title>
<para>It is possible to browse the files in the source <para>It is possible to browse the files in the source
repository by using a web interface. Changes that affect the repository by using a web interface. Changes that affect the
entire port system are now documented in the <ulink entire port system are now documented in the <ulink
url="http://cvsweb.FreeBSD.org/ports/CHANGES"> url="http://svnweb.FreeBSD.org/ports/head/CHANGES">CHANGES</ulink>
CHANGES</ulink> file. Changes that affect individual ports file. Changes that affect individual ports
are now documented in the <ulink are now documented in the <ulink
url="http://cvsweb.FreeBSD.org/ports/UPDATING"> url="http://svnweb.FreeBSD.org/ports/head/UPDATING">UPDATING</ulink>
UPDATING</ulink> file. However, the definitive answer to file. However, the definitive answer to
any question is undoubtedly to read the source code of <ulink any question is undoubtedly to read the source code of <ulink
url="http://cvsweb.FreeBSD.org/ports/Mk/bsd.port.mk"> url="http://svnweb.FreeBSD.org/ports/head/Mk/bsd.port.mk">bsd.port.mk</ulink>,
bsd.port.mk</ulink>, and associated files.</para> and associated files.</para>
</sect1> </sect1>
<sect1 id="ports-mailling-list"> <sect1 id="ports-mailling-list">

View file

@ -614,6 +614,7 @@
<!ENTITY man.su.1 "<citerefentry/<refentrytitle/su/<manvolnum/1//"> <!ENTITY man.su.1 "<citerefentry/<refentrytitle/su/<manvolnum/1//">
<!ENTITY man.sum.1 "<citerefentry/<refentrytitle/sum/<manvolnum/1//"> <!ENTITY man.sum.1 "<citerefentry/<refentrytitle/sum/<manvolnum/1//">
<!ENTITY man.suspend.1 "<citerefentry/<refentrytitle/suspend/<manvolnum/1//"> <!ENTITY man.suspend.1 "<citerefentry/<refentrytitle/suspend/<manvolnum/1//">
<!ENTITY man.svn.1 "<citerefentry/<refentrytitle/svn/<manvolnum/1//">
<!ENTITY man.switch.1 "<citerefentry/<refentrytitle/switch/<manvolnum/1//"> <!ENTITY man.switch.1 "<citerefentry/<refentrytitle/switch/<manvolnum/1//">
<!ENTITY man.symorder.1 "<citerefentry/<refentrytitle/symorder/<manvolnum/1//"> <!ENTITY man.symorder.1 "<citerefentry/<refentrytitle/symorder/<manvolnum/1//">
<!ENTITY man.systat.1 "<citerefentry/<refentrytitle/systat/<manvolnum/1//"> <!ENTITY man.systat.1 "<citerefentry/<refentrytitle/systat/<manvolnum/1//">