`fix-spec-file` is not part of `propose_downstream` job so we need to
use the `post-modifications` hook instead.
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
The previous commits fd980a6b48, 3167867cff, f08f4bbfec all
unsuccessfully tried to fix the copr_build/release job (e.g. setting
`fix-spec-file:` to an empty string is invalid syntax).
Rework this to be similar to what cockpit-podman etc. do. Our spec file
in the upstream release tarball is already correct, so download these,
extract its cockpit.spec, and tell packit to leave it alone by
overwriting the `fix-spec-file:` action.
That way we get notifications about failed releases, and can act on
them. Our other projects already have that, it was just forgotten in
cockpit itself.
We had another failure with Packit release infra where Packit workflow
failed due to type incorrectly being `None` where it needs to be either
string or list.
Checking with Packit team again and they apologized and proposed we just
use empty string. This took place in ther Matrix.
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
By default Packit only grabs `Source0`. Problem is that Packit converts
all other Source URLs to local files and thus cannot download Source
files.[1] By overriding `fix-spec-file` and preventing Packit from
replacing all Source URLs it should in theory download all the tarballs.
With this we also no longer need to override `create-archive` as Packit
already does this.
[1] Due to Packit usually building directly from upstream repos
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
As release of cockpit 360 showed the version in cockpit.spec is already
set to the correct number. As a result the correct version was replaced
as 360 -> 36360.
Packit doesn't support downloading all sources and will instead only
download the last Source listed in a specfile. We need to download the
`Source0` manually to get `cockpit.tar.xz` as `Source1` currently points
to `cockpit-node.tar.xz`.
Related-to: https://github.com/cockpit-project/cockpit/issues/22883
Related-to: https://github.com/packit/packit-service/issues/1505
Assisted-by: Claude
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
Co-authored-by: Maja Massarini <mmassari@redhat.com>
When we publish our packages we currently use the
`PACKIT_DOWNSTREAM_REPO` envvar. This is not defined when we are
publishing to Copr and instead we should use `PACKIT_UPSTREAM_REPO`
envvar.
Changing it to use downstream repo by default and fallback to upstream
repo fixes this issue.
Fixes: https://github.com/cockpit-project/cockpit/issues/22883
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
Re-use the release copr_build actions for `propose-downstream`. We
really don't want/need this to rebuild the dist tarball and bundles.
This also regularly times out in packit's sandcastle containers due to
not having enough CPU/RAM.
It also started failing recently as `post-upstream-clone` happens before
installation of `srpm_build_deps`, so asciidoctor was not yet available.
Also, `$PACKIT_PROJECT{,_NAME}_VERSION` is not yet set in that early
rule, so partially revert c4d7d8e049. Sadly, the `propose-downstream`
job does not have a really good hook [1] for what we need to do -- e.g.
`fix-spec-file` does not run in that job. Fix the spec file (i.e.
resolve the NPM_PROVIDES) in `post-modifications:` inside the dist-git
dir.
[1] https://packit.dev/docs/configuration/actions
Our COPR packit source build has failed since version 352 since the
reorganization of our build system for the -node tarball.
`tools/fix-spec` now requires `runtime-npm-modules.txt` to be present,
so adjust the tarball extraction accordingly.
While we are at it, also move the tarball downloads from fix-spec-file
into post-upstream-clone, which fits better. Now both the global and the
local `fix-spec-file:` rules are actually the same.
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#22670https://issues.redhat.com/browse/COCKPIT-1370
Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
Co-Authored-By: Martin Pitt <mpitt@redhat.com>
Also adjust the packit config. We have to stop using `create-archive:`
as that can only handle a single tarball [1]. It does two things for us
which we replace:
* Set `Version:`; our `make-dist` already does that, so fish out
the generated/fixed spec file from the release tarball instead of
taking the template.
* Replace SourceN URLs with local file names. Do that in the
`fix-spec-file` rule manually, as suggested in [1].
[1] https://packit.dev/docs/configuration/actions#create-archive
Update `make-dist` and `release` to produce a runtime node_modules tarball.
`tools/node-modules runtime-tar` uses `jq`, so add that as a packit
source build dependency.
Adjust the consumers of `make-dist` accordingly. This isn't being used for
anything yet, this will be a follow-up.
Our package.json's `dependencies` has transitive/optional dependencies
which don't actually end up in the bundle, e.g. `argparse`,
`attr-accept`, or `js-tokens`; or `react-dropzone` which is a
`@patternfly/react-table` dependency, but not actually used in
cockpit.
The next commit will aggravate this further.
So make the computation of the `Provides: bundled(npm(..))` lines more
precise: Ask esbuild about which modules it actually included, which it
tells us via the "metafile". Change build.js to always output that (drop
the `--metafile` option), compute a ./runtime-npm-modules.txt list, and
use that to build the spec file.
Ported from https://github.com/cockpit-project/cockpit-files/commit/e15a518fddad1
Disable the two storage plans for now. It's a ton of work to fix the
tests for TF image mode, and we don't run them upstream on bootc/ostree
images either. Let's do the enablement step by step.
A lot of our tests assume they can write into /usr/local, and our
upstream -bootc images allow that. Mount a tmpfs on it.
https://issues.redhat.com/browse/COCKPIT-1214
The cloud images are missing [1] and not even COPR works.
Also move the s390x build from -development (which is 42 now, which
doesn't work) to -latest-stable (which is 41), same as for the --arch64
build.
[1] https://pagure.io/fedora-infrastructure/issue/12389
Testing Farm does not yet have a Fedora 41 image.
Also move the Fedora aarch64 run to the latest stable. Right now this
will go back to Fedora 40 instead of 41, so that we don't lose ARM
testing.
Disable `TestLogin.testClientCertAuthentication` for the time being. It
fails on an unclear reason, and it can't be investigated locally with
`tmt` yet, as testcloud does not yet know about the "CentOS-Stream-10"
image.
Build every commit into main into
https://copr.fedorainfracloud.org/coprs/g/cockpit/main-builds/
We will use that for cross-project testing (e.g. running cockpit's tests
in systemd-policy or udisks upstream PRs). Users can also install that
to test bug fixes and new features after they landed, but before they
got released.
In commit 940cc5cd1 I dropped the copr_build's `post-upstream-clone:`
action as it became identical to the global one, and I thought it would
be inherited. But it turns out that specifying `actions:` replaces the
global object entirely. That made release COPR builds fail on missing
spec file.
Copy the post-upstream-clone command and add a comment why it's
necessary. We'll have to keep this until
https://github.com/packit/packit-service/issues/1505 gets fixed.
packit hasn't had a sandcastle container for ages, but builds SRPMs on
COPR. This has enough RAM and CPU to just build the bundles by itself.
So drop explicit webpack-jumpstart call, and add a `nodejs` srpm
dependency instead.
`make-dist` still opportunistically tries to download a jumpstart
tarball, but does not wait or depend on it.
Actually check for the "xgettext" binary in the relevant section.
xsltproc is already checked further down, conditionalized by
--enable-docs. The latter is also in a different package.
See https://github.com/cockpit-project/cockpit/discussions/18408
Hardcoding this list is redundant and hard to change: changing the COPR
config and updating all our projects' packit.yml files needs to happen
in lockstep.
packit now learned to just read the configuration from an existing COPR
repository, so drop the target list entirely. See
https://github.com/packit/packit-service/issues/1499
As usual, keep supporting the two most recent branched versions.
Also drop Rawhide from our cockpit-preview COPR build: We directly
upload new releases to Rawhide anyway, so this is redundant.