Commit Graph

60 Commits

Author SHA1 Message Date
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 a08bc2acf4
feature(clone): add protocol option to force cloning over HTTPS
This is a rather quick and simple implementation to override the current
logic and force clone with HTTPS. Allowing to explicitly clone over HTTPS
is currently required to unblock reproducible builds where no ssh keys
and GitLab user accounts are set up as of now. Hence this quick solution
comes into play to mitigate the regression on reproducible builds
builders.

Revisit the overall auto detection and protocol logic approach for a
later release related to some ideas floating around in pending
merge-requests.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-24 02:50:08 +02:00
Levente Polyak 6ce666a166
feature(parallel): run up to N jobs in parallel for repo clone/configure
Run up to N jobs in parallel. By default the number of jobs is equal to the
number of available processing units. For sequential processing this option
needs to be passed with 1.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 16:12:45 +02:00
Levente Polyak 830dcde2d8
pkgctl build: support worker slots for none tty builds
Allow overriding the worker slot with a dedicated option. Furthermore
detect if the current tty is no pts and fall back to choosing a random
worker slot between 1 and number of available processing units.

Fixes #137

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:13 +02:00
Caleb Maclennan 1da97a8b36
doc: Fixup formatting issues in asciidoc man pages 2023-05-20 00:08:13 +02:00
Christian Heusel 8e3b6bcc5b
pkgctl repo clone: add option to switch working tree
Add an option to call the switch command after clone. Switch to a
specified version. The working tree and the index are updated to match
the version.

Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:13 +02:00
Christian Heusel 4289be212b
build: allow release options only in combination with --release
It leads to weird expectations when using --db-update or --message
without --release. Make the behavior more user friendly, by aborting the
operation and explaining that release options only work in conjunction
with the release option.

Fixes #131

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-05-20 00:08:13 +02:00
Christian Heusel ed96635141
pkgctl repo: introduce the switch subcommand
Signed-off-by: Christian Heusel <christian@heusel.eu>
Co-Authored-By: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:13 +02:00
Christian Heusel 645a5a9f04
pkgctl: introduce the version subcommand
Related to https://gitlab.archlinux.org/archlinux/devtools/-/issues/125

Closes #125

Signed-off-by: Christian Heusel <christian@heusel.eu>
Co-Authored-By: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:12 +02:00
Levente Polyak f3518e248c
build: support nocheck for initial bootstrap builds
Output a warning when this option is used to remind packagers to rebuild
the packages with checks once the bootstrap cycle has been completed.
2023-05-20 00:08:12 +02:00
Christian Heusel 5e22e4f81e
config: allow suppying the gitlab token via env var
This would allow to supply the gitlab tokens via the env var
DEVTOOLS_GITLAB_TOKEN and therefore allow users to choose whatever
program they want to fill this env var.

Closes #113

Signed-off-by: Christian Heusel <christian@heusel.eu>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:12 +02:00
Levente Polyak 4ae857e665
doc: update manpage footer for GitLab and remove static list of maintainers
The list of all maintainers that have worked so far on devtools is
exceeding a sane amount making each manpage convulsed. The authors can
be pulled from GitLab directly without occupying lots of space on every
manpage. We would like to express gratitude to all our maintainers.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:12 +02:00
Levente Polyak f669a71e84
repo-configure: automatically determine protocol from packager identity
The remote protocol is automatically determined from the author email
address by choosing SSH for all official packager identities and
read-only HTTPS otherwise.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20 00:08:11 +02:00
Levente Polyak 1d7f997215
build: command to build packages inside a clean chroot 2023-05-20 00:08:11 +02:00
Levente Polyak e0307c7925
conf: move makepkg and pacman config into separate conf.d dirs
We have used the datadir like a kitchen sink, lets clean up a bit by
having a better and well structured layout. Put makepkg and pacman
configs in separate directories: makepkg.conf.d and pacman.conf.d.
2023-05-20 00:08:11 +02:00
Levente Polyak 5752488ef1
release: command to commit, tag and upload build artifacts
This is a smart and more convenient invocation of the classical
commitpkg and archrelease with auto-discovery for target repositories
and a shorthand option to directly call db-update.
2023-05-19 22:27:13 +02:00
Levente Polyak f834fc4700
db: command for Pacman database modification like update, move etc 2023-05-19 22:27:13 +02:00
Levente Polyak 2a59c32bf4
repo: added command to create a new packaging repository 2023-05-19 22:27:13 +02:00
Levente Polyak 77d800eab2
auth: implemented module to authenticate against our GitLab
This helps to have a convenient way to manage and test our personal
GitLab tokens. Those are used for certain API calls like creating new
repositories.

