Commit graph

1559 commits

Author SHA1 Message Date
Jelle van der Waa
7acfbe6d92 debian: Add lintian override for woff-font-in-wrong-dir
In Debian Testing this was renamed or newly added, basically the same
lintian rule as font-outside-font-dir.
2026-10-21 10:10:16 +02:00
Jelle van der Waa
618473f951 package.json: Switch to markdown-to-jsx
The PackageKit UpdateDetail signal provides markdown in the
`update_text` and uses remarkable to parse the markdown contents.

Remarkable however has not been updated since 6 years, additionally it
requires us to use `dangerouslySetInnerHTML` which can lead to XSS
issues.

The npm ecosystem has two other markdown alternatives `react-markdown`
and a `markdown-to-jsx`. The latter has zero dependencies while
`react-markdown` has eleven and requires additional plugins like
`rehype-external-links` to add a rel/target to external links.

https://www.freedesktop.org/software/PackageKit/gtk-doc/Transaction.html
https://github.com/jonschlinkert/remarkable/issues/438
2026-10-09 15:43:36 +02:00
Jelle van der Waa
fd3bf8f3ef tools: Drop dist tarball exclude
Fixed in https://github.com/react-dropzone/react-dropzone/issues/1447
2026-09-18 11:32:13 +02:00
Marius Vollmer
63ee509363 debian: Add PSF-2.0 license to copyright.template 2026-09-02 11:37:07 +03:00
tomasmatus
4f630ec70d spec: networkmanger description line is too long
Fix cockpit-networkmanager.noarch: E: description-line-too-long

Related: #23657
2026-09-01 09:50:30 +02:00
Jelle van der Waa
bbdf74044d treewide: Fix typos discovered by codespell 2026-08-18 11:58:12 +02:00
Allison Karlitskaya
0c46dd5729 urls-check: avoid using 'task' from bots
We're trying to get rid of this module and this is one of the last
users.  It isn't really using anything from the module either, other
than the `api` GitHub instance (which it could easily create for itself
directly).

Let's use the GitHub methods directly for everything.  One minor fix:
you close GitHub issues with PATCH, not POST.
2026-06-02 15:46:31 +02:00
Martin Pitt
bd0b6910e7 debian: Bump Standards-Version to 4.7.4
No changes necessary as per
https://www.debian.org/doc/debian-policy/upgrading-checklist.html#version-4-7-4
2026-04-23 10:31:38 +02:00
Luca Boccassi
6dbb80d090 debian: Drop static user cleanup
The cockpit-wsinstance static user was replaced with DynamicUser in
version 330. Cleaning up the obsolete user on upgrade is no longer
necessary, as Debian stable already ships version 337. Drop both the
workaround and the adduser dependency.
2026-04-23 10:31:38 +02:00
tomasmatus
561b86b507 tools/fix-spec: use word boundry for version number replacement 2026-04-16 10:59:54 +02:00
Jelle van der Waa
d6f46c9293 make-sysext: don't enable -Werror
sysext's are used in development for experiments so code might emit
warnings.
2026-02-26 19:33:09 +01:00
Martin Pitt
97a3164358 spec: Fix license typo
It's spelled "GPL-3.0-or-later", not "*-and-*".
2026-02-12 12:18:07 +01:00
Martin Pitt
a7ae147258 REUSE: Convert license headers to SPDX format
Replace full LGPL/GPL/MIT/BSD license header with
SPDX-License-Identifier in all source files. This is more concise and
makes the license information machine readable.

Keep the full text of ISC for src/common/cockpitbase64.[hc], it's small
enough and only used in this pair of files. Also keep the CC-BY-SA
paragraph in pkg/storaged/icons/gnome-icons.jsx as explained in the
previous commit.

See https://reuse.software/spec-2.0/#2-include-a-copyright-notice-and-license-in-each-file

https://issues.redhat.com/browse/COCKPIT-1742
2026-02-04 10:24:11 +01:00
Martin Pitt
8354638840 REUSE: Add missing licenses
The bridge, and also some parts of pkg/lib/ are GPL-3.0-and-later
licensed, not LGPL-2.1. At some point we should clean this up, but for
now accept the status quo and ship the GPL 3 text.

The four patternfly react-templates copies in pkg/lib are MIT licensed.

Rename/add them to "LICENSES/<spdx>.txt" as recommended by
https://reuse.software/spec-2.0/

