Commit Graph

1127 Commits

Author SHA1 Message Date
Jelle van der Waa 4673ad6c89
feat(search): add subcommand to search across the packaging group
Search for an expression across the GitLab packaging group. To use a
filter, include it in your query. You may use wildcards (*) to use glob
matching. Available filters for the blobs scope: path, extension.

Every usage of the search command must be authenticated. Consult the
'pkgctl auth' command to authenticate with GitLab or view the
authentication status.

This command uses bats for pretty printing the results including line
numbers and syntax highlighting.

Component: pkgctl search
Co-authored-by: Christian Heusel <christian@heusel.eu>
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
2024-01-07 02:35:18 +01:00
Levente Polyak 78dd150996
chore(offload-build): deprecate in favor of pkgctl build --offload
Emit a warning when offload-build is invoked to warn about future
removal.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2024-01-05 01:07:39 +01:00
Levente Polyak 4425913e4f
chore(build): use more intuitive update-checksums option for humans
The philosophy of our CLI is to provide options that better match human
expectations in an intuitive way rather than mimic wording of previous
tools with abbreviation.

Component: pkgctl build
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2024-01-05 01:01:52 +01:00
Levente Polyak 2a1e8aebaf
chore(make): suppress output when copying git hooks directory 2023-12-19 20:27:01 +01:00
Levente Polyak 3933f20001
fix(cliff): trim fix separator before checking merge request id
The fix separator contains a whitespace, which made the check never
match. We now trim the separator before checking, making it resilient
against any kind of spaces.

Fixes b7984c6073
2023-12-19 20:06:26 +01:00
Levente Polyak 0f14d630bc
feat(cliff): add label for breaking changes to changelog 2023-12-19 20:06:26 +01:00
Levente Polyak d00a2b9890
feat(configure): ship default ignore via exclude
BREAKING CHANGE: Increments the repo spec version which requires to
reconfigure all existing packaging repo clones.

Fixes #129

Component: pkgctl repo configure
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-12-19 20:06:26 +01:00
Christian Heusel c2d73d73ae
fix(commitpkg): prefer core.editor over $EDITOR and $VISUAL
This is done to closer mimick the behaviour of git here, as it prefers
core.editor setting over the other editor options as per git-var(1):

> The order of preference is the $GIT_EDITOR environment variable, then
> core.editor configuration, then $VISUAL, then $EDITOR, and then the
> default chosen at compile time, which is usually vi.

Fixes #192
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-12-03 22:02:13 +01:00
Levente Polyak f2cafa3cb0
feat(clone): speedup maintainer and universe clone query
There is a single endpoint now to list all pkgbases and their current
maintainers. Use this endpoint for speeding up the clone of all packages
of a maintainer by only issuing a single API call.

Component: pkgctl repo clone
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-12-03 21:51:59 +01:00
Jan Alexander Steffens (heftig) c356995dc1
feat(config): Add -z pack-relative-relocs to LDFLAGS
This moves relative relocations from the `.rela.dyn` section into a new
`.relr.dyn` section with a significantly more compact encoding,
supported since glibc 2.36, GNU Binutils 2.38 and LLVM 15.

This can reduce the size of libraries a lot, e.g. the installed size of
`libphonenumber` dropped from about 17 MB to 7 MB.

For more info, see
https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/23.

Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2023-12-03 20:11:24 +01:00
Jan Alexander Steffens (heftig) 1535a69af6
chore(config): Use one -Wl in LDFLAGS per logical flag
This will separate logical flags with whitespace and make it easier to
split the flags across multiple lines.

Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2023-12-03 20:11:21 +01:00
Christian Heusel 9a356eae82
feat(web): implement option to print the URL instead of opening it
In certain situations, users may encounter limitations when unable to
utilize xdg-open (e.g., when connected to an Arch machine via SSH).
Consequently, this commit introduces the option to simply print the
repository link to copy or click on it.

Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-11-26 18:23:17 +01:00
kpcyrd ae14c246b8
feat(makerepropkg): Add option to skip running check for speedup
Add -n to allow running makepkg with --nocheck. This is useful to reduce
the time required to reproduce a package, as they should not depend on
running the check function for being reproducible.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-11-26 16:48:15 +01:00
Levente Polyak cc369e86d2
feat(makechrootpkg): add option to interactively inspect the chroot
Implement the -x option for makechrootpkg which allows to get an
interactive shell in the chroot after building the package. Useful to
ease the debugging of a package build.

Depending on the argument, the interactive shell is either always
spawned or only when an error occurred during build.

This option is also forwarded from `pkgctl build` via the `--inspect`
flag.

Component: pkgctl build
Component: makechrootpkg
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-11-26 01:28:20 +01:00
David Runge c9de6a18b9
fix(make): Specify GITLAB_HOST for glab to avoid default host confusion
Specify the upstream instance hostname for glab using the `GITLAB_HOST`
environment variable.
Without it `glab` will use whatever is set as host using the `host`
key in its configuration and silently break the links of all uploaded
assets.

