<feed xmlns='http://www.w3.org/2005/Atom'>
<title>access-control/ci, branch main</title>
<subtitle>Unnamed repository
</subtitle>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/access-control/'/>
<entry>
<title>Only build the access control executable</title>
<updated>2026-11-15T13:54:31+00:00</updated>
<author>
<name>dev</name>
<email>dev@example</email>
</author>
<published>2026-11-15T13:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/access-control/commit/?id=da06d4f56afa72ae832238f91358b9aeaeaf0da5'/>
<id>da06d4f56afa72ae832238f91358b9aeaeaf0da5</id>
<content type='text'>
The container image and all the server configuration (Dockerfile, entrypoint,
cgitrc, sshd, lighttpd, create-repo, git-host-key) move to the git-host project.
This repo is now just the program: cmd/, src/, test/, the Makefile that builds
git-authz and installs it, and the example policy - the same cmd/src/test/obj
layout the reference projects use.

The CI pipeline keeps the compile-and-test gate (strict, test, sanitizer,
install) and drops the container-build job, which belongs to git-host now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The container image and all the server configuration (Dockerfile, entrypoint,
cgitrc, sshd, lighttpd, create-repo, git-host-key) move to the git-host project.
This repo is now just the program: cmd/, src/, test/, the Makefile that builds
git-authz and installs it, and the example policy - the same cmd/src/test/obj
layout the reference projects use.

The CI pipeline keeps the compile-and-test gate (strict, test, sanitizer,
install) and drops the container-build job, which belongs to git-host now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Layout: cmd/, src/, test/, everything built into obj/</title>
<updated>2026-11-14T00:06:35+00:00</updated>
<author>
<name>dev</name>
<email>dev@example</email>
</author>
<published>2026-11-14T00:06:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/access-control/commit/?id=bc7f4da406fbd802b08985ba583e52f040bdba85'/>
<id>bc7f4da406fbd802b08985ba583e52f040bdba85</id>
<content type='text'>
The tree had grown sideways: main.c living among the sources it dispatches to,
one test binary covering everything, object files left in the source directory
because the Makefile put them there and, worse, tracked them.

Now the command line is cmd/main.c, the engine is src/ and nothing in it knows
about the command line, and each area of the engine has its own program under
test/ - glob, norm, parse, need, check - each linking the library and reporting
its own count.  A failure says which area broke instead of taking the whole run
down with a single "unit: 171" line, which is the only thing a per-file split
buys and it is worth the small duplication the shared test.h absorbs.

Objects go to obj/, test runners to obj/test_runner/, so a build leaves the
tree as it found it.  The stale src/*.o and tests/unit that were committed
earlier are gone; they were build output in a source tree and the .gitignore
that should have stopped them arrived after they did.

The Makefile follows the same shape as the other C trees here: directories in
variables, wildcards for the sources, one pattern rule that makes its own
directory, test runners built from the same objects as the binary so they
cannot test a different build than ships, and `test` running every runner with
a foreach so the first failure stops the line.  `strict` is `all` with -Werror,
which is what CI now calls instead of passing CFLAGS in from outside; the
sanitizer and install targets are unchanged in what they do.

Behaviour is unchanged: 171 direct checks and 154 behavioural ones, same as
before the move, and make install still stages a working hook symlink.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tree had grown sideways: main.c living among the sources it dispatches to,
one test binary covering everything, object files left in the source directory
because the Makefile put them there and, worse, tracked them.

Now the command line is cmd/main.c, the engine is src/ and nothing in it knows
about the command line, and each area of the engine has its own program under
test/ - glob, norm, parse, need, check - each linking the library and reporting
its own count.  A failure says which area broke instead of taking the whole run
down with a single "unit: 171" line, which is the only thing a per-file split
buys and it is worth the small duplication the shared test.h absorbs.

Objects go to obj/, test runners to obj/test_runner/, so a build leaves the
tree as it found it.  The stale src/*.o and tests/unit that were committed
earlier are gone; they were build output in a source tree and the .gitignore
that should have stopped them arrived after they did.

The Makefile follows the same shape as the other C trees here: directories in
variables, wildcards for the sources, one pattern rule that makes its own
directory, test runners built from the same objects as the binary so they
cannot test a different build than ships, and `test` running every runner with
a foreach so the first failure stops the line.  `strict` is `all` with -Werror,
which is what CI now calls instead of passing CFLAGS in from outside; the
sanitizer and install targets are unchanged in what they do.

Behaviour is unchanged: 171 direct checks and 154 behavioural ones, same as
before the move, and make install still stages a working hook symlink.
</pre>
</div>
</content>
</entry>
<entry>
<title>container: the host, built from the program's own install</title>
<updated>2026-11-13T21:32:38+00:00</updated>
<author>
<name>dev</name>
<email>dev@example</email>
</author>
<published>2026-11-13T21:32:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.jnsn.dev/cgit/access-control/commit/?id=47c9b98ea3fb91833d6d0847fa4345fa23593a97'/>
<id>47c9b98ea3fb91833d6d0847fa4345fa23593a97</id>
<content type='text'>
The image is two stages: one compiles, runs the suite and installs into a
staging root, the other is the host and receives that staging root whole.  The
reason for the copy-whole is that the paths in the image are then the paths
`make install` produces - including the hook symlink and its relative target -
rather than a second list of destinations kept in a Dockerfile, which is how an
image and a build start to disagree about where the hook is.

The build stage is Alpine so the binary is musl-linked like the rest of the
runtime image; a glibc binary would fail as "no such file" about a file that is
plainly there.  `make test` runs in that stage, so an image built from a tree
whose tests fail does not get to exist.

The lighttpd config, sshd config, CGI shim, cgitrc and the two operator tools
come from the shell implementation, with the comments corrected: there is no
refcheck any more, and the hook the comments point at is now a symlink to this
binary.  Nothing about the wiring changed, which is the point - the C program
drops into a host that was already built around one hook and one policy file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The image is two stages: one compiles, runs the suite and installs into a
staging root, the other is the host and receives that staging root whole.  The
reason for the copy-whole is that the paths in the image are then the paths
`make install` produces - including the hook symlink and its relative target -
rather than a second list of destinations kept in a Dockerfile, which is how an
image and a build start to disagree about where the hook is.

The build stage is Alpine so the binary is musl-linked like the rest of the
runtime image; a glibc binary would fail as "no such file" about a file that is
plainly there.  `make test` runs in that stage, so an image built from a tree
whose tests fail does not get to exist.

The lighttpd config, sshd config, CGI shim, cgitrc and the two operator tools
come from the shell implementation, with the comments corrected: there is no
refcheck any more, and the hook the comments point at is now a symlink to this
binary.  Nothing about the wiring changed, which is the point - the C program
drops into a host that was already built around one hook and one policy file.
</pre>
</div>
</content>
</entry>
</feed>
