Skip to content

Commit f50747a

Browse files
committed
Init
1 parent 0f786b2 commit f50747a

File tree

10 files changed

+199
-2
lines changed

10 files changed

+199
-2
lines changed

.daemonless/config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
variants:
3+
- tag: 15.0
4+
containerfile: Containerfile.pkg
5+
aliases: ["latest"]
6+
default: true
7+
args:
8+
FREEBSD_RELEASE: "15.0"

.github/workflows/build.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build OCI image for base
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore: ['*.md', 'LICENSE', '.gitignore']
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
uses: appjail-makejails/workflows/.github/workflows/daemonless-build.yaml@main
14+
with:
15+
image_name: base
16+
secrets: inherit

Containerfile.pkg

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG FREEBSD_RELEASE
2+
3+
FROM ghcr.io/freebsd/freebsd-runtime:${FREEBSD_RELEASE}
4+
5+
LABEL org.opencontainers.image.title="FreeBSD base" \
6+
org.opencontainers.image.description="FreeBSD base image" \
7+
org.opencontainers.image.authors="Jesús Daniel Colmenares Oviedo <dtxdf@disroot.org>"
8+
9+
ENV ASSUME_ALWAYS_YES=yes
10+
11+
RUN mkdir -p /etc/pkg && \
12+
printf '%s\n' \
13+
'FreeBSD-ports-kmods: { enabled: no }' \
14+
'FreeBSD-base: {' \
15+
' url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",' \
16+
' mirror_type: "srv",' \
17+
' signature_type: "fingerprints",' \
18+
' fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",' \
19+
' enabled: yes' \
20+
'}' \
21+
'FreeBSD-Ports: {' \
22+
' url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",' \
23+
' mirror_type: "srv",' \
24+
' signature_type: "fingerprints",' \
25+
' fingerprints: "/usr/share/keys/pkg",' \
26+
' enabled: yes' \
27+
'}' > /etc/pkg/FreeBSD.conf && \
28+
rm -rf /usr/local/etc/pkg

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# base
2-
FreeBSD-base OCI image used by Makejails.
1+
# FreeBSD
2+
3+
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable home-class hardware, and has since continuously been the most commonly used BSD-derived operating system.
4+
5+
wikipedia.org/wiki/FreeBSD
6+
7+
<img src="https://www.freebsd.org/images/banner-red.png" alt="freebsd logo" width="80%" height="auto">
8+
9+
## How to use this Makejail
10+
11+
```sh
12+
appjail makejail \
13+
-j freebsd \
14+
-f gh+AppJail-makejails/base
15+
```
16+
17+
### Arguments
18+
19+
* `base_from` (default: `ghcr.io/AppJail-makejails/base`): Location of OCI image. See also [OCI Configuration](#oci-configuration).
20+
* `base_tag` (default: `latest`): OCI image tag. See also [OCI Configuration](#oci-configuration).
21+
22+
## OCI Configuration
23+
24+
```yaml
25+
build:
26+
variants:
27+
- tag: 15.0
28+
containerfile: Containerfile.pkg
29+
aliases: ["latest"]
30+
default: true
31+
args:
32+
FREEBSD_RELEASE: "15.0"
33+
```

update/Containerfile.pkg.template

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG FREEBSD_RELEASE
2+
3+
FROM ghcr.io/freebsd/freebsd-runtime:${FREEBSD_RELEASE}
4+
5+
LABEL org.opencontainers.image.title="FreeBSD base" \
6+
org.opencontainers.image.description="FreeBSD base image" \
7+
org.opencontainers.image.authors="Jesús Daniel Colmenares Oviedo <dtxdf@disroot.org>"
8+
9+
ENV ASSUME_ALWAYS_YES=yes
10+
11+
RUN mkdir -p /etc/pkg && \
12+
printf '%s\n' \
13+
'FreeBSD-ports-kmods: { enabled: no }' \
14+
'FreeBSD-base: {' \
15+
' url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",' \
16+
' mirror_type: "srv",' \
17+
' signature_type: "fingerprints",' \
18+
' fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",' \
19+
' enabled: yes' \
20+
'}' \
21+
'FreeBSD-Ports: {' \
22+
' url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",' \
23+
' mirror_type: "srv",' \
24+
' signature_type: "fingerprints",' \
25+
' fingerprints: "/usr/share/keys/pkg",' \
26+
' enabled: yes' \
27+
'}' > /etc/pkg/FreeBSD.conf && \
28+
rm -rf /usr/local/etc/pkg

update/README.md.template

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# FreeBSD
2+
3+
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable home-class hardware, and has since continuously been the most commonly used BSD-derived operating system.
4+
5+
wikipedia.org/wiki/FreeBSD
6+
7+
<img src="https://www.freebsd.org/images/banner-red.png" alt="freebsd logo" width="80%" height="auto">
8+
9+
## How to use this Makejail
10+
11+
```sh
12+
appjail makejail \
13+
-j freebsd \
14+
-f gh+AppJail-makejails/base
15+
```
16+
17+
### Arguments
18+
19+
* `base_from` (default: `ghcr.io/AppJail-makejails/%%IMAGE_NAME%%`): Location of OCI image. See also [OCI Configuration](#oci-configuration).
20+
* `base_tag` (default: `latest`): OCI image tag. See also [OCI Configuration](#oci-configuration).
21+
22+
## OCI Configuration
23+
24+
```yaml
25+
%%OCI_CONFIGURATION%%
26+
```

update/build.yaml.template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build OCI image for %%IMAGE_NAME%%
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore: ['*.md', 'LICENSE', '.gitignore']
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
uses: appjail-makejails/workflows/.github/workflows/daemonless-build.yaml@main
14+
with:
15+
image_name: %%IMAGE_NAME%%
16+
secrets: inherit

update/config.yaml.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build:
2+
variants:
3+
- tag: %%TAG1%%
4+
containerfile: Containerfile.pkg
5+
aliases: ["latest"]
6+
default: true
7+
args:
8+
FREEBSD_RELEASE: "%%TAG1%%"

update/update.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
IMAGE_NAME=base
2+
TAG1=15.0

update/update.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
BASEDIR=`dirname -- "$0"` || exit $?
4+
BASEDIR=`realpath -- "${BASEDIR}"` || exit $?
5+
6+
. "${BASEDIR}/update.conf"
7+
8+
set -xe
9+
set -o pipefail
10+
11+
mkdir -p -- "${BASEDIR}/../.daemonless"
12+
13+
cat -- "${BASEDIR}/config.yaml.template" |\
14+
sed -E \
15+
-e "s/%%TAG1%%/${TAG1}/g" > "${BASEDIR}/../.daemonless/config.yaml"
16+
17+
cat -- "${BASEDIR}/README.md.template" |\
18+
sed -E \
19+
-e "s/%%TAG1%%/${TAG1}/g" \
20+
-e "s/%%IMAGE_NAME%%/${IMAGE_NAME}/g" \
21+
-e "/%%OCI_CONFIGURATION%%/{
22+
r ${BASEDIR}/../.daemonless/config.yaml
23+
d
24+
}" > "${BASEDIR}/../README.md"
25+
26+
mkdir -p -- "${BASEDIR}/../.github/workflows"
27+
28+
cat -- "${BASEDIR}/build.yaml.template" |\
29+
sed -E \
30+
-e "s/%%IMAGE_NAME%%/${IMAGE_NAME}/g" > "${BASEDIR}/../.github/workflows/build.yaml"
31+
32+
cat -- "${BASEDIR}/Containerfile.pkg.template" |\
33+
sed -E \
34+
-e "s/%%PYVER%%/${PYVER}/g" > "${BASEDIR}/../Containerfile.pkg"

0 commit comments

Comments
 (0)