# cqpkg **Repository Path**: wangtiaoke/cqpkg ## Basic Information - **Project Name**: cqpkg - **Description**: CqOS utility for working with dist-git - **Primary Language**: Python - **License**: Not specified - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 1 - **Created**: 2025-01-22 - **Last Updated**: 2025-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Cqpkg A tool for working with CqOS dist-git Cqpkg is a wrapper for `rpkg` that interacts with RPM git repositories like the ones hosted at [internal Gitlab](http://192.168.10.152). Rpkg also provides some convenience methods/commands for local builds via `mock` or `rpmbuild`, for interacting with Koji, and for generating patches. Not all typical `rpkg` commands have been implemented yet. If the command you are looking for doesn't appear to work, please open an issue or make a PR. This repository provides a console script, `cqpkg`. ## cqpkg The `cqpkg` script allows you to interact with CqOS dist-git. ## Installation (for cqos) ### User Level Global Install To install the package globally for current user: ```bash make uv-tool-install ``` Although we do not have `pyproject.toml`, we can still use `uv tool install` to install this project. ### RPM package (deprecated) Because CQOS was modified inconsistently with the upstream Linux distro. We maintain a separate installation script for it. This script also handles environment setup and configuration updates for cqos. ```sh curl -LsSf https://gitee.com/wangtiaoke/cqpkg/raw/develop/install | bash -s ``` ### Koji/Mock configuration Use this script solely for updating Koji's configuration: ```sh curl -LsSf https://gitee.com/wangtiaoke/cqpkg/raw/develop/install | bash -s -- --update-koji-config ``` Use this script solely for updating Mock's configuration: ```sh curl -LsSf https://gitee.com/wangtiaoke/cqpkg/raw/develop/install | bash -s -- --update-mock-config ``` ### Configure Dist-git server token via `.env` 1. Copy the example environment file to create your local configuration: ```sh cp .env.example .env ``` 2. Edit `.env` and set the Dist-git server URL and token. Example entries: ```env CQPKG_DISTGIT_PRIVATE_TOKEN=your_personal_access_token_here ``` 3. Generate a personal access token on your Dist-git server (e.g., GitLab) with the appropriate scopes (API/read_repository or similar), then paste it into `CQPKG_DISTGIT_PRIVATE_TOKEN`. 4. Secure the file and avoid committing it: ```sh chmod 600 .env ``` These steps let the `cqpkg` script authenticate to your Dist-git server using the token configured in `.env`. ## Supported commands Here is the list of supported commands by cqpkg: - rpmbuild wrapper: local, prep, build, install... - mock-config Here is the list of supported commands by cqpkg-oa: - sources ## Contribution Some features are still missing, and we'd love to have your help in implementing them! If you have a feature in mind that isn't currently available, please don't hesitate to: - Open an issue to discuss the feature. - Submit a pull request with your implementation. Thank you for contributing to the project! ## Development ### Setting Up the Development Environment **Prerequisites:** ```sh sudo dnf install -y libcurl-devel python3-devel gcc openssl-devel ``` ### Developing To clone the repository and install the package: ```sh git clone https://gitee.com/wangtiaoke/cqpkg.git cd cqpkg make install ``` ### Build RPM package Modify cqpkg.spec and create a tag: ```sh git tag 0.0.4 # In Makefile will use tag as version make mockbuild ``` Note: Current .spec for Cqos 24 ### koji config To config koji API for cqpkg. You can use the following config, save it as `~/.koji/config`: ```conf [koji] server = http://192.168.10.142/kojihub weburl = http://192.168.10.142/koji topurl = http://192.168.10.142/kojifiles ```