Fixes in rules
This includes the FAQ as there is an FAQ about Rule 17.
This commit is contained in:
1 parent
b717062099
commit
da9064d95b
4 files changed
+335
-246
No files matched your search
@@ -922,7 +922,7 @@ FAQ on “<a href="#makefile">submission Makefiles</a>.</p>
|
||||
<div id="file_perms">
|
||||
<h3 id="q-0.6-what-permissions-may-my-files-be-and-what-if-i-need-different-permissions">Q 0.6: What permissions may my files be and what if I need different permissions?</h3>
|
||||
</div>
|
||||
<p>As <a href="next/rules.html#rule17">Rule 17</a> states, files in your submission tarball <strong>MUST</strong> be
|
||||
<p>Files in your submission tarball <strong>MUST</strong> be
|
||||
specific permissions. In particular: directories <strong>MUST</strong> be <code>drwxr-xr-x</code> (i.e.
|
||||
<code>0755</code>), the optional files, <code>try.sh</code> or <code>try.alt.sh</code>, if provided, <strong>MUST</strong> be
|
||||
<code>-r-xr-xr-x</code> (i.e. <code>0555</code>) and all other files <strong>MUST</strong> be <code>-r--r--r--</code> (i.e.
|
||||
@@ -931,6 +931,9 @@ specific permissions. In particular: directories <strong>MUST</strong> be <code>
|
||||
the appropriate place in your Makefile. See the
|
||||
FAQ on “<a href="#makefile">submission Makefile</a>”
|
||||
for more details.</p>
|
||||
<p>See the
|
||||
FAQ on “<a href="#rule17">Rule 17</a>”
|
||||
and <a href="next/rules.html#rule17">Rule 17</a> itself.</p>
|
||||
<p>Do remember that if your submission requires different filenames, then you
|
||||
<strong>MUST</strong> make a <strong>COPY</strong> of them in your <code>Makefile</code>. See also <a href="next/rules.html#rule11">Rule
|
||||
11</a>.</p>
|
||||
@@ -1114,10 +1117,11 @@ as how you them to help write you submission in your <code>remarks.md</code> fil
|
||||
<p>The following are the details behind <a href="next/rules.html#rule17">Rule 17</a>.</p>
|
||||
<h3 id="tldr-rule-17---use-mkiocccentry1">TL;DR Rule 17 - Use <code>mkiocccentry(1)</code></h3>
|
||||
<p class="leftbar">
|
||||
This is a <strong>COMPLEX</strong> rule. <strong>Violating this rule will cause your submission to REJECTED!</strong>
|
||||
To help you avoid such a rejection, you are <strong>HIGHLY ENCOURAGED</strong> to use the <code>mkiocccentry(1)</code> tool,
|
||||
based on the latest release of the <a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry repo</a>,
|
||||
to form your submission’s xz compressed tarball.
|
||||
This is a <strong>COMPLEX</strong> rule. <strong>Violating this rule will cause your submission to
|
||||
be REJECTED!</strong> To help you avoid such a rejection, you are <strong>HIGHLY ENCOURAGED</strong>
|
||||
to use the <code>mkiocccentry(1)</code> tool, based on the latest release of the
|
||||
<a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry repo</a>, to form your
|
||||
submission’s xz compressed tarball.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
The <a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry repo</a>
|
||||
@@ -1153,17 +1157,6 @@ additional details of each tool, see its man page, and in some cases, the <a hre
|
||||
guidelines</a>.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
There is no need to use <code>jparse(1)</code> but the <code>jparse(3)</code> library
|
||||
library will be linked when compiling the tools as they use various functions
|
||||
provided by it, and <code>chkentry</code> uses the JSON parser API as well.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
Of course you <strong>may</strong> invoke <code>jparse(1)</code> if you wish to validate a JSON file but
|
||||
the only JSON files you might want to validate for the IOCCC are validated
|
||||
by <code>chkentry(1)</code>, and that is what you should use to make sure you conform to
|
||||
this rule.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
The maximum number of <strong>extra files</strong> is 31. See the <a href="#max-files">maximum number of extra
|
||||
files section</a> below for finer details and the
|
||||
FAQ on “<a href="#extra-files">including additional files</a>”
|
||||
@@ -1175,6 +1168,10 @@ Extra files are defined as files that are not the required files (<code>prog.c</
|
||||
and <code>.auth.json</code>) and files that are also not the optional files (<code>try.sh</code>,
|
||||
<code>prog.alt.c</code> and <code>try.alt.sh</code>).
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
<strong>NOTE</strong>: optional filenames are only optional if they are in the submission top
|
||||
level directory.
|
||||
</p>
|
||||
<p>Jump to: <a href="#">top</a></p>
|
||||
<h3 id="rule-17---the-complex-details">Rule 17 - The COMPLEX details</h3>
|
||||
<p class="leftbar">
|
||||
@@ -1186,7 +1183,7 @@ The xz compressed tarball filename must be of the form:
|
||||
<a href="https://en.wikipedia.org/wiki/Universally_unique_identifier">UUID</a></strong> (see
|
||||
<a href="https://datatracker.ietf.org/doc/html/rfc9562">RFC 9562</a> for
|
||||
details), and where <em><code>slot_num</code></em> is a single decimal digit integer
|
||||
(i.e., >= <code>0</code> and < <code>9</code>).
|
||||
(i.e., >= <code>0</code> and <= <code>9</code>).
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
In particular, <code>username</code> is in the form of:
|
||||
@@ -1245,12 +1242,13 @@ and the <a href="https://spec.commonmark.org/current/">CommonMark Spec</a>.
|
||||
<p class="leftbar">
|
||||
The <code>.auth.json</code> file is created by <code>mkiocccentry(1)</code> and it holds information
|
||||
about the author(s) of the submission. It will <strong>ONLY</strong> be looked at if your
|
||||
submission wins but it <strong>MUST</strong> still be valid according to <code>chkentry(1)</code>.
|
||||
submission wins but it <strong>MUST</strong> still be valid according to <code>jparse(3)</code> <strong>AND</strong>
|
||||
<code>chkentry(1)</code>.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
The <code>.info.json</code> file is created by <code>mkiocccentry(1)</code> and it holds information
|
||||
about the submission itself. It also <strong>MUST</strong> be valid according to
|
||||
<code>chkentry(1)</code>.
|
||||
about the submission itself. It also <strong>MUST</strong> be valid according to <strong>BOTH</strong>
|
||||
<code>jparse(3)</code> <strong>AND</strong> <code>chkentry(1)</code>.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
For the complete <code>mkiocccentry(1)</code> process, see the
|
||||
@@ -1262,6 +1260,9 @@ any other tool detects <strong>ANY</strong> problem, you are <strong>HIGHLY</str
|
||||
and try again.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
On the other hand, some issues are errors and you <strong>MUST</strong> fix those).
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
If you do use <code>mkiocccentry(1)</code> and you run into a problem, you might see the
|
||||
FAQ on “<a href="#questions">how to ask a question about the IOCCC rules, guidelines and
|
||||
tools</a>”.
|
||||
@@ -1273,10 +1274,15 @@ page</a>.
|
||||
The xz compressed tarball file <strong>MUST</strong> be <= <strong>3999971</strong> octets in size.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
When your submission’s xz compressed tarball is uncompressed,
|
||||
the total size of your submission (the sum of the size of the program,
|
||||
hints, comments, build and info files) <strong>MUST</strong> be <=
|
||||
<strong>28314624</strong> octets (<strong>27651K</strong>) in size.
|
||||
When your submission’s xz compressed tarball is uncompressed, the total size of
|
||||
your submission (the sum of the size of the program source code,
|
||||
remarks/comments, Makefile and all other files) <strong>MUST</strong> be <= <strong>28314624</strong>
|
||||
octets (<strong>27651K</strong>) in size.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
One of the many checks <code>txzchk(1)</code> performs is summing up the total size. Of
|
||||
course if you manipulate the tarball to get past this you risk violating this
|
||||
rule.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
Your submission’s xz compressed tarball <strong>MUST</strong> pass the <code>txzchk(1)</code> test. See
|
||||
@@ -1296,13 +1302,14 @@ more details on this tool and the <a href="https://github.com/ioccc-src/mkioccce
|
||||
repo</a>.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
Your entry may have subdirectories, depending on the depth and total length of
|
||||
the filenames. Certain directories like <code>.git</code>, <code>RCCS</code>, <code>CVS</code> and <code>.svn</code> are
|
||||
skipped. For more information, see the <a href="next/guidelines.html">guidelines</a>.
|
||||
Your entry <strong>MAY</strong> have subdirectories, depending on the depth and total length of
|
||||
the filenames. Certain directories like <code>.git</code>, <code>RCCS</code>, <code>CVS</code> and <code>.svn</code>
|
||||
(amongst others) are skipped. For more information, see the
|
||||
<a href="next/guidelines.html">guidelines</a>.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
Filenames in your entry (that is, not including the files generated by the
|
||||
<code>mkiocccentry(1)</code> tool or the tools it or any other tool invokes) <strong>MUST</strong>:
|
||||
With the exception of those generated by the <code>mkiocccentry(1)</code> tool or the tools
|
||||
it or any other tool invokes, files in your submission <strong>MUST</strong>:
|
||||
</p>
|
||||
<ul>
|
||||
<li><p class="leftbar">
|
||||
@@ -1314,7 +1321,7 @@ Be <= <strong>38</strong> characters in length.
|
||||
<li><p class="leftbar">
|
||||
<strong>NOT</strong> contain a path component of: <strong><code>.</code></strong> (that is, with
|
||||
the exception of files generated by <code>mkiocccentry(1)</code> itself, it must have
|
||||
<strong>NO</strong> <strong><code>.</code></strong> an <strong>NO</strong> dot file).
|
||||
<strong>NO</strong> dot file including <code>.</code> itself).
|
||||
</p></li>
|
||||
<li><p class="leftbar">
|
||||
<strong>NOT</strong> contain a path component of: <strong><code>..</code></strong> (that is,
|
||||
@@ -1326,7 +1333,7 @@ Match the regular expression
|
||||
<code>mkiocccentry(1)</code>).
|
||||
</p></li>
|
||||
<li><p class="leftbar">
|
||||
<strong>NOT</strong> be a directory depth > 4.
|
||||
<strong>NOT</strong> have a directory depth > 4.
|
||||
</p></li>
|
||||
<li><p class="leftbar">
|
||||
<strong>NOT</strong> have a total <strong>path</strong> length > 99 characters.
|
||||
@@ -1343,23 +1350,25 @@ authors (that will only be looked at if the submission wins).
|
||||
</p></li>
|
||||
<li><p class="leftbar">
|
||||
<code>.info.json</code> which contains information about the
|
||||
entry.
|
||||
submission.
|
||||
</p></li>
|
||||
</ul>
|
||||
<p class="leftbar">
|
||||
The <code>chkentry(1)</code> tool will validate these two JSON files, and do other checks
|
||||
on your submission directory as well, <em>prior to</em> forming the tarball.
|
||||
on your submission directory as well, <em>prior to</em> <code>mkiocccentry(1)</code> forming the
|
||||
tarball.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
Files and directories in your submission tarball <strong>MUST</strong> be specific
|
||||
permissions and <code>mkiocccentry(1)</code> does this for you. In particular: directories
|
||||
<strong>MUST</strong> be <code>drwxr-xr-x</code> (i.e. <code>0755</code>), the optional files, <code>try.sh</code> or
|
||||
<code>try.alt.sh</code>, if provided, <strong>MUST</strong> be <code>-r-xr-xr-x</code> (i.e. <code>0555</code>) and all other
|
||||
files <strong>MUST</strong> be <code>-r--r--r--</code> (i.e. <code>0444</code>). If the files do not have these
|
||||
permissions, your submission <strong>WILL</strong> be rejected for violating <a href="next/rules.html#rule17">Rule
|
||||
17</a>! In addition to <code>mkiocccentry(1)</code> creating and copying the
|
||||
directories and files with these modes, it also verifies them after the fact and
|
||||
if they are not correct it is an <strong>error</strong>.
|
||||
<strong>MUST</strong> be <code>drwxr-xr-x</code> (i.e. <code>0755</code>), the optional files, not counting
|
||||
<code>prog.alt.c</code> (i.e. <code>try.sh</code> and <code>try.alt.sh</code>), if provided, <strong>MUST</strong> be
|
||||
<code>-r-xr-xr-x</code> (i.e. <code>0555</code>) and all other files <strong>MUST</strong> be <code>-r--r--r--</code> (i.e.
|
||||
<code>0444</code>). If the files do not have these permissions, your submission <strong>WILL</strong>
|
||||
be rejected for violating <a href="next/rules.html#rule17">Rule 17</a>! In addition to
|
||||
<code>mkiocccentry(1)</code> creating and copying the directories and files with these
|
||||
modes, it also verifies them after the fact and if they are not correct it is an
|
||||
<strong>error</strong>.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
If you do need different permissions, then see the
|
||||
@@ -1368,9 +1377,10 @@ FAQ on “<a href="#file_perms">file permissions</a>”. Also keep in mind
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
The <code>txzchk(1)</code> tool will also verify file/directory permissions (and many other
|
||||
things) for you and so will <code>chkentry(1)</code> (along with validating the JSON files
|
||||
and running semantics checks on them). If these checks fail it is an <strong>error</strong>
|
||||
and <code>mkiocccentry(1)</code> will fail. In this case (it fails and you used
|
||||
things) for you, and so will <code>chkentry(1)</code> (along with other checks on files and
|
||||
directories in your submission directory, including the two required JSON files,
|
||||
<code>.auth.json</code> and <code>.info.json</code>). If these checks fail it is an <strong>error</strong>
|
||||
and <code>mkiocccentry(1)</code> will abort. In this case (it fails and you used
|
||||
<code>mkiocccentry(1)</code>) it is very <strong>possibly</strong> a bug; please <a href="https://github.com/ioccc-src/mkiocccentry/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D+%3Ctitle%3E">report it as a bug at
|
||||
the mkiocccentry issues
|
||||
page</a>.
|
||||
@@ -1422,7 +1432,7 @@ created!
|
||||
<p class="leftbar">
|
||||
Tarballs <strong>MUST</strong> only create files and directories <em>under</em> the submission
|
||||
directory. They may <strong>NOT</strong> contain absolute paths (paths that start with <code>/</code>)!
|
||||
<code>txzchk</code> only checks the submission tarball so you must verify these details
|
||||
<code>txzchk</code> does <strong>NOT</strong> check other tarballs so <strong>YOU MUST</strong> verify these details
|
||||
yourself.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
@@ -1449,23 +1459,23 @@ submission will result in violating this rule.
|
||||
<strong>MAKE SURE</strong> you use the correct release of the repository; you should do this
|
||||
<strong>AFTER</strong> the contest opens (pull any changes or if you prefer download the
|
||||
repository via the download option at GitHub). See the
|
||||
FAQ on “<a href="#obtaining_mkiocccentry">obtaining mkiocccentry</a>”
|
||||
FAQ on “<a href="#obtaining_mkiocccentry">obtaining the latest release of mkiocccentry</a>”
|
||||
for more help on ensuring you do have the most up to date release.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
We recommend that you run <code>make</code> and then install the tools (and man pages) via
|
||||
<code>make install</code> (as root or using <code>sudo(1)</code>) to help you run these tools from
|
||||
<code>make install</code> (as root or using <code>sudo(8)</code>) to help you run these tools from
|
||||
your submission’s directory (or any other directory). The <code>make install</code> will
|
||||
install in <code>/usr/local</code>. However, <strong>you do not have</strong> to install them, but in
|
||||
that case you’ll have to run it from the toolkit’s directory or use the correct
|
||||
options to specify the path to the necessary tools, and also specify the path to
|
||||
your files.
|
||||
your files, which can be problematic.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
These tools will link in the <code>jparse(3)</code> library and the <code>dbg</code> library and the
|
||||
<code>dyn_array</code> library; <code>chkentry(1)</code> uses the JSON parser (<code>jparse</code>) to validate
|
||||
and parse the <a href="https://www.json.org/json-en.html">JSON</a> but the other tools use
|
||||
parts of the <code>jparse</code> utility functions as well.
|
||||
These tools will link in the <code>jparse(3)</code> library, the <code>dbg</code> library and the
|
||||
<code>dyn_array</code> library; <code>chkentry(1)</code> uses the JSON parser (<code>jparse(3)</code>) to
|
||||
validate and parse the <a href="https://www.json.org/json-en.html">JSON</a> files but the
|
||||
other tools use parts of the <code>jparse</code> utility functions as well.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
If you run into a problem with one or more of these tools, <strong>PLEASE</strong> <a href="https://github.com/ioccc-src/mkiocccentry/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D+%3Ctitle%3E">report it
|
||||
@@ -1476,7 +1486,7 @@ for help here and also read our
|
||||
FAQ on “<a href="#mkiocccentry_bugs">mkiocccentry repo bugs</a>”.
|
||||
</p>
|
||||
<p class="leftbar">
|
||||
At the risk of stating the obvious: submissions that violate <a href="#rule17">Rule
|
||||
At the risk of stating the obvious: submissions that violate <a href="next/rules.html#rule17">Rule
|
||||
17</a> <strong>WILL BE REJECTED</strong>, so <strong>BE SURE</strong> to use the latest release of the
|
||||
<a href="https://github.com/ioccc-src/mkiocccentry">mkiocccentry repo</a>, to form and test
|
||||
your submission’s xz compressed tarball. Do <strong>NOT</strong> assume you have the most
|
||||
|
||||
Reference in new issue
Block a user