Signed-off-by: David Runge <dvzrv@archlinux.org>
2023-11-24 22:27:14 +01:00
Christian Heusel 9f8ca5df1a
chore(release): nicely format multiple "Component:" trailers
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-11-24 02:32:02 +01:00
Christian Heusel 7825f9fb02
chore(docs): correct the manpage for pkgctl db update
Turns out the manpages of pkgctl db update and pkgctl db move were just switched without having the page title adjusted.
Fixing the initial error therefore turned out to create the same problem for the manpage of pkgctl db update, which this commit re-fixes.

Fixes: 5e3ab4b321 ("chore(docs): correct the manpage for pkgctl db move")
Fixes: f834fc4700 ("db: command for Pacman database modification like update, move etc")
Fixes #195
Component: pkgctl db update
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-11-24 02:17:10 +01:00
Christian Heusel b7984c6073
chore(release): allow fixes tags without cluttering the changelog
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-11-20 15:10:48 +01:00
Christian Heusel 5e3ab4b321
chore(docs): correct the manpage for pkgctl db move
So far the manpage for pkgctl db move seemed to be a copy of the pkgctl db update manpage
which caused an error upon install as the move page was not created.
Instead compiling this manpage overwrote the one for pkgctl db update
which this commit fixes.

Fixes: f834fc4700 ("db: command for Pacman database modification like update, move etc")
Fixes #195
Component: pkgctl db move
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-11-20 15:10:41 +01:00
Christian Heusel e7b82f36ef
feat(build): add --updpkgsums option
This is useful so people who update patches etc. can update their checksums on building.
The functionality itself was already implemented for --pkgver, but was not available separately.

Fixes #168
Component: pkgctl build
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-11-20 15:00:21 +01:00
Orhun Parmaksız 4d7364ed1b
fix(cliff): update the tag_pattern to use regex 2023-10-31 16:55:14 +01:00
Levente Polyak e0ab20d05c
fix(build): use correct variable to reference available architectures
The referenced places were missing in a previous refactoring commit and
hence broke the build command in multiple ways.

Fixes 0669315821
2023-10-17 23:23:36 +02:00
Antonio Rojas 5cbe9ad612
fix(build): allow using --install and --offload simultaneously
Don't take the full (local) path of the package to install when using
--offload.

Fixes #194
Component: pkgctl build
2023-10-14 00:00:52 +02:00
Christian Heusel 6f106e7cd6
chore: refactor loop variable name
Component: pkgctl build
Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-10-02 11:37:06 +02:00
Christian Heusel 0669315821
chore: refactor variable names in valid-{tags,repos}.sh
Even though the variables in these files are globablly used they have a weirdly local sounding name.
This commit fixes this by refactoring all usages throughout our codebase.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-10-02 11:29:03 +02:00
Levente Polyak a6d43aca01
chore(release): streamline release make target with git-cliff and glab
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-09-27 01:12:53 +02:00
Levente Polyak 02bc8bfbc0
chore(release): version v1.0.4 2023-09-27 00:38:17 +02:00
Levente Polyak f632659563
fix(clone): ssh connection may require user input (key unlocking etc)
Anything that requires user input (such as a key unlock or hostkey
verify) will block the terminal and wait for input which will never
come.

When cloning or configuring a repo via ssh we therefore initially
connect to gitlab to warm the connection.

Afterwards users are expected to either have setup a ssh ControlMaster
or use something like a ssh agent.

Fixes #148

Component: pkgctl repo clone/configure

Co-Authored-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-09-26 22:44:58 +02:00
Christian Heusel 7e41adf00b
chore: add a config file for git cliff
This is done so that the generated changelog carries more information
(i.e. the scope of the change).

Co-Authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-09-26 21:13:08 +02:00
Levente Polyak a316b50f88
fix(makepkg.conf): use breezy for the bzr protocol in makepkg.conf
Pacman does not resolve provides for the protocol packages, hence we
need to switch to the new package name for bzr.

Related-to: https://gitlab.archlinux.org/pacman/pacman/-/merge_requests/78
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-09-19 01:32:22 +02:00
Levente Polyak 547961681a
fix(pkgctl): avoid pacman db dependency checks during repo detection
By default the sync operation enables dependency checks during the
preparation of the transaction. This isn't necessary for the print
option, but is done nevertheless, which leads to issues for example
during soname dependency problems. The result is a none functional
automatic repo detection.

Fix this by explicitly disabling dependency version checks. We specify
this option twice to skip all dependency checks.

Fixes #189

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-09-10 00:03:42 +02:00
Jelle van der Waa 8190a22480
feat(release): always generate a .SRCINFO file on release
When releasing a package always generate a .SRCINFO file so we can build
tooling based upon these files instead of having to parse bash in a
non-bash language.

