Bug 2360489 - Review Request: anubis - Weighs the soul of incoming HTTP requests using proof-of-work to stop AI crawlers
Summary: Review Request: anubis - Weighs the soul of incoming HTTP requests using proo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2360490 2371327 2371335
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-16 22:46 UTC by Davide Cavalca
Modified: 2025-08-20 20:47 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-08-18 23:11:26 UTC
Type: ---
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)

Description Davide Cavalca 2025-04-16 22:46:32 UTC
Spec URL: https://dcavalca.fedorapeople.org/review/anubis/anubis.spec
SRPM URL: https://dcavalca.fedorapeople.org/review/anubis/anubis-1.16.0-1.fc43.src.rpm

Description:
Weighs the soul of incoming HTTP requests using proof-of-work to stop AI
crawlers.

Fedora Account System Username: dcavalca

Comment 1 Fedora Review Service 2025-04-16 22:46:44 UTC
There seems to be some problem with the following file.
SRPM URL: https://dcavalca.fedorapeople.org/review/anubis/anubis-1.16.0-1.fc43.src.rpm
Fetching it results in a 403 Forbidden error.
Please make sure the URL is correct and publicly available.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Neal Gompa 2025-04-16 22:47:07 UTC
Taking this review.

Comment 3 Davide Cavalca 2025-04-16 22:47:21 UTC
This will not build as-is. It needs https://bodhi.fedoraproject.org/updates/FEDORA-2025-a9e62b593c and two more unpackaged things (cssnano and postcss-url) to build the assets.

Comment 5 Davide Cavalca 2025-07-16 21:45:46 UTC
Looks like there's something wrong with cssnano as it's not being picked up properly:

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.TnfqJn
+ umask 022
+ cd /builddir/build/BUILD/anubis-1.20.0-build
+ cd anubis-1.20.0
+ make assets
go generate ./...
(✓) Complete [ updates=2 duration=1.687791ms ]
(✓) Complete [ updates=3 duration=5.075413ms ]
./web/build.sh

  static/js/main.mjs       7.2kb
  static/js/main.mjs.map  20.7kb

⚡ Done in 3ms
static/js/main.mjs   : 45.60%   (  7.23 KiB =>   3.30 KiB, static/js/main.mjs.zst) 

  static/js/bench.mjs       4.3kb
  static/js/bench.mjs.map  17.4kb

⚡ Done in 2ms
./xess/build.sh
Error: Cannot find module 'cssnano'
Require stack:
- /builddir/build/BUILD/anubis-1.20.0-build/anubis-1.20.0/xess/postcss.config.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1401:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
    at Module._load (node:internal/modules/cjs/loader:1211:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1487:12)
    at require (node:internal/modules/helpers:135:16)
    at Object.<anonymous> (/builddir/build/BUILD/anubis-1.20.0-build/anubis-1.20.0/xess/postcss.config.js:3:5)
    at Module._compile (node:internal/modules/cjs/loader:1730:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/builddir/build/BUILD/anubis-1.20.0-build/anubis-1.20.0/xess/postcss.config.js'
  ]
}
make: *** [Makefile:17: assets] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.TnfqJn (%build)
    Bad exit status from /var/tmp/rpm-tmp.TnfqJn (%build)

Comment 6 Davide Cavalca 2025-07-16 22:06:57 UTC
Spec URL: https://dcavalca.fedorapeople.org/review/anubis/anubis.spec
SRPM URL: https://dcavalca.fedorapeople.org/review/anubis/anubis-1.20.0-1.fc43.src.rpm

Changelog:
- temporarily clobber the postcss config to get it to build, as it can't find cssnano otherwise; this needs to be fixed properly before importing
- clobber more broken tests in mock

Comment 7 Jiří Kyjovský 2025-08-11 15:07:51 UTC
I created copr repo with the latest updates that contains blockers for anubis: https://copr.fedorainfracloud.org/coprs/nikromen/anubis-test/packages/

the postcss-cli contains a wrapper that sets NODE_PATH correctly to fix the "Not found cssnano" issue

