Fossil SCM

Generating the /etc/os-release file for the OCI container using autosetup at configure time rather than from a build arg in the Dockerfile at image creation time. This lets use back out the use of heredocs in the Dockerfile, which isn't supported in Podman at all as of this writing and under Docker requires use of BuildKit rather than the legacy "docker build" mechanism. The primary consequence of doing it this way is that the Fossil version number in that generated file becomes the configure-time version, unconditionally. The old way let you override the FSLVER variable at image build time and have that value put into the os-release file. Under this new scheme, you now have to run "/jail/bin/fossil version" to find out what version of Fossil got baked into the image.

wyoung 2023-01-17 05:28 trunk
Commit ec8ef573b31669fdb17383a66ac7aa092f052cd5aa4aa2d857b1f1bf6d746a70
+3 -9
--- Dockerfile
+++ Dockerfile
@@ -34,21 +34,14 @@
3434
RUN set -x \
3535
&& tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
3636
&& ( cd bbx && yes "" | make oldconfig && make -j11 ) \
3737
&& test ! -x /usr/bin/upx || upx -9q bbx/busybox
3838
39
-# Dummy up an OS release info file for those using systemd-nspawn.
39
+# Copy in dummied-up OS release info file for those using nspawn.
4040
# Without this, it'll gripe that the rootfs dir doesn't look like
4141
# it contains an OS.
42
-ARG FSLVER="trunk"
43
-RUN cat <<-OSREL > /etc/os-release
44
- NAME="Fossil BusyBox"
45
- ID="fslbbx"
46
- VERSION="${FSLVER}"
47
- HOME_URL="https://fossil-scm.org/home/doc/trunk/www/containers.md"
48
- BUG_REPORT_URL="https://fossil-scm.org/forum"
49
-OSREL
42
+COPY containers/os-release /etc/os-release
5043
5144
### The changeable Fossil layer is the only one in the first stage that
5245
### changes often, so add it last, to make it independent of the others.
5346
###
5447
### $FSLSTB can be either a file or a directory due to a ADD's bizarre
@@ -57,10 +50,11 @@
5750
### building outside a Fossil checkout, but when building via the
5851
### container-image target, we can avoid a costly hit on the Fossil
5952
### project's home site by pulling the data from the local repo via the
6053
### "tarball" command. This is a DVCS, after all!
6154
ARG FSLCFG=""
55
+ARG FSLVER="trunk"
6256
ARG FSLURL="https://fossil-scm.org/home/tarball/src?r=${FSLVER}"
6357
ENV FSLSTB=/tmp/fsl/src.tar.gz
6458
ADD $FSLURL $FSLSTB
6559
RUN set -x \
6660
&& if [ -d $FSLSTB ] ; then mv $FSLSTB/src fsl ; \
6761
--- Dockerfile
+++ Dockerfile
@@ -34,21 +34,14 @@
34 RUN set -x \
35 && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
36 && ( cd bbx && yes "" | make oldconfig && make -j11 ) \
37 && test ! -x /usr/bin/upx || upx -9q bbx/busybox
38
39 # Dummy up an OS release info file for those using systemd-nspawn.
40 # Without this, it'll gripe that the rootfs dir doesn't look like
41 # it contains an OS.
42 ARG FSLVER="trunk"
43 RUN cat <<-OSREL > /etc/os-release
44 NAME="Fossil BusyBox"
45 ID="fslbbx"
46 VERSION="${FSLVER}"
47 HOME_URL="https://fossil-scm.org/home/doc/trunk/www/containers.md"
48 BUG_REPORT_URL="https://fossil-scm.org/forum"
49 OSREL
50
51 ### The changeable Fossil layer is the only one in the first stage that
52 ### changes often, so add it last, to make it independent of the others.
53 ###
54 ### $FSLSTB can be either a file or a directory due to a ADD's bizarre
@@ -57,10 +50,11 @@
57 ### building outside a Fossil checkout, but when building via the
58 ### container-image target, we can avoid a costly hit on the Fossil
59 ### project's home site by pulling the data from the local repo via the
60 ### "tarball" command. This is a DVCS, after all!
61 ARG FSLCFG=""
 