Some tests have shown around 30 seconds or generating the metadata on
packages like thunderbird. The implementation in makepkg becomes semi
slow for some split packages that provide a huge number of individual
packages, but it seems reasonably fast so we can instead have a uniform
state of always providing .SRCINFO files.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-09-04 23:41:00 +02:00
Christian Heusel f31ea3a48e
fix(build): fix repo detection for special chars in package name
Currently we used grep -E, in a way that special characters in the
package name such as the '+' in 'ls++' also became part of the regex.

This commit switches this to become a literal string matching using awk.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-08-27 17:08:23 +02:00
Christian Heusel 9f7808c26e
fix(build): installing packages into the chroot fails for relative links
As the relative links are relative to the pkgctl invocations PWD and not
necessarily relative to the location where makechrootpkg is invoked from
this fails unexpectedly.

This commit fixes this by just using the full path when passing the
location to makechrootpkg.

Fixes https://gitlab.archlinux.org/archlinux/devtools/-/issues/181

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-08-27 16:55:50 +02:00
Jan Alexander Steffens (heftig) 5f4fd52e38
feat(arch-nspawn): Use a unique scope name instead of --keep-unit
`--keep-unit` is really only for use in services like
`systemd-nspawn@.service`.

The parameter was added in commit 000ea6c7bb because
systemd-nspawn defaults the name of the machine (and thus the generated
scope) to the name of the working directory, which is not unique. Thus
spawning a container from `archbuild/extra-x86_64/foo` while
`archbuild/testing-x86_64/foo` is already running would fail.

We can avoid the unit conflict by giving the container a unique machine
name. Creating a scope also allows us to place the container in a slice
hierarchy for resource control.
2023-07-21 19:41:22 +02:00
Jan Alexander Steffens (heftig) 1b25190176
chore(arch-nspawn): Simplify args construction for systemd-nspawn 2023-07-21 19:41:22 +02:00
Christian Heusel 030e6af880
chore: fix spelling mistake packge -> package
it seems like the mistake was copied to a few locations, this commit
fixes it.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-07-06 15:30:49 +02:00
Levente Polyak 662d6c5274
fix(make): use correct version variable for release target 2023-07-05 18:45:54 +02:00
Levente Polyak 3de03e8b1f
chore(release): version v1.0.3 2023-07-05 18:36:07 +02:00
Christian Heusel 720b7c9b05
chore(build): skip invalid architectures on autodetection
This is done so that pkgctl can be better used to build aur packages
which can have arch=(...) settings for which we do not have a clean
chroot builder.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-07-05 18:17:32 +02:00
Christian Heusel 0ea7e9e0e5
chore(doc): fix spelling typo in pkgrel detection
Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-06-18 01:01:11 +02:00
Christian Heusel be5f54c95c
fix(commitpkg): ensure the PKGBUILD is version controlled
Early exit in case the PKGBUILD is not yet properly under version
control, which can happen for freshly initialized repositories.
Furthermore print an appropriate error message including a hint how to
resolve this.

Fixes #154
Fixes #167

Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-06-17 23:02:36 +02:00
Levente Polyak 5c6e13a672
chore(doc): add missing dependency on fakeroot
We need fakeroot to trick pacman into updating a fresh pacman database
for an unprivileged user.
2023-06-08 00:31:35 +02:00
Levente Polyak a07df0beea
chore(release): version v1.0.2 2023-05-28 01:22:09 +02:00
Levente Polyak c7d627165f
chore(release): adjust Makefile for new release schema
Ask for the next release version and automatically create a signed tag.
Furthermore add a simple release target to call glab for uploading the
required artifacts.
2023-05-28 01:21:40 +02:00
Antonio Rojas e47035e74d
chore(build): improve error wording if no package repo could be detected
Not being in any official repo does not necessarily mean this is a new
package. One could simply be building an AUR or custom local package.
Make the message less confusing in such case.
2023-05-27 22:18:04 +02:00
Daniel M. Capella 9b11b16a7e
chore(doc): remove duplicate subcommand from example help text 2023-05-27 21:44:09 +02:00
Levente Polyak 3283b2ca59
fix(commitpkg): only force existing files to be under version control
Before porting commitpkg to Git, the code has checked the SVN status for
none commited files. During the port this has changed by straight
checking for any passed files if they were under version control or not.

In general the whole logic is very brittle as variables are searched by
regex and directly passed to eval while ignoring any function scoping.
This leads to missing files when they reference the $pkgname inside a
package function but also provide wrong ones when eval simply returns
the first $pkgname while ignoring and function scopes.

In the future this should completely be replaces by .SRCINFO processing.

Fixes #145

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-27 01:53:45 +02:00
Toolybird 71cb9e97bb
fix(archroot): preserve original args for check_root before discarding
arch-nspawn, mkarchroot, makerepropkg all call "shift" after getopts
processing. Save the original args and pass on to check_root to prevent
options being discarded.

Fixes 41d4624879
Fixes #149

Signed-off-by: Toolybird <toolybird@tuta.io>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-26 01:06:14 +02:00
Levente Polyak 1b808b8e32
chore(release): version v1.0.1 2023-05-24 03:19:26 +02:00