Skip to content

Commit e9a1e0a

Browse files
committed
Move Fedora package build into Podman.
1 parent a13773a commit e9a1e0a

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,18 @@ totpm-$(VERSION).tar.gz: $(SOURCES)
1717
totpm-$(VERSION)-1.fc$(FEDORA_RELEASE).src.rpm: totpm-$(VERSION).tar.gz
1818
fedpkg --release f$(FEDORA_RELEASE) srpm
1919

20-
totpm-$(VERSION)-1.fc$(FEDORA_RELEASE).$(ARCH).rpm: totpm-$(VERSION)-1.fc$(FEDORA_RELEASE).src.rpm
21-
fedpkg --release f$(FEDORA_RELEASE) mockbuild
20+
totpm-$(VERSION)-1.fc$(FEDORA_RELEASE).$(ARCH).rpm: totpm-$(VERSION)-1.fc$(FEDORA_RELEASE).src.rpm fedora-builder/Dockerfile fedora-builder/storage.conf
21+
podman build \
22+
-t totpm-builder:$(FEDORA_RELEASE) \
23+
--build-arg FEDORA_RELEASE=$(FEDORA_RELEASE) \
24+
fedora-builder
25+
26+
podman run \
27+
--privileged \
28+
-v .:/build:rw,z \
29+
totpm-builder:$(FEDORA_RELEASE) \
30+
fedpkg --release f$(FEDORA_RELEASE) mockbuild
31+
2232
cp -a results_totpm/$(VERSION)/1.fc$(FEDORA_RELEASE)/totpm-$(VERSION)-1.fc$(FEDORA_RELEASE).$(ARCH).rpm ./
2333

2434
.PHONY: fedora-package

fedora-builder/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ARG FEDORA_RELEASE=40
2+
FROM fedora:${FEDORA_RELEASE}
3+
VOLUME /build
4+
RUN dnf -y install jq cargo fedpkg
5+
RUN mkdir -p /run/containers/storage /var/lib/containers/storage
6+
COPY ./storage.conf /etc/containers/storage.conf
7+
WORKDIR /build

fedora-builder/storage.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[storage]
2+
driver = "vfs"
3+
runroot = "/run/containers/storage"
4+
graphroot = "/var/lib/containers/storage"

0 commit comments

Comments
 (0)