Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .qubesbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ vm:
deb:
build:
- debian
archlinux:
build:
- archlinux
37 changes: 37 additions & 0 deletions Dockerfile.run_tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Builds an image to run local tests
# Build using e.g. `podman build -t qos-test . -f Dockerfile.run_tests`
# Execute tests with `podman run --rm -it --cap-add SYS_ADMIN qos-test:latest`

FROM registry.gitlab.com/qubesos/docker-images/qubesos-ci:latest
USER root
RUN dnf install -y \
openssl \
python3-rpm \
sequoia-sqv \
python3-xlib \
python3-tqdm \
python3-xcffib \
python3-pyxdg \
libnotify \
zstd \
xorg-x11-server-Xvfb \
&& dnf clean all
RUN dnf install -y --enablerepo=qubes-host-r4.3-current-testing scrypt

COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

WORKDIR /workspace
COPY . /workspace
RUN chown -R gitlab-runner:gitlab-runner /workspace

# PAM modified to allow tests to run (e.g. via podman) on systems (=OS outside the container) which require a root pwd
RUN echo "gitlab-runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& echo "#%PAM-1.0" > /etc/pam.d/sudo \
&& echo "auth sufficient pam_permit.so" >> /etc/pam.d/sudo \
&& echo "account sufficient pam_permit.so" >> /etc/pam.d/sudo \
&& echo "session required pam_permit.so" >> /etc/pam.d/sudo

USER gitlab-runner
ENV USER=gitlab-runner
ENV ENABLE_SLOW_TESTS=1
CMD xvfb-run uv run python -m unittest discover -s qubesadmin/tests -p '*.py' -v
45 changes: 45 additions & 0 deletions archlinux/PKGBUILD.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
pkgname=qubes-core-admin-client
pkgver=@VERSION@
pkgrel=@REL@
pkgdesc="This package include management tools, like qvm-*."
arch=("x86_64")
url="https://qubes-os.org/"
license=('GPL')
depends=(
'scrypt'
'xorg-xrandr'
'python-setuptools'
'python-tqdm'
'python-xcffib'
'python-xlib'
'python-yaml'
'qubes-repo-templates'
'qubes-rpm-oxide'
)
makedepends=(
'make'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)

_pkgnvr="${pkgname}-${pkgver}-${pkgrel}"
changelog=debian/changelog
source=("${_pkgnvr}.tar.gz")
md5sums=(SKIP)

build() {
cd "${_pkgnvr}"
python -m build --wheel --no-isolation
}

package() {
cd "${_pkgnvr}"
# shellcheck disable=SC2154
python -m installer --destdir="$pkgdir" dist/*.whl
make install-misc DESTDIR="$pkgdir"
}

# vim:set tabstop=4 shiftwidth=4 softtabstop=4 expandtab:
Loading