Age | Commit message (Collapse) | Author |
|
This avoids the unwanted removal of the folder if someone has already
pre-defined the variable.
Fixes #219
Suggested-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
Since version 2.15.1 nvchecker emits a warning for version strings that
it consideres invalid (e.g. in the case of PyPI).
These warning messages get in the way (the first version emitted via a
warning is used as version to compare against) of retrieving the latest
version of an upstream and therefore we ignore them.
Component: pkgctl version check
Signed-off-by: David Runge <dvzrv@archlinux.org>
|
|
Systemd 256 introduces functionality which colors the terminal
background on systemd-nspawn invocations which makes the pkgctl output
look weird.
Disable this bevaviour for pkgctl, so it stays active for arch-nspawn
(for now).
Component: pkgctl
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
A .cache can be bind mounted into the container to save the caches for
reuse, but sometimes we want to exclude specific caches (because they
don't work well, e.g. bazel's).
Component: makechrootpkg
|
|
Co-authored-by: Christian Heusel <christian@heusel.eu>
|
|
Git 2.45.1 expanded its security checks to deny cloning even local repos
that are owned by another user. Previously, this just affected network
filesystems.
On our buildserver, this prevents makepkg from cloning repos from our
shared srcdest into the srcdir, if these repos were created by another
packager.
To disable this check, set `safe.directory` to `*`. This looks like a
glob, but is really just a special value. The only other option would be
to add each Git repository in srcdest to the configuration.
Component: makechrootpkg
|
|
This fixes issues with packages containing plus signs, that need to be
escaped in toml as well as the extended grep regex.
Component: pkgctl version check
|
|
Since logs from offloaded builds are collected in a temporary directory
on the remote server, it is rather difficult/error-prone to get to them,
because the path changes in each rebuild. Fetching logs from the server
into $LOGDEST makes it easier to investigate them and also brings the
behavior of offload-build closer to archbuild.
Log files are always downloaded, even for failed builds.
Component: offload-build
Signed-off-by: Jakub Klinkovský <lahwaacz@archlinux.org>
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
|
|
So far the commands would stop execution if one of the target
directories did not contain a PKGBUILD instead of just reporting failure
for that directory. Fix this by replacing the 'die' calls with setting
the error for the spinner facility.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
This introduces the `pkgctl repo clean` command which removes every
untracked files from local package repositories (via `git clean`).
The usage is as simple as `pkgctl repo clean [OPTION] [PATH]` (where
"[PATH]" can be equal to a wildcard "*").
Component: pkgctl repo clean
|
|
pacman 6.1 added support for CacheServer which allows us to download
packages faster and reduce the burden on tier0 server.
They won't be used to fetch databases so it should be pretty safe in the
repository consistency context.
Component: arch-nspawn
|
|
Return an error and abort operation when an invalid target repo is
passed.
Component: pkgctl db remove
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Sometimes it isn't obvious which set of packages are removed from a
split package when the pkgbase matches also a subset of a pkgbase. This
can happen for example with bootstrapping packages, when the intention
is to just remove a partial part of the bootstrap pkgbase.
To make the intention more explicit, list all to be removed packages and
await for confirmation.
Component: pkgctl db remove
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
By default passing a pkgbase removes all split packages, debug packages
as well as entries from the state repo for all existing architectures.
When using the `--partial` option it may most likely lead to undesired
effects by leaving debug packages behind as well as dangling entries in
the state repository. However, for specific use cases its required to
get rid of old split package parts.
Fixes #218
Component: pkgctl db remove
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
systemd-nspawn sets up a pts in the container by default which build
scripts might use to ask for interactive input. This is only okay if
the host side is also a TTY. The 'autopipe' mode deals with this
situation appropriately.
|
|
The architecture definition of the variable was using invalid bash
syntax and was previously unused:
$ _binary_arch=${DEVTOOLS_VALID_ARCHES[*]:0:-1}
bash: -1: substring expression < 0
We therefore fix the definition of the variable and use it for the
autocompletion of the offload-build command.
Furthermore fix wrongly named architecture variables that have been
missed from previous refactoring.
Fixes #222
Component: completion
Fixes: f961e2e ("completion: implemented structured declarative bash completions")
Fixes: 4173e0a ("chore: refactor variable names in valid-{tags,repos}.sh")
Signed-off-by: Christian Heusel <christian@heusel.eu>
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Use a central location in common.sh to define the default rsync options.
Switch to use batched uploads by targeting a partial directory which is
not taken into account by db update. Instead, once all packages that
belong to a split package group are uploaded into the .partial
directory, all artifacts are moved in one batch into the staging
directory of the repo server. This reduced the window of opportunity for
a partial release significantly to a tiny window.
Component: pkgctl release
|
|
This allows us to have more control over the output and status logs.
Using this method we are able to avoid cluttering the version upgrade
subcommand while downloading sources for updating the checksums.
Having this internally will also allow us in the future to have smart
checksums updating by only trying to change the checksums of sources
that have actually changed, for example when adjusting a patch file we
should avoid trying to overwrite the archive checksums unintentionally.
Component: pkgctl version upgrade
|
|
This commit aims to make 'pkgctl version upgrade' also update checksums
in addition of bumping the pkgver and reseting the pkgrel.
Component: pkgctl version upgrade
|
|
Originally fixed in b7893a2ca8e09062197129881bce3fd6700a573a, that approach created another bug when packages have several providers. In that case, pacman expects a number, so "yes" is not a valid answer, leading to an infinite loop.
Using the undocumented, but stable option "--ask=4" allows to selectively change the default answer for conflicts, therefore properly fixing the underlying issue.
See also: https://gitlab.archlinux.org/pacman/pacman/-/issues/60
Fixes #163
Component: makechrootpkg
|
|
In certain scenarios, like when an URL is checked that asks for
credentials or other kind of input, the process blocks and waits for
stdin input. This isn't particularly useful during scripted execution
and in our cases also just an indicator for like a none existing GitHub
repository.
To avoid this situation, disable git terminal prompts.
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Introduce a new version subcommand `setup` which does a best effort to
generate the most minimal required .nvchecker.toml file for specific
sources.
It supports a wide range of common sources like:
- Git, GitHub, GitLab, Hackage, NPM, PyPI, RubyGems, CPAN, crates.io
The creation logic is based on matching a domain for a source which is
something predictable and then simply passes an array of the url parts
for every source creator to extract the useful bits out of the url
array.
Component: pkgctl version setup
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
|
|
If users have enabled push.followTags in their Git config then dropping
packages to the AUR spews errors because all the release tags from
official repos are rejected by AUR repos.
|
|
Several subcommands accept multiple paths in a way that passing a
wildcard is an expected use case. Previously this wasn't possible if the
main directory contained any text files or scripts.
Fix this by skipping none directory paths for such commands.
Component: pkgctl
Signed-off-by: Morten Linderud <foxboron@archlinux.org>
|
|
We can only update the local ref to the remote head from main to master
once we have actually pushed the master branch to the remote. If we do
this too early, the call will simply error out.
Instead, only update the local head for the configured remote after we
have successfully renamed the branch and pushed it to the AUR.
Fixes #212
Component: pkgctl aur drop-from-repo
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This commit simply replaces the usage of `scp` with `rsync`
for faster file transfer.
Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
|
|
This avoids some corner cases that some applications behave ill when
TERM is completely unset. Instead, ensure we set TERM to dumb as a
fallback, which should serve better than not having any term defined.
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
The latest release of devtools has included some pretty printing
capabilities and fancy terminal stuff with the spinner and so on.
It seems like the existing safeguards to disable this for incapable
terminals were not enough though, therefore we saw two types of errors:
- offload-build:
```
==> Building in chroot for [extra] (x86_64)...
tput: unknown terminal "unknown"
tput: unknown terminal "unknown"
tput: unknown terminal "unknown"
```
- repro builders:
```
==> Successfully switched <package> to version <version>
tput: No value for $TERM and no -T specified
ERROR: Failed checkout <package>
```
The recently included fail option made this error populate to the
command level and therefore increased its impact from a not so nice
logging message to a more severe problem which made the command abort.
We fix this by checking if tput is supported or else use the raw escape
sequences instead of tput commands.
Fixes: fedfc80 ("feat(term): add terminal utils to handle a dynamic spinner")
Fixes: 66e83c9 ("feat(version): pretty print and group together version check results")
Fixes: d0dc0e1 ("feat(search): add optional plain output formatting")
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
We should explicitly instruct makepkg to not sign the source package,
even when the BUILDENV array in makepkg.conf contains 'sign'. The
devtools workflow is to always sign separately from building, which is
different from makepkg and it should not depend on its configuration.
Furthermore, this function is currently used only in offload-build to
collect sources that are transferred to the server before the build
itself. Signing this source package does not provide any benefits.
|
|
The adequate target repo options are not appropriately forwarded to the
release subcommand if the auto-release options is activated. Previously
we did not restrict the --repo option, which the build option has used
as a shortcut. Since last release, this option is restricted to new
packages that are not in any official repository yet.
Fix this issue by forwarding the same target repo options that have been
used during the build command and not forcefully the --repo options.
Fixes #209
Component: pkgctl build
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Since last release, offload building now has proper error handling
enabled. This unfortunately lead to a regression for packages, like any
packages, where makepkg claims debug packages are available during
--packagelist while none were actually built. This leads to the scp
command failing when trying to download the none existing packages
which ultimately leads to a termination of the build script.
Fix this by filtering out package files that do not exist before trying
to download them.
Fixes #208
Component: pkgctl build
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This works around the fact that we are currently not auto detecting
unstable repository targets while providing a stability layer option on
the subcommand. Soften the --repo option rules by allowing unstable
repositories to use that flag for building and releasing against the
unstable repositories.
This will be replaced in the near future by proper integration of target
repository auto-detection that in aware of unstable repositories while
providing a unstable stability layer options.
Component: pkgctl build
Component: pkgctl release
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Previously the behavior was inconsistent and not fully fulfilling its
purpose of only using --repo once when initially pushing a new and
unknown package to the official repositories.
Consolidate the behavior by only allowing to use --repo during the
initial packaging and disallow any subsequent usage. The expected user
experience is to subsequently use --testing or --staging to influence
the auto-detection of the build target. This avoids any kind of human
error which leads to releasing core packages to extra-testing by
accident.
Furthermore, allow the build subcommand to automatically fallback to
extra as the default stable repository target which greatly improves the
usability for AUR or local override builds.
Fixes #193
Fixes #191
Component: pkgctl build
Component: pkgctl release
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This change introduces the new --install-to-host flag to pkgctl build,
which can be used with one of the modes 'all' or 'auto'. Depending on
the mode either all or just already installed packages are installed to
the host system.
BREAKING CHANGE: the --install flag is renamed to --install-to-chroot
to avoid confusion with the newly introduced flag.
Component: pkgctl build
Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This helps people to be slightly more patient as the progress status
update includes the current percentage.
Component: pkgctl search
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Change 'none pkgbase' to 'non-pkgbase' as the sentence refers sections
that are not the pkgbase section, rather than an empty pkgbase section
or something of that sort that could be misconstrued by using the word
'none'.
Component: pkgctl version check
|
|
For pkgbases with '.' in the name, the TOML-section must be wrapped in
double quotes in order for it not to be parsed as a supersection and a
subsection. This case was not properly handled by checks for if the
TOML-file contains a pkgbase section, and for if the TOML-file contains
superfluous sections. Address this by handling optional double quotes in
the greps related to said checks.
This was discovered in the AUR package ruby-cool.io and the issue can be
reproduced with the following minimal PKGBUILD and .nvchecker.toml file:
$ cat PKGBUILD
pkgname=ruby-cool.io
pkgver=1.8.0
$ cat .nvchecker.toml
["ruby-cool.io"]
source = "gems"
gems = "cool.io"
Before the fix:
$ pkgctl version check
Failure
x ruby-cool.io: missing pkgbase section in .nvchecker.toml: ruby-cool.io
After the fix:
$ pkgctl version check
GEN lib/version/check.sh
Out-of-date
✓ ruby-cool.io: current version 1.8.0 is latest
Component: pkgctl version check
|
|
Component: pkgctl version check
Component: pkgctl version update
|
|
Enhanced and overhauled the documentation for the 'version' subcommand.
The improvements include comprehensive details on the subcommand's
behavior, usage, and a variety of scenarios it handles.
Added a central section within the pkgctl-version manpage that documents
the nvchecker configuration and rules.
Component: pkgctl version
Singled-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
It can be handy to have an exit code that allows better status
indication or chaining.
On exit, return one of the following codes:
- 0: Normal exit condition, all checked versions are up-to-date
- 1: Unknown cause of failure
- 2: Normal exit condition, but there are out-of-date versions
- 3: Failed to run some version checks
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Sometimes it can be desired to get a results for each entry even if the
current version is up-to-date. Add a --verbose option to print this
optional detail.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
It may take quite some time to check a lot of upstream versions.
However, we still want to nicely group the results together. To avoid
just showing a static status message it makes much more sense to show a
dynamic spinner with a summary of the progress.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
The spinner uses a status file that can be used to dynamically update
the message. The spinner itself buffers the output in a frame buffer
variable before flushing a frame in one go.
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Collect all check results in arrays and pretty print the results after
grouping them together based on out-of-date, up-to-date and failures.
Print a summary that shows a brief statistic about the results when
processing multiple check items.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This adds support for global keyfile from the user config home
XDG_CONFIG_HOME which allows to set tokens for GitHub and GitLab for
certain nvchecker configuration.
When ~/.config/nvchecker/keyfile.toml exists, it will automatically be
appended as keyfile of the local .nvchecker.toml file.
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Add defensive programming to the execution chain of the version check
subcommand for graceful error handling of subprocesses as well as errors
returned from nvchecker itself indicated in the returned JSON.
Furthermore this fixes a bug when processing multiple packages where the
pkgbase variable is stuck for subsequent packages that do not declare a
pkgbase variable itself.
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This subcommand applies the detected upstream version upgrades to a
PKGBUILD.
Component: pkgctl version upgrade
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
Component: pkgctl version check
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
Component: pkgctl build
Signed-off-by: Christian Heusel <christian@heusel.eu>
|