Release version 2.4.0 2025-02-28 #1199
lcn2
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Release 2.4.0 2025-02-28
Fix and improve warning of
-y
and-Y
inmkiocccentry
.The code did not explicitly check for
-Y
; it just used the implicit-y
from-Y
. That is fixed and now if not-q
show a simple summary but always showthe longer warning to be sure that they know. As for
-Y
it really ought to beused only for the test script but even
-y
should be used with EXTREMEcaution.
Add extra sanity checks in
check_submission_dir()
: it now checks towards thebeginning if the required files exist (that is, the three user submitted files,
not the JSON file as those don't exist yet, though it does check that they do
not exist as dot files here would be an error) and are readable and if they are
not size 0 (for Makefile and remarks.md - prog.c may be empty).
Updated some literal strings of the three required filenames (as above) to their
macros in both mkiocccentry and txzchk.
Fixes in
chkentry
with checking if files exist or do not exist (depending onoptions) and also add checks for file sizes for certain files, namely Makefile,
remarks.md (in non-winning mode) as well as index.html (in winning mode) and
README.md (in winning mode).
Error messages were improved in
chkentry
as well though there are some places(the manifest check) where they could be improved (this would require lower
level changes that we do not have time for before the freeze later today).
Sync jparse repo to
jparse/
for new utilfunction (that uses its
file_size()
function)is_empty()
. This is used inthe update to
chkentry
.Added copyright message to jparse files (at the request of Landon some while
back).
More work on the
chkentry_test.sh
script. The script is in better shape sothat when the directories are generated (they cannot be static due to version
changes - at least without a new option) the script should hopefully be easily
updated (though it depends maybe on how the new directories are generated).
Resequence exit codes in
jparse/util.c
.Updated versions of
jparse
by changingx.y.z
tox.y+1.0
except that forthose under <
2.0.0
they have been changed to2.0.0
.chkentry
now looks for directories that are the wrong permissions as well asdirectories with a depth beyond the max as well as any type of file other than a
regular file or directory.
Bug fix an enum in jparse which caused a util function (used in the above fix to
chkentry) to fail.
Updated
SOUP_VERSION "2.0.0 2025-02-28"
.Updated
MKIOCCCENTRY_VERSION
to"2.0.0 2025-02-28"
.Updated
FNAMCHK_VERSION
to"2.0.0 2025-02-28"
.Updated
TXZCHK_VERSION
to"2.0.0 2025-02-28"
.Updated
CHKENTRY_VERSION
to"2.0.0 2025-02-28"
.Updated the version of
test_ioccc/chkentry_test.sh
,test_ioccc/hostchk.sh
,test_ioccc/ioccc_test.sh
,test_ioccc/mkiocccentry_test.sh
,test_ioccc/prep.sh
andtest_ioccc/txzchk_test.sh
to"2.0.0 2025-02-28"
.Release 2.3.44 2025-02-27
Prepare for code freeze (28 February 2025) with some final changes, some
important (and useful) and some not that important (but done to be complete).
Sync jparse repo to
jparse/
before codefreeze (28 February 2025).
Updated copyright messages, some missing, some updated (based on brief
discussions a while back and more recently, recent updates to code and perhaps
other things) to many files.
The script
bug_report.sh
actually can have the script in the TOOLS variable asit will not actually cause an infinite loop as it only gets the version of the
tool - which is quite useful to know that the user is using the most recent
version of the script. This was also done in
jparse/
but that doesn't matterhere; it's only mentioned due to the sync.
Enhance
mkiocccentry
prompting with-i answers
used. Instead of alwaysanswering yes even when an issue is found, unless the new option
-Y
is used,give the user a chance to confirm things are okay (in particular, it allows one
to answer no to a question; it does not prompt you for everything as that would
defeat the purpose of the answers file). The use of
-Y
is highly discouragedunless you are certain you're good to go and it is mostly used for
mkiocccentry_test.sh
which needs to be non-interactive.Improve usage string about
workdir
andtopdir
to make certain things a bitclearer.
Updated
MKIOCCCENTRY_VERSION
to"1.2.35 2025-02-27"
.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.15 2025-02-26"
.Release 2.3.44 2025-02-26
Remove unused arg in
write_json_files()
.Updated
MKIOCCCENTRY_VERSION
to"1.2.34 2025-02-26"
.Release 2.3.43 2025-02-25
Improve
mkiocccentry_test.sh
- add only required files test.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.14 2025-02-25"
.Plug a loophole in
chkentry(1)
and make it do even more tests that weremissing/not previously thought of.
Updated
CHKENTRY_VERSION
to"1.1.5 2025-02-25"
.Release 2.3.42 2025-02-24
Disable
-g3
in Makefile as use of-O
option (besides level 0) makesdebugging much harder so one should not typically use both. This was done in
dbg
anddyn_array
(and opened a pull request in both repos) too; I didjparse/
(in the repo) a while back for the same reason as cited here.Fun facts: the repo version is:
"2.3.42 2025-02-24"
and so the last two digitsof the version number itself and the last two digits of the date in the version
are opposites (and thus anagrams) for 42, the Ultimate Answer to/of Life, the
Universe and Everything; but no matter
how absurd it is, and no matter how obvious it was a joke and no matter how much
Douglas Adams explicitly said it was a
joke,
people still think it's serious and people still have stated it is real and some
astronomers even spent years studying
it
only to claim that it really is 42! That means that the real
Vogons are
humans, at least until that hyperspace
bypass is formed. :-)
BTW: Landon told me that: at Google Headquarters (previously SGI) at building 42
there is a very hidden copy of The Hitchhiker's Guide to the Galaxy (H2G2) with
drawings and other things that Douglas Adams requested Landon taunt them
[Google] to find and he's had a lot of joy in doing so since very few have been
able to find it (and Landon is one of the very few who know about it).
Okay so there's some fun totally unrelated to the changes but it's fun so why
not? :-)
Fix bug in
mkiocccentry
where a submission topdir which only had the threerequired files would abort with an error (due to list being not NULL but empty
due to a typo).
Sync jparse repo to
jparse/
for someupcoming fixes to
chkentry
(I thought of a loophole in a new option that wasbeing finalised and more was discovered after this).
chkentry
has had a partial fix but more needs to be done (for the loophole Ithought of with the
-w
option). Unfortunately the other things took more timethan I hoped and I cannot get it in today - and fixes and improvements to the
FTS functions requires a minor update to chkentry (both in
chkentry.c
andsoup/entry_util.c
) minor change or else it will not compile and also willlikely segfault.
Updated
MKIOCCCENTRY_VERSION
to"1.2.33 2025-02-24"
.Updated
CHKENTRY_VERSION
to"1.1.4 2025-02-24"
.NOTE: the
MKIOCCCENTRY_VERSION
in this commit was by accident"1.2.33 2025-02-34"
but we have retroactively fixed it. Thus if you check out thisspecific commit you would see that the version is a mismatch here.
Release 2.3.41 2025-02-23
Much work on issue #1152 done.
Both
-w
and-i
have been implemented. The man page has not been updated asthe error codes need to be reconsidered now that the tool does more checks.
Depending on the
-i path
or-w
(or both) options different checks are nowperformed, not just semantics tests (indeed one can actually skip the JSON tests
entirely by
-i info -i auth
but other things are still done). Themkiocccentry
tool will not use either option which is the strictest mode.Besides error codes needing to be reviewed and the man page (and if necessary
other documentation) being updated, unless something was missed the only thing
left to do is to fix the test script to work with the one arg only model.
Sync jparse repo to
jparse/
for someupdates that were necessary for the above to be implemented.
Fixed
mkiocccentry
to check for executable filenames by the function, not bythe filenames themselves.
Added the files
soup/chk_sem_auth.c
andsoup/chk_sem_info.c
to the lesspicky variable in
soup/Makefile
as the lines are quite long now, due to thefact that another arg had to be given to the callback functions for the manifest
checks update.
Release 2.3.40 2025-02-22
Significantly simplify and refactor the FTS functions in jparse/util.c. A great
deal of thought and effort was put into this and when the
topdir
is passed tochk_manifest()
(which is being worked on) it will be far easier. The benefitof these changes, besides being much cleaner, simpler and it being modularised,
is that if some issue is discovered or some new feature is needed (as has
already happened numerous times) function calls do not have to be updated.
mkiocccentry
has been updated to use the simplified interface as well.A note:
jparse/
has not been fully synced because of a change injson_sem
for
chkentry
that is not yet complete (this was done prior to deciding torework the FTS functions). So the CHANGES.md file and the
json_sem.[ch]
filescommitted to the jparse repo are not yet here.
Updated
MKIOCCCENTRY_VERSION
to"1.2.31 2025-02-22"
Release 2.3.39 2025-02-21
Fix many debug calls in
soup/entry_util.c
at level medium to not revealinformation about the submission. This includes GitHub handle and country code,
amongst others.
Due to what will be needed with chkentry (and also in mkiocccentry - which has
been updated) some of the jparse util functions were updated and new ones were
added. It cannot always be assumed that finding files should be done in a
case-insensitive manner so there is a new boolean in those functions (and in one
or two of the new functions). The
mkiocccentry
had a function that is based onone of them (
array_has_path()
).The arrays in the info struct in mkiocccentry now are freed and set to NULL IFF
(if and only if) they are empty. This not only allows for not checking them for
NULL (except before showing the contents) but it also allows for more checks
that were not previously done (some were thought of in the process of this and
the below change).
Update exit codes in mkiocccentry, allocating
4
for any issue (and there are alot, even more now due to more checks (as above) and
5
for when the user sayssomething is not okay. Updated the man page for this though the
guidelines/rules/FAQ and quick start guide do need to be updated as well (for
this change possibly and other more recent changes as well). This also lets the
mkiocccentry_test.sh
script verify that the exact error code is encountered(when testing errors) and not just not 0. Besides additional testing (after code
freeze and of course before) this should, with the exception of documentation,
complete the
workdir topdir
model, unless something else useful or importantis thought of (like the allocation of exit codes and the new approach to
handling the arrays).
The function
free_info()
now uses the recent functionfree_paths_array()
forthe dynamic arrays of paths.
Better checks on
topdir
inchkentry
(as in even though the pointers werechecked for NULL they are now only done if topdir is a directory that can be
searched).
Updated
MKIOCCCENTRY_VERSION
"1.2.30 2025-02-21"
.Updated
SOUP_VERSION
to"1.1.22 2025-02-21"
Updated
CHKENTRY_VERSION
to"1.1.2 2025-02-21"
.Release 2.3.38 2025-02-20
General clean-up.
Removed the no longer used
vermod.sh
script (it was used to modify theversions of tools in the JSON files under
test_ioccc/test_JSON
but these filesare now created at need).
Since we now recommend that one install the tools (since trying to run the tools
to create a submission tarball from the mkiocccentry directory itself is more
burdensome and can be problematic) the man pages (in cases where it is
necessary - and that were not missed) no longer have
./
in front of commands(in the examples).
Clean up some usage messages to be shorter (in some ways) especially the length
of lines (some formatting fixes were also made).
Bug fix in
mkiocccentry
- check for NULL or empty workdir and topdir.Change mkiocccentry arg count check to be exact as we no longer use extra args
(though it didn't hurt to have them it might be better to be clear to the user).
This required updating
mkiocccentry_test.sh
as well.Updated
MKIOCCCENTRY_VERSION
to"1.2.29 2025-02-20"
.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.12 2025-02-20"
.Sync jparse repo to
jparse/
for new utilfunction which will be used with issue #1152. This function finds a path in a
paths array.
BTW: we do realise that a lot of the util functions in jparse have nothing to do
with JSON parsing but there is a historical reason behind this.
Change
mkiocccentry
to form.auth.json
and then.info.json
and then runchkentry(1)
on both of the files. This will changed to running it with asingle arg - the topdir - but this change allows it to be easier to do once
chkentry(1)
has been modified to do this (part of it was done - namely thatthe
topdir
arg is there and 'set' but it's not used yet).More fixes in
mkiocccentry_test.sh
. It no longer shows the commands ofmake clobber
from themkiocccentry
functioncheck_submission()
. This is done byactually making the test Makefile have empty clobber and clean rules: they're
not needed anyway. Also to help distinguish output after each mkiocccentry
command is called it prints '--' and also it now shows the command that will be
run (the mkiocccentry commands that is).
Make
chkentry
one-arg mode only. It now needs atopdir
as the arg. More workhas to be done but now at least the topdir is obtained and processed.
Updated
CHKENTRY_VERSION
to"1.1.1 2025-02-20"
.Release 2.3.37 2025-02-19
Many bug fixes in various tools and a jparse function plus some enhancements in
jparse (that will be used in
chkentry
at the very least).Logic fixes in
fnamchk
. It no longer has both a-u
and a-t
option.Instead of
-t
is used it is test mode (see below). A new option (-T
) wasadded which says to ignore the timestamp check (results - the parsing is still
necessary or else the next part will fail). With these changes the issue of the
minimum timestamp being changed (for new contests or some other reason) is
resolved (or at most one can just rebuild the error test files). This also
fixes a theoretical loophole in
fnamchk(1)
which is far out of scope of thisdocument.
txzchk
gives-t
tofnamchk
if given the-x
option. This is importantbecause if a filename starts with
submit.test-
it MUST be in test mode. Inthe case
txzchk
test mode (-x
) it also gives tofnamchk
the-T
optiondue to the timestamp change being an issue.
Additionally:
mkiocccentry
now passes totxzchk
the option-x
if the testmode is active (contest ID is
"test"
).Bug fixes in
txzchk
(one indirectly by fixing a bug in thejparse
utilfunction
dir_name()
- an edge case that was missed). Files that were not sanerelative paths (i.e. not POSIX plus + safe chars only) were also not being
reported (it is not even clear if they were being noted as a problem).
Because of the new
-T
option tofnamchk
(which is required) as well as abovebug fixes in
txzchk
thetxzchk
test error files had to be rebuilt.The
txzchk_test.sh
script now determines if the filename is a test filename(it starts with
"submit.test-"
) and if so it passes totxzchk
the option-x
which will pass tofnamchk(1)
the-t
option.Added a new function
is_executable_filename()
insoup/entry_util.c
(whichuses the new array
executable_filenames
) so that the judges can decide whichfiles have to be executable (as Landon told me this might happen). The error
messages (in
txzchk
) have also been updated to show the octal mode too.Sync jparse repo to
jparse/
forimprovements to some recent utility functions plus the bug fix to
dir_name()
.These new enhancements will be used in
chkentry
in a number of ways but thathas to be explained later (or not). It might also be useful in other tools but
that has to be determined later too.
Updated
MKIOCCCENTRY_VERSION
to"1.2.28 2025-02-19"
.Updated
FNAMCHK_VERSION
to"1.0.4 2025-02-19"
.Updated
TXZCHK_VERSION
to"1.1.14 2025-02-19"
.Updated
TXZCHK_TEST_VERSION
to1.0.4 2025-02-19"
.Release 2.3.36 2025-02-17
Various fixes and further enhancements to the
find_path*()
functions injparse. One in particular will very possibly be very useful for the
chkentry(1)
updates but it's a useful update anyway (allows filtering filetypes by an enum of bits). These were synced from the jparse
repo to
jparse/
.Updated
MKIOCCCENTRY_VERSION
to"1.2.27 2025-02-17"
.Release 2.3.35 2025-02-16
Multiple fixes and enhancements in some of the jparse util functions. Updated
mkiocccentry for these fixes/enhancements. Note that
fts_open(3)
has tohave either
FTS_PHYSICAL
orFTS_LOGICAL
so theread_fts()
function(prior to calling
fts_open(3)
) now removes both bits and then sets theright one based on the boolean. This is why it's no longer in the
options to the function call - it would be removed anyway since we can't
assume what is needed (for here we want
FTS_PHYSICAL
but in some casesit might not be desired and there was no way to be correct otherwise).
There are other improvements and fixes as well.
Updated
MKIOCCCENTRY_VERSION
to"1.2.26 2025-02-16"
.Release 2.3.34 2025-02-15
Added
-I path
option tomkiocccentry(1)
to ignore a path. This option can bespecified more than once. The path is under the topdir (in other words if
you have a file
topdir/foo
and you specifytopdir
as yourtopdir
and youwish to ignore
topdir/foo
you would use-I foo
, not-I topdir/foo
). Thiswas added because some people have files/directories in their submission
directory that they do not want to submit (but do want in their directory) that
would normally be included by
mkiocccentry(1)
. This has been added to help andthe man page but not the FAQ, guidelines or rules (yet).
Sync jparse repo to
jparse/
forimprovements (and fixes) to some utility functions (renamed due to the
improvements) (one of which is used by the new feature).
Update
MKIOCCCENTRY_VERSION
to"1.2.25 2025-02-15"
.Release 2.3.33 2025-02-14
Fix issue #1159 - -i answers always answers yes.
This is absolutely ESSENTIAL so that we don't have to worry about changes in
file sets that would cause problems; if any file set (that we have to confirm is
OK) changed the answers file would be ENTIRELY useless because the order of
the answers would be different (i.e. we would need an additional line!). To
be helpful if
answer_yes == true
(i.e.-y
is used or implied) and!quiet
)(i.e.
-q
not use) we will warn the user that we will answer yes to everyquestion (at the beginning right after the
Welcome to mkiocccentry
message).We use the
print
macro fromjparse/
rather thanmsg()
fromdbg
orprintf
with a single check because it performs many more checks which is veryimportant when always answering yes (perhaps the function
pr()
thatprint
uses should allow a string without having to have a format but that's another
matter entirely).
Improved the handling of user saying 'no' to a question: namely it suggests the
user fix their topdir (giving the absolute path we determined earlier) and
remove the submission directory (which is under the workdir) also giving the
absolute path determined earlier on.
Note that
mkiocccentry_test.sh
already uses-q
so we don't need to update it(since it's not necessary to show this stuff for tests). The reason this issue
was not detected earlier is because the script uses
-y
. Even so the codecopy_topdir()
and alsocheck_submission()
now doif (!answer_yes && !read_answers_flag_used)
instead of justif (!answer_yes)
(not strictlynecessary but this adds another layer of defence in case something goes wrong).
A message was incorrect too (referred to the wrong type of file).
Additionally an unnecessary arg to
get_contest_id()
was removed (it was apointer to
read_answers_flag_used
but that is a global variable so it'sunnecessary to have it in the function as we can just set read/set its value as
necessary.
Sync jparse repo to
jparse/
for newutility functions that will be useful for issue #1152.
Renamed
append_unique_str()
in mkiocccentry toappend_unique_filename()
.Sequenced exit codes.
Release 2.3.33 2025-02-13
Sync jparse repo to
jparse/
for newutility functions (FTS related as well as at least one other). These FTS related
ones are useful for both #1070 (which it now uses) and also the new issue #1152.
Most importantly (at this time) is that we no longer use the
fts_open()
andfts_read()
functions directly: instead it isread_fts()
which is a wrapperto it but one can call it multiple times to get the next entry in the tree.
Using this has multiple advantages which will be more fully realised once issue
#1152 is being worked on (that includes possibly the new function
find_file()
, though theoretically #1070 could also use it - it just does notneed to). The function
find_file()
returns the path from the directorysearched so one can
fopen(3)
it if they wish.As a special feature of
read_fts()
, one can switch back to the originaldirectory, depending on the args (all NULL / -1 except for the
int *cwd
whichmust be not NULL and
*cwd
must be >= 0); this is useful because the function,if
dir
!= NULL (ordirfd
is a valid directory FD) will change the directory.This can be used after
find_file()
as well as long as you make sure thatcwd
is not NULL and
*cwd
is a valid FD (the feature will callclose(*cwd)
so itis no longer valid until it is obtained again perhaps by another call to the
function).
Added
/test_ioccc/topdir
to .gitignore.Start work on issue #1152. Added ignored filenames list option.
Release 2.3.32 2025-02-12
Remove outdated man pages.
In particular: the man pages ending in
.sh.[0-9]
were out of date. They wereat one point symlinks but this was undone by accident. The only man pages up to
date in this way are the ones without the
.sh
(so for exampleioccc_test.8
was updated but
ioccc_test.sh.8
was not). The make uninstall rule stillremoves those files but the make install rule does not install them as they no
longer exist.
Don't warn about but make it an error if the submission directory does not have
a file or directory that was not ignored/not copied for some reason that did
exist in the topdir. This checks by type too: if a directory was called
foo
but in the submission directory it was a file it is considered a missing
directory. This is an important check. If there is a missing file or directory
(symlinks are an error in the submission directory so we don't check for missing
symlinks) it means something went wrong (or perhaps the user was messing about
with the tool which is also an issue) and this is why it is now an error. Since
the
fts_cmp()
function I added makes sure that the files and directories arelisted in the same order in both
scan_topdir()
andcheck_submission()
theway checking for missing files and directories is done should be fine.
Add to list of ignored directories for other RCSs.
When printing lists of ignored directories/files (not the ones found in the
topdir but those that we do not allow like ignored directories, forbidden
filenames etc.) it now prints them in tabular form. The same could be done for
what is in topdir (and later on submission directory) but not doing this makes
it easier to verify everything is okay.
Improve handling of questions/answers/errors. In particular in mkiocccentry
when getting the submission slot number, title and abstract of the submission,
it now asks the user to confirm their input. This is useful because if they make
a typo they would have to start all over (and in some places like with author
details it actually does ask you to confirm). Also if an output error (telling
the user of invalid input) occurs it is a fatal error as otherwise the user
might not know what is going on. If there is a failure to write to the answers
file it is now an error as it could lead to incorrect input (and in fact
previously it warned the user at the end to be very careful that everything is
okay). Additionally improved some wording/formatting of some prompts (or extra
details about the prompts).
Add even more sanity checks to
check_submission()
to make sure that files(depending on name) and directories are the correct permissions. This is done by
new
jparse/
util functions (synced from the jparserepo). Now not only will
txzchk(1)
detectinvalid permissions but so will
mkiocccentry(1)
(and a bug fix in themkdirs()
function was also made but not documented by mistake).mkiocccentry_test.sh
now tests the optional files as well (that isprog.alt.c
,try.sh
andtry.alt.sh
).Add link to example Makefile in
warn_Makefile()
, encouraging and recommendingits use.
Cleaned up warning in
check_submission()
.More sanity checks in
scan_topdir()
andcheck_submission()
: make sure that adirectory name is not the same as a required or optional filename. That does not
mean that one couldn't have a subdirectory with that name but it cannot be in
the top level of the submission directory.
Plug some holes in txzchk. This includes not checking the max depth of a
directory (only total number of directories was checked), checking that a
directory is not named a required/mandatory filename, certain other directory
name checks and other such things. Rebuilt the test error files.
Improved
is_forbidden_filename()
: if it's not in the forbidden filenameslist but it does start with a
.
and it's not a required filename like.auth.json
or.info.json
it is a forbidden filename (it is true thatthe function
sane_relative_path()
would pick up on this but this isdefence in depth).
Updated
MKIOCCCENTRY_VERSION
to"1.2.22 2025-02-12"
.Updated
TXZCHK_VERSION
to"1.1.13 2025-02-12"
.Updated
SOUP_VERSION
to"1.1.20 2025-02-12"
.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.11 2025-02-12"
.Release 2.3.31 2025-02-11
Bug fix and improvements in
mkiocccentry_test.sh
.The script ended up repeating author information (duplicate entry) and also
changed author handles to wrong strings (in some cases it changed it to
n
).This happened because the
answers()
functions (changed throughout the scriptper test) were not updated when the
-y
option was added tomkiocccentry
(which I added to solve another problem).
The improvement is that to make the args consistent with the
mkiocccentry(1)
tool itself it now uses the directories
test_ioccc/workdir
andtest_ioccc/topdir
: updating the script and the.gitignore
file.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.10 2025-02-11"
.Updated FAQ about installing the tools, giving better details on why it is
HIGHLY recommend you do and also what you have to do if you do not (as it
requires more work).
Fix
bug_report.sh
to checktest_ioccc/gen_test_JSON.sh
.Fix
test_ioccc/ioccc_test.sh
to have a-m make
option for those who need tospecify a path to a GNU
make(1)
tool. One can use this withmake test
by wayof:
make MAKE=/path/to/gnumake test
for example.
Fix
test_ioccc/gen_test_JSON.sh
to work for NetBSD (change ingrep
regexp).Add hints to
mkiocccentry
when reporting files/directories/symlinks that willnot be added/made. If
need_hints
is false this is not done. This should helpusers out so that they do not have to go to the FAQ just to find out what is
wrong.
Change
mk_submission_dir()
to usemkdir(2)
with mode 0 and then usechmod(2)
with the correct modes. This should fix the issue where the directorymade has the wrong mode due to umasks like what happened with NetBSD. (This is
also how the
mkdirs()
function fromjparse
works.)Important bug fixes in
mkiocccentry
for issue #1070, as noted below:check_submission()
.check_submission()
in particular, again I think).
topdir it is an error.
prog.c
,Makefile
andremarks.md
).those that are of size 0 (like directories or extra files).
array_has_path()
whichappend_unique_str()
uses and whichcopy_topdir()
andcheck_submission()
use. This helps identify if a name(path) is the same type of file. For instance if in the topdir a file called
foo
existed but in the submission directoryfoo
was a directory it is anerror.
the topdir (including for missing files and directories).
Updated
MKIOCCCENTRY_VERSION
to"1.2.21 2025-02-11"
.Release 2.3.30 2025-02-10
Change
MAX_DIR_COUNT
toMAX_EXTRA_DIR_COUNT
.To make it much less confusing the submission directory is no longer considered
with the maximum number of directories allowed. This required an algorithm
change in
txzchk(1)
as well as some updates to howmkiocccentry(1)
checksif there are too many extra directories.
As for
txzchk(1)
the structtxz_file
now has achar *top_dirname
(which iscalculated like
dir_name(path, -1);)
. In the casefnamchk(1)
did not fail(i.e.
dirname
- renamed fromdir_name
is notNULL
) and we found adirectory (first char of the line is
d
) we get the directory name with thetrailing
/
removed (dir_name(path, 0);
) and compare it with the topdirectory name; if they're not the same and the
dirname
(the submissiondirectory name) is the same as the top directory name then it's an extra
directory.
Added function
free_txz_file()
which takes a pointer to a pointer to astruct txz_file
and is called byfree_txz_files_list()
.Fixed check of
len < 0
of directories inscan_topdir()
.Important bug fixes in
mkiocccentry(1)
for issue #1070. This includes somefile types not accounted for (including error conditions) as well as
modularisation of these checks (new function
check_ftsent()
) plus better(more) comments. Moved
has_ignored_dirname()
tosoup/entry_util.c
. Incopy_topdir()
there is no need tofchdir(cwd)
only to close the descriptoronly to obtain the file descriptor in
check_submission()
when we can simplypass it to the function.
Bug fix
test_github()
: it did not check if there was a character after the@
.Update
mkiocccentry.1
for issue #1070.Updated
MKIOCCCENTRY_VERSION
to"1.2.20 2025-02-10"
.Updated
TXZCHK_VERSION
to"1.1.12 2025-02-09"
.Updated
SOUP_VERSION
to"1.1.19 2025-02-10"
.Release 2.3.29 2025-02-09
Add a limit on the number of directories in a submission so that one cannot
abuse the fact that there was no limit on number of directories besides the
depth of subdirectories. For
txzchk(1)
(due to how it works) it counts thesubmission directory itself (which is why it is
MAX_DIR_COUNT
and notMAX_EXTRA_DIR_COUNT
) but formkiocccentry(1)
it does not count thetopdir/submission directory as that would be confusing to users (it would seem
like there is a bug as well whereas now it only would be confusing if they look
at the macro - but since that's unlikely it is less of a problem and it's less
confusing than in
txzchk(1)
as in the tarball you do see the submissiondirectory itself). This update does require a chance in documentation.
The number chosen was arbitrarily selected and certainly could be modified by
the judges if desired but I chose 13: not only did it seem like a reasonable
choice but it's a prime and also is a swap of the digits in the max extra file
count (which also happens to be prime).
Remove dead code from
scan_topdir()
andcheck_submission()
and in theprocess make it easier to see that every condition is covered (every return
value from
sane_relative_path()
in other words). This fix should make iteasier to document the process of
mkiocccentry(1)
. This means that the arrayignored_files
is no longer needed as well.Updated
MKIOCCCENTRY_VERSION
to"1.2.19 2025-02-09"
.Updated
TXZCHK_VERSION
to"1.1.12 2025-02-09"
.Updated
SOUP_VERSION
to"1.1.18 2025-02-09"
.Release 2.3.28 2025-02-08
Make some fixes for issue #1070.
Add missing lists to present to user (before copying files) such as: directories
to be made; unsafe files and directories to be ignored (instead of making it an
error - it is an error only if in the submission directory). When traversing the
submission directory create lists for directories so these can be presented to
the user as well (if any that are in the topdir are not found in the submission
directory).
Use macros instead of raw octal modes (for
mkdir(2)
/mkdirs()
/copyfile()
).Various other fixes might also have been made.
Modularise
copy_topdir()
andverify_submission()
by splitting them intothree functions. The first part of
copy_topdir()
is now inscan_topdir()
andit does the scanning (up to the point of making sure the required files exist in
the topdir and that there are not too many files). At the end of the function it
will call the new
copy_topdir()
which lists everything to the user and asksfor verification. If the user is okay with everything then directories are made
(if necessary) and files are copied over. Then if nothing is wrong after that
copy_topdir()
will callcheck_submission()
which makes sure everything thatis in
topdir
exists in the submission directory and also run other tests likecheck_prog_c()
,check_Makefile()
andcheck_remarks_md()
. The check forunique strings in the lists is now case-insensitive for filesystems that do not
distinguish case (just like we do when checking that an extra file is not the
same name, regardless of case, as a required file, for example). The check for
prog.c, Makefile and remarks.md are still case-sensitive.
Updated
MKIOCCCENTRY_VERSION
to"1.2.18 2025-02-08"
.Updated
SOUP_VERSION
to"1.1.17 2025-02-08"
.Release 2.3.27 2025-02-07
Resolve issue #1070.
The simplified command line should be complete! (Or if not complete it is just
about complete and should be done relatively simply.) The next step will be to
update the man page and any documentation in the website (that might have to be
done, perhaps talking about all the steps).
I renamed the
mkiocccentry()
function tocopy_topdir()
and the function thatverifies everything is
verify_submission()
(yes this is unfortunate because ofthe
verify_submission_dir()
which actually happens afterverify_submission()
but it seemed like an appropriate name - and unfortunately it comes much later
in the process so they can't be merged).
Add list of ignored symlinks to
copy_topdir()
. This is useful as otherwise theuser might think it's a regular file and not understand why it's being ignored.
Ask user if forbidden files list is okay (even though they are always forbidden
it might be that the user needs such a file in the submission and they can come
up with some other way to go about it).
Move the check of
prog.c
,Makefile
andremarks.md
to the second step(during the traversing of the submission directory where the files were copied
to).
Updated
MKIOCCCENTRY_VERSION
to"1.2.17 2025-02-07"
.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.9 2025-02-07"
.Added
Makefile.test
intest_ioccc
which themkiocccentry_test.sh
scriptuses. This is necessary because the Makefile that was used before was the top
level Makefile here and using
make clobber
on it caused errors (because ofmissing subdirectories).
Unrelated but I have removed
XXX
comments in FAQ.md as the task had been done(updating links after the great fork merge).
Release 2.3.26 2025-02-06
More work on #1070.
collect_topdir_files()
has been renamedmkiocccentry()
.write_info()
now writes additional files to the manifest. This means thedynamic arrays are in the struct info (the
extra_files
variable in the structhas been removed and the
extra_count
is asize_t
).The required files are now processed (checked) after traversing the topdir.
These files are in a new array (
required_files
) and they are shown to the userprior to showing any extra files (which in this case includes files that are not
try.sh or try.alt.sh).
The
check_prog_c()
,check_Makefile()
andcheck_remarks_md()
functions hadto change because we cannot (and this was a bug fix) know exactly where the
files might be (or where the user runs the program from, see below). These
functions also no longer check the filename length of the files as we already
know they are the correct length AND also the new path is not necessarily the
same. Also, the
char *
s that have the filenames of"prog.c"
,"Makefile"
and
"remarks.md"
are no longer there: we simply write them directly (this wasnecessary because a problem occurred - though that was likely fixed - and
because we no longer need it anyway as the filenames are exact [before one could
specify a different filename and it would copy it to the right filename but now
this is not possible]).
The
free_info()
has been changed to account for the changes in the struct.Updated
find_utils()
to check formake(1)
(default paths/usr/bin/make
andif not that
/bin/make
). New option tomkiocccentry
is-m make
to do this.This will be needed for part of #1070.
Updated
mkiocccentry(1)
or the new-m make
option.Updated
MKIOCCCENTRY_VERSION
to"1.2.16 2025-02-06"
.Updated
SOUP_VERSION
to"1.1.16 2025-02-06"
.Updated
TXZCHK_VERSION
to"1.1.11 2025-02-06"
.Release 2.3.25 2025-02-05
Sync jparse repo to
jparse/
for newutility function
mkdirs()
. As described injparse/CHANGES.md
:This is used to create (sub)directory trees in submission tarballs.
Function
verify_submission_dir()
now uses-R
inls
and while there is aline to read it checks if it matches the correct form. When the loop is done if
no correct line was found then it is an error (if it's < 0 from the beginning it
is also an error).
collect_topdir_files()
now copies additional files to the submissiondirectory. It requires obtaining absolute paths for the target file and the
source files because otherwise files might not be found (this does mean we have
to use
getcwd()
and have buffers of sizePATH_MAX+1
). There are numerous XXXcomments added pointing out that some of this has to be changed and perhaps
cleaned up (one such thing is that prog.c, Makefile and remarks.md will not be
checked when traversing the topdir but processed later on with the other files -
but there are other things that have to be done in addition to steps not yet
implemented). So although some of this will have to be changed some of it can
simply be moved and perhaps changed a bit (or adapted into what has to be done
depending on the steps). Depending on the file the permissions are different
(
try.sh
andtry.alt.sh
are the only ones allowed to be executable, forexample).
Updated
MKIOCCCENTRY_VERSION
to"1.2.15 2025-02-05"
.Release 2.3.24 2025-02-04
collect_topdir_files()
now creates dynamic arrays for lists offiles/directories (ignored/skipped, added etc.), sorted after traversing the
directory. Although it does add the
prog.c
,Makefile
andremarks.md
duringthe traversing of the directory it still adds those to the list of files. When
the traversing is done it shows the user the list of files and it will prompt
them if everything is in order (assuming the three required files were found and
there was not an error condition). Some arrays are not shown to the user (yet?)
and it is not yet clear if all of them will be needed either.
Add symlinks to ignored files list in
collect_topdir_files()
.Show forbidden files list in
collect_topdir_files()
.The
mkiocccentry_test.sh
script had to be updated due how the checks on themaximum depth is now done.
Updated
MKIOCCCENTRY_VERSION
to"1.2.14 2025-02-04"
.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.8 2025-02-04"
.Release 2.3.23 2025-02-03
Improve function
copyfile()
(from jparserepo) so that it can either copy the mode
from the source file to the destination file (mode as in
stat(2)
'sst_mode
)OR set to a specific mode. This necessitated updating
mkiocccentry(1)
.Use (in
copyfile()
)errp()
in some cases where it waserr()
(when we haderrno
). Also in case oferrp()
usestrerror(errno)
.Updated
MKIOCCCENTRY_VERSION
to"1.2.13 2025-02-03
.Release 2.3.22 2025-02-02
Sync jparse repo to
jparse/
for newutility function
copyfile()
. As described injparse/CHANGES.md
:mkiocccentry
now usescopyfile()
instead ofcp(1)
. Updatedfind_utils()
to not look for
cp(1)
and removedCP_PATH_0
andCP_PATH_1
macros. Thecalls to
find_utils()
were updated which meanstxzchk
was also updated.mkiocccentry_test.sh
no longer has the-c cp
option. Updated man pages ofmkiocccentry
andmkiocccentry_test.sh
.collect_topdir_files()
now skips descendants of ignored directory names. Italso checks for forbidden filenames before checking the file type. The same goes
for checking if it's a sane relative path. Prior to checking the file type, if
it is ignored it will be processed (as necessary - not yet done) and if it's a
forbidden filename it will also be processed (as necessary - not yet done). If
it is not ignored and not forbidden then we check if it's a sane relative path
and depending on the type of file (directory or regular file) we do the next
step. There still is no list of files yet but this prevents having to go down
directories that are to be ignored and not checking forbidden filenames (other
than it being forbidden) etc.
Updated
MKIOCCCENTRY_VERSION
to"1.2.12 2025-02-02"
.Updated
MKIOCCCENTRY_TEST_VERSION
to"1.0.7 2025-02-02"
.Updated
TXZCHK_VERSION
to"1.1.10 2025-02-02"
.Updated
SOUP_VERSION
to"1.1.15 2025-02-02"
.Release 2.3.21 2025-02-01
Add
O_CLOEXEC
flag toopen(2)
inwrite_info()
andwrite_auth()
functionsin mkiocccentry.
Updated
MKIOCCCENTRY_VERSION
to"1.2.11 2025-02-01"
.Remove unused
test_paths()
fromsoup/entry_util.c
.Release 2.3.20 2025-01-31
Updated
mkiocccentry.1
for newmkiocccentry(1)
command line syntax alongwith some other fixes. More checks need to be done with this update, however.
Fix
txzchk
to use macro names fortry.sh
andtry.alt.sh
. Also add newcount variables for files with invalid permissions and number of executable
files. Added a good test file and a bad test file. Rebuilt error files.
Updated
TXZCHK_VERSION
to"1.1.9 2025-01-31"
.Sync jparse repo to
jparse/
for newutility function to check for ignored (or if desired forbidden) path components.
This will be useful when traversing directories. It is currently used for this
but ignored paths are still not processed (just skipped). (A new function was
added to mkiocccentry.c for this too.)
Fixed bug in mkiocccentry where the max depth error was reporting the wrong
depth.
Updated
MKIOCCCENTRY_VERSION
to"1.2.10 2025-01-31"
.Release 2.3.19 2025-01-30
More work on #1070.
The files (unless
try.sh
ortry.alt.sh
but see below) copied are nowread-only (as in
-r--r--r--
) and directories aredrwxr-xr-x
) andtxzchk(1)
now verifies this. In order to get tests to work the copying of extra files is not
done so technically the
try.sh
andtry.alt.sh
part is for future reference.To be specific, the following permissions will be set by mkiocccentry and
verified by txzchk:
directory and MUST be
-r-xr-xr-x
. If any other executable file is found it isan error.
drwxr-xr-x
. If any other permissions fordirectories are found it is an error.
-r--r--r--
. This includes the three mandatory files AND.info.json
AND.auth.json
. If any other permissions for files are set it isan error.
The test suite still checks for depths that are too deep because the
collect_topdir_files()
scans the entire tree. The only difference now is thatno extra files are copied. As the
check_extra_data_files()
function wouldbecome obsolete when this issue is resolved it is not a big deal that the
function is now gone, especially as the way it was called was not how it will be
done (the
workdir
is the source of all files not just the required files).Because of this change the
extra_count
is set to 0. However the test filesstill can be verified and the test txzchk files are not affected by this fact.
Thus the only change here is that extra data files are not currently copied to a
submission directory and won't be until the rest of the
topdir
is processed.Updated
MKIOCCCENTRY_VERSION
to"1.2.9 2025-01-30"
.Updated
TXZCHK_VERSION
to"1.1.8 2025-01-30"
.Release 2.3.18 2025-01-29
More work on #1070.
The
collect_topdir_files()
now verifies that all three required files(
prog.c
,Makefile
andremarks.md
) are found.The
collect_topdir_files()
also only records extra files if it's not anoptional file or a required file.
Removed the
MKIOCCENTRY_DEV
macro. Instead it now defaults to the new way butwith the ability to (for now) specify extra files as additional args. This is
not how it will remain but this change allows for easier development. The
mkiocccentry_test.sh
script was updated to account for this. Thewarn_*()
functions no longer take a
char const *
of the file they are warning againstas it's required to be the specific names so there is no need to repeat it (plus
it's called in multiple locations and we do not always have the path).
This means that
make test
can work in the new way though later the script willhave to be changed again.
Updated
MKIOCCCENTRY_VERSION
to"1.2.8 2025-01-29"
.Bug fix debug output in
txzchk
when adding full filename to list (previouslyit had to do basename but now full path).
Updated
TXZCHK_VERSION to "1.1.7 2025-01-29"
.Release 2.3.17 2025-01-28
Make more progress on #1070.
Rename
collect_files()
tocollect_topdir_files()
. The function now checksfor
prog.c
,Makefile
andremarks.md
, running the checks on them (like inthe old command line interface), copying them to the work directory if all is
okay. To do this it has to record the directory that the tool was run from as
well as the topdir (as in file descriptor of it) as it has to switch back and
forth between the directories. For the
check_prog_c()
,check_Makefile()
andcheck_remarks_md()
functions the filenames have to be faked: that is they haveto be in the form:
topdir/prog.c
,topdir/Makefile
andtopdir/remarks.md
.For now the code also allows one to specify extra filenames as optional args.
This will change when this issue is resolved completely as only files under
topdir will be copied over. Doing this for now does allow for extra files to be
copied to the submission tarball, however, which is useful for testing.
No lists are yet created so we do not show the user what directories/files were
ignored. It is very likely that some (or possibly a lot) of this code will have
to change but it should be possible to adapt it into new functions (which will
be necessary).
Added new functions to check if a string (or a
char const *
) matches amandatory filename, a forbidden filename, an optional filename or an ignored
directory name. These functions are used in the
test_extra_filename()
function(which now also checks for ignored directory names).
Updated
MKIOCCCENTRY_VERSION
to"1.2.7 2025-01-28"
.Updated
SOUP_VERSION
to"1.1.14 2025-01-28"
.Release 2.3.16 2025-01-26
More work on #1070: the check on files being found now is done from the
directory that the user specifies. This involved an enhancement to the jparse
function
sane_relative_path()
. That enhancement allows filenames to start with./
as when walking from.
the function prepends./
to each filename. Therevery possibly will be a new enhancement/utility function required before the
filenames can be written to the .info.json file but that will have to be
determined later.
A memory error was fixed in the
jparse
functioncount_comps()
.Updated
SOUP_VERSION
to"1.1.13 2025-01-26"
.Updated
MKIOCCCENTRY_VERSION
to"1.2.6 2025-01-26"
.Updated
TXZCHK_VERSION
to"1.1.6 2025-01-26"
.Release 2.3.15 2025-01-24
More work done on #1070. The function
count_files()
insoup/entry_util.c
hasbeen renamed to
collect_files()
and it now only counts files that are valid,checking for unsafe names, depth too deep, too long filenames and so on. If too
many files are found (it does not consider optional files or required files yet)
it is also an error. Nothing is added to a list yet.
The mkiocccentry tool has been updated to use this function, showing debug
output if
-v 1
. It can no longer fake the paths toprog.c
,Makefile
andremarks.md
so it exits 0 after the call to thecollect_files()
function.With low debug level (1) it will show what files are collected.
Updated
SOUP_VERSION
to"1.1.12 2025-01-24"
.Updated
MKIOCCCENTRY_VERSION
to"1.2.5 2025-01-24"
.Sync jparse repo to
jparse/
to fix someminor issues in
sane_relative_path()
.Release 2.3.14 2025-01-20
The
test_ioccc/test_JSON
is now built by a new tooltest_ioccc/gen_test_JSON.sh
via the
make test_JSON
rule intest_ioccc/Makefile
.The
test_ioccc/gen_test_JSON.sh
tool buildstest_ioccc/test_JSON
fromtest_ioccc/template.test_JSON
as well assoup/limit_ioccc.h
andsoup/limit_ioccc.h
to change selected values of the form %%TOKEN%so that changes to, for example, versions will be automatically
applied to the resulting
test_ioccc/test_JSON
tree.The
make clobber
rule intest_ioccc/Makefile
removesthe
test_ioccc/test_JSON
tree.Fixed a number of broken tests in the
test_ioccc/test_JSON
tree.Updated and sorted
.gitignore
.Fixed debug message that incorrectly stated that was unknown.
Changed
MKIOCCCENTRY_REPO_VERSION
from "2.3.12 2025-01-18"to "2.3.14 2025-01-20".
Changed
SOUP_VERSION
from "1.1.10 2025-01-19"to "1.1.11 2025-01-20".
Change
mkiocccentry_test.sh
to not test-d
as it now sets-E
which causesa failure.
Add to the macro
MKIOCCCENTRY_DEV
so that for now it at least will run thetests on
prog.c
,Makefile
andremarks.md
and form the tarball even thoughit's not complete (it won't ignore the right files, it doesn't do anything with
the other files etc. but this way at least the program won't fail when working
on the issue).
Changed
MKIOCCCENTRY_VERSION
to"1.2.4 2025-01-20"
.Release 2.3.13 2025-01-19
Bug fix
noprompt_yes_or_no()
inmkiocccentry.c
(it had missingnot_reached()
aftererr()
calls).Bug fix
inspect_Makefile()
inmkiocccentry.c
to skip built-in Makefile rules(those starting with a '.') because if someone has, for instance, what we have
here and in jparse (
.NOTPARALLEL:
) it will confuse the checker and cause the'all' rule to not be detected as first which puts the submitter at a big risk of
violating rule 17.
Change
MKIOCCCENTRY_VERSION
to"1.2.3 2025-01-19"
.Start work on issue #1070. To not interfere with the current system and to allow
others (namely Landon) to work on it too, it uses a macro:
MKIOCCCENTRY_DEV
.If this is defined it will require 2 args and it will not set the prog.c,
remarks.md or Makefile variables as they won't exist. This means the functions
that pass in those variables are not called either. The usage message is
simplified for the dev version. If it is defined it will set the topdir too.
Also changed the
work_dir
variable toworkdir
(in both modes). IfMKIOCCCENTRY_DEV
is used to compile the tool thenmake test
WILL fail!This is because the script uses the old four mandatory arguments (and the
optional files in some cases too).
Fixed a NULL pointer dereference in
mkiocccentry
:answers
was passed todbg() even if it was NULL (none of the answers options were used).
Release 2.3.12 2025-01-18
Increase the
OPTIONAL_SUBMISSION_FILES
to 3 due to the additional optionalfile
try.alt.sh
.Sync jparse repo to
jparse/
to fix somebugs and add missing strings (to
-h
and-V
in some tools). Also bug fixedthe
jparse_bug_report.sh
script (yes this is ironic).Release 2.3.11 2025-01-17
Bug fix
txzchk
to check for required files in top level directory only (withthe exception that dot files are not allowed in any subdirectory and the only
dot files allowed in the top level directory are
.info.json
and.auth.json
).Added new test files to
txzchk
test suite, both good and bad (with associated.err
files).This fix involved a bug fix and enhancement to the jparse library (not the JSON
parser but the
util.c
file) which involved syncing the jparse repo again.Updated
TXZCHK_VERSION
to"1.1.4 2025-01-17"
.Added new macro (in jparse)
JPARSE_UTILS_VERSION
set at"1.0.0 2025-01-17"
.This is strictly so that the JSON parser library version is not changed when
something not strictly related the jparse JSON parse(r) related routines are
changed. In other words,
json_util.c
is a jparse library version (likejparse.l
andjparse.y
) change but a change inutil.c
is a change in theJPARSE_UTILS_VERSION
. The tools (in jparse and here) now refer to this in both-h
and-V
.Added even more bad
txzchk
test files for those with special bits (as anythingnot marked as
-
ord
inls -l
).Reversed the argument order for
chkentry(1)
. Now the.auth.json
argcomes before
.info.json
. Now, one may do the following, assuming thatthe
topdir
has the.auth.json
and.info.json
files:chkentry topdir/.*.json
Major updates to
txzchk(1)
. It no longer tests for total files against themaximum but rather extra files against the extra file maximum. As subdirectories
are now allowed the warning for more than one file with the same name depends on
the directory. It might be worth noting that when an identical filename is found
more than once it increments the count but it can cause confusing output exactly
because it is confusing (and should never happen unless someone is messing with
their tarball or has some system error). It also now checks for optional files
which do not count against extra files and neither do required files. In a
function a variable was no longer used so it has been removed and in some other
places code was no longer necessary (where it was) so said code was also
removed. Added a new test case file in both good and bad directories. Rebuilt
error files.
Possibly some bug fixes were made during the above.
Updated version of
txzchk
to"1.1.5 2025-01-18"
and updated JSON files toaccount for this.
New array in
soup/entry_util.c
which is of optional filenames (these only countif they're in the top level directory).
Bug fix
bug_report.sh
to check forMakefile.local
, notmakefile.local
.This same change was done in other files that still referred to it with the
exception of this file and .gitignore. It was done in dbg/ and dyn_array/ but
the change needs to be done in the repos too.
Release 2.3.10 2025-01-16
Added
-E
tomkiocccentr(1)
to exit non-zero (1 in fact) onthe first warning.
Added
-s seed
tomkiocccentr(1)
seed a pseudo-random generator,then generate a
random_answers.seed
file with pseudo-random answers,and then to use that as if
-i random_answers.seed
had been called withpseudo-random answers. This is useful as a dry run in that one does
not have go thru the interactive process of answering questions.
Added
-d
as an alias for-s 21701
.While an effective seed is any value from 0 thru 2147483647, we tested
mkiocccentr -s seed
for seeds 0 thru 32767.Fixed the message about use of the 'test" user to not refer
to sending Email.
Removed the need for
IOCCC_WINNER_HANDLE_READY
as it is now ready.The hint now refers to the FAQ URL:
Fixed typos in
soup/location_tbl.c
where there were improper trailingcommas in strings.
Moved
MKIOCCCENTRY_ANSWERS_EOF
frommkiocccentry.h
tosoup/version.h
, even though it is not strictly a version relatedstring, because
MKIOCCCENTRY_ANSWERS_EOF
is used in conjunction withMKIOCCCENTRY_ANSWERS_VERSION
which is insoup/version.h
.Fixed
mkiocccentry -y
so that it prevents a yes/no prompt from beingused. The use of
mkiocccentry -i answers
will ask the user to verifythe list of files for the submission unless
-y
is also given.The highbit warning is not permanently set to
false
as we now allowall UTF-8 in IOCCC source code.
Changed
MKIOCCCENTRY_VERSION
from "1.1.6 2025-01-13"to "1.2 2025-01-16".
Changed
MKIOCCCENTRY_REPO_VERSION
from "2.3.9 2025-01-14"to "2.3.10 2025-01-16".
Fixed
make all test; make test
failure.Added to list of forbidden files
GNUmakefile
. This involved an update to theforbidden_filenames
array insoup/entry_util.c
and making bothtxzchk
andmkiocccentry
use that array. This means that theMKIOCCCENTRY_VERSION
wasbumped again, making it
"1.2.1 2025-01-16"
. TheTXZCHK_VERSION
was updatedto
"1.1.3 2025-01-16"
. The test JSON files were updated for both of theseversion updates. A new bad test file for txzchk was added along with its
appropriate err file.
Make
mkiocccentry_test.sh
test-d
option (which uses-s seed). Updated version of script to
"1.0.4 2025-01-16"`.Removed blank lines from
mkiocccentry.1
(they're not needed and some say it'sincorrect).
Make
mkiocccentry
random answers file prependhttp://example.com/
(andhttps://example.com/
to the URLs. The emails probably should be@example.com
too but that can be worried about another time.
Changed
MANDATORY_FILE_COUNT
toMANDATORY_SUBMISSION_FILES
to clarifythe meaning of this value. This value remains at 5.
Added
OPTIONAL_SUBMISSION_FILES
to list the 2 files that aremay be added without being counted an extra file.
Added
MAX_EXTRA_FILE_COUNT
to give the maximum number of extra filesfor a submission. This does NOT include mandatory files, nor does
it include optional files a submission. This value as been set to 31.
Now
MAX_FILE_COUNT
refers to the maximum total file count, includingmandatory files, optional files, and extra files for a submission.
Added important comments to
soup/limit_ioccc.h
aboutboth submission and winning entry mandatory and optional files.
NOTE: The above file limits refer to submissions, not a winning entries
as IOCCC judges are free to add additional files to a winning entry as needed.
NOTE: As a result of the above,
MAX_FILE_COUNT
is 5+2+31 = 38,an increase from the effective file count limit of 42-5 = 37 when
the mandatory file count was subtracted from MAX_FILE_COUNT in the code.
Release 2.3.9 2025-01-14
Renamed
test_extra_file()
to better account for what it is:test_extra_filename()
. Improved the function to use twochar *[]
s so that wedon't have to have checks on each file manually in each tool that uses it,
though at present only
chkentry(1)
uses it (it is not clear if any other toolcan use it in the future but this update allows for more easily maintaining the
list of filenames that must be present and that must not be present).
Release 2.3.8 2025-01-13
Work done on new
mkiocccentry
options-d
and-s seed
(both will bedocumented when completed).
Sync jparse repo to
jparse/
with newutility functions that act on directory paths. These functions are:
dir_name()
: takes a path and strips offlevel
components (i.e./
). Inthe case of successive
/
s it removes those as well. The comments at the top ofthe function explains in more detail the way the
level
works. This is modelledafter the
base_name()
function which functions as thebasename(3)
function;dir_name()
functions asdirname(3)
.count_comps()
: counts in a string the number of components delimited by thecomponent character (a
char
). Successive component characters are counted asone. The comments at the top of the function details specifics.
count_dirs()
: usingcount_comps()
(with component/
), count the numberof directory components in a path.
Updated the jparse utility test code to test the new functions.
Remove blacklisting of
inventory.html
file. This involved a new version ofmkiocccentry
,txzchk
andchkentry
as all of these tools prevented suchfiles from existing.
Release 2.3.7 2025-01-12
Removed
Makefile.example
as this file duplicates the contents ofMakefile.example from "the other repo".
Release 2.3.6 2025-01-10
Update regexp error message in mkiocccentry. (This was done in jparse too and
that was synced from the jparse repo).
Fix check in mkiocccentry (<= 0, not < 0).
Minor bug fix in txzchk where errno was set to 0 after the function call.
Updated txzchk and mkiocccentry version which required updating JSON files too.
Slight update to GitHub issue template files to match the other one (and should
look nicer in the subject line).
Release 2.3.5 2025-01-08
Update
mkiocccentry_test.sh
to test the new subdirectory option ofmkiocccentry
, with the depth being valid and the depth being too high.Fix regexp in error message for basename of files according to how
sane_relative_path()
functions.Sync
jparse/
from jparse repo with acomment to
sane_relative_path()
(about regexp it enforces) and additional testcases to the util test code.
Updated FAQ about how to use `mkiocccentry as well as the man page (with some
details on how the mkiocccentry will copy directories now). The FAQ, guidelines
and rules have to be updated in the winner repo and that'll come next unless
something comes up here.
Release 2.3.4 2025-01-07
Submission tarballs can now have subdirectories! This is a major release that
will require updates to the guidelines, the rules and FAQ in the website (and
this will be done soon). To get this to work a new jparse library release was
also made, synced from the jparse repo.
There are other changes as well but the relevant ones are:
New utility functions:
which determine if a path is both relative and POSIX plus + safe, based on the
maximum depth, maximum path length and the maximum length of each component. An
enum was added:
The new function
sane_relative_path()
returns one of those values depending onthe condition (except that it won't return
PATH_ERR_UNKNOWN
as that is for theother two functions in the case one passes an invalid value). The function
path_sanity_name()
returns a read-only string of the enum value that matchesthe name (i.e.
"PATH_OK"
forPATH_OK
).path_sanity_error()
returns asimple message based on the value passed in although there is some room for
improvement.
The utility test code has many new cases that tests every condition of
sane_relative_path()
.Tools in this repo that were changed for this enhancement are
txzchk
,mkiocccentry
andchkentry
. To include a subdirectory in a submission tarballyou may just specify the path and
mkiocccentry(1)
will do the right thing byusing
-r
tocp
.Maximum depth of 4 directories. Reduced size of max filename length (to 38, the
length of UUIDs) and max path length of a file is 99.
New test tarball files. Rebuilt error files.
Changed
SOUP_VERSION
to"1.1.4 2024-12-31"
.Changed
MKIOCCCENTRY_VERSION
to"1.1.3 2025-01-07"
.Changed
TXZCHK_VERSION
to"1.1.0 2025-01-07"
.Changed
CHKENTRY_VERSION
to"1.0.4 2025-01-07"
.This discussion was created from the release Release version 2.4.0 2025-02-28.
Beta Was this translation helpful? Give feedback.
All reactions