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.
Commit
4cb5c03ea1c02607a7eb5fdda7651a8be54b446425cf602b56373f074aa931c5
Parent
5b62bfe101390bf…
5 files changed
-5
-1
+4
-2
-3
+10
-4
-5
| --- Dockerfile | ||
| +++ Dockerfile | ||
| @@ -30,15 +30,10 @@ | ||
| 30 | 30 | ADD $BBXURL /tmp/bbx/src.tar.gz |
| 31 | 31 | RUN set -x \ |
| 32 | 32 | && tar --strip-components=1 -C bbx -xzf bbx/src.tar.gz \ |
| 33 | 33 | && ( cd bbx && yes "" | make oldconfig && make -j11 ) |
| 34 | 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 | 35 | ### The changeable Fossil layer is the only one in the first stage that |
| 41 | 36 | ### changes often, so add it last, to make it independent of the others. |
| 42 | 37 | ### |
| 43 | 38 | ### $FSLSTB can be either a file or a directory due to a ADD's bizarre |
| 44 | 39 | ### behavior: it unpacks tarballs when added from a local file but not |
| 45 | 40 |
| --- 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 |
M
auto.def
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -773,9 +773,8 @@ | ||
| 773 | 773 | # them, it also changes the URL we fetch the source tarball from, so |
| 774 | 774 | # repeated builds of a given version generate and fetch the source |
| 775 | 775 | # tarball once only, keeping it in the local Docker/Podman cache. |
| 776 | 776 | set ci [readfile "$::autosetup(srcdir)/manifest.uuid"] |
| 777 | 777 | define FOSSIL_CI_PFX [string range $ci 0 11] |
| 778 | -make-template containers/os-release.in | |
| 779 | 778 | |
| 780 | 779 | make-template Makefile.in |
| 781 | 780 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 782 | 781 | |
| 783 | 782 | ADDED containers/os-release |
| 784 | 783 | 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 |
+4
-2
| --- 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" | |
| 2 | 3 | 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 @@ | |
+10
-4
| --- www/containers.md | ||
| +++ www/containers.md | ||
| @@ -729,21 +729,27 @@ | ||
| 729 | 729 | “`myproject`” within `~/museum/myproject/repo.fossil`, named according |
| 730 | 730 | to the reasons given [above](#repo-inside). We’ll make consistent use of |
| 731 | 731 | this naming scheme in the examples below so that you will be able to |
| 732 | 732 | replace the “`myproject`” element of the various file and path names. |
| 733 | 733 | |
| 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: | |
| 736 | 743 | |
| 737 | 744 | ``` |
| 738 | 745 | $ make container |
| 739 | 746 | $ docker container export $(make container-version) | |
| 740 | 747 | machinectl import-tar - myproject |
| 741 | 748 | ``` |
| 742 | 749 | |
| 743 | -Next, create `/etc/systemd/nspawn/myproject.nspawn`, containing | |
| 744 | -something like: | |
| 750 | +Next, create `/etc/systemd/nspawn/myproject.nspawn`: | |
| 745 | 751 | |
| 746 | 752 | ---- |
| 747 | 753 | |
| 748 | 754 | ``` |
| 749 | 755 | [Exec] |
| 750 | 756 |
| --- 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 |