Skip to content

Commit

Permalink
Add qubes-builder integration and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Dec 7, 2024
1 parent ad93971 commit b7bf9b3
Show file tree
Hide file tree
Showing 9 changed files with 277 additions and 367 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pkgs/
xorg-server-*.tar.xz
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include:
- file: /r4.2/gitlab-base.yml
project: QubesOS/qubes-continuous-integration
- file: /r4.2/gitlab-host.yml
project: QubesOS/qubes-continuous-integration
8 changes: 8 additions & 0 deletions .qubesbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
host:
rpm:
build:
- xorg-x11-server.spec
source:
files:
- url: https://www.x.org/pub/individual/xserver/xorg-server-@[email protected]
sha512: xorg-server-@[email protected]
53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.DEFAULT_GOAL = get-sources
.SECONDEXPANSION:

DIST ?= fc32
VERSION := $(shell cat version)

FEDORA_SOURCES := https://src.fedoraproject.org/rpms/xorg-x11-server/raw/f$(subst fc,,$(DIST))/f/sources
SRC_FILES := \
xorg-server-$(VERSION).tar.xz


BUILDER_DIR ?= ../..
SRC_DIR ?= qubes-src

SRC_URLS := \
https://www.x.org/pub/individual/xserver/xorg-server-$(VERSION).tar.xz


UNTRUSTED_SUFF := .UNTRUSTED

SHELL := bash

.PHONY: get-sources verify-sources clean clean-sources

ifeq ($(FETCH_CMD),)
$(error "You can not run this Makefile without having FETCH_CMD defined")
endif

%: %.sha512
@$(FETCH_CMD) $@$(UNTRUSTED_SUFF) -- $(filter %/$@,$(SRC_URLS))
@sha512sum --status -c <(printf "$$(cat $<) -\n") <$@$(UNTRUSTED_SUFF) || \
{ echo "Wrong SHA512 checksum on $@$(UNTRUSTED_SUFF)!"; exit 1; }
@mv $@$(UNTRUSTED_SUFF) $@

get-sources: $(SRC_FILES)
@true

verify-sources:
@true

clean:
@true

clean-sources:
rm -f $(SRC_FILES) *$(UNTRUSTED_SUFF)

# This target is generating content locally from upstream project
# # 'sources' file. Sanitization is done but it is encouraged to perform
# # update of component in non-sensitive environnements to prevent
# # any possible local destructions due to shell rendering
# .PHONY: update-sources
update-sources:
@$(BUILDER_DIR)/$(SRC_DIR)/builder-rpm/scripts/generate-hashes-from-sources $(FEDORA_SOURCES)
4 changes: 4 additions & 0 deletions Makefile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ifeq ($(PACKAGE_SET),dom0)
RPM_SPEC_FILES := xorg-x11-server.spec
endif
NO_ARCHIVE := 1
1 change: 1 addition & 0 deletions rel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.20.14
Loading

0 comments on commit b7bf9b3

Please sign in to comment.