prefill the access token web view as per
https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#prefill-personal-access-token-name-and-scopes

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-19 22:27:12 +02:00
Levente Polyak a8be7423ef
pkgctl: add a unified command-line frontend for devtools
This is the first step of a simple and highly structured unified
interface to devtools commands in a single wrapper.

The split is based on groups like `repo`, `build` and `diff`

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-19 22:27:12 +02:00
Levente Polyak 3d3176beb6
pkgrepo: rename archco as a general purpose tool for packaging repos
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-19 22:27:12 +02:00
Levente Polyak bb72473529
crossrepomove: drop support as this is not needed anymore
We unified the source repositories to a single location. Having to cross
repo move them between physical locations is not required anymore.
2023-03-19 22:02:04 +01:00
Celeste Liu 4ff7aa0d8a
archbuild: add doc for bind mount config
Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
2023-03-06 21:06:59 +01:00
Levente Polyak f4e8047d65
diffpkg: prefer to search inside the pool dir if available
On certain packaging machines where the pacman cache gets updated very
infrequently, the behavior of diffpkg may not function correctly as old
packages were to be downloaded as diff target. In such cases we look for
a pool directory first and search via a glob for an available pool
package sorted by version.

The pool search glob has three glob segments each disallowing the dash
delimiter to split across pkgrel, pkgver and arch. This will return the
correct package from the pool without considering overly eager wildcards
that potentially match different pkgnames.

The default pool search directory is /srv/ftp/pool
2022-08-31 02:26:47 +02:00
Levente Polyak 70a3041ff8
diffpkg: allow to set column width for side-by-side view
The magic values `columns` and `auto` allow to set specific aspects,
with 'auto' as the default value:

- auto: Set width to the maximum line length of all input files
- columns: Set width to the shell defined $COLUMNS env var

Furthermore any number can be passed to set a static width.
2022-08-31 02:26:47 +02:00
Levente Polyak ba070f1ca9
diffpkg: add colored output option with default of auto 2022-08-23 20:23:51 +02:00
Levente Polyak b9dadc5576
diffpkg: allow to choose between unified context and two columns 2022-08-23 20:23:22 +02:00
Greg Land 6bd7e70e68
doc: Fixed spelling error in devtools man page 2022-08-13 15:23:14 +02:00
Levente Polyak 626aecb472
make: split out man page files into doc/man folder 2022-06-22 01:05:03 +02:00
Levente Polyak 6d946989f3
doc: update links and references after moving to GitLab 2022-06-22 01:05:03 +02:00
Levente Polyak 7a8f101498
doc/export-pkgbuild-keys.1: fix filename to detect manpage location
The manpage doc has been added without a suffix which fails during
install.
2022-06-09 21:25:10 +02:00
Allan McRae d00a28ea0e
Export source PGPs from PKGBUILD on commit
Provide a tool to export keys listed in the PKGBUILDs validpgpkeys to
keys/pgp/$fingerprint.asc.

The presense of the "keys" directory alongside the PKGBUILD in trunk/
is tested during commitpkg.  If the directory is abscent, keys are
exported and added to the commit.  If the directory is present, a
check is made to ensure all valid PGP keys are provided.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2022-06-09 20:41:18 +02:00
Levente Polyak c2f163b640
diffpkg: support comparing two given package archives
This adds support similar to diffpkg from the infrastructure repo
that is based on the assumption that two archives can be passed
to the tooling in order to compare them.
2022-05-17 21:03:44 +02:00
Levente Polyak c339536a37
diffpkg: support multiple diff modes to compare with
This adds support for the following diff modes:

- content list (default)
- diffoscope
- .PKGINFO diff
- .BUILDINFO diff
2022-05-17 21:03:44 +02:00
Jelle van der Waa 11edc45048
diffpkg - diff repo vs. build package
Include a new tool as alternative to checkpkg, this runs diffoscope on a
newly build package and the current repository package. This can be
useful for finding new files / binaries.
2022-05-17 21:03:43 +02:00
Felix Yan fa5afbc30b
checkpkg: set makepkg vars from build root to support none host archs
When building for an architecture different from the host, the correct
old package was downloaded as "$copydir"'s pacman was configured with
the target CARCH, but checkpkg doesn't know this and tries to search the
cache for host CARCH instead, producing the following error:

`==> ERROR: tarball not found for package: xxx`

This change fixes this by passing the appropriate makepkg config
explicitly, so that checkpkg behaves consistently.

Co-Authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2022-01-22 01:12:32 +01:00
Levente Polyak cc6cf65ef9
makerepropkg: support parallel runs in dedicated namespaces
This adds proper namespace locking as well to fix screwing up the
running makerepropkg process.
2021-11-18 20:31:23 +01:00
yoursweetie 9028302ac7
doc: Add arch-nspawn man page 2021-09-08 22:13:36 +02:00
Jelle van der Waa a9bf4789b3
Sort man page links in `man 7 devtools` 2021-09-07 22:37:25 +02:00
tsuibin fd17f53cef
doc: Add archbuild man page 2021-09-07 22:23:32 +02:00
yoursweetie 80e8c1fc70
doc: Add makechrootpkg man page 2021-09-07 20:55:42 +02:00
Christian Hesse a49bcf2097
doc: update default build host
Commit 09e169b741 changed the default
build host from dragon.archlinux.org to build.archlinux.org - match
in documentation.

Signed-off-by: Christian Hesse <mail@eworm.de>
2021-01-31 02:16:44 +01:00
Eli Schwartz 0883f45b3a
makerepropkg: allow specifying the package in pacman -S format
We now accept:

1) # nothing

    in which case we'll use the PKGBUILD to retrieve...

2) name, or repo/name

    in which case we'll use pacman to cache the package and retrieve...

3) a filename

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2021-01-27 00:56:48 +01:00
Jelle van der Waa 360a7611a8
doc: add devtools.7 man page
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2021-01-26 20:39:06 +01:00
Eli Schwartz 51842a1676
makerepropkg: support checking multiple split packages
By specifying multiple package files, we assume they are all from the
same PKGBUILD, and try to check them all against the produced artifacts.
Since the buildinfo should be comparable for all of them, we simply use
the first one passed on the command line.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2020-02-27 14:49:54 +01:00
Eli Schwartz 53fe5c67a1
makerepropkg: add support to check unreproducible packages using diffoscope
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2020-02-27 14:49:48 +01:00
Eli Schwartz ca4d348c86
doc: add manpage for the new makerepropkg tool
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-11-30 13:21:23 +01:00
Eli Schwartz bcba566405
mkarchroot: support wrapping pacstrap -U
Needed to support reproducible builds.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-11-30 13:21:23 +01:00
Levente Polyak 5dd90ef848
checkpkg: add option to print a warning in case of differences
Sometimes its desired to be explicitly made aware of differences
reporter by checkpkg via printing a warning instead of a regular
message.

Automatically use --warn for makechrootpkg builds so packagers are made
visibly aware of a soname bump by simply looking out for colors
indicating non success messages.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-09-28 00:15:51 +02:00
Levente Polyak 5246cb9aa5
checkpkg: add option to avoid keeping the tmp dir
In some cases, like default makechrootpkg execution, the temporary
directory used to assemble the differences is not required. Add an
option to checkpkg that allows to get rid of that directory after
run and call it automatically like that in makechrootpkg.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-09-28 00:15:48 +02:00