62 ARG FSLURL="https://fossil-scm.org/home/tarball/src?r=${FSLVER}"
63 ENV FSLSTB=/tmp/fsl/src.tar.gz
64 ADD $FSLURL $FSLSTB
65 RUN set -x \
66 && if [ -d $FSLSTB ] ; then mv $FSLSTB/src fsl ; \
67
--- Dockerfile
+++ Dockerfile
@@ -34,21 +34,14 @@
34 RUN set -x \
35 && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
36 && ( cd bbx && yes "" | make oldconfig && make -j11 ) \
37 && test ! -x /usr/bin/upx || upx -9q bbx/busybox
38
39 # Copy in dummied-up OS release info file for those using nspawn.
40 # Without this, it'll gripe that the rootfs dir doesn't look like
41 # it contains an OS.
42 COPY containers/os-release /etc/os-release
 
 
 
 
 
 
 
43
44 ### The changeable Fossil layer is the only one in the first stage that
45 ### changes often, so add it last, to make it independent of the others.
46 ###
47 ### $FSLSTB can be either a file or a directory due to a ADD's bizarre
@@ -57,10 +50,11 @@
50 ### building outside a Fossil checkout, but when building via the
51 ### container-image target, we can avoid a costly hit on the Fossil
52 ### project's home site by pulling the data from the local repo via the
53 ### "tarball" command. This is a DVCS, after all!
54 ARG FSLCFG=""
55 ARG FSLVER="trunk"
56 ARG FSLURL="https://fossil-scm.org/home/tarball/src?r=${FSLVER}"
57 ENV FSLSTB=/tmp/fsl/src.tar.gz
58 ADD $FSLURL $FSLSTB
59 RUN set -x \
60 && if [ -d $FSLSTB ] ; then mv $FSLSTB/src fsl ; \
61
+1
--- auto.def
+++ auto.def
@@ -773,8 +773,9 @@
773773
# them, it also changes the URL we fetch the source tarball from, so
774774
# repeated builds of a given version generate and fetch the source
775775
# tarball once only, keeping it in the local Docker/Podman cache.
776776
set ci [readfile "$::autosetup(srcdir)/manifest.uuid"]
777777
define FOSSIL_CI_PFX [string range $ci 0 11]
778
+make-template containers/os-release.in
778779
779780
make-template Makefile.in
780781
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
781782
782783
ADDED containers/os-release.in
--- auto.def
+++ auto.def
@@ -773,8 +773,9 @@
773 # them, it also changes the URL we fetch the source tarball from, so
774 # repeated builds of a given version generate and fetch the source
775 # tarball once only, keeping it in the local Docker/Podman cache.
776 set ci [readfile "$::autosetup(srcdir)/manifest.uuid"]
777 define FOSSIL_CI_PFX [string range $ci 0 11]
 
778
779 make-template Makefile.in
780 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
781
782 DDED containers/os-release.in
--- auto.def
+++ auto.def
@@ -773,8 +773,9 @@
773 # them, it also changes the URL we fetch the source tarball from, so
774 # repeated builds of a given version generate and fetch the source
775 # tarball once only, keeping it in the local Docker/Podman cache.
776 set ci [readfile "$::autosetup(srcdir)/manifest.uuid"]
777 define FOSSIL_CI_PFX [string range $ci 0 11]
778 make-template containers/os-release.in
779
780 make-template Makefile.in
781 make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
782
783 DDED containers/os-release.in
--- a/containers/os-release.in
+++ b/containers/os-release.in
@@ -0,0 +1,3 @@
1
+NAME="Fossil Bus@FOSSIL_CI_PFX@="fslbbx"
2
+VERSION="Fossil 2"
3
+HOME_URL="https://fossil-scm.org/home/doc/trunk/www/contain
--- a/containers/os-release.in
+++ b/containers/os-release.in
@@ -0,0 +1,3 @@
 
 
 
--- a/containers/os-release.in
+++ b/containers/os-release.in
@@ -0,0 +1,3 @@
1 NAME="Fossil Bus@FOSSIL_CI_PFX@="fslbbx"
2 VERSION="Fossil 2"
3 HOME_URL="https://fossil-scm.org/home/doc/trunk/www/contain

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button