Add .gitmodules for src/rosaria, and tests that a clean clone brings code
src/rosaria and src/waypoints are gitlinks (index mode 160000) with no .gitmodules entry, so a fresh clone created EMPTY directories. Because src/robot/package.xml declares <depend>rosaria</depend>, a clean clone could not be built, and the `rosrun waypoints waypoints_server` step in guide.txt could not resolve. - .gitmodules: declare src/rosaria -> github.com/amor-ros-pkg/rosaria.git. Verified rather than guessed: commit 204dc0c6785abb4037c1c5ee76439cf5f50cb880 exists on that repository's master branch. - src/waypoints: its origin could NOT be identified (not in the Gitea instance, not in the author's GitHub account, not on the machine, not on the web), so no entry was invented for it. It is documented in the README as a known gap and listed in tests/known-gaps.txt. - tests/run.sh: offline integrity checks - packages complete, package names present and unique, catkin toplevel symlink, every gitlink declared or a documented gap, src/rosaria resolves at the pinned commit, every in-tree <depend> points at a package that exists. Exits non-zero on failure. - tests/negative.sh: proves that suite has teeth by breaking one thing at a time in a throwaway copy, with a positive control first. - README: where each gitlink comes from, what a clean clone still lacks, the darknet_ros reference in guide.txt that matches no package, and the stale rosaria licence row (left for the author to decide). Known limitation, documented in the README: the untargeted `git submodule update --init` still aborts, because the unmapped src/waypoints gitlink has no URL to resolve. Initialise by path instead: `git submodule update --init -- src/rosaria`. That works today and will keep working once src/waypoints is sorted out. No package code, CMakeLists or third-party licences were changed; the repository stays GPL-3.0. Not proven: that the workspace builds - there is no ROS in this environment, so catkin_make was never run.
This commit is contained in:
@@ -39,3 +39,101 @@ OpenNI2 headers remain in the repository under
|
||||
next to the source can drop them back into
|
||||
`src/ros_astra_camera/include/openni2_redist/<arch>/`; that directory is now
|
||||
ignored by git so it will not be committed again.
|
||||
|
||||
## Submodules: a clean clone must bring code, not empty directories
|
||||
|
||||
`src/rosaria` and `src/waypoints` are recorded in this repository's history as
|
||||
**gitlinks** (index mode `160000`, i.e. submodule entries), not as plain
|
||||
directories. A gitlink stores only a commit id — the code itself lives in another
|
||||
repository. For a clone to bring that code, each gitlink needs a matching entry in
|
||||
`.gitmodules`; without one, `git clone` simply creates an **empty directory**.
|
||||
|
||||
That was the state of this repository until this fix, and it broke the build:
|
||||
`src/robot/package.xml` declares `<depend>rosaria</depend>`, so while `src/rosaria`
|
||||
was empty a clean clone could not be built.
|
||||
|
||||
### `src/rosaria` — origin identified, fixed here
|
||||
|
||||
`src/rosaria` points at commit `204dc0c6785abb4037c1c5ee76439cf5f50cb880` of
|
||||
**<https://github.com/amor-ros-pkg/rosaria.git>**. This was verified rather than
|
||||
guessed: the commit exists on that repository's `master` branch (it is the merge
|
||||
commit of pull request #56) and its tree contains `package.xml`, `CMakeLists.txt`
|
||||
and `RosAria.cpp`.
|
||||
|
||||
A `.gitmodules` entry now declares it, so a clean clone brings the code:
|
||||
|
||||
```sh
|
||||
git clone <url> p3dx-catkin
|
||||
cd p3dx-catkin
|
||||
git submodule update --init -- src/rosaria
|
||||
```
|
||||
|
||||
**Note the `-- src/rosaria`.** The untargeted `git submodule update --init` still
|
||||
aborts, because `src/waypoints` is a gitlink with no `.gitmodules` mapping and git
|
||||
cannot resolve a URL for it. The same applies to a bare `git submodule status`.
|
||||
Initialising by path works today and keeps working once `waypoints` is sorted out.
|
||||
|
||||
### `src/waypoints` — origin NOT identified; the author must supply it
|
||||
|
||||
`src/waypoints` points at commit `115553cfa8c2ace122414ac5a9b235cd2e225693`, but
|
||||
**that code does not exist in any remote that could be found** — this was checked,
|
||||
not assumed. It is not:
|
||||
|
||||
- in the Gitea instance (`aneto/*`) — no repository matches `waypoints`;
|
||||
- in the author's GitHub account (`ags-neto`) — 15 public repositories, none named
|
||||
`waypoints`, and `ags-neto/waypoints` returns 404;
|
||||
- anywhere on the machine where these checks were run — there is no
|
||||
`waypoints_server` source on it;
|
||||
- on the web — the commit `115553c…` is not reachable from any candidate repository.
|
||||
|
||||
Because the origin is unknown, **no `.gitmodules` entry was invented for it**: a
|
||||
guessed URL would be worse than an honest gap. `tests/run.sh` reports it as a *known
|
||||
gap* and fails only if that list grows (see `tests/known-gaps.txt`).
|
||||
|
||||
The consequence is concrete: `guide.txt` tells you to run
|
||||
`rosrun waypoints waypoints_server`, and in a clean clone that does **not** resolve,
|
||||
because `src/waypoints` is empty.
|
||||
|
||||
Only the author has this code, and there are two honest ways to close the gap. Both
|
||||
are his call:
|
||||
|
||||
1. **Create a repository for it** (Gitea is the natural home), push the package, then
|
||||
add the `[submodule "src/waypoints"]` section to `.gitmodules` with its path and
|
||||
URL; or
|
||||
2. **Bring the directory into this repository** — `git rm --cached src/waypoints` and
|
||||
commit the real files, so the package is plain content and needs no submodule.
|
||||
|
||||
Either way, once it is fixed, remove the `src/waypoints` line from
|
||||
`tests/known-gaps.txt`: the suite reports the baseline as stale until you do.
|
||||
|
||||
## `guide.txt` also runs a package that is not in this workspace
|
||||
|
||||
The object-detection section of `guide.txt` says to run
|
||||
`roslaunch darknet_ros darknet_ros.launch`, but there is **no `darknet_ros` package
|
||||
under `src/`**. This is a documentation-conformance gap, not a gitlink — the package
|
||||
presumably came from another workspace or from a system install. It is recorded here
|
||||
and not fixed: `guide.txt` is the author's.
|
||||
|
||||
## One observation left for the author (licences)
|
||||
|
||||
The licence table above was written when `rosaria` was still an empty gitlink, so its
|
||||
row reads "gitlinks with no content, no licence file to read". Now that `src/rosaria`
|
||||
resolves, that row is stale: at the pinned commit, `rosaria/package.xml` declares
|
||||
`<license>GPLv2</license>` (version 0.9.0). That matters for the repository-wide
|
||||
GPL-3.0 decision, because GPLv2 without "or later" is not compatible with GPL-3.0.
|
||||
The row was deliberately **left untouched** — the licence decision is the author's,
|
||||
not this fix's.
|
||||
|
||||
## Tests
|
||||
|
||||
`tests/run.sh` checks what can be checked without ROS: that every package recorded in
|
||||
the index has `package.xml` and `CMakeLists.txt`, that package names are present and
|
||||
unique, that `src/CMakeLists.txt` is catkin's toplevel symlink, that every gitlink is
|
||||
either declared in `.gitmodules` or a documented known gap, that `src/rosaria`
|
||||
resolves at the pinned commit, that the declared submodule URL is the verified one,
|
||||
that every in-tree `<depend>` points at a package that exists, and that every known
|
||||
gap is documented here. `tests/negative.sh` proves the suite has teeth by breaking one
|
||||
thing at a time in a throwaway copy.
|
||||
|
||||
They do **not** prove that the workspace builds — no ROS was available where they were
|
||||
written, so `catkin_make` was never run.
|
||||
|
||||
Reference in New Issue
Block a user