There are three "tables" with structure initialization lists in mt.c,
which look like they were intended to be nicely-aligned, but over time
they got out of alignment.
Redo the alignment by unwrapping the lines and using Emacs'
align-regex, even though this leads to an exception of ~130 line
length for the 'cmds' table, since it leads to a very readable table
(on large terminals). Also protect these regions from clang-format, in
preparation for full file re-indents.
I can't find any mention of looking up stinit.def in the current
directory first, at least not since version 0.7. Correct the man page
to mention only `/etc/stinit.def'.
Instead of assuming all passed buffers are DEFMAX, use the given
buflen. Also change some types (int→size_t) since these are all
related to string sizes.
There is a long-standing (it was already present in 0.7, so around 15
years) bug in stinit's find_pars function, related to parsing per-mode
configurations. Due to the way the temporary buffers are used, at one
point a strcat() is called on overlapping strings. This is documented
not to work, but it seems the behaviour is not deterministic: for some
pairs of strings it works, for some not (possibly related to distance
between strings, etc.). This results in the fact that parsing the
provided example file fails for _some_ entries, but not for all, with
a seemingly wrong error message (showing snippets of the input file
that do not exist).
Fix this issue in a trivial way by simply using a different (new)
buffer during the mode parsing.
Since we still have copies of files from the kernel sources, keep the
kernel version instead of moving to 'plain' GPL-v2 (only trivial
differences exist).
Fixes#5.
This would have found earlier things such as issue #6, and since it's
only done in distcheck, doesn't impact normal users (for whom
`-Werror` is a bit too strict).
This is much more comprehensive than just 'make' since it actually
runs the binaries (--version mode) and checks that the distributed
archive is complete.
This patch reworks the directory-related variables to allow
installation of binaries under `/usr/[s]bin`, instead of directly
under `/[s]bin`. It also allows installing the man pages under a
different prefix (e.g. `/usr/local`).
Example:
$ make install EXEC_PREFIX=/usr
will install binaries under `/usr/bin`, respectively `/usr/sbin`. A
full "local" installation under `/usr/local` is accomplished by:
$ make install EXEC_PREFIX=/usr/local PREFIX=/usr/local
This patch points once again that an autoconf/automake conversion
would make a lot of sense…
Closes#3. Additionally, it fixes a previous bug with installation of
the manual pages.
Short of moving to autotools, this is the best that can be done:
- move the version from hardcoded in the .c files, to a
dynamically-built `version.h` file so that we only declare the
version in one place
- build a better dist file (.tar.gz) by explicitly selecting which
files to copy, instead of unbounded recursion from the source
directory
- ensure that the files being copied to the archive have a sane
user/group and mode
- add a distcheck target that simply reuses the archive to build and
run the programs, and then regenerate the archive from itself
autotools would solve all this by default, but still feels too
heavyweight for just two .c files.
Additionall, drop the .lsm file. It seems mostly useless these days;
I'll be happy to reinstate it however if anyone cares.
Instead of split per tool, migrate to a single README file, and move
all the changelog information to a separate CHANGELOG file; both new
files are in markdown format.
Additionally, note the handover of package maintainership starting
with the (to-be-released) 1.2 version.
While looking at Fedora's build spec for mt-st, I saw that they recode
the README.stinit file to UTF-8; this makes a lot of sense, so let's
recode all non-UTF files in UTF-8.