The previous fix (commit 6e05f5b483) only cleaned
test/images/$(TEST_OS), which is just a symlink to $(TEST_OS).qcow.
Clean the actual image as well.
Closes#46
Remove the entire previous overlay instead of just removing the built
package. This ensures that there are no leftovers from previous
interactive debugging sessions.
This has already shown to lead to confusion in practice in
cockpit-podman.
Closes#44
When the topmost commit isn't tagged, rpmbuild otherwise fails with
error: line 2: Illegal char '-' (0x2d) in: Version: 176-1-g9101a30a
Replace the dashes from `git describe` with periods, to get a valid RPM
upstream version number.
Closes#45
Taken rules from Cockpit, which have been proven to be effective for
finding bugs and keeping clean code, and sensible (not taking
unreasonable effort to satisfy).
Fix code layout in app.jsx accordingly.
Closes#39
eslint is much more powerful and flexible than jshint, and we don't want
to promote writing new projects with pre-ES6 code.
As a side effect, this also avoids downloading PhantomJS (see
https://github.com/jshint/jshint/issues/3318), thereby cutting down
node_modules/ from 470 MB to 210 MB.
This is only being used for extracting the package name from package
json, to avoid having to duplicate it in `Makefile`.
But for only this purpose, Python 3 is rather heavyweight. It's also not
available on RHEL/CentOS 7.
- Entirely drop `%build` section, as there is nothing to do anyway.
- Use `%make_install` macro.
- Replace the complicated file list wrangling with a simple directory
enumeration.
Thanks to Igor Gnatenko for the suggestions!
See https://bugzilla.redhat.com/show_bug.cgi?id=1603146Closes#38
Our release tarballs only contain files, not their containing
directories, due to `git ls-files`. tar creates these directories on the
fly on unpack, with a current timestamp instead of an archived one. This
causes directories in src/ to be newer than dist/ and thus a `make` will
try to rebuild the webpack. This breaks RPM builds.
Release tarballs already have dist/. We can't rebuild the webpack in an
RPM as that requires npm and network access for `npm install`. But we
also don't want to ship the entire `node_modules/` as that is huge and
would require lots of careful license review.
So ship a stub node_modules/ that satisfies the Makefile dependency.
Make sure that this is not newer than package.json or anything in dist/,
so that none of the Makefile's rebuild rules trigger.
Closes#36
When building in production mode, there is no index.js, just an
index.min.js.gz. This previously caused unnecessary rebuilds, or even
RPM build failures in environments where npm was not available. Test for
index.html instead, which is reliable.
Also factor this out into a constant to make it easier to adjust in
forked projects.
This is easier to handle downstream, as the spec file can be used as-is,
instead of having to get rebuilt.
Adjust the clean rule to only remove the .spec if the .spec.in exists,
so that it gets removed in the upstream git, but not in unpacked release
tarball trees.
Building the *.po files requires the `po2json` module, so add a
dependency to it.
Put the example node module into a variable to avoid repeating it. Also
test for `po2json` instead of `react-lite`, as the latter is more likely
to get replaced by actual projects in favor of the full React.
Closes#33
Vagrant defaults to nfs on linux, which requires root rights and changes
nfs configuration. The rsync backend is much less invasive, but needs
manual triggering (at least `vagrant rsync-auto`).
Closes#29
Rename some files and change some identifiers to be neutral to the
application name. This makes it simpler to change everything to a proper
name when cloning this project.
Document in the README how to find the remaining places to change.
Closes#20
With this one does not need to type the full path to the VM. This is
useful to demonstrate how to use other test frameworks than cockpit's
test API.
Closes#19
Cockpit's testlib.py has no stable API guarantee, so check it out from a
stable tag instead of master. This should occasionally be bumped to stay
current.
Note that the same does not apply to bots/: Stable tags are useless
there as the old images get cleaned up. Also, testvm.py API needs to be
stable for Cockpit's own purposes already.
This needs to drop the slight git checkout optimization, but this also
makes the code more symmetric and easier to understand.
Closes#18