Fossil SCM

The /etc/os-release workaround for nspawn's pickiness has caused the feature to go into negative ROI territory. Ripped it out of the mainstream process and made it a manual step for those who need it, in the hopes that this will cause fewer ongoing problems than leaving it as it is.

wyoung 2023-03-23 16:40 trunk
Commit 4cb5c03ea1c02607a7eb5fdda7651a8be54b446425cf602b56373f074aa931c5
-5
--- Dockerfile
+++ Dockerfile
@@ -30,15 +30,10 @@
3030
ADD $BBXURL /tmp/bbx/src.tar.gz
3131
RUN set -x \
3232
&& tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
3333
&& ( cd bbx && yes "" | make oldconfig && make -j11 )
3434
35
-# Copy in dummied-up OS release info file for those using nspawn.
36
-# Without this, it'll gripe that the rootfs dir doesn't look like
37
-# it contains an OS.
38
-COPY containers/os-release /etc/os-release
39
-
4035
### The changeable Fossil layer is the only one in the first stage that
4136
### changes often, so add it last, to make it independent of the others.
4237
###
4338
### $FSLSTB can be either a file or a directory due to a ADD's bizarre
4439
### behavior: it unpacks tarballs when added from a local file but not
4540
--- Dockerfile
+++ Dockerfile
@@ -30,15 +30,10 @@
30 ADD $BBXURL /tmp/bbx/src.tar.gz
31 RUN set -x \
32 && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
33 && ( cd bbx && yes "" | make oldconfig && make -j11 )
34
35 # Copy in dummied-up OS release info file for those using nspawn.
36 # Without this, it'll gripe that the rootfs dir doesn't look like
37 # it contains an OS.
38 COPY containers/os-release /etc/os-release
39
40 ### The changeable Fossil layer is the only one in the first stage that
41 ### changes often, so add it last, to make it independent of the others.
42 ###
43 ### $FSLSTB can be either a file or a directory due to a ADD's bizarre
44 ### behavior: it unpacks tarballs when added from a local file but not
45
--- Dockerfile
+++ Dockerfile
@@ -30,15 +30,10 @@
30 ADD $BBXURL /tmp/bbx/src.tar.gz
31 RUN set -x \
32 && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \
33 && ( cd bbx && yes "" | make oldconfig && make -j11 )
34
 
 
 
 
 
35 ### The changeable Fossil layer is the only one in the first stage that
36 ### changes often, so add it last, to make it independent of the others.
37 ###
38 ### $FSLSTB can be either a file or a directory due to a ADD's bizarre
39 ### behavior: it unpacks tarballs when added from a local file but not
40
-1
--- auto.def
+++ auto.def
@@ -773,9 +773,8 @@
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
779778
780779
make-template Makefile.in
781780
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
782781
783782
ADDED containers/os-release
784783
DELETED containers/os-release.in
--- auto.def
+++ auto.def
@@ -773,9 +773,8 @@
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
784 ELETED containers/os-release.in
--- auto.def
+++ auto.def
@@ -773,9 +773,8 @@
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
783 ELETED containers/os-release.in
--- a/containers/os-release
+++ b/containers/os-release
@@ -1,3 +1,5 @@
1
-NAME="Fossil Bus@FOSSIL_CI_PFX@="fslbbx"
1
+NAME="Fossil BusyBox"
2
+ID="fslbbx"
23
VERSION="Fossil 2"
3
-HOME_URL="https://fossil-scm.org/home/doc/trunk/www/contain
4
+HOME_URL="https://fossil-scm.org/home/doc/trunk/www/containers.md"
5
+BUG_REPORT_URL="https://fossil-scm.org/forum"
--- a/containers/os-release
+++ b/containers/os-release
@@ -1,3 +1,5 @@
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
+++ b/containers/os-release
@@ -1,3 +1,5 @@
1 NAME="Fossil BusyBox"
2 ID="fslbbx"
3 VERSION="Fossil 2"
4 HOME_URL="https://fossil-scm.org/home/doc/trunk/www/containers.md"
5 BUG_REPORT_URL="https://fossil-scm.org/forum"
D containers/os-release.in
-3
--- a/containers/os-release.in
+++ b/containers/os-release.in
@@ -1,3 +0,0 @@
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
@@ -1,3 +0,0 @@
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
@@ -1,3 +0,0 @@
 
 
 
--- www/containers.md
+++ www/containers.md
@@ -729,21 +729,27 @@
729729
“`myproject`” within `~/museum/myproject/repo.fossil`, named according
730730
to the reasons given [above](#repo-inside). We’ll make consistent use of
731731
this naming scheme in the examples below so that you will be able to
732732
replace the “`myproject`” element of the various file and path names.
733733
734
-The first configuration step is to convert the Docker container into
735
-a “machine,” as `systemd` calls it. The easiest method is:
734
+If you use [the stock `Dockerfile`](/file/dockerfile) to generate your
735
+base image, `nspawn` won’t recognize it as containing an OS unless you
736
+put a line like this into the first stage:
737
+
738
+```
739
+COPY containers/os-release /etc/os-release
740
+```
741
+
742
+That will let you produce a `systemd` “machine” via the OCI image:
736743
737744
```
738745
$ make container
739746
$ docker container export $(make container-version) |
740747
machinectl import-tar - myproject
741748
```
742749
743
-Next, create `/etc/systemd/nspawn/myproject.nspawn`, containing
744
-something like:
750
+Next, create `/etc/systemd/nspawn/myproject.nspawn`:
745751
746752
----
747753
748754
```
749755
[Exec]
750756
--- www/containers.md
+++ www/containers.md
@@ -729,21 +729,27 @@
729 “`myproject`” within `~/museum/myproject/repo.fossil`, named according
730 to the reasons given [above](#repo-inside). We’ll make consistent use of
731 this naming scheme in the examples below so that you will be able to
732 replace the “`myproject`” element of the various file and path names.
733
734 The first configuration step is to convert the Docker container into
735 a “machine,” as `systemd` calls it. The easiest method is:
 
 
 
 
 
 
 
736
737 ```
738 $ make container
739 $ docker container export $(make container-version) |
740 machinectl import-tar - myproject
741 ```
742
743 Next, create `/etc/systemd/nspawn/myproject.nspawn`, containing
744 something like:
745
746 ----
747
748 ```
749 [Exec]
750
--- www/containers.md
+++ www/containers.md
@@ -729,21 +729,27 @@
729 “`myproject`” within `~/museum/myproject/repo.fossil`, named according
730 to the reasons given [above](#repo-inside). We’ll make consistent use of
731 this naming scheme in the examples below so that you will be able to
732 replace the “`myproject`” element of the various file and path names.
733
734 If you use [the stock `Dockerfile`](/file/dockerfile) to generate your
735 base image, `nspawn` won’t recognize it as containing an OS unless you
736 put a line like this into the first stage:
737
738 ```
739 COPY containers/os-release /etc/os-release
740 ```
741
742 That will let you produce a `systemd` “machine” via the OCI image:
743
744 ```
745 $ make container
746 $ docker container export $(make container-version) |
747 machinectl import-tar - myproject
748 ```
749
750 Next, create `/etc/systemd/nspawn/myproject.nspawn`:
 
751
752 ----
753
754 ```
755 [Exec]
756

Keyboard Shortcuts

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