```
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{name}
cp -pr package.json index.js lib/ %{buildroot}%{nodejs_sitelib}/%{name}/
# Copy over bundled nodejs modules
cp -pr node_modules node_modules_prod %{buildroot}%{nodejs_sitelib}/%{name}/

mkdir -p %{buildroot}%{_bindir}
# wrapper script for postcss CLI to set NODE_PATH
cat << 'EOF' > %{buildroot}%{_bindir}/postcss
#!/bin/sh
# Set NODE_PATH to the system-wide node_modules directory
export NODE_PATH=%{nodejs_sitelib}
# Execute the actual postcss script, passing all arguments
exec %{nodejs_sitelib}/%{name}/index.js "$@"
EOF

# Make the wrapper script executable
chmod +x %{buildroot}%{_bindir}/postcss

%check
%{buildroot}%{nodejs_sitelib}/%{name}/index.js --help
```

and it also contains the preset-advanced for cssnano which is under review https://bugzilla.redhat.com/show_bug.cgi?id=2387591

and the anubis builds with these fixes (and with the correct xess/postcss.config.js), so hopefully these will unblock it.

Comment 8 Davide Cavalca 2025-08-17 23:14:18 UTC
Thank you, I've pushed the wrapper in https://src.fedoraproject.org/rpms/postcss-cli/c/e6e2b71123e1b263b311f736391fa751e98e4522 and it's building now.

Comment 9 Davide Cavalca 2025-08-18 00:14:56 UTC
Spec URL: https://dcavalca.fedorapeople.org/review/anubis/anubis.spec
SRPM URL: https://dcavalca.fedorapeople.org/review/anubis/anubis-1.21.3-1.fc44.src.rpm

Changelog:
- update to 1.21.3
- update license tag
- add missing BR and drop postcss hack now that it actually works

Comment 10 Davide Cavalca 2025-08-18 00:15:19 UTC
Note: this last build depends on https://koji.fedoraproject.org/koji/buildinfo?buildID=2802679 which is pending signing at the moment.

Comment 11 Fedora Review Service 2025-08-18 00:16:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9439081
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2360489-anubis/fedora-rawhide-x86_64/09439081-anubis/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 12 Davide Cavalca 2025-08-18 04:07:18 UTC
[fedora-review-service-build]

Comment 13 Fedora Review Service 2025-08-18 04:09:45 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9439474
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2360489-anubis/fedora-rawhide-x86_64/09439474-anubis/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 14 Davide Cavalca 2025-08-18 14:32:28 UTC
[fedora-review-service-build]

Comment 15 Fedora Review Service 2025-08-18 14:42:14 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/9440618
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2360489-anubis/fedora-rawhide-x86_64/09440618-anubis/fedora-review/review.txt

Found issues:

- Documentation size is 2399773 bytes in 110 files. 
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 16 Neal Gompa 2025-08-18 14:52:32 UTC
Spec review notes:

> %setup -q -T -D -a1 %{forgesetupargs}
> #autopatch -p1

What's up with this? Is there a reason we can't use %autosetup here?

> %systemd_post anubis

Does "default" do something?

Comment 17 Davide Cavalca 2025-08-18 14:55:12 UTC
> What's up with this? Is there a reason we can't use %autosetup here?

This is what go2rpm autogenerates, I tried to change as little as possible of it

> Does "default" do something?

The template instance name is used to infer the environment file to read, and the stock one shipped in the package is default.env, so we use default here to make sure it gets read.

Comment 18 Neal Gompa 2025-08-18 15:36:22 UTC
Review notes:

* Package spec partly generated by go2rpm, simplifying review
* Package follows Fedora Packaging Guidelines
* Vendored dependencies are correctly noted and licenses accounted for
* Package builds and installs
* No serious issues from rpmlint

PACKAGE APPROVED.

Comment 19 Fedora Admin user for bugzilla script actions 2025-08-18 22:56:37 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/anubis

Comment 20 Fedora Update System 2025-08-18 23:07:00 UTC
FEDORA-2025-f772d80558 (anubis-1.21.3-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-f772d80558

Comment 21 Fedora Update System 2025-08-18 23:11:26 UTC
FEDORA-2025-f772d80558 (anubis-1.21.3-1.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2025-08-20 17:30:32 UTC
FEDORA-2025-64fd8c8d97 (anubis-1.21.3-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-64fd8c8d97

Comment 23 Fedora Update System 2025-08-20 20:47:27 UTC
FEDORA-2025-64fd8c8d97 (anubis-1.21.3-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


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