From 88ddaa4f1f480923e14f662bab30cacff277ba40 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Thu, 28 Mar 2024 14:54:11 -0500 Subject: [PATCH] WIP: debbuilder Currently does not work. --- debbuilder/.gitignore | 1 + debbuilder/Dockerfile | 19 +++++++++++++++++++ debbuilder/Makefile | 13 +++++++++++++ debbuilder/README.md | 22 ++++++++++++++++++++++ debbuilder/build.sh | 6 ++++++ 5 files changed, 61 insertions(+) create mode 100644 debbuilder/.gitignore create mode 100644 debbuilder/Dockerfile create mode 100644 debbuilder/Makefile create mode 100644 debbuilder/README.md create mode 100755 debbuilder/build.sh diff --git a/debbuilder/.gitignore b/debbuilder/.gitignore new file mode 100644 index 0000000..5b26e2d --- /dev/null +++ b/debbuilder/.gitignore @@ -0,0 +1 @@ +abuild diff --git a/debbuilder/Dockerfile b/debbuilder/Dockerfile new file mode 100644 index 0000000..bfc7d58 --- /dev/null +++ b/debbuilder/Dockerfile @@ -0,0 +1,19 @@ +FROM docker.io/library/ubuntu:18.04 + +# apt configuration +RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak +RUN sed /etc/apt/sources.list.bak -e 's/# deb-src/deb-src/g' >/etc/apt/sources.list +RUN apt-get update && apt-get install -y --no-install-recommends build-essential cdbs devscripts equivs fakeroot && apt-get clean && rm -rf /tmp/* /var/tmp/* + +# build script +RUN mkdir -p /build +WORKDIR /build +COPY build.sh /build/build.sh +RUN chmod 755 /build/build.sh + +VOLUME /build/src +VOLUME /build/pkg + +ENTRYPOINT ["/build/build.sh"] +CMD ["non_existant_package_name"] + diff --git a/debbuilder/Makefile b/debbuilder/Makefile new file mode 100644 index 0000000..f97485e --- /dev/null +++ b/debbuilder/Makefile @@ -0,0 +1,13 @@ +CONMAN=sudo docker + +REGISTRY=registry.intra.dominic-ricottone.com +IMAGE=debbuilder +TAG=latest + +image: + $(CONMAN) buildx build --push \ + --platform linux/arm64,linux/amd64 \ + --tag $(REGISTRY)/$(IMAGE):$(TAG) \ + . + +.PHONY: image diff --git a/debbuilder/README.md b/debbuilder/README.md new file mode 100644 index 0000000..265c9e9 --- /dev/null +++ b/debbuilder/README.md @@ -0,0 +1,22 @@ +# debbuilder + + +## Build and Deploy + +``` +make image +``` + + +### Tags + + + `latest` + +---- + +## Use + +Builds DEB packages. +Not meant for humans. +See https://git.dominic-ricottone.com/~dricottone/simple-builder . + diff --git a/debbuilder/build.sh b/debbuilder/build.sh new file mode 100755 index 0000000..49779f3 --- /dev/null +++ b/debbuilder/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh +cd src/$1 || exit 1 +mk-build-deps -i -r control -t "apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends" || exit 1 +debuild -b -uc -us || exit 1 +cp -a /build/src/*.deb /build/src/*.buildinfo /build/src/*.changes /build/pkg/ + -- 2.45.2