Skip to content

Commit

Permalink
Update and support for builderv2
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed Jan 30, 2024
1 parent 81eac87 commit 416a4ed
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 99 deletions.
11 changes: 11 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
checks:pylint:
before_script:
- pip install pylint
script:
- PYTHONPATH=test-packages python3 -m pylint qubeswhonix
stage: checks
include:
- file: /r4.2/gitlab-base.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.2/gitlab-host.yml
project: QubesOS/qubes-continuous-integration
4 changes: 4 additions & 0 deletions .qubesbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
host:
rpm:
build:
- rpm_spec/qubes-core-admin-addon-bridge-device.spec
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
ADMIN_API_METHODS_SIMPLE = \
admin.vm.device.bridge.Attach \
admin.vm.device.bridge.Available \
admin.vm.device.bridge.Detach \
admin.vm.device.bridge.List \
admin.vm.device.bridge.Set.persistent

all:
python3 setup.py build

install:
# force /usr/bin before /bin to have /usr/bin/python instead of /bin/python
PATH="/usr/bin:$$PATH" python3 setup.py install $(PYTHON_PREFIX_ARG) -O1 --skip-build --root $(DESTDIR)

mkdir -p $(DESTDIR)/etc/qubes-rpc/policy
for method in $(ADMIN_API_METHODS_SIMPLE); do \
cp qubes-rpc-policy/$$method.policy $(DESTDIR)/etc/qubes-rpc/policy/$$method; \
ln -s ../../usr/libexec/qubes/qubesd-query-fast $(DESTDIR)/etc/qubes-rpc/$$method || exit 1; \
done
# default RPC policy
install -D -m 0664 -- qubes-rpc-policy/80-admin-default-bridge.policy $(DESTDIR)/etc/qubes/policy.d/80-admin-default-bridge.policy
8 changes: 8 additions & 0 deletions qubes-rpc-policy/80-admin-default-bridge.policy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Do not modify this file, create a new policy file with a lower number in the
## filename instead. For example `30-bridge.policy`.

!include-service admin.vm.device.bridge.Attach * include/admin-local-rwx
!include-service admin.vm.device.bridge.Available * include/admin-local-ro
!include-service admin.vm.device.bridge.Detach * include/admin-local-rwx
!include-service admin.vm.device.bridge.List * include/admin-local-ro
!include-service admin.vm.device.bridge.Set.persistent * include/admin-local-rwx
13 changes: 0 additions & 13 deletions qubes-rpc-policy/admin.vm.device.bridge.Attach.policy

This file was deleted.

13 changes: 0 additions & 13 deletions qubes-rpc-policy/admin.vm.device.bridge.Available.policy

This file was deleted.

13 changes: 0 additions & 13 deletions qubes-rpc-policy/admin.vm.device.bridge.Detach.policy

This file was deleted.

13 changes: 0 additions & 13 deletions qubes-rpc-policy/admin.vm.device.bridge.List.policy

This file was deleted.

13 changes: 0 additions & 13 deletions qubes-rpc-policy/admin.vm.device.bridge.Set.persistent.policy

This file was deleted.

10 changes: 6 additions & 4 deletions rpm_spec/qubes-core-admin-addon-bridge-device.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ URL: https://www.qubes-os.org
Source0: %{name}-%{version}.tar.gz

BuildArch: noarch
BuildRequires: make
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools

%description
qubes-core-admin extension for handling Bridge Device
Expand All @@ -28,9 +30,9 @@ make %{?_smp_mflags}
%{python3_sitelib}/qubesbridgedevice-*.egg-info
%{python3_sitelib}/qubesbridgedevice

%attr(2775,root,qubes) %dir /etc/qubes-rpc/policy
%attr(0664,root,qubes) %config(noreplace) /etc/qubes-rpc/policy/admin.*
/etc/qubes-rpc/admin.*
%attr(2775,root,qubes) %dir /etc/qubes/policy.d/
%attr(0664,root,qubes) %config(noreplace) /etc/qubes/policy.d/80-admin-default-bridge.policy
/etc/qubes/policy.d/80-admin-default-bridge.policy

%changelog

@CHANGELOG@

0 comments on commit 416a4ed

Please sign in to comment.