<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Contributing to FreeBSD | FreeBSD Foundation</title>
	<atom:link href="https://staging.freebsdfoundation.org/topic/contributing-to-freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>https://staging.freebsdfoundation.org</link>
	<description>A non-profit organization dedicated to supporting and building the FreeBSD Project</description>
	<lastBuildDate>Mon, 22 Aug 2022 17:24:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://staging.freebsdfoundation.org/wp-content/uploads/2015/12/favicon.png</url>
	<title>Contributing to FreeBSD | FreeBSD Foundation</title>
	<link>https://staging.freebsdfoundation.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Contributing to FreeBSD as a Programmer</title>
		<link>https://staging.freebsdfoundation.org/resource/contributing-to-freebsd-as-a-programmer/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Mon, 15 Aug 2022 18:26:25 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11559</guid>

					<description><![CDATA[<p>FreeBSD relies on the continued contributions of its user base to survive. Becoming involved is simple and there are a wide variety of tasks that users can contribute to. This guide will focus on how programmers can contribute to the project.</p>
<p>The post <a href="https://staging.freebsdfoundation.org/resource/contributing-to-freebsd-as-a-programmer/">Contributing to FreeBSD as a Programmer</a> first appeared on <a href="https://staging.freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor"><p></section><section class="block block-core-paragraph"></p>
<p><strong>Updated: June 15, 202</strong>2</p>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="507" height="304" class="wp-image-7899" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/03/event-slider-freebsd-logo-cropped.jpg" alt="" srcset="https://staging.freebsdfoundation.org/wp-content/uploads/2020/03/event-slider-freebsd-logo-cropped.jpg 507w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/03/event-slider-freebsd-logo-cropped-300x180.jpg 300w" sizes="(max-width: 507px) 100vw, 507px" /></figure>
<p></section></div>
<section class="block block-core-paragraph"></p>
<p>FreeBSD relies on the continued contributions of its user base to survive. Becoming involved is simple and there are a wide variety of tasks that users can contribute to.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>A large and growing number of international contributors, of various ages and areas of technical expertise, develop FreeBSD. There is always more work to be done than there are people available to do it, and more help is always appreciated.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The FreeBSD project is responsible for the entire FreeBSD operating system environment, meaning a wide range of <code>TODO</code> tasks exist. To help contributing to the FreeBSD documentation, check out <a href="https://staging.freebsdfoundation.org/contributing-freebsd-documentation/" target="_blank" rel="noreferrer noopener">this guide</a> on submitting and updating documentation.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>This guide will focus on how programmers can contribute to the project. Please read through the following selection of tasks that may be needed.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="has-text-align-center wp-block-heading">Where to Find Open Tasks</h2>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">1.1 Ongoing Programmer Tasks</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Most of the tasks listed here require a considerable investment of time, an in-depth knowledge of the FreeBSD kernel, or both. However, there are also many useful tasks which are suitable for “weekend hackers”.</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list" type="1">
	<li>Read the <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-bugs" target="_blank" rel="noreferrer noopener">FreeBSD problem reports mailing list</a>. There may be a problem you can comment constructively on, or with patches you can test. You could even try to fix one of the problems yourself.</li>
	<li>If you know of any bug fixes which have been successfully applied to -CURRENT but have not been merged into -STABLE after a decent interval (normally a couple of weeks), send the committer a polite reminder.</li>
	<li>Move contributed software to <code>src/contrib</code> in the source tree.</li>
	<li>Make sure code in <code>src/contrib</code> is up to date.</li>
	<li>Build the source tree with extra warnings enabled and clean up the warnings. A list of build warnings can also be found from our <a href="https://ci.freebsd.org/" target="_blank" rel="noreferrer noopener">CI</a> by selecting a build and checking &#8220;LLVM/Clang Warnings&#8221;.</li>
	<li>Fix warnings for ports which do deprecated things like using <code>gets()</code> or including <code>malloc.h</code>.</li>
	<li>If you have contributed any ports where you had to make FreeBSD-specific changes, send your patches back to the original authors (this will make your life easier when they bring out the next version).</li>
	<li>Get copies of formal standards like POSIX®. Compare FreeBSD&#8217;s behavior to that required by the standard. If the behavior differs, particularly in subtle or obscure corners of the specification, send in a PR about it. If you are able to, figure out how to fix it and include a patch in the PR.</li>
</ol>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">1.2 Working Through the PR Database</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>FreeBSD users can submit requests for enhancement and bug reports through to <a href="http://bugs.freebsd.org/search/" target="_blank" rel="noreferrer noopener">FreeBSD PR (problem report) </a>database. The database contains many active programmer and non-programmer tasks, though not all tasks are required to be logged there. Look through the open problem reports, and see if anything there takes your interest. There is a wide range of tasks that may range from simple code reviews to much more complex requests that may not readily contain a fix.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Start with open problem reports that have not been assigned to anyone else. If there is an active PR that is assigned to someone else, but looks like something you would like to work on, email the person assigned to the task and ask if you can assist or take over the PR. They may already have a patch that they need to test, or benefit from your suggestions.</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">1.3 Ongoing Ports Tasks</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The Ports Collection contains a massive amount of content and as such, is always a perpetual work in progress. People are constantly needed to keep the collection up to date, and filled with high quality third party software.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Anyone can get involved, and there are lots of different ways to contribute. Contributing to ports is an excellent way to help “give back” something to the project. Whether you are looking for an ongoing role or a fun challenge for a rainy day, the project would love to have your help!</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>There are a number of easy ways you can contribute to keeping the ports tree up to date and in good working order:</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>Create a new port for a cool or useful software.</li>
	<li>Adopt an unmaintained port and become the maintainer.

<ul>
	<li>If you have created or adopted a port, be aware of what you need to do as a maintainer. Consider reading through <a href="https://docs.freebsd.org/en/articles/contributing/ports-contributing.html#maintain-port" target="_blank" rel="noreferrer noopener">the maintainer responsibilities.</a></li>
</ul>
</li>
	<li>When you are looking for a quick challenge you could fix a bug or a broken port.</li>
</ul>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">1.4 Pick One of the Items From the Ideas Page</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p><a href="https://wiki.freebsd.org/IdeasPage" target="_blank" rel="noreferrer noopener">The FreeBSD ideas page</a> is regularly updated with items for programmers. Anyone looking to contribute to the FreeBSD Project can check it for tasks that they can assist with.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img decoding="async" width="1024" height="402" class="wp-image-7893" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/05/free-bsd-header-1024x402.jpg" alt="" srcset="https://staging.freebsdfoundation.org/wp-content/uploads/2020/05/free-bsd-header-1024x402.jpg 1024w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/05/free-bsd-header-300x118.jpg 300w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/05/free-bsd-header-1536x603.jpg 1536w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/05/free-bsd-header-2048x804.jpg 2048w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/05/free-bsd-header-scaled.jpg 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
<p></section></div>
<section class="block block-core-heading"></p>
<h2 class="has-text-align-center wp-block-heading">Ways to Contribute to The System</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>After identifying a task to work on, there are a few ways to assist with the operating system itself.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">2.1 Submitting Bug Reports and General Commentary</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&nbsp;</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If you are submitting a specific change, you can submit the patch by using the <a href="https://bugs.freebsd.org/submit/" target="_blank" rel="noreferrer noopener">bug submission form</a>. <a href="https://staging.freebsdfoundation.org/freebsd-project/resources/how-to-submit-a-bug-report" target="_blank" rel="noreferrer noopener">This how to guide</a> provides a step-by-step walkthrough for submitting a bug report.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If the patch is suitable to be applied to the source tree put [PATCH] in the synopsis of the report. When including patches, <em><strong>do not</strong></em> use cut-and-paste because cut-and-paste turns tabs into spaces and makes them unusable. When patches are a lot larger than 20KB, consider compressing them prior to uploading them.</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">2.2 Submitting Changes to Existing Source Code</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>An addition or change to the existing source code is a somewhat trickier affair and depends a lot on how far out of date you are with the current state of FreeBSD development. There is a special on-going release of FreeBSD known as “FreeBSD-CURRENT” which is made available in a variety of ways for the convenience of developers working actively on the system. See <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html" target="_blank" rel="noreferrer noopener">The FreeBSD Handbook</a> for more information about getting and using FreeBSD-CURRENT.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Working from older sources, unfortunately, means that your changes may sometimes be too obsolete or too divergent for easy re-integration into FreeBSD. Chances of this can be minimized somewhat by subscribing to the <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-announce" target="_blank" rel="noreferrer noopener">FreeBSD announcements mailing list</a> and the <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-current" target="_blank" rel="noreferrer noopener">FreeBSD-CURRENT mailing list</a> lists, where discussions on the current state of the system take place.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Assuming that you can manage to secure fairly up-to-date sources to base your changes on, the next step is to produce a set of diffs to send to the FreeBSD maintainers. This is done with the <a href="https://www.freebsd.org/cgi/man.cgi?query=diff&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">diff(1)</a> command.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The preferred <a href="https://www.freebsd.org/cgi/man.cgi?query=diff&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">diff(1)</a> format for submitting patches is the unified output format generated by <code>diff -u</code>.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><em><strong><code>%</code> <code>diff -u oldfile newfile</code></strong></em></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>or</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><em><strong><code>% diff -u -r -N olddir newdir</code></strong></em></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>will generate a set of unified diffs for the given source file or directory hierarchy.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Once you have a set of diffs (which you may test with the <a href="https://www.freebsd.org/cgi/man.cgi?query=patch&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">patch(1)</a> command), you should submit them for inclusion with FreeBSD as a bug report. Because we are busy, we may not be able to address it immediately, but it will remain in the PR database until we do. Indicate your submission by including <code>[PATCH]</code> in the synopsis of the report.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If your change is of a potentially sensitive nature, such as if you are unsure of copyright issues governing its further distribution then you should send it to Core Team <code>&lt;<a href="mailto:core@FreeBSD.org" target="_blank" rel="noreferrer noopener">core@FreeBSD.org</a>&gt;</code> directly rather than submitting as a bug report. The Core Team <code>&lt;<a href="mailto:core@FreeBSD.org" target="_blank" rel="noreferrer noopener">core@FreeBSD.org</a>&gt;</code> reaches a much smaller group of people who do much of the day-to-day work on FreeBSD. Note that this group is also <em>very busy</em> and so you should only send mail to them where it is truly necessary.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><strong>NOTE:</strong> Please refer to <a href="https://www.freebsd.org/cgi/man.cgi?query=intro&amp;sektion=9&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">intro(9)</a> and <a href="https://www.freebsd.org/cgi/man.cgi?query=style&amp;sektion=9&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">style(9)</a> for some information on coding style. We would appreciate it if you were at least aware of this information before submitting code.</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">2.3 New Code or Major Value-Added Packages</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>In the case of a significant contribution, or the addition of an important new feature to FreeBSD, it becomes almost always necessary to either send changes as tar files or a publicly accessible git branch or repository. Running these large changes through <a href="https://reviews.freebsd.org/" target="_blank" rel="noreferrer noopener">Phabricator</a> is also recommended.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>When working with large amounts of code, the touchy subject of copyrights also invariably comes up. FreeBSD prefers free software licenses such as BSD or ISC. Copyleft licenses such as GPLv2 are sometimes permitted. The complete listing can be found on the <a href="https://www.freebsd.org/internal/software-license.html" target="_blank" rel="noreferrer noopener">core team licensing policy</a> page.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img decoding="async" width="480" height="128" class="wp-image-5184" src="https://staging.freebsdfoundation.org/wp-content/uploads/2017/05/freebsd_ports-e1585249630722.png" alt="" srcset="https://staging.freebsdfoundation.org/wp-content/uploads/2017/05/freebsd_ports-e1585249630722.png 480w, https://staging.freebsdfoundation.org/wp-content/uploads/2017/05/freebsd_ports-e1585249630722-300x80.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></figure>
<p></section></div>
<section class="block block-core-heading"></p>
<h2 class="has-text-align-center wp-block-heading">Contributing to Ports</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Creating a port is a once-off task. Ensuring that a port is up to date and continues to build and run requires an ongoing maintenance effort. Maintainers are the people who dedicate some of their time to meeting these goals.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The foremost reason ports need maintenance is to bring the latest and greatest in third party software to the FreeBSD community. An additional challenge is to keep individual ports working within the Ports Collection framework as it evolves.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.1 Adopting Unmaintained Ports</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Taking over unmaintained ports is a great way to get involved. Unmaintained ports are only updated and fixed when somebody volunteers to work on them. There are a large number of unmaintained ports. A good idea is to start by adopting a port that you use regularly.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Unmaintained ports have their <code><strong>MAINTAINER</strong></code> set to <code><strong>ports@FreeBSD.org</strong></code>. A list of unmaintained ports and their current errors and problem reports can be seen at the <a href="http://portsmon.freebsd.org/" target="_blank" rel="noreferrer noopener">FreeBSD Ports Monitoring System</a>.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Some ports affect a large number of others due to dependencies. Generally, we want people to have some experience before they maintain these ports.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&nbsp;</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.2 Finding and Fixing a Broken Port</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>There are two really good places to find a port that needs some attention.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>You can use the <a href="https://bugs.freebsd.org/search">web interface</a> to the Problem Report database to search through and view unresolved PRs. The majority of ports PRs are updates, but with a little searching and skimming over synopses you should be able to find something interesting to work on (the <code><strong>sw-bug</strong></code> class is a good place to start).</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The other place is the <a href="http://portsmon.freebsd.org/">FreeBSD Ports Monitoring System</a>. In particular look for unmaintained ports with build errors and ports that are marked <code>BROKEN</code>. It is OK to send changes for a maintained port as well, but remember to ask the maintainer in case they are already working on the problem.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Once you have found a bug or problem, collect information, investigate and fix! If there is an existing PR, follow up to that. Otherwise create a new PR. Your changes will be reviewed and, if everything checks out, committed.</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.3 How to Adopt the Port</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>First, make sure you understand your responsibilities as a maintainer. Also read the <a href="https://download.freebsd.org/ftp/doc/en/books/porters-handbook/book.pdf">Porter&#8217;s Handbook</a>. <em>Please do not commit yourself to more than you feel you can comfortably handle.</em></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>You may request maintainership of any unmaintained port as soon as you wish. Simply set <code><strong>MAINTAINER</strong></code> to your own email address and send a problem report (PR) with the change. If the port has build errors or needs updating, you may wish to include any other changes in the same PR. This will help because many committers are less willing to assign maintainership to someone who does not have a known track record with FreeBSD. Submitting PRs that fix build errors or update ports are the best ways to establish one.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>File your PR with category <code><strong>ports</strong></code> and class <code><strong>change-request</strong></code>. A committer will examine your PR, commit the changes, and close the PR.</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.4 Keep Your Ports up to Date</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>This section outlines the process to follow to keep your ports up to date.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>This is an overview. More information about upgrading a port is available in the <a href="https://download.freebsd.org/ftp/doc/en/books/porters-handbook/book.pdf" target="_blank" rel="noreferrer noopener">Porter&#8217;s Handbook</a>.</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list" type="1">
	<li><strong>Watch for updates</strong>: Monitor the upstream vendor for new versions, updates and security fixes for the software. Announcement mailing lists or news web pages are useful for doing this. Sometimes users will contact you and ask when your port will be updated. If you are busy with other things, or for any reason just cannot update it at the moment, ask if they will help you by submitting an update. You may also receive automated email from the <code><strong>FreeBSD Ports Version Check</strong></code> informing you that a newer version of your port&#8217;s distfile is available. More information about that system (including how to stop future emails) will be provided in the message.</li>
	<li><strong>Incorporate changes</strong>: When they become available, incorporate the changes into the port. You need to be able to generate a patch between the original port and your updated port.</li>
	<li><strong>Review and test</strong>: Thoroughly review and test your changes:

<ul>
	<li>Build, install and test your port on as many platforms and architectures as you can. It is common for a port to work on one branch or platform and fail on another.</li>
	<li>Make sure your port&#8217;s dependencies are complete. The recommended way of doing this is by installing your own ports tinderbox.</li>
	<li>Check that the packing list is up to date. This involves adding in any new files and directories and removing unused entries.</li>
	<li>Verify your port using <a href="https://www.freebsd.org/cgi/man.cgi?query=portlint&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">portlint(1)</a> as a guide.</li>
	<li>Consider whether changes to your port might cause any other ports to break. If this is the case, coordinate the changes with the maintainers of those ports. This is especially important if your update changes the shared library version; in this case, at the very least, the dependent ports will need to get a <code><strong>PORTREVISION</strong></code> bump so that they will automatically be upgraded by automated tools such as portmaster or <a href="https://www.freebsd.org/cgi/man.cgi?query=portupgrade&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">portupgrade(1)</a>.</li>
</ul>
</li>
	<li><strong>Submit changes</strong>: Send your update by submitting a PR with an explanation of the changes and a patch containing the differences between the original port and the updated one. <strong>Note:</strong> Please do not submit a <a href="https://www.freebsd.org/cgi/man.cgi?query=shar&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">shar(1)</a> archive of the entire port; instead, use <a href="https://www.freebsd.org/cgi/man.cgi?query=diff&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">diff(1)</a> <code><strong>-ruN</strong></code>. In this way, committers can much more easily see exactly what changes are being made.</li>
	<li><strong>Wait</strong>: At some stage a committer will deal with your PR. It may take minutes, or it may take weeks — so please be patient. If you don&#8217;t receive feedback, it may simply that the committer had none, or that it was missed.</li>
	<li><strong>Give feedback</strong>: If a committer finds a problem with your changes, they will most likely refer it back to you. A prompt response will help get your PR committed faster, and is better for maintaining a thread of conversation when trying to resolve any problems.</li>
	<li><strong>And Finally</strong>: Your changes will be committed and your port will have been updated. The PR will then be closed by the committer.</li>
</ol>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.5 Ensure Your Ports Continue to Build Correctly</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>FreeBSD only guarantees that the Ports Collection works on the <code><strong>-STABLE</strong></code> branches. In theory, you should be able to get by with running the latest release of each stable branch but if you can run the branch, that is even better.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Since the majority of FreeBSD installations run on PC-compatible machines (what is termed the <code><strong>i386</strong></code> architecture), we expect you to keep the port working on that architecture. We prefer that ports also work on the <strong><code>amd64</code> </strong>architecture running native. It is completely fair to ask for help if you do not have one of these machines.</p>
<p></section>
<section class="block block-core-heading"></p>
<h5 class="wp-block-heading"><strong>Note</strong>: </h5>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The usual failure modes for non<strong>&#8211;<code>x86</code></strong> machines are that the original programmers assumed that, for instance, pointers are <strong><code>int</code>s</strong>, or that a relatively lax older <strong>gcc</strong> compiler was being used. More and more, application authors are reworking their code to remove these assumptions — but if the author is not actively maintaining their code, you may need to do this yourself.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>These are the tasks you need to perform to ensure your port is able to be built:</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list" type="1">
	<li><strong>Watch for build failures</strong>: Check your mail for mail from <code><strong>pkg-fallout@FreeBSD.org</strong></code> and the <a href="http://portscout.freebsd.org/">distfiles scanner</a> to see if any of the port which are failing to build are out of date.</li>
	<li><strong>Collect information</strong>: Once you are aware of a problem, collect information to help you fix it. Build errors reported by <code><strong>pkg-fallout</strong></code> are accompanied by logs which will show you where the build failed. If the failure was reported to you by a user, ask them to send you information which may help in diagnosing the problem, such as:

<ul>
	<li>Build logs</li>
	<li>The commands and options used to build the port (including options set in <code><strong>/etc/make.conf</strong></code>)</li>
	<li>A list of packages installed on their system as shown by <a href="https://www.freebsd.org/cgi/man.cgi?query=pkg-info&amp;sektion=8&amp;manpath=freebsd-release-ports">pkg-info(8)</a></li>
	<li>The version of FreeBSD they are running as shown by <a href="https://www.freebsd.org/cgi/man.cgi?query=uname&amp;sektion=1&amp;manpath=freebsd-release-ports">uname(1)</a><code><strong> -a</strong></code></li>
	<li>When their ports collection was last updated</li>
	<li>When their ports tree and <code><strong>INDEX</strong></code> was last updated</li>
</ul>
</li>
	<li><strong>Investigate and find a solution</strong>: Unfortunately there is no straightforward process to follow to do this. If you are stuck, ask for help! The <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-ports">FreeBSD ports mailing list</a> is a good place to start, and the upstream developers are often very helpful.</li>
	<li><strong>Submit changes</strong>: Just as with updating a port, you should now incorporate changes, review and test, submit your changes in a PR, and provide feedback if required.</li>
	<li><strong>Send patches to upstream authors</strong>: In some cases, you will have to make patches to the port to make it run on FreeBSD. Some (but not all) upstream authors will accept such patches back into their code for the next release. If so, this may even help their users on other BSD-based systems as well and perhaps save duplicated effort. Please consider sending any applicable patches to the authors as a courtesy.</li>
</ol>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.6 Investigate Bug Reports and PRs Related to Your Port</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>FreeBSD-specific bugs are generally caused by assumptions about the build and runtime environments that do not apply to FreeBSD. You are less likely to encounter a problem of this type, but it can be more subtle and difficult to diagnose.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>These are the tasks you need to perform to ensure your port continues to work as intended:</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list" type="1">
	<li><strong>Respond to bug reports: </strong>Bugs may be reported to you through email via the <a href="https://bugs.freebsd.org/search/" target="_blank" rel="noreferrer noopener">Problem Report database</a>. Bugs may also be reported directly to you by users. You should respond to PRs and other reports within 14 days, but please try not to take that long. Try to respond as soon as possible, even if it is just to say you need some more time before you can work on the PR. If you have not responded after 14 days, any committer may commit from a PR that you have not responded to via a <code>maintainer-timeout</code>.</li>
	<li><strong>Collect information</strong>: If the person reporting the bug has not also provided a fix, you need to collect the information that will allow you to generate one. If the bug is reproducible, you can collect most of the required information yourself. If not, ask the person who reported the bug to collect the information for you, such as:

<ul>
	<li>A detailed description of their actions, expected program behavior and actual behavior</li>
	<li>Copies of input data used to trigger the bug</li>
	<li>Information about their build and execution environment — for example, a list of installed packages and the output of <a href="https://www.freebsd.org/cgi/man.cgi?query=env&amp;sektion=1&amp;manpath=freebsd-release-ports">env(1)</a></li>
	<li>Core dumps</li>
	<li>Stack traces</li>
</ul>
</li>
	<li><strong>Eliminate incorrect reports</strong>: Some bug reports may be incorrect. For example, the user may have simply misused the program; or their installed packages may be out of date and require updating. Sometimes a reported bug is not specific to FreeBSD. In this case report the bug to the upstream developers. If the bug is within your capabilities to fix, you can also patch the port so that the fix is applied before the next upstream release.</li>
	<li><strong>Find a solution</strong>: As with build errors, you will need to sort out a fix to the problem. Again, remember to ask if you are stuck!</li>
	<li><strong>Submit or approve changes</strong>: Just as with updating a port, you should now incorporate changes, review and test, and submit your changes in a PR (or send a follow-up if a PR already exists for the problem). If another user has submitted changes in the PR, you can also send a follow-up saying whether or not you approve the changes.</li>
</ol>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.7 Providing Support</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Part of being a maintainer is providing support — not for the software in general — but for the port and any FreeBSD-specific quirks and problems. Users may contact you with questions, suggestions, problems and patches. Most of the time their correspondence will be specific to FreeBSD.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Occasionally you may have to point users seeking general support to the appropriate resources. Less frequently you will encounter a person asking why the <code>RPM</code>s are not up to date or how can they get the software to run under Foo Linux. Take the opportunity to tell them that your port is up to date, and suggest that they try FreeBSD.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Sometimes users and developers will spend time assisting you and your port. They may:</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>Submit a PR or send you patches to update your port</li>
	<li>Investigate and perhaps provide a fix to a PR</li>
	<li>Otherwise submit changes to your port</li>
</ul>
<p></section>
<section class="block block-core-paragraph"></p>
<p>In these cases, your main obligation is to respond in a timely manner. Again, the timeout for non-responsive maintainers is 14 days. After this period changes may be committed unapproved. They have taken the trouble to do this for you; so please try to at least respond promptly. Then review, approve, modify or discuss their changes with them as soon as possible.</p>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="wp-block-heading">3.8 Resources for Ports Maintainers and Contributors</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook" target="_blank" rel="noreferrer noopener">Porter&#8217;s Handbook</a> is your hitchhiker&#8217;s guide to the ports system. Keep it handy!</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <a href="https://bugs.freebsd.org/bugzilla/query.cgi" target="_blank" rel="noreferrer noopener">Problem Report database</a>.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <a href="http://portsmon.freebsd.org/" target="_blank" rel="noreferrer noopener">FreeBSD Ports Monitoring System</a> can show you cross-referenced information about ports such as build errors and problem reports. If you are a maintainer you can use it to check on the build status of your ports. As a contributor you can use it to find broken and unmaintained ports that need to be fixed.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <a href="http://portscout.freebsd.org/" target="_blank" rel="noreferrer noopener">FreeBSD Ports distfile scanner</a> can show you ports for which the distfiles are not fetchable. You can check on your own ports or use it to find ports that need their <code><strong>MASTER_SITES</strong></code> updated.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><a href="https://www.freebsd.org/cgi/url.cgi?ports/ports-mgmt/poudriere/pkg-descr" target="_blank" rel="noreferrer noopener">ports-mgmt/poudriere</a> is the most thorough way to test a port through the entire cycle of installation, packaging, and deinstallation. Documentation is located at the <a href="https://github.com/freebsd/poudriere" target="_blank" rel="noreferrer noopener">poudriere github repository</a></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><a href="https://www.freebsd.org/cgi/man.cgi?query=portlint&amp;sektion=1&amp;manpath=freebsd-release-ports" target="_blank" rel="noreferrer noopener">portlint(1)</a> is an application which can be used to verify that your port conforms to many important stylistic and functional guidelines. portlint is a simple heuristic application, so you should use it <em>only as a guide</em>. If portlint suggests changes which seem unreasonable, consult the <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook" target="_blank" rel="noreferrer noopener">Porter&#8217;s Handbook</a> or ask for advice.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-ports" target="_blank" rel="noreferrer noopener">FreeBSD ports mailing list</a> is for general ports-related discussion. It is a good place to ask for help. You can <a href="https://lists.freebsd.org/mailman/listinfo" target="_blank" rel="noreferrer noopener">subscribe, or read and search the list archives</a>. Reading the archives of the <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs" target="_blank" rel="noreferrer noopener">FreeBSD ports bugs mailing list</a> and the <a href="http://lists.freebsd.org/mailman/listinfo/svn-ports-head" target="_blank" rel="noreferrer noopener">SVN commit messages for the ports tree for head/</a> may also be of interest.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="has-text-align-center wp-block-heading">Other Ways to Contribute</h2>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If you are looking for something interesting to get started, the FreeBSD Project has several Wiki pages containing areas within which new contributors can get ideas on how to get started.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <a href="https://wiki.freebsd.org/JuniorJobs" target="_blank" rel="noreferrer noopener">Junior Jobs</a> page lists current projects that may interest people new to FreeBSD, these can be great way to acquaint oneself with the project.</p>
<p></section><section class="block block-classic-editor"></p></section><p>The post <a href="https://staging.freebsdfoundation.org/resource/contributing-to-freebsd-as-a-programmer/">Contributing to FreeBSD as a Programmer</a> first appeared on <a href="https://staging.freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Submit a Bug Report</title>
		<link>https://staging.freebsdfoundation.org/resource/how-to-submit-a-bug-report/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Mon, 15 Aug 2022 18:23:16 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11557</guid>

					<description><![CDATA[<p>One of the easiest ways to get involved with the FreeBSD Project is through the submission of bug reports. A bug report can be about any component of FreeBSD, including problems with the operating system programs, a mistake in the documentation, or a new feature that the submitter wishes to see incorporated. This guide will focus on the process of using the Bugzilla form to report bugs and changes.</p>
<p>The post <a href="https://staging.freebsdfoundation.org/resource/how-to-submit-a-bug-report/">How to Submit a Bug Report</a> first appeared on <a href="https://staging.freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor"><p></section><section class="block block-core-paragraph"></p>
<p><strong>Updated: June 2, 2021</strong></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>One of the easiest ways to get involved with the FreeBSD Project is through the submission of bug reports. A bug report can be about any component of FreeBSD, including problems with the operating system programs, a mistake in the documentation, or a new feature that the submitter wishes to see incorporated.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>General ideas and suggestions should be sent to the <a href="http://lists.freebsd.org/mailman/listinfo/freebsd-hackers" target="_blank" rel="noreferrer noopener">FreeBSD technical discussions mailing list</a>. Bugs and <em>specific</em> changes can be submitted through the <a href="https://bugs.freebsd.org/bugzilla/enter_bug.cgi" target="_blank" rel="noreferrer noopener">bug submission form</a>.<br />
<br />
This guide will focus on the process of using the Bugzilla form to report bugs and changes.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h3 class="wp-block-heading">1. When to Submit a Bug Report:</h3>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Before submitting a bug report, make sure that a bug report is the right course of action. There are still many cases where submitting a problem report is clearly <em>not</em> the right course of action, and will only serve to frustrate both the submitter and the developers. Below are a couple examples of cases which may <strong>not</strong> be worth a bug report:</p>
<p></section>
<section class="block block-core-heading"></p>
<h5 class="has-text-align-center wp-block-heading">Questions:</h5>
<p></section>
<section class="block block-core-paragraph"></p>
<p>As a general rule, the problem is <em>not </em>a bug if it can be expressed as a question (&#8220;How do I do X?&#8221; or &#8220;Where can I find Y&#8221;). While some cases might be worthy of a bug report, consider using the <a href="https://lists.freebsd.org/mailman/listinfo/freebsd-questions" target="_blank" rel="noreferrer noopener">FreeBSD general questions mailing list</a> to pose the question before submitting a bug report. This will help make sure that questions are filtered through the correct channels.</p>
<p></section>
<section class="block block-core-heading"></p>
<h5 class="has-text-align-center wp-block-heading">Ports/Other Software</h5>
<p></section>
<section class="block block-core-paragraph"></p>
<p>While submitting bug reports for ports or software not part of FreeBSD itself, consider the following:</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>Please do not submit problem reports that about updated versions of applications. Ports maintainers are automatically notified by portscout when a new version of an application becomes available. A patch to update that port to the newest version, however, would be welcome.</li>
</ul>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>For unmaintained ports (<code>MAINTAINER</code> is <code>ports@FreeBSD.org</code>), a PR without an included patch is unlikely to get picked up by a committer. To become the maintainer of an unmaintained port, submit a PR with the request (patch preferred but not required).</li>
</ul>
<p></section>
<section class="block block-core-heading"></p>
<h5 class="has-text-align-center wp-block-heading">Non Reproducible Bugs</h5>
<p></section>
<section class="block block-core-paragraph"></p>
<p>While running into a bug that cannot be reproduced can be annoying, these rarely can be fixed. If the bug only occurred once and you cannot reproduce it, and it does not seem to happen to anybody else, chances are none of the developers will be able to reproduce it or figure out what is wrong. Often these kinds of bugs are caused by a failing hard drive or overheated processor, try to rule these out before submitting a bug report.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h3 class="wp-block-heading">2. Who Should the Report be Filed to?</h3>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The software that makes up FreeBSD is a collection of several different elements, making sure that the bug report is sent to the correct developers to ensure it is fixed quickly.</p>
<p></section>
<section class="block block-core-group"></p>
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow"><section class="block block-core-group">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow"><section class="block block-core-list">
<ul class="wp-block-list">
	<li>Code in the base system that is written and maintained by FreeBSD contributors, such as the kernel, the C library, and the device drivers (categorized as <code>kern</code>); the binary utilities (<code>bin</code>); the manual pages and documentation (<code>docs</code>); and the web pages (<code>www</code>). All bugs in these areas should be reported to the FreeBSD developers.</li>
</ul>
</section>
<section class="block block-core-list">
<ul class="wp-block-list">
	<li>Code in the base system that is written and maintained by others, and imported into FreeBSD and adapted. Examples include <a href="https://www.freebsd.org/cgi/man.cgi?query=clang&amp;sektion=1&amp;manpath=freebsd-release-ports">clang(1)</a>, and <a href="https://www.freebsd.org/cgi/man.cgi?query=sendmail&amp;sektion=8&amp;manpath=freebsd-release-ports">sendmail(8)</a>. Most bugs in these areas should be reported to the FreeBSD developers; but in some cases they may need to be reported to the original authors instead if the problems are not FreeBSD-specific.</li>
</ul>
</section>
<section class="block block-core-list">
<ul class="wp-block-list">
	<li>Individual applications that are not in the base system but are instead part of the FreeBSD Ports Collection (category <code>ports</code>). Most of these applications are not written by FreeBSD developers; what FreeBSD provides is merely a framework for installing the application. Therefore, only report a problem to the FreeBSD developers when the problem is believed to be FreeBSD-specific; otherwise, report it to the authors of the software.</li>
</ul>
</section></div></div>
</section></div></div>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h3 class="wp-block-heading">3. Extra Considerations</h3>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>It is not possible for FreeBSD to fix problems in anything other than certain recent branches of the base system, so filing a bug report about an older version will probably only result in a developer advising you to upgrade to a supported version to see if the problem still recurs. The Security Officer team maintains the <a href="https://www.freebsd.org/security/">list of supported versions</a>.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Always do a background search before submitting a bug report. The bug may have already been reported or is being discussed on a mailing list. Therefore, you should check these places before submitting. These include:</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list">
	<li>The FreeBSD <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/index.html">Frequently Asked Questions</a> (FAQ) list. The FAQ attempts to provide answers for a wide range of questions, such as those concerning <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/hardware.html">hardware compatibility</a>, <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/applications.html">user applications</a>, and <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/kernelconfig.html">kernel configuration</a>.</li>
	<li>The <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/eresources.html#ERESOURCES-MAIL">mailing lists</a>—if you are not subscribed, use <a href="https://www.freebsd.org/search/search.html#mailinglists">the searchable archives</a> on the FreeBSD website.</li>
	<li>Optionally, the entire web—use your favorite search engine to locate any references to the problem.</li>
	<li>Next, the searchable <a href="https://bugs.freebsd.org/bugzilla/query.cgi">FreeBSD PR database</a> (Bugzilla). Unless the problem is recent or obscure, there is a fair chance it has already been reported.</li>
	<li>Most importantly, attempt to see if existing documentation in the source base addresses your problem. For the base FreeBSD code, you should carefully study the contents of <code>/usr/src/UPDATING</code> on your system or the latest version at <code><a href="https://svnweb.freebsd.org/base/head/UPDATING?view=log">https://svnweb.freebsd.org/base/head/UPDATING?view=log</a></code>. (This is vital information if you are upgrading from one version to another—especially if you are upgrading to the FreeBSD-CURRENT branch). However, if the problem is in something that was installed as a part of the FreeBSD Ports Collection, you should refer to <code>/usr/ports/UPDATING</code> (for individual ports) or <code>/usr/ports/CHANGES</code> (for changes that affect the entire Ports Collection). <code><a href="https://svnweb.freebsd.org/ports/head/UPDATING?view=log">https://svnweb.freebsd.org/ports/head/UPDATING?view=log</a></code> and <code><a href="https://svnweb.freebsd.org/ports/head/CHANGES?view=log">https://svnweb.freebsd.org/ports/head/CHANGES?view=log</a></code> are also available via svnweb.</li>
</ol>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h3 class="wp-block-heading">4. Submitting the Bug Report</h3>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Bug reports will use the <a title="https://bugs.freebsd.org/bugzilla/enter_bug.cgi" href="https://bugs.freebsd.org/bugzilla/enter_bug.cgi" target="_blank" rel="noreferrer noopener">bugzilla web form.</a> To submit a bug report, an account will need to be created. Select the category that the bug falls under, then fill out the form.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The following fields will need to be filled out:</p>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="757" height="27" class="wp-image-8792" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105356.png" alt="" srcset="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105356.png 757w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105356-300x11.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></figure>
<p></section></div>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li><strong>Summary:</strong> A short and specific description of the bug. This will be used as the subject of the bug report email. Obscure summaries tend to be ignored.</li>
</ul>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="231" height="80" class="wp-image-8794" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105426.png" alt="" /></figure>
<p></section></div>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li><strong>Severity: </strong>Choose between one of <code>Affects only me</code>, <code>Affects some people</code>, or <code>Affects many people.</code> Make sure to be realistic with this and only mark it as <code>Affects many people</code> if it really does.</li>
</ul>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="543" height="127" class="wp-image-8795" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105657.png" alt="" srcset="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105657.png 543w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105657-300x70.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></figure>
<p></section></div>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li><strong>Component:</strong> Choose the appropriate category. Figure out what part of the system contains the bug. Remember, FreeBSD is a complete operating system, which installs both a kernel, the standard libraries, many peripheral drivers, and a large number of utilities (the “base system”). However, there are thousands of additional applications in the Ports Collection. Here&#8217;s a list of possible categories:

<ol>
	<li>If a problem is with the kernel, the libraries (such as standard C library <code>libc</code>), or a peripheral driver in the base system, in general you will use the <code>kern</code> category. (There are a few exceptions; see below). In general these are things that are described in section 2, 3, or 4 of the manual pages.</li>
	<li>If a problem is with a binary program such as <a href="https://www.freebsd.org/cgi/man.cgi?query=sh&amp;sektion=1&amp;manpath=freebsd-release-ports">sh(1)</a> or <a href="https://www.freebsd.org/cgi/man.cgi?query=mount&amp;sektion=8&amp;manpath=freebsd-release-ports">mount(8)</a>, you will first need to determine whether these programs are in the base system or were added via the Ports Collection. If you are unsure, you can do <code>whereis <em>programname</em></code>. FreeBSD&#8217;s convention for the Ports Collection is to install everything underneath <code>/usr/local</code>, although this can be overridden by a system administrator. For these, you will use the <code>ports</code> category (yes, even if the port&#8217;s category is <code>www</code>; see below). If the location is <code>/bin</code>, <code>/usr/bin</code>, <code>/sbin</code>, or <code>/usr/sbin</code>, it is part of the base system, and you should use the <code>bin</code> category. These are all things that are described in section 1 or 8 of the manual pages.</li>
	<li>If you believe that the error is in the startup <code>(rc)</code> scripts, or in some kind of other non-executable configuration file, then the right category is <code>conf</code> (configuration). These are things that are described in section 5 of the manual pages.</li>
	<li>If you have found a problem in the documentation set (articles, books, man pages) or website the correct choice is <code>docs</code>.</li>
</ol>
</li>
	<li>There are a few more specialized categories.

<ul>
	<li>If the problem would otherwise be filed in <code>kern</code> but has to do with the USB subsystem, the correct choice is <code>usb</code>.</li>
	<li>If the problem would otherwise be filed in <code>kern</code> but has to do with the threading libraries, the correct choice is <code>threads</code>.</li>
	<li>If the problem would otherwise be in the base system, but has to do with our adherence to standards such as POSIX®, the correct choice is <code>standards</code>.</li>
	<li>If you are convinced that the problem will only occur under the processor architecture you are using, select one of the architecture-specific categories: commonly <code>i386</code> for Intel-compatible machines in 32-bit mode; <code>amd64</code> for AMD machines running in 64-bit mode (this also includes Intel-compatible machines running in EMT64 mode); and less commonly <code>arm</code> or <code>powerpc</code>.</li>
</ul>
<ul>
	<li>If you really do not know where the problem lies (or the explanation does not seem to fit into the ones above), use the <code>misc</code> category.</li>
</ul>
</li>
</ul>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="200" height="98" class="wp-image-8796" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-105715.png" alt="" /></figure>
<p></section></div>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li><strong>Version:</strong> Choose the environment where the bug was observed. Include the operating system and version, the version of the specific program or file where the bug occurred in the description below.</li>
</ul>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" class="wp-image-8797" src="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-111148.png" alt="" width="580" height="157" srcset="https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-111148.png 688w, https://staging.freebsdfoundation.org/wp-content/uploads/2020/11/Screenshot-2020-11-09-111148-300x82.png 300w" sizes="(max-width: 580px) 100vw, 580px" /></figure>
<p></section></div>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li><strong>Description: </strong>Describe the bug you are experiencing. Unless you are absolutely certain, avoid speculation on what may be causing the issue. The description should include steps to replicate the issues, as well as any workarounds that you discovered. This is important because it may help other people with the same issue or help a developer figure out the cause.</li>
</ul>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h3 class="wp-block-heading">5. Following Up</h3>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Once the problem report has been filed, you will receive a confirmation by email which will include the tracking number that was assigned to your problem report and a URL you can use to check its status. With a little luck, someone will take an interest in your problem and try to address it, or, as the case may be, explain why it is not a problem. You will be automatically notified of any change of status, and you will receive copies of any comments or patches someone may attach to your problem report&#8217;s audit trail.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If someone requests additional information from you, or you remember or discover something you did not mention in the initial report, please submit a follow up. The number one reason for a bug not getting fixed is lack of communication with the originator. The easiest way is to use the comment option on the individual PR&#8217;s web page, which you can reach from the <a href="https://bugs.freebsd.org/bugzilla/query.cgi">PR search page</a>.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If the problem report remains open after the problem has gone away, just add a comment saying that the problem report can be closed, and, if possible, explaining how or when the problem was fixed.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Sometimes there is a delay of a week or two where the problem report remains untouched, not assigned or commented on by anyone. This can happen when there is an increased problem report backlog or during a holiday season. When a problem report has not received attention after several weeks, it is worth finding a committer particularly interested in working on it.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>There are a few ways to do so, ideally in the following order, with a few days between attempting each communication channel:</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>Find the relevant FreeBSD mailing list for the problem report from the <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/eresources.html#ERESOURCES-MAIL">list in the Handbook</a> and send a message to that list asking about assistance or comments on the problem report.</li>
	<li>Join the relevant IRC channels. A partial listing is here: <a href="https://wiki.freebsd.org/IrcChannels">https://wiki.freebsd.org/IrcChannels</a>. Inform the people in that channel about the problem report and ask for assistance. Be patient and stay in the channel after posting, so that the people from different time zones around the world have a chance to catch up.</li>
	<li>Find committers interested in the problem that was reported. If the problem was in a particular tool, binary, port, document, or source file, check the <a href="http://svnweb.freebsd.org/">SVN Repository</a>. Locate the last few committers who made substantive changes to the file, and try to reach them via IRC or email. A list of committers and their emails can be found in the <a href="https://www.freebsd.org/doc/en_US.ISO8859-1/articles/contributors">Contributors to FreeBSD</a> article.</li>
</ul>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Remember that these people are volunteers, just like maintainers and users, so they might not be immediately available to assist with the problem report. Patience and consistency in the follow-ups is highly advised and appreciated. With enough care and effort dedicated to that follow-up process, finding a committer to take care of the problem report is just a matter of time.</p>
<p></section><section class="block block-classic-editor"></p></section><p>The post <a href="https://staging.freebsdfoundation.org/resource/how-to-submit-a-bug-report/">How to Submit a Bug Report</a> first appeared on <a href="https://staging.freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Contributing FreeBSD Documentation</title>
		<link>https://staging.freebsdfoundation.org/resource/contributing-freebsd-documentation/</link>
		
		<dc:creator><![CDATA[Anne Dickison]]></dc:creator>
		<pubDate>Mon, 15 Aug 2022 18:19:41 +0000</pubDate>
				<guid isPermaLink="false">https://freebsdfoundation.org/?post_type=resource&#038;p=11555</guid>

					<description><![CDATA[<p>Quality documentation is crucial to the success of FreeBSD, submitting documentation is one of the easiest ways to contribute to the project and anyone is welcome to submit! Willingness to contribute is the only membership requirement.</p>
<p>The post <a href="https://staging.freebsdfoundation.org/resource/contributing-freebsd-documentation/">Contributing FreeBSD Documentation</a> first appeared on <a href="https://staging.freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></description>
										<content:encoded><![CDATA[<section class="block block-classic-editor"><p></section><section class="block block-core-paragraph"></p>
<p><strong>Updated: February 5, 2022</strong></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Quality documentation is crucial to the success of FreeBSD, submitting documentation is one of the easiest ways to contribute to the project and anyone is welcome to submit! Willingness to contribute is the only membership requirement.</p>
<p></section>
<div class="wp-block-image"><section class="block block-core-image"></p>
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="274" height="163" class="wp-image-9449" src="https://staging.freebsdfoundation.org/wp-content/uploads/2021/05/doc.jpg" alt="" /></figure>
<p></section></div>
<section class="block block-core-heading"></p>
<h2 class="has-text-align-center wp-block-heading">Documentation Quick-Guide</h2>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The first step to contribute is to subscribe to the <a href="https://lists.freebsd.org/mailman/listinfo/freebsd-doc" target="_blank" rel="noreferrer noopener">FreeBSD documentation project mailing list.</a> This is a fantastic resource for any questions or problems involving the documentation.</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list" type="1">
	<li>Install a few packages. The <a href="https://www.freebsd.org/cgi/url.cgi?ports/textproc/docproj/pkg-descr">textproc/docproj</a> meta-package installs all of the software needed to edit and build FreeBSD documentation, git is needed to obtain a working copy of the documentation and generate patches with, and python is helpful for work with the FreeBSD documentation<br />
<code><em># pkg install docproj git</em></code></li>
	<li>Install a local working copy of the documentation from the FreeBSD repository in <code>~/doc</code> (see <a title="The Working Copy" href="https://docs.freebsd.org/en/books/fdp-primer/working-copy/" target="_blank" rel="noreferrer noopener">Chapter 3, <em>The Working Copy</em></a>).<br />
<code><em>% git clone https://git.freebsd.org/doc</em></code>.<code><em>git ~/doc</em></code></li>
	<li>Configure the text editor:

<ul>
	<li>Word wrap set to 70 characters.</li>
	<li>Tab stops set to 2.</li>
	<li>Replace each group of 8 leading spaces with a single tab. Specific editor configurations are listed in <a href="https://docs.freebsd.org/en/books/fdp-primer/editor-config/">Chapter 15, <em>Editor Configuration</em></a>.</li>
</ul>
</li>
	<li>Update the local working copy:<br />
<code><em>% git pull --ff-only</em></code></li>
	<li>Edit the documentation files that require changes. If a file needs major changes, consult the mailing list for input. References to AsciiDoctor can be found in <a href="https://docs.freebsd.org/en/books/fdp-primer/asciidoctor-primer/" target="_blank" rel="noreferrer noopener">Chapter 6. AsciiDoctor Primer</a> and in the <a href="https://docs.asciidoctor.org/asciidoc/latest/" target="_blank" rel="noreferrer noopener">AsciiDoc Language Documentation Portal</a>.</li>
	<li><em>Always</em> build-test changes before submitting them. Running <strong><code>make</code></strong> in the top-level directory of the documentation being edited will generate that documentation in split HTML format.<br />
<em><code>% make</code></em></li>
	<li>When changes are complete and tested, generate a “diff file”:<br />
<em><code>% cd ~/doc <br />
% git diff</code></em> &gt; <em><code>bsdinstall.diff.txt</code></em><br />
Give the diff file a descriptive name.</li>
	<li>Submit the diff file using the web-based <a href="https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Documentation">Problem Report</a> system. If using the web form, enter a Summary of <code>[Patch]</code><em> </em><strong>short description of problem</strong>. Select the Component <strong>Documentation</strong>. In the <strong>Description</strong> field, enter a short description of the changes and any important details about them. Use the <code>[ Add an attachment ]</code> button to attach the diff file. Finally, use the <code>[ Submit Bug ]</code> button to submit your diff to the problem report system.</li>
</ol>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Optional Tools</h4>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>These applications are not required, but can make working on the documentation easier or add capabilities. Both editors include a special mode for editing documents with commands to reduce errors and typing.

<ul>
	<li>Vim (<a href="https://www.freebsd.org/cgi/url.cgi?ports/editors/vim/pkg-descr">editors/vim</a>),</li>
	<li>Emacs (<a href="https://www.freebsd.org/cgi/url.cgi?ports/editors/emacs/pkg-descr">editors/emacs</a>)</li>
</ul>
</li>
</ul>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">1. Editing and Maintaining a Working Copy</h2>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The <em>working copy</em> is a copy of the FreeBSD repository documentation tree downloaded onto the local computer. Changes are made to the local working copy, tested, and then submitted as patches to be committed to the main repository. A full copy of the documentation tree can occupy 700 megabytes of disk space. Allow for a full gigabyte of space to have room for temporary files and test versions of various output formats.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Manual Pages</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>FreeBSD documentation for commands and configuration files can be found within the manual page collection. These consist of two repositories: <em><code>doc</code></em> for books and articles, and <em><code>src </code></em>for operating system and manual pages. These repositories can contain multiple versions of documentation and source code.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>In order to edit manual pages, <code><em>src </em></code>will need to be checked out separately.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Choosing a Directory</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>FreeBSD documentation is traditionally stored in <code><em>/usr/doc/</em></code>, and system source code with manual pages in <code><em>/usr/src/</em></code>. These directory trees are relocatable, and users may want to put the working copies in other locations to avoid interfering with existing information in the main directories. The examples that follow use <em><code>~/doc</code> </em>and<em> <code>~/src</code></em>, both subdirectories of the user&#8217;s home directory.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Check Out a Copy</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>A download of a working copy from the repository is called a clone, this can be done with <code>git clone</code>. For example, to checkout the latest version (<em><code>head</code></em>) of the documentation tree.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><em><code>% git clone https://git.freebsd.org/doc.git ~./doc</code></em></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>And to checkout the source code for manual pages:</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><em><code>% git clone https://git.freebsd.org/src.git ~./src</code></em></p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Updating the Working Copy</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>The FreeBSD repository is frequently updated, even a short time after the initial checkout, changes may have already been made creating differences between the local working copy and the main FreeBSD repository. To update the local version, use <em><code>git pull</code></em> on the directory containing the local working copy. Getting into the habit of doing this often before editing document files will be helpful.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><code><em>% cd ~/doc</em></code><br />
<code><em>% git pull --ff-only</em></code></p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Reverting Changes</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Sometimes it turns out that changes were unnecessary, or the writer wants to start over. <em><code>git restore </code></em>can &#8220;reset&#8221; files to their unchanged form</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><em><code>% git restore filename</code></em></p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Making a Diff</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>After edits to a file or group of files are completed, the differences between the local working copy and the version on the FreeBSD repository must be collected into a single file for submission. These <em>diff</em> files are produced by redirecting the output of <code>git diff</code> into a file:</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p><em><code>%</code> <code>cd ~/doc</code> </em><br />
<em><code>%</code> <code>git diff</code> &gt; filename</em></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Give the file a meaningful name that identifies the contents. Thhttps://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/working-copy.htmlis will be important for identifying what type of change was made, and to what part of the tree.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>If the diff file is to be submitted with the web “<a href="https://bugs.freebsd.org/bugzilla/enter_bug.cgi">Submit a FreeBSD problem report</a>” interface, add a <code>.txt</code> extension to give the earnest and simple-minded web form a clue that the contents are plain text.</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">2. Documentation Build Process</h2>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Rendering AsciiDoc into Output</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Different types of output can be produced from a single AsciiDoc source file.</p>
<p></section>
<section class="block block-core-table"></p>
<figure class="wp-block-table is-style-stripes">
<table>
<thead>
<tr>
<th><strong>FORMATS  </strong></th>
<th>File Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>html</code></td>
<td>HTML</td>
<td>An <code>article </code>or <code>book </code>chapter.</td>
</tr>
<tr>
<td><code>pdf</code></td>
<td>PDF</td>
<td>Portable Document Format.</td>
</tr>
<tr>
<td><code>epub</code></td>
<td>EPUB</td>
<td>Electronic Publication file format.</td>
</tr>
</tbody>
</table>
</figure>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">FreeBSD Documentation Build Toolset</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>These are the tools used to build and install the FDP documentation.</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>The primary build tool is <a href="https://www.freebsd.org/cgi/man.cgi?query=make&amp;sektion=1&amp;manpath=freebsd-release-ports">make(1)</a>, specifically Berkeley Make.</li>
	<li>Hugo</li>
	<li>AsciiDoctor</li>
	<li>Git</li>
</ul>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Understanding Makefiles in the Documentation Tree</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>There are three main types of <code>Makefile</code>s in the FreeBSD Documentation Project tree.</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>The Makefile in the documentation directory will build only the documentation.</li>
	<li>The Makefile in the website directory will build only the website.</li>
	<li>The Makefile at the top of the tree will build both the documentation and the website.</li>
</ul>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Documentation Makefile</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>These <code>Makefiles </code>usually take this form: (Some contents have been removed for simplicity sake):</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><strong>MAINTAINER</strong>=carlavilla@FreeBSD.org 

<strong>ALL_LANGUAGES</strong>=	bn-bd da de el en es fr hu it ja ko mn nl pl pt-br ru tr zh-cn zh-tw

<strong>LOCALBASE</strong>?=	/usr/local

<strong>RUBY_CMD</strong> =	${LOCALBASE}/bin/ruby
<strong>HUGO_CMD</strong> =	${LOCALBASE}/bin/hugo
<strong>HUGO_ARGS</strong>?=	--verbose --minify
<strong>HUGO_OFFLINE_ARGS</strong>?= 	--environment offline --verbose --minify
<strong>ASCIIDOCTOR_CMD</strong>=	${LOCALBASE}/bin/asciidoctor
<strong>ASCIIDOCTORPDF_CMD</strong>=	${LOCALBASE}/bin/asciidoctor-pdf

<strong>                                                         .    .    .
</strong>
<strong>.ORDER</strong>: all run

<strong>.ORDER</strong>: requirements
<strong>.ORDER</strong>: starting-message
<strong>.ORDER</strong>: starting-message build
<strong>.ORDER</strong>: build

<strong>all</strong>: requirements starting-message generate-pgpkeys-txt build
<strong>run</strong>: requirements starting-message generate-pgpkeys-txt run-local

<strong>starting-message</strong>: .PHONY
	@echo ---------------------------------------------------------------
	@echo                   Building the documentation
	@echo  included languages: ${LANGUAGES}
	@echo  excluded languages: ${SKIP_LANGS}
	@echo ---------------------------------------------------------------

<strong>run-local</strong>: .PHONY
	HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \
		${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313"

<strong>build</strong>: .PHONY
	HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_ARGS}


</pre>
<p></section>
<section class="block block-core-table"></p>
<figure class="wp-block-table is-style-regular">
<table>
<tbody>
<tr>
<td>&nbsp;</td>
<td>The <strong><code>MAINTAINER</code> </strong>flag specifies who is the maintainer of this Makefile.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong><code>RUBY_CMD</code> </strong>flag specifies the location of the Ruby binary.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong><code>HUGO_CMD</code> </strong>flag specifies the location of the Hugo binary.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong><code>ASCIIDOCTOR_CMD</code> </strong>flag specifies the location of the AsciiDoctor binary.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong><code>ALL_LANGUAGES</code> </strong>flag specifies in which languages the documentation has to be generated.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><code>.</code><strong><code>ORDER</code> </strong>directives are used to ensure multiple make jobs may run without problem.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong><code>all</code> </strong>target builds the documentation and puts the result in ~/doc/documentation/public.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><strong><code>starting-message</code> </strong>shows a message in the CLI to show the user that the process is running.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><code><strong>run-local</strong></code> runs hugo webserver on port 1313, or a random free port if that is already in use.</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><code><strong>build</strong></code> builds the documentation and puts the result in the <code>~/doc/documentation/public.</code></td>
</tr>
</tbody>
</table>
</figure>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 class="has-text-align-center wp-block-heading">Website Makefile</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>These <code>Makefiles</code> share a similar format to documentation <code>Makefiles</code>, however, no <strong>languages</strong> tag is used.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Here is an example of the second half of a website <code>Makefile</code>:</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"><strong>.ORDER</strong>: all run

<strong>.ORDER</strong>: starting-message generate-releases
<strong>.ORDER</strong>: starting-message build
<strong>.ORDER</strong>: generate-releases build

<strong>all</strong>: starting-message generate-releases run 

<strong>starting-message</strong>: .PHONY 
	@echo ---------------------------------------------------------------
	@echo                   Building the website
	@echo ---------------------------------------------------------------

<strong>generate-releases</strong>: data/releases.toml

<strong>data/releases.toml</strong>:
	${RUBY_CMD} ./tools/releases-toml.rb

<strong>run-local</strong>: .PHONY
	HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \
	    ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313"

<strong>build</strong>: .PHONY 
	${HUGO_CMD}
</pre>
<p></section>
<section class="block block-core-table"></p>
<figure class="wp-block-table">
<table>
<tbody>
<tr>
<td><strong><code>all</code> </strong>target builds the website and puts the result in <code>~/doc/website/public.</code></td>
</tr>
<tr>
<td><code><strong>generate-releases</strong></code> calls the script used to convert from AsciiDoc variables to TOML variables. With this conversion, the releases variables can be used in AsciiDoc and in the Hugo custom templates.</td>
</tr>
<tr>
<td><strong><code>build</code> </strong>builds the website and puts the result in the <code>~/doc/website/public.</code></td>
</tr>
</tbody>
</table>
</figure>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h2 class="wp-block-heading">3. AsciiDoctor Primer</h2>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Most FDP documentation is written with AsciiDoc. This chapter explains what that means, how to read and understand the documentation source, and the techniques used. To get a complete reference of the AsciiDoctor capabilities please consult the <a href="https://docs.asciidoctor.org/home/">Asciidoctor documentation</a>. Some of the examples have been taken from the <a href="https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference">AsciiDoc Syntax Quick Reference</a>.<br />
<br />
</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 id="asciidoctor-headings" class="has-text-align-center wp-block-heading">Headings</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>AsciiDoctor supports six headings levels. If the document type is <code>article</code> only one level 0 (<code>=</code>) can be used. If the document type is <code>book</code> then there can be multiple level 0 (<code>=</code>) headings.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>This is an example of headings in an <code>article</code>.</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"> = Document Title (Level 0)

 == Level 1 Section Title

 === Level 2 Section Title

 ==== Level 3 Section Title

 ===== Level 4 Section Title

 ====== Level 5 Section Title

 == Another Level 1 Section Title</pre>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 id="asciidoctor-paragraphs" class="has-text-align-center wp-block-heading">Paragraphs</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>Paragraphs don’t require special markup in AsciiDoc. A paragraph is defined by one or more consecutive lines of text. To create a new paragraph leave one blank line.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>For example, this is a heading with two paragraphs.</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted"> = This is the heading

 This is the first paragraph.
 This is also the first paragraph.

 And this is the second paragraph.</pre>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 id="asciidoctor-lists" class="has-text-align-center wp-block-heading">Lists</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>AsciiDoctor supports a few types of lists, the most common are <code>ordered</code> and <code>unordered</code>. To get more information about lists, see <a href="https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#lists">AsciiDoc Syntax Quick Reference</a>.</p>
<p></section>
<section class="block block-core-paragraph"></p>
<p class="has-text-align-left"><strong>To create an ordered list use the <code>.</code> character.</strong></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>For example, this is an ordered list.</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted">. First item
. Second item
.. Subsecond item
. Third item</pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>And this would be rendered as.</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list">
	<li>First item</li>
	<li>Second item

<ol type="a">
	<li>Subsecond item</li>
</ol>
</li>
	<li>Third item</li>
</ol>
<p></section>
<section class="block block-core-paragraph"></p>
<p class="has-text-align-left"><strong>To create an unordered list use the <code>*</code> character.</strong></p>
<p></section>
<section class="block block-core-paragraph"></p>
<p>For example, this is an unordered list.</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted">* First item
* Second item
** Subsecond item
* Third item</pre>
<p></section>
<section class="block block-core-paragraph"></p>
<p>And this would be rendered as.</p>
<p></section>
<section class="block block-core-list"></p>
<ul class="wp-block-list">
	<li>First item</li>
	<li>Second item

<ul>
	<li>Subsecond item</li>
</ul>
</li>
	<li>Third item</li>
</ul>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-heading"></p>
<h4 id="asciidoctor-links" class="has-text-align-center wp-block-heading">Links</h4>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To point to another website the <code>link</code> macro should be used.</p>
<p></section>
<section class="block block-core-preformatted"></p>
<pre class="wp-block-preformatted">link:https://www.FreeBSD.org[FreeBSD]</pre>
<p></section>
<section class="block block-core-table"></p>
<figure class="wp-block-table">
<table>
<tbody>
<tr>
<td>&nbsp;</td>
<td>As the AsciiDoctor documentation describes, the <code>link</code> macro is not required when the target starts with a URL scheme like <code>https</code>. However, it is a good practice to do this anyway to ensure that AsciiDoctor renders the link correctly, especially in non-latin languages like Japanese.</td>
</tr>
</tbody>
</table>
</figure>
<p></section>
<section class="block block-core-paragraph"></p>
<p>To point to another book or article the AsciiDoctor variables should be used. For example, if we are in the <code>cups</code> article and we want to point to <code>ipsec-must</code> these steps should be used.</p>
<p></section>
<section class="block block-core-list"></p>
<ol class="wp-block-list">
	<li>Include the <code><em>urls.adoc</em></code> file from <code>~/doc/shared</code> folder.<br />
<code><em>include::shared/{lang}/urls.adoc[]</em></code></li>
	<li>Then create a link using the AsciiDoctor variable to the <code>ipsec-must</code> article.<br />
<em><code>extref:{ipsec-must}[IPSec-Must article]</code></em></li>
</ol>
<p></section>
<section class="block block-core-paragraph"></p>
<p>&nbsp;</p>
<p></section>
<section class="block block-core-spacer"></p>
<div class="wp-block-spacer" aria-hidden="true"> </div>
<p></section>
<section class="block block-core-paragraph"></p>
<p class="has-text-align-center">We hope this guide has served as a brief introduction to the process of submitting documentation, programmers should also check out our guide on <a href="https://staging.freebsdfoundation.org/contributing-to-freebsd-as-a-programmer/" target="_blank" rel="noreferrer noopener">Contributing to FreeBSD as a Programmer</a>.</p>
<p></section><section class="block block-classic-editor"></p></section><p>The post <a href="https://staging.freebsdfoundation.org/resource/contributing-freebsd-documentation/">Contributing FreeBSD Documentation</a> first appeared on <a href="https://staging.freebsdfoundation.org">FreeBSD Foundation</a>.</p>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
