Bug 2569284 - Review Request: valijson - Update to 1.1.3
Summary: Review Request: valijson - Update to 1.1.3
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Cristian Le
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2026-11-10 03:32 UTC by alexdev
Modified: 2026-11-16 10:21 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
vascom2: fedora-review?


Attachments (Terms of Use)

Description alexdev 2026-11-10 03:32:40 UTC
Spec URL: https://github.com/asavchkov/valijson/blob/a114b9a54789d4b3fa9acd8f81d8280dcfe2911b/valijson.spec
SRPM URL: https://gitlab.com/-/project/88622025/uploads/094d954e675a71647bbe4acec5e90a7c/valijson-1.1.3-1.fc44.src.rpm
Description: Header files for valijson
Fedora Account System Username: alexdev

Current version/release in rawhide: None (retired)
Upstream release that is considered latest: 1.1.3
URL: https://github.com/tristanpenman/valijson

Comment 1 alexdev 2026-11-10 04:07:26 UTC
Dist-git PR https://src.fedoraproject.org/rpms/valijson/pull-request/4

Comment 2 alexdev 2026-11-10 04:47:06 UTC
The reasoning behind this request is that I was experimenting with this package as a new package maintainer and meanwhile the package was retired so I've decided to put it back considering that I've got it ready anyway and that it can be useful for system and backend developers.

Comment 3 Cristian Le 2026-11-12 10:14:51 UTC
[fedora-review-service-build]

Comment 4 Cristian Le 2026-11-12 11:57:07 UTC
Mostly catch-up from the previous structure, but otherwise it looks fine

- The build fails when I run it locally
  ```
  mv: cannot stat 'thirdparty/JSON-Schema-Test-Suite-7ab81c077a6ff1bcf8d3c35b7209e1b402d465de/': No such file or directory
  ```
- The spec file looks good, but the srpm is out-of-sync, it uses a version that failed to build, please make sure these are always in sync 
- Can you contact upstream and ask to expose the tests as a ctest?
- Can you request upstream to install the cmake files in `CMAKE_INSTALL_DATADIR` instead of `CMAKE_INSTALL_LIBDIR`? This would allow to make `-devel` a true `BuildArch: noarch`
- Recommend to use the `%conf` separation unless there is a specific need otherwise
- You should add a `%{nil}` if you are going to use a `%cmake ... \` with a macro at the end. Alternatively you can write that macro line as `-Dvalijson_BUILD_TESTS:BOOL=%{with tests}`
- `--config` in `%cmake_build` is unnecessary we are using single-configuration ninja generators
- Can you look into the examples vs tests and give a quick word if it makes sense to build the examples or not?
- I don't see a reference for the `json11` comment there, can you re-raise it? Afaict it was removed because upstream is unmaintained and removed in Fedora. They even provide `valijson_EXCLUDE_JSON11`, but it seems it does not cover the exclusion of file installation, can you file an issue for them?
- A `Provides: bundled(JSON-Schema-Test-Suite)` is missing
- `include/compat/optional.hpp` is no longer present afaict, so the `BSL-1.0` is mostly no longer relevant. You can keep it for the top-level/SourceLicense, but change it for `devel`
- Please use a raw link for the spec file and other such links that can be `curl` downloaded directly. Much of the integration will break
- You mentioned you had done a copr build of this, it would be nice to include it
- The `Requires` are a bit sus, I suspect you do not need *all* of them, and I do not see `target_link_libraries` or a `Config.cmake` that would do those import requirements. You could shoot upstream a message to get a clarification of this, and I would recommend them to create some wrapper targets for these integrations if desired

Comment 5 alexdev 2026-11-13 08:11:27 UTC
> The build fails when I run it locally

My bad, I earlier changed from the short commit hash to the full one but didn't update the name of the directory inside tar.gz. Fixed it and updated the link to SRPM in the description.

Comment 6 alexdev 2026-11-13 08:18:11 UTC
Copr builds successfully
https://copr.fedorainfracloud.org/coprs/alexdev/valijson/build/11320052

Comment 7 alexdev 2026-11-14 04:44:24 UTC
> Can you request upstream to install the cmake files in `CMAKE_INSTALL_DATADIR` instead of `CMAKE_INSTALL_LIBDIR`? This would allow to make `-devel` a true `BuildArch: noarch`

Agree, will see if I can push the change into the upstream https://github.com/tristanpenman/valijson/pull/261

Comment 8 alexdev 2026-11-14 16:14:12 UTC
> You should add a `%{nil}` if you are going to use a `%cmake ... \` with a macro at the end. Alternatively you can write that macro line as `-Dvalijson_BUILD_TESTS:BOOL=%{with tests}`

I like to write expressions such that they don't produce unnecessary white space when they are expanded. If I write it like this, will it be acceptable?
``` 
%cmake -DCMAKE_BUILD_TYPE=Release%{?with_tests: -Dvalijson_BUILD_TESTS:BOOL=ON}
```

Comment 9 alexdev 2026-11-15 15:20:49 UTC
> They even provide `valijson_EXCLUDE_JSON11`, but it seems it does not cover the exclusion of file installation, can you file an issue for them?

Generally I agree and have created an issue for them: https://github.com/tristanpenman/valijson/issues/262.

However their description of the option says:
```
option(valijson_EXCLUDE_JSON11 "Exclude json11 when building test suite (json11 is archived upstream)." FALSE)
```
so the may respond that this option applies to building and running the tests only.

Comment 10 Cristian Le 2026-11-16 10:21:41 UTC
> I like to write expressions such that they don't produce unnecessary white space when they are expanded.

`%{nil}` should not produce an empty space. The issue is rather than if you try to build it without tests, it will join up with the `%cmake_build` macro below (as a single command) and blow up

> If I write it like this, will it be acceptable?
> %cmake -DCMAKE_BUILD_TYPE=Release%{?with_tests: -Dvalijson_BUILD_TESTS:BOOL=ON}

Well, here is the pattern I generally use insted
```
%cmake \
  -DCMAKE_BUILD_TYPE=Release \
  -Dvalijson_BUILD_TESTS:BOOL=%{with tests}
```

The `%{with ...}`/`%{without ...}` will always evaluate to either 0 or 1, and CMake has various truthy/falsey patterns that it accepts, 0 and 1 being one of them. If you prefer `ON`/`OFF`, you can also get that with `%[ %{with tests} ? "ON" : "OFF" ]`. This is also compatible with `BuildSystem: cmake` if you want to experiment with it.

> so the may respond that this option applies to building and running the tests only.

Main thing is to re-establish dialogue. We can get to a agreement somehow.


Note You need to log in before you can comment on or make changes to this bug.