Parcourir la source

Remove version numbers from generated tarballs

Signed-off-by: Laurent Bercot <[email protected]>
Laurent Bercot il y a 3 ans
Parent
commit
572ae510b7
2 fichiers modifiés avec 46 ajouts et 44 suppressions
  1. 10 10
      Makefile
  2. 36 34
      README.md

+ 10 - 10
Makefile

@@ -26,7 +26,7 @@ all: rootfs-overlay-arch-tarball symlinks-overlay-arch-tarball rootfs-overlay-no
 
 .PHONY: rootfs-overlay-arch rootfs-overlay-arch-tarball
 rootfs-overlay-arch: $(OUTPUT)/rootfs-overlay-$(ARCH)/package/admin/execline/command/execlineb
-rootfs-overlay-arch-tarball: $(OUTPUT)/s6-overlay-$(HW)-$(VERSION).tar.xz
+rootfs-overlay-arch-tarball: $(OUTPUT)/s6-overlay-$(HW).tar.xz
 
 $(OUTPUT)/rootfs-overlay-$(ARCH)/package/admin/execline/command/execlineb: skaware-install
 	exec rm -rf $(OUTPUT)/rootfs-overlay-$(ARCH)
@@ -34,28 +34,28 @@ $(OUTPUT)/rootfs-overlay-$(ARCH)/package/admin/execline/command/execlineb: skawa
 	exec cp -a $(OUTPUT)/staging-$(ARCH)/package $(OUTPUT)/staging-$(ARCH)/command $(OUTPUT)/rootfs-overlay-$(ARCH)/
 	exec rm -rf $(OUTPUT)/rootfs-overlay-$(ARCH)/package/*/*/include $(OUTPUT)/rootfs-overlay-$(ARCH)/package/*/*/library
 
-$(OUTPUT)/s6-overlay-$(HW)-$(VERSION).tar.xz: rootfs-overlay-arch
+$(OUTPUT)/s6-overlay-$(HW).tar.xz: rootfs-overlay-arch
 	exec rm -f [email protected]
 	cd $(OUTPUT)/rootfs-overlay-$(ARCH) && tar -Jcvf [email protected] --owner=0 --group=0 --numeric-owner .
 	exec mv -f [email protected] $@
 
 .PHONY: symlinks-overlay-arch symlinks-overlay-arch-tarball
 symlinks-overlay-arch: $(OUTPUT)/symlinks-overlay-arch/usr/bin/execlineb
-symlinks-overlay-arch-tarball: $(OUTPUT)/s6-overlay-symlinks-arch-$(VERSION).tar.xz
+symlinks-overlay-arch-tarball: $(OUTPUT)/s6-overlay-symlinks-arch.tar.xz
 
 $(OUTPUT)/symlinks-overlay-arch/usr/bin/execlineb: rootfs-overlay-arch
 	exec rm -rf $(OUTPUT)/symlinks-overlay-arch
 	exec mkdir -p $(OUTPUT)/symlinks-overlay-arch/usr/bin
 	for i in `ls -1 $(OUTPUT)/rootfs-overlay-$(ARCH)/command` ; do ln -s "../../command/$$i" $(OUTPUT)/symlinks-overlay-arch/usr/bin/ ; done
 
-$(OUTPUT)/s6-overlay-symlinks-arch-$(VERSION).tar.xz: symlinks-overlay-arch
+$(OUTPUT)/s6-overlay-symlinks-arch.tar.xz: symlinks-overlay-arch
 	exec rm -f [email protected]
 	cd $(OUTPUT)/symlinks-overlay-arch && tar -Jcvf [email protected] --owner=0 --group=0 --numeric-owner .
 	exec mv -f [email protected] $@
 
 .PHONY: rootfs-overlay-noarch rootfs-overlay-noarch-tarball
 rootfs-overlay-noarch: $(OUTPUT)/rootfs-overlay-noarch/init
-rootfs-overlay-noarch-tarball: $(OUTPUT)/s6-overlay-noarch-$(VERSION).tar.xz
+rootfs-overlay-noarch-tarball: $(OUTPUT)/s6-overlay-noarch.tar.xz
 
 TMPDIR1 := $(OUTPUT)/rootfs-overlay-noarch.tmp
 
@@ -69,28 +69,28 @@ $(OUTPUT)/rootfs-overlay-noarch/init: layout/rootfs-overlay/init
 	exec ln -s s6-overlay-$(VERSION) $(TMPDIR1)/package/admin/s6-overlay
 	exec mv -f $(TMPDIR1) $(OUTPUT)/rootfs-overlay-noarch
 
-$(OUTPUT)/s6-overlay-noarch-$(VERSION).tar.xz: rootfs-overlay-noarch
+$(OUTPUT)/s6-overlay-noarch.tar.xz: rootfs-overlay-noarch
 	exec rm -f [email protected]
 	cd $(OUTPUT)/rootfs-overlay-noarch && tar -Jcvf [email protected] --owner=0 --group=0 --numeric-owner .
 	exec mv -f [email protected] $@
 
 .PHONY: symlinks-overlay-noarch symlinks-overlay-noarch-tarball
 symlinks-overlay-noarch: $(OUTPUT)/symlinks-overlay-noarch/usr/bin/printcontenv
-symlinks-overlay-noarch-tarball: $(OUTPUT)/s6-overlay-symlinks-noarch-$(VERSION).tar.xz
+symlinks-overlay-noarch-tarball: $(OUTPUT)/s6-overlay-symlinks-noarch.tar.xz
 
 $(OUTPUT)/symlinks-overlay-noarch/usr/bin/printcontenv: rootfs-overlay-noarch
 	exec rm -rf $(OUTPUT)/symlinks-overlay-noarch
 	exec mkdir -p $(OUTPUT)/symlinks-overlay-noarch/usr/bin
 	for i in `ls -1 $(OUTPUT)/rootfs-overlay-noarch/command` ; do ln -s "../../command/$$i" $(OUTPUT)/symlinks-overlay-noarch/usr/bin/ ; done
 
-$(OUTPUT)/s6-overlay-symlinks-noarch-$(VERSION).tar.xz: symlinks-overlay-noarch
+$(OUTPUT)/s6-overlay-symlinks-noarch.tar.xz: symlinks-overlay-noarch
 	exec rm -f [email protected]
 	cd $(OUTPUT)/symlinks-overlay-noarch && tar -Jcvf [email protected] --owner=0 --group=0 --numeric-owner .
 	exec mv -f [email protected] $@
 
 .PHONY: syslogd-overlay-noarch syslogd-overlay-noarch-tarball
 syslogd-overlay-noarch: $(OUTPUT)/syslogd-overlay-noarch/etc/s6-overlay/s6-rc.d/syslogd/run
-syslogd-overlay-noarch-tarball: $(OUTPUT)/syslogd-overlay-noarch-$(VERSION).tar.xz
+syslogd-overlay-noarch-tarball: $(OUTPUT)/syslogd-overlay-noarch.tar.xz
 
 TMPDIR2 := $(OUTPUT)/syslogd-overlay-noarch.tmp
 
@@ -103,7 +103,7 @@ $(OUTPUT)/syslogd-overlay-noarch/etc/s6-overlay/s6-rc.d/syslogd/run: layout/sysl
 	find $(TMPDIR2) -type f -size +0c -print | xargs sed -i -e 's|@SHEBANGDIR@|$(SHEBANGDIR)|g; s/@VERSION@/$(VERSION)/g;' --
 	exec mv -f $(TMPDIR2) $(OUTPUT)/syslogd-overlay-noarch
 
-$(OUTPUT)/syslogd-overlay-noarch-$(VERSION).tar.xz: syslogd-overlay-noarch
+$(OUTPUT)/syslogd-overlay-noarch.tar.xz: syslogd-overlay-noarch
 	exec rm -f [email protected]
 	cd $(OUTPUT)/syslogd-overlay-noarch && tar -Jcvf [email protected] --owner=0 --group=0 --numeric-owner .
 	exec mv -f [email protected] $@

+ 36 - 34
README.md

@@ -46,10 +46,10 @@ RUN apt-get update && apt-get install -y nginx xz-utils
 RUN echo "daemon off;" >> /etc/nginx/nginx.conf
 CMD ["/usr/sbin/nginx"]
 
-ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch-${S6_OVERLAY_VERSION}.tar.xz /tmp
-RUN tar -C / -Jxpf /tmp/s6-overlay-noarch-${S6_OVERLAY_VERSION}.tar.xz
-ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64-${S6_OVERLAY_VERSION}.tar.xz /tmp
-RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64-${S6_OVERLAY_VERSION}.tar.xz
+ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
+RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
+ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
+RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
 ENTRYPOINT ["/init"]
 ```
 
@@ -103,7 +103,7 @@ finalization (`cont-finish.d`) and their own services with dependencies between
 * Usable with all base images - Ubuntu, CentOS, Fedora, Alpine, Busybox...
 * Distributed as a small number of .tar.xz files depending on what exact functionality you need - to keep your image's number of layers small.
 * A whole set of utilities included in `s6` and `s6-portable-utils`. They include handy and composable utilities which make our lives much, much easier.
-* Log rotating out-of-the-box through `logutil-service` which uses [`s6-log`](http://skarnet.org/software/s6/s6-log.html) under the hood.
+* Log rotating out-of-the-box through `logutil-service` which uses [`s6-log`](https://skarnet.org/software/s6/s6-log.html) under the hood.
 * Some support for Docker's `USER` directive, to run your whole process tree as a specific user. Not compatible with all features, details in the [notes](#notes) section.
 
 ## The Docker Way?
@@ -166,31 +166,28 @@ The tarballs you need are a function of the image you use; most people will
 need the first two, and the other ones are extras you can use at your
 convenience.
 
-Note that this documentation may not be quite up-to-date and you may need
-to replace `3.1.0.0` with the latest version of s6-overlay. :-)
-
-1. `s6-overlay-noarch-3.1.0.0.tar.xz`: this tarball contains the scripts
+1. `s6-overlay-noarch.tar.xz`: this tarball contains the scripts
 implementing the overlay. We call it "noarch" because it is architecture-
 independent: it only contains scripts and other text files. Everyone who
 wants to run s6-overlay needs to extract this tarball.
-2. `s6-overlay-x86_64-3.1.0.0.tar.xz`: replace `x86_64` with your
+2. `s6-overlay-x86_64.tar.xz`: replace `x86_64` with your
 system's architecture. This tarball contains all the necessary binaries
 from the s6 ecosystem, all linked statically and out of the way of
 your image's binaries. Unless you know for sure that your image already
 comes with all the packages providing the binaries used in the overlay,
 you need to extract this tarball.
-3. `s6-overlay-symlinks-noarch-3.1.0.0.tar.xz`: this tarball contains
+3. `s6-overlay-symlinks-noarch.tar.xz`: this tarball contains
 symlinks to the s6-overlay scripts so they are accessible via `/usr/bin`.
 It is normally not needed, all the scripts are accessible via the PATH
 environment variable, but if you have old user scripts containing
 shebangs such as `#!/usr/bin/with-contenv`, installing these symlinks
 will make them work.
-4. `s6-overlay-symlinks-arch-3.1.0.0.tar.xz`: this tarball contains
+4. `s6-overlay-symlinks-arch.tar.xz`: this tarball contains
 symlinks to the binaries from the s6 ecosystem provided by the second
 tarball, to make them accessible via `/usr/bin`. It is normally not
 needed, but if you have old user scripts containing shebangs such as
 `#!/usr/bin/execlineb`, installing these symlinks will make them work.
-5. `syslogd-overlay-noarch-3.1.0.0.tar.xz`: this tarball contains
+5. `syslogd-overlay-noarch.tar.xz`: this tarball contains
 definitions for a `syslogd` service. If you are running daemons that
 cannot log to stderr to take advantage of the s6 logging infrastructure,
 but hardcode the use of the old `syslog()` mechanism, you can extract
@@ -201,15 +198,20 @@ To install those tarballs, add lines to your Dockerfile that correspond
 to the functionality you want to install. For instance, most people would
 use the following:
 ```
-ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-noarch-3.1.0.0.tar.xz /tmp
-RUN tar -C / -Jxpf /tmp/s6-overlay-noarch-3.1.0.0.tar.xz
-ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-x86_64-3.1.0.0.tar.xz /tmp
-RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64-3.1.0.0.tar.xz
+ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-noarch.tar.xz /tmp
+RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
+ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-x86_64.tar.xz /tmp
+RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
 ```
 
 ## Usage
 
 The project is distributed as a set of standard .tar.xz files, which you extract at the root of your image.
+(You need the xz-utils package for `tar` to understand `.tar.xz` files; it is available
+in every distribution, but not always in the default container images, so you may need
+to `apt install xz-utils` or `apk add xz-utils`, or equivalent, before you can
+expand the archives.)
+
 Afterwards, set your `ENTRYPOINT` to `/init`.
 
 Right now, we recommend using Docker's `ADD` directive instead of running `wget` or `curl`
@@ -235,10 +237,10 @@ For example:
 
 ```
 FROM busybox
-ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-noarch-3.1.0.0.tar.xz /tmp
-RUN tar -C / -Jxpf /tmp/s6-overlay-noarch-3.1.0.0.tar.xz
-ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-x86_64-3.1.0.0.tar.xz /tmp
-RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64-3.1.0.0.tar.xz
+ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-noarch.tar.xz /tmp
+RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
+ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.0.0/s6-overlay-x86_64.tar.xz /tmp
+RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
 ENTRYPOINT ["/init"]
 ```
 
@@ -397,7 +399,7 @@ and your container will exit with that value.
 ### Fixing ownership and permissions
 
 This section describes a functionality from the versions of s6-overlay
-that are **anterior to** 3.1.0.0. fix-attrs is still supported in 3.1.0.0,
+that are **anterior to** v3. fix-attrs is still supported in v3,
 but is **deprecated**, for several reasons: one of them is that it's
 generally not good policy to change ownership dynamically when it can be
 done statically. Another reason is that it doesn't work with USER containers.
@@ -752,7 +754,7 @@ enough so that your scripts have time to finish without s6-overlay interrupting
 ### syslog
 
 If software running in your container requires syslog, extract the
-`syslogd-overlay-noarch-3.1.0.0.tar.xz` tarball:
+`syslogd-overlay-noarch.tar.xz` tarball:
 that will give you a small syslogd emulation. Logs will be found
 under various subdirectories of `/var/log/syslogd`, for instance
 messages will be found in the `/var/log/syslogd/messages/` directory,
@@ -785,10 +787,10 @@ The s6-overlay releases have a checksum files you can use to verify
 the download using SHA256:
 
 ```sh
-ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch-${S6_OVERLAY_VERSION}.tar.xz /tmp
-ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch-${S6_OVERLAY_VERSION}.tar.xz.sha256 /tmp
-ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64-${S6_OVERLAY_VERSION}.tar.xz /tmp
-ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64-${S6_OVERLAY_VERSION}.tar.xz.sha256 /tmp
+ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
+ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz.sha256 /tmp
+ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
+ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz.sha256 /tmp
 RUN cd /tmp && sha256sum -c *.sha256
 ```
 
@@ -814,20 +816,20 @@ privilege separation between services in your container.
 
 Over on the releases tab, we have a number of tarballs:
 
-* `s6-overlay-noarch-${version}.tar.xz`: the s6-overlay scripts.
-* `s6-overlay-${arch}-${version}.tar.xz`: the binaries for platform *${arch}*.
+* `s6-overlay-noarch.tar.xz`: the s6-overlay scripts.
+* `s6-overlay-${arch}.tar.xz`: the binaries for platform *${arch}*.
 They are statically compiled and will work with any Linux distribution.
-* `s6-overlay-symlinks-noarch-${version}.tar.xz`: `/usr/bin` symlinks to the s6-overlay scripts. Totally optional.
-* `s6-overlay-symlinks-arch-${version}.tar.xz`: `/usr/bin` symlinks to the skaware binaries. Totally optional.
-* `syslogd-overlay-noarch-${version}.tar.xz`: the syslogd emulation. Totally optional.
+* `s6-overlay-symlinks-noarch.tar.xz`: `/usr/bin` symlinks to the s6-overlay scripts. Totally optional.
+* `s6-overlay-symlinks-arch.tar.xz`: `/usr/bin` symlinks to the skaware binaries. Totally optional.
+* `syslogd-overlay-noarch.tar.xz`: the syslogd emulation. Totally optional.
 * `s6-overlay-${version}.tar.xz`: the s6-overlay source. Download it if you want to build s6-overlay yourself.
 
-We have binaries for at least x86_64, aarch64, arm32, i486, i686, and riscv64.
+We have binaries for at least x86_64, aarch64, arm32, i486, i686, riscv64, and s390x.
 The full list of supported arches can be found in [conf/toolchains](https://github.com/just-containers/s6-overlay/blob/master/conf/toolchains).
 
 ## Contributing
 
-Anyway you want! Open issues, open PRs, we welcome all contributors!
+Any way you want! Open issues, open PRs, we welcome all contributors!
 
 ## Building the overlay yourself