Note: pkg/storaged/icons/gnome-icons.jsx is CC-BY-SA-3.0 licensed (or
LGPL-3.0). This does not have a canonical plaintext format, just the
webpage. So don't copy that, retaining the current license header in
that file is good enough.

Adjust the .spec accordingly.
2026-02-04 10:24:11 +01:00
Martin Pitt
e4e96f1560 spec: Remove extra COPYING file copy
%license is sufficient, it already copies the license into
/usr/share/licenses. We don't need another copy in the doc dir.

https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
2026-02-04 10:24:11 +01:00
Martin Pitt
528415563b tools: Add missing fields and files to Debian copyright template
- Add Upstream-Contact
- Update top-level Copyright years
- Explicitly give copyright for debian/ packaging
- Add the modified PatternFly react-template copies, they are MIT
- Add test/common/pixeldiff, which was copied from somewhere else

See https://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/2026-January/037817.html
2026-02-03 14:36:57 +01:00
Martin Pitt
0d15c9f1cb build-debian-copyright: Don't top-level merge packages with differing licenses
This resulted in "License: ISC and MIT" for argparse, which is
confusing. Most packages in it are MIT, while
test/resolver/nested_symlinks/mylib/* is ISC.

Refine this by considering each directory with a package.json as a
separate ting initially, and then merging paths to into their parent
paragraph if they have the same license.

Assisted-by: Claude <noreply@anthropic.com>
2026-02-03 14:36:57 +01:00
Martin Pitt
981d301bf6 build-debian-copyright: Scan all node_modules/ files for copyrights
This picks up a lot of copyrights that are not in LICENSE/COPYING files.
See node/* related comments in
https://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/2026-January/037817.html
2026-02-03 14:36:57 +01:00
Martin Pitt
673d935029 tools/node-modules: Tolerate react-dropzone dist tarballs in runtime-tar
react-dropzone 14.4.0 started to include its own
dist/react-dropzone-14.4.0.tgz.

This should be reverted once the bug gets fixed.

https://github.com/react-dropzone/react-dropzone/issues/1447
2026-01-30 10:09:40 +01:00
Martin Pitt
93d6090052 tools/node-modules: Break up known non-text files patterns
This makes the list easier to maintain.
2026-01-30 10:09:40 +01:00
Allison Karlitskaya
b62ab7027f build: bump GLib depend to 2.68, drop hacks
Drop cockpithacks-glib by increasing our dependency to 2.68:
 - the stderr logging hack was only needed before 2.67
 - g_assert_no_error is available since 2.66

The oldest glib version we need to contend with is 2.68.4 on rhel-9-2,
so this should be fine.

Change a g_memdup() call to g_memdup2() to avoid a warning: the new API
is the same as the old one except that it takes `gsize` instead of
`guint`, avoiding integer overflow problems.
2026-01-29 21:02:59 +01:00
Allison Karlitskaya
71614f3a52 tools: drop glib-networking runtime dep from packaging
We used to need this as a runtime dependency when cockpit-ws contained
support for TLS, but since 198b48a3d2 ("ws: Drop TLS support") there
is no reason for it anymore.

We still need to leave it as a build-time dependency because our unit
tests use GIO as a TLS client.
2026-01-29 21:02:59 +01:00
Martin Pitt
e201a5c11a debian: Drop obsolete docbook-xsl build dependency
Using asciidoctor now.
2026-01-29 12:00:24 +01:00
Martin Pitt
d58f998f9c tools: Actually make version argument optional in fix-spec 2026-01-29 09:07:38 +01:00
Allison Karlitskaya
6605f3fc7e pkg/Makefile: stop using termschutz
This was meant to protect us from weird terminal-tampering effects of
npm and webpack but we don't use either of those as part of our build
process anymore.  We can probably drop this by now.
2026-01-28 11:58:16 +01:00
Martin Pitt
ea10fbcc52 ws: Drop pam_cockpit_cert stub
Commit 5b5e29a6 (5 years ago, Cockpit 248) dropped that module and just
kept a stub as backwards compatibility, with warnings on upgrades. Let's
finally remove this. RHEL 9.0 shipped with Cockpit 264, so the real
module was never in there.

Users who still have that will now get a "no such module" in the journal
log, which is ok.
2026-01-28 08:48:05 +01:00
Jelle van der Waa
1cfec353b8 tools: require /usr/bin/node as buildrequires for Fedora rawhidu
Depend on the binary as rawhide transitioned into providing `nodejs` via
a `nodejs-bin`.

https://fedoraproject.org/wiki/Changes/NodejsAlternativesSystem
2026-01-27 21:42:18 +01:00
Allison Karlitskaya
848e36dd0b test: adjust bots imports
We moved some files from task/ to lib/, so update the imports so we can
drop the shims.
2026-01-26 13:32:52 +01:00
Alice Brooks
f82c317a43 spec: improve asciidoctor builddep resolving
/usr/bin/asciidoctor does resolve when using dnf however under zypper
or subsequently building in obs this fails. It seems the more correct
way of handling this is through rubygem(asciidoctor) which works under
both package managers
2026-01-23 08:19:37 +01:00
Yaakov Selkowitz
f680e0e011 spec: Fix dnf5daemon dependency 2026-01-19 09:54:37 +01:00
Jelle van der Waa
766c8b30bc tools: use path based buildrequires for opensuse
zypper does not supported path based installing of packages but
`BuildRequires` does, circumventing unneeded churn of updating the spec
file for every new Ruby version
2026-01-16 16:36:32 +01:00
Jelle van der Waa
56ec1925c6 tools: update asciidoctor dependency for tumbleweed
Tumbleweed is a rolling release distro so the Ruby dependency updates
every now and then. Zypper does not support path based BuildRequires
like dnf does.
2026-01-16 13:05:23 +01:00
Jelle van der Waa
a027d90db9 package.json: drop sizzle for integration tests
Our own builtin :contains implementation is good enough for our
integration tests.

Closes: #19122
2026-01-14 11:35:34 +01:00
Martin Pitt
a0291f0f49 test: Fix devel scenario
Commit a30e928bdb broke the /devel scenario, as we always
rebuilt the bundle during RPM build. Change the spec to accept a
pre-defined `%{rebuild_bundle}`, and pass that from test/image-prepare.
2026-01-12 15:59:44 +01:00
Martin Pitt
b7c0c80fd9 kdump: Hide page on Arch
Arch Linux does not currently support kdump. There is no kexec-tools
equivalent. [1] sounds promising, but it's not currently integrated into
Arch.

Stop packaging the kdump page, and also add a manifest condition so
that it doesn't appear in beiboot/ws-container/Client scenarios.

[1] https://blogs.igalia.com/gpiccoli/2024/07/presenting-kdumpst-or-how-to-collect-kernel-crash-logs-on-arch-linux/

Fixes #21106
2026-01-12 10:12:16 +01:00
Martin Pitt
9fe6fc162c spec: Install pre-built manpages more elegantly
Avoid the repetition of file names.
2026-01-12 09:00:55 +01:00
Martin Pitt
e6797a234b debian: Update watch file to version 5
Done automatically with `uscan --update-watchfile`.

Fixes lintian "older-debian-watch-file-standard 4" info.

lintian < 2.127.0 does not recognize this yet, so we have to ignore its
complaint on older Debian/Ubuntu releases.
2026-01-12 09:00:55 +01:00
Martin Pitt
c38f43929e debian: Drop version in Conflicts: cockpit-tests
Conflics should be unversioned. Fixes lintian

I: cockpit-ws: conflicts-with-version cockpit-tests (<< 331)
2026-01-12 09:00:55 +01:00
Martin Pitt
d2a7b95f97 debian: Fix esbuild/nodejs build dependencies
esbuild on Debian's ppc64 keeps failing:

> TypeError: esbuild.context is not a function
>    at build (file:///build/reproducible-path/cockpit-354/build.js:207:43)

But making these build dependencies architecture specific was bogus
anyway: These are only relevant for the "Architecture: all" packages,
which are built on amd64. The bundle builds are just thrown away on all
other architectures.

So make this explicit and correct, and declare these as
`Build-Depends-Indep:` instead.
2026-01-11 14:34:11 +01:00
Luna D Dragon
197e7cf828 tools/cockpit.spec: require ruby3.4-rubygem-asciidoctor on opensuse
asciidoctor is packaged as a ruby3.4-rubygem-asciidoctor on opensuse
tumbleweed this is required to build the documentation.
2026-01-10 07:54:14 +01:00
Martin Pitt
f1c5912583 debian: Drop obsolete lintian overrides
These don't apply any more with the move from docbook to asciidoc.

Fixes three "unused-override" lintian infos.
2026-01-08 13:02:15 +01:00
Freya Gustavsson
6a0da46280 doc: Prebundle docs on RHEL & CentOS
With this we can get rid of asciidoc-py dependency altogether and
instead rely on the docs being prebundled before installation.

Include the built guide and manpages into the release tarball for that.

Fixes #22670
https://issues.redhat.com/browse/COCKPIT-1370

Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
Co-Authored-By: Martin Pitt <mpitt@redhat.com>
2026-01-08 13:02:15 +01:00
Martin Pitt
9ae2bb1da7 spec: Adjust to shared node modules path in Fedora 44
The latest rawhide esbuild [1] got rebuilt against the updated nodejs
packages which now implement the common module path [2]
/usr/lib/node_modules. Set that as prefered search path. Keep the
version specific ones for Fedora 42 and 43.

[1] https://koji.fedoraproject.org/koji/rpminfo?rpmID=45394723
[2] https://discussion.fedoraproject.org/t/f43-change-proposal-nodejs-node-modules-path-self-contained/157324
2025-12-29 11:49:52 +01:00
Martin Pitt
f9b89c7551 debian: Fix build on unofficial architectures
esbuild and nodejs are not available on the non-primary Debian
architectures, Restrict the build deps to the available architectures,
and keep the prebuilt dist/ for the others.
2025-12-29 11:49:52 +01:00
Martin Pitt
130b606346 debian: Bump Standards-Version to 4.7.3
No changes necessary as per
https://www.debian.org/doc/debian-policy/upgrading-checklist.html#version-4-7-3

Note that we keep the `Priority:` field for the time being for older
releases and their lintians.
2025-12-29 11:49:52 +01:00
Freya Gustavsson
d33f29db99
sysext: Add Bazzite as Fedora-system (#22691)
To get `make-sysext` to work with my system I need to add Bazzite here
to ensure it installs it correctly, otherwise it shows as unsupported
distro. Bazzite is built upon Fedora and is a bootc-based system.

We could do modifications here to look for `$ID_LIKE` instead, but for
now I just added Bazzite.

See-also: https://github.com/cockpit-project/cockpit/issues/22690

Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2025-12-16 20:06:18 +01:00
Freya Gustavsson
23e095b9d3 doc: Move build workflow to AsciiDoc
With the created AsciiDoc files for documentation we can now update our
build structure to generate the HTML and Manpage files both during build
and package distribution.

Changes
- Uses AsciiDoctor or asciidoc-py and a2x to generate HTML and Manpages.
- Generated HTML and Manpage files moved to `doc/output/`.
- Support packaging docs on all distributions Cockpit deploys to.
- Add package dependencies for AsciiDoctor and asciidoc-py.
- Safety fallback in automake file to search for either asciidoctor or
  asciidoc-py in terms of priority.

Known issues
- Links in guide pages goes to new files for the pages themselves, which
  meant we now generate HTML files for all `.adoc` files and not just
  `index.html`.

With the removal of fonts we also managed to break the build pipeline
that automake generated for us. As the doc guide fonts make rule was
removed, which relied on `$(DIST_STAMP)` rule, automake optimized the
build process and in turn broke the workflow. As a workaround the
`$(DIST_STAMP)` rule was added to the index rule as a dep to help
automake generate it the way we want it.

As the workaround is a hack and not a real solution, this needs to be
fixed in another PR to make sure these dependency issues do not occur if
we were to remove `$(DIST_STAMP)` from a rule.

We also need the `$(DIST_STAMP)` to appear last in the doc generation or
something, likely race condition, may cause the `index.html` to only
contain `{}`.

Related-to: https://github.com/cockpit-project/cockpit/issues/22648
Related-to: https://github.com/cockpit-project/cockpit/issues/22647
Co-authored-by: Aleksandra Fedorova <afedorova@redhat.com>
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
2025-12-16 09:41:37 +01:00
Jelle van der Waa
55513a80b0 tools: remove extraneous space 2025-12-12 09:32:32 +01:00
Luca Boccassi
d855d9f109 debian: drop ws dependency on systemd
This version is satisfied since Bullseye.
2025-12-10 09:53:28 +01:00
Martin Pitt
37f62b0ff0 debian: Auto-generate debian/copyright
Now that we ship the node modules tarball as part of the source, we need
to document its copyrights and licenses. Update
tools/build-debian-copyright to the version in cockpit-{files,podman}
(we can drop their copies and import from cockpit afterwards), and
adjust the copyright template accordingly: add missing licenses and
update the comment about `dist/`.
2025-12-08 11:47:47 +01:00