Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2023-05-20pkgctl repo clone: add option to switch working treeChristian Heusel
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-20build: allow release options only in combination with --releaseChristian Heusel
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-20pkgctl repo: introduce the switch subcommandChristian Heusel
Signed-off-by: Christian Heusel <christian@heusel.eu> Co-Authored-By: Levente Polyak <anthraxx@archlinux.org>
2023-05-20pkgctl: introduce the version subcommandChristian Heusel
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-20config: fixup file permissions to be more strictLevente Polyak
Normally the default in Arch is that all home directories are private. However, this may have been changed locally. To make sure we never expose secrets, lets use a umask of 0077 when writing the config. Additionally add some temporary fixup code to migrate the file and directory permissions of already existing paths. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20build: support nocheck for initial bootstrap buildsLevente Polyak
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-20config: allow suppying the gitlab token via env varChristian Heusel
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-20edit: improve editor presence checkingCampbell Jones
Adds a check for the configured Git editor (git config core.editor) in both commitpkg and build.sh. Additionally, instead of blindly executing vi when all other options are exhausted, remove it instead as it is a none standard installed editor anyway. Closes #106 Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20gitlab: add project path function to map special charsLevente Polyak
Automatic path conversion is limited to GitLab API v4 and will be removed in the future. It's expected that the caller does the path conversion on caller side and only passes a valid path to the API within its limitations. Hence convert project names to valid paths: 1. replace single '+' between word boundaries with '-' 2. replace any other '+' with literal 'plus' 3. replace any special chars other than '_', '-' and '.' with '-' 4. replace consecutive '_-' chars with a single '-' 5. replace 'tree' with 'unix-tree' due to GitLab reserved keyword Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-20repo-configure: automatically determine protocol from packager identityLevente Polyak
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-20build: command to build packages inside a clean chrootLevente Polyak
2023-05-20build: replace m4 defines with sed scripts during buildLevente Polyak
There is no reason anymore to use m4 since we got rid of the includes by using library files. Let's replace the last usage of m4 and completely red rid of it. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-05-19release: command to commit, tag and upload build artifactsLevente Polyak
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-19git: convert repos and tags config to new repo layoutLevente Polyak
2023-05-19db: command for Pacman database modification like update, move etcLevente Polyak
2023-05-19repo: added command to create a new packaging repositoryLevente Polyak
2023-05-19auth: implemented module to authenticate against our GitLabLevente Polyak
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-19gitlab: implemented module for required API callsLevente Polyak
We need to use API calls as we can't create repositories in protected namespaces by simply pushing a none existing repository. For privacy reasons this is limited to private personal repositories in GitLab.
2023-05-19config: implemented simple config module to store token and settingsLevente Polyak
2023-05-19src: modularize repo layout into a libraryLevente Polyak
This will greatly help us to structure the functionality and commands in a more sane way. We will distribute the sources as actual libraries and reuse code with imports instead of processing everything with m4 and duplicating a lot of code.