Fixes in rules

This includes the FAQ as there is an FAQ about Rule 17.
This commit is contained in:
Cody Boone Ferguson committed 2025-03-01 14:37:13 -08:00
1 parent b717062099
commit da9064d95b
4 files changed
+335 -246

No files matched your search

+66 -54
View File
@@ -596,7 +596,7 @@ Jump to: [top](#)
### Q 0.6: What permissions may my files be and what if I need different permissions?
</div>
As [Rule 17](next/rules.html#rule17) states, files in your submission tarball **MUST** be
Files in your submission tarball **MUST** be
specific permissions. In particular: directories **MUST** be `drwxr-xr-x` (i.e.
`0755`), the optional files, `try.sh` or `try.alt.sh`, if provided, **MUST** be
`-r-xr-xr-x` (i.e. `0555`) and all other files **MUST** be `-r--r--r--` (i.e.
@@ -607,6 +607,10 @@ the appropriate place in your Makefile. See the
FAQ on "[submission Makefile](#makefile)"
for more details.
See the
FAQ on "[Rule 17](#rule17)"
and [Rule 17](next/rules.html#rule17) itself.
Do remember that if your submission requires different filenames, then you
**MUST** make a **COPY** of them in your `Makefile`. See also [Rule
11](next/rules.html#rule11).
@@ -867,10 +871,11 @@ The following are the details behind [Rule 17](next/rules.html#rule17).
### TL;DR Rule 17 - Use `mkiocccentry(1)`
<p class="leftbar">
This is a **COMPLEX** rule. **Violating this rule will cause your submission to REJECTED!**
To help you avoid such a rejection, you are **HIGHLY ENCOURAGED** to use the `mkiocccentry(1)` tool,
based on the latest release of the [mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry),
to form your submission's xz compressed tarball.
This is a **COMPLEX** rule. **Violating this rule will cause your submission to
be REJECTED!** To help you avoid such a rejection, you are **HIGHLY ENCOURAGED**
to use the `mkiocccentry(1)` tool, based on the latest release of the
[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry), to form your
submission's xz compressed tarball.
</p>
<p class="leftbar">
@@ -896,19 +901,6 @@ additional details of each tool, see its man page, and in some cases, the [IOCCC
guidelines](next/guidelines.html).
</p>
<p class="leftbar">
There is no need to use `jparse(1)` but the `jparse(3)` library
library will be linked when compiling the tools as they use various functions
provided by it, and `chkentry` uses the JSON parser API as well.
</p>
<p class="leftbar">
Of course you **may** invoke `jparse(1)` if you wish to validate a JSON file but
the only JSON files you might want to validate for the IOCCC are validated
by `chkentry(1)`, and that is what you should use to make sure you conform to
this rule.
</p>
<p class="leftbar">
The maximum number of **extra files** is 31. See the [maximum number of extra
files section](#max-files) below for finer details and the
@@ -923,6 +915,11 @@ and `.auth.json`) and files that are also not the optional files (`try.sh`,
`prog.alt.c` and `try.alt.sh`).
</p>
<p class="leftbar">
**NOTE**: optional filenames are only optional if they are in the submission top
level directory.
</p>
Jump to: [top](#)
@@ -938,7 +935,7 @@ The xz compressed tarball filename must be of the form:
[UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)** (see
[RFC 9562](https://datatracker.ietf.org/doc/html/rfc9562) for
details), and where _`slot_num`_ is a single decimal digit integer
(i.e., >= `0` and < `9`).
(i.e., >= `0` and <= `9`).
</p>
<p class="leftbar">
@@ -993,13 +990,14 @@ and the [CommonMark Spec](https://spec.commonmark.org/current/).
<p class="leftbar">
The `.auth.json` file is created by `mkiocccentry(1)` and it holds information
about the author(s) of the submission. It will **ONLY** be looked at if your
submission wins but it **MUST** still be valid according to `chkentry(1)`.
submission wins but it **MUST** still be valid according to `jparse(3)` **AND**
`chkentry(1)`.
</p>
<p class="leftbar">
The `.info.json` file is created by `mkiocccentry(1)` and it holds information
about the submission itself. It also **MUST** be valid according to
`chkentry(1)`.
about the submission itself. It also **MUST** be valid according to **BOTH**
`jparse(3)` **AND** `chkentry(1)`.
</p>
@@ -1014,6 +1012,10 @@ any other tool detects **ANY** problem, you are **HIGHLY** encouraged to fix it
and try again.
</p>
<p class="leftbar">
On the other hand, some issues are errors and you **MUST** fix those).
</p>
<p class="leftbar">
If you do use `mkiocccentry(1)` and you run into a problem, you might see the
FAQ on "[how to ask a question about the IOCCC rules, guidelines and
@@ -1028,10 +1030,16 @@ The xz compressed tarball file **MUST** be <= **3999971** 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) **MUST** be <=
**28314624** octets (**27651K**) 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) **MUST** be <= **28314624**
octets (**27651K**) in size.
</p>
<p class="leftbar">
One of the many checks `txzchk(1)` 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">
@@ -1056,27 +1064,28 @@ repo](https://github.com/ioccc-src/mkiocccentry).
</p>
<p class="leftbar">
Your entry may have subdirectories, depending on the depth and total length of
the filenames. Certain directories like `.git`, `RCCS`, `CVS` and `.svn` are
skipped. For more information, see the [guidelines](next/guidelines.html).
Your entry **MAY** have subdirectories, depending on the depth and total length of
the filenames. Certain directories like `.git`, `RCCS`, `CVS` and `.svn`
(amongst others) are skipped. For more information, see the
[guidelines](next/guidelines.html).
</p>
<p class="leftbar">
Filenames in your entry (that is, not including the files generated by the
`mkiocccentry(1)` tool or the tools it or any other tool invokes) **MUST**:
With the exception of those generated by the `mkiocccentry(1)` tool or the tools
it or any other tool invokes, files in your submission **MUST**:
</p>
* <p class="leftbar">Be <= **38** characters in length.</p>
* <p class="leftbar">**NOT** have a leading **`/`**.</p>
* <p class="leftbar">**NOT** contain a path component of: **`.`** (that is, with
the exception of files generated by `mkiocccentry(1)` itself, it must have
**NO** **`.`** an **NO** dot file).</p>
**NO** dot file including `.` itself).</p>
* <p class="leftbar">**NOT** contain a path component of: **`..`** (that is,
**NO** **`..`**).</p>
* <p class="leftbar">Match the regular expression
`^[0-9A-Za-z]+[0-9A-Za-z_+.-]*$` (again, excluding files generated by
`mkiocccentry(1)`).</p>
* <p class="leftbar">**NOT** be a directory depth > 4.</p>
* <p class="leftbar">**NOT** have a directory depth > 4.</p>
* <p class="leftbar">**NOT** have a total **path** length > 99 characters.</p>
<p class="leftbar">
@@ -1087,23 +1096,25 @@ the additional files that are generated by the `mkiocccentry(1)` tool:
* <p class="leftbar">`.auth.json` which contains information about the author or
authors (that will only be looked at if the submission wins).</p>
* <p class="leftbar">`.info.json` which contains information about the
entry.</p>
submission.</p>
<p class="leftbar">
The `chkentry(1)` tool will validate these two JSON files, and do other checks
on your submission directory as well, _prior to_ forming the tarball.
on your submission directory as well, _prior to_ `mkiocccentry(1)` forming the
tarball.
</p>
<p class="leftbar">
Files and directories in your submission tarball **MUST** be specific
permissions and `mkiocccentry(1)` does this for you. In particular: directories
**MUST** be `drwxr-xr-x` (i.e. `0755`), the optional files, `try.sh` or
`try.alt.sh`, if provided, **MUST** be `-r-xr-xr-x` (i.e. `0555`) and all other
files **MUST** be `-r--r--r--` (i.e. `0444`). If the files do not have these
permissions, your submission **WILL** be rejected for violating [Rule
17](next/rules.html#rule17)! In addition to `mkiocccentry(1)` 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 **error**.
**MUST** be `drwxr-xr-x` (i.e. `0755`), the optional files, not counting
`prog.alt.c` (i.e. `try.sh` and `try.alt.sh`), if provided, **MUST** be
`-r-xr-xr-x` (i.e. `0555`) and all other files **MUST** be `-r--r--r--` (i.e.
`0444`). If the files do not have these permissions, your submission **WILL**
be rejected for violating [Rule 17](next/rules.html#rule17)! In addition to
`mkiocccentry(1)` 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
**error**.
</p>
<p class="leftbar">
@@ -1114,9 +1125,10 @@ FAQ on "[file permissions](#file_perms)". Also keep in mind
<p class="leftbar">
The `txzchk(1)` tool will also verify file/directory permissions (and many other
things) for you and so will `chkentry(1)` (along with validating the JSON files
and running semantics checks on them). If these checks fail it is an **error**
and `mkiocccentry(1)` will fail. In this case (it fails and you used
things) for you, and so will `chkentry(1)` (along with other checks on files and
directories in your submission directory, including the two required JSON files,
`.auth.json` and `.info.json`). If these checks fail it is an **error**
and `mkiocccentry(1)` will abort. In this case (it fails and you used
`mkiocccentry(1)`) it is very **possibly** a bug; please [report it as a bug at
the mkiocccentry issues
page](https://github.com/ioccc-src/mkiocccentry/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D+%3Ctitle%3E).
@@ -1176,7 +1188,7 @@ created!
<p class="leftbar">
Tarballs **MUST** only create files and directories _under_ the submission
directory. They may **NOT** contain absolute paths (paths that start with `/`)!
`txzchk` only checks the submission tarball so you must verify these details
`txzchk` does **NOT** check other tarballs so **YOU MUST** verify these details
yourself.
</p>
@@ -1212,25 +1224,25 @@ submission will result in violating this rule.
**MAKE SURE** you use the correct release of the repository; you should do this
**AFTER** the contest opens (pull any changes or if you prefer download the
repository via the download option at GitHub). See the
FAQ on "[obtaining mkiocccentry](#obtaining_mkiocccentry)"
FAQ on "[obtaining the latest release of mkiocccentry](#obtaining_mkiocccentry)"
for more help on ensuring you do have the most up to date release.
</p>
<p class="leftbar">
We recommend that you run `make` and then install the tools (and man pages) via
`make install` (as root or using `sudo(1)`) to help you run these tools from
`make install` (as root or using `sudo(8)`) to help you run these tools from
your submission's directory (or any other directory). The `make install` will
install in `/usr/local`. However, **you do not have** 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 `jparse(3)` library and the `dbg` library and the
`dyn_array` library; `chkentry(1)` uses the JSON parser (`jparse`) to validate
and parse the [JSON](https://www.json.org/json-en.html) but the other tools use
parts of the `jparse` utility functions as well.
These tools will link in the `jparse(3)` library, the `dbg` library and the
`dyn_array` library; `chkentry(1)` uses the JSON parser (`jparse(3)`) to
validate and parse the [JSON](https://www.json.org/json-en.html) files but the
other tools use parts of the `jparse` utility functions as well.
</p>
<p class="leftbar">
@@ -1243,7 +1255,7 @@ FAQ on "[mkiocccentry repo bugs](#mkiocccentry_bugs)".
</p>
<p class="leftbar">At the risk of stating the obvious: submissions that violate [Rule
17](#rule17) **WILL BE REJECTED**, so **BE SURE** to use the latest release of the
17](next/rules.html#rule17) **WILL BE REJECTED**, so **BE SURE** to use the latest release of the
[mkiocccentry repo](https://github.com/ioccc-src/mkiocccentry), to form and test
your submission's xz compressed tarball. Do **NOT** assume you have the most
recent release without pulling or downloading via GitHub and do **MAKE SURE** you