Move base images directory to top level

These are standalone, better to have them at the top.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-01-24 18:55:23 +00:00
parent f27c3ff5ed
commit f8e0a3d61c
93 changed files with 0 additions and 0 deletions

33
base/rng-tools/Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM alpine:3.5
RUN \
apk update && apk upgrade && \
apk add \
argp-standalone \
curl \
gcc \
linux-headers \
make \
musl-dev \
patch \
&& true
COPY . /
ENV pkgname=rng-tools pkgver=5
RUN curl -O -sSL http://downloads.sourceforge.net/project/gkernel/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
RUN sha256sum -c sha256sums
RUN zcat $pkgname-$pkgver.tar.gz | tar xf -
RUN cd $pkgname-$pkgver && for p in ../*.patch; do cat $p | patch -p1; done
RUN cd $pkgname-$pkgver && \
export LIBS="-largp" && \
LDFLAGS=-static ./configure \
--prefix=/usr \
--libexecdir=/usr/lib/rng-tools \
--sysconfdir=/etc \
--disable-silent-rules && \
make && \
make DESTDIR=/ install && \
strip /usr/sbin/rngd

29
base/rng-tools/Makefile Normal file
View File

@@ -0,0 +1,29 @@
.PHONY: tag push
BASE=alpine:3.5
IMAGE=rng-tools
default: push
hash: Dockerfile fix-textrels-on-PIC-x86.patch sha256sums
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
docker run --rm $(IMAGE):build sh -c 'cat /Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build
rm -f hash
tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build
rm -f hash
clean:
rm -f hash
.DELETE_ON_ERROR:

View File

@@ -0,0 +1,50 @@
--- rng-tools/rdrand_asm.S
+++ rng-tools/rdrand_asm.S
@@ -49,6 +49,7 @@
ret
ENDPROC(x86_rdrand_nlong)
+#define INIT_PIC()
#define SETPTR(var,ptr) leaq var(%rip),ptr
#define PTR0 %rdi
#define PTR1 %rsi
@@ -84,7 +85,16 @@
ret
ENDPROC(x86_rdrand_nlong)
+#if defined(__PIC__)
+#undef __i686 /* gcc builtin define gets in our way */
+#define INIT_PIC() \
+ call __i686.get_pc_thunk.bx ; \
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+#define SETPTR(var,ptr) leal (var)@GOTOFF(%ebx),ptr
+#else
+#define INIT_PIC()
#define SETPTR(var,ptr) movl $(var),ptr
+#endif
#define PTR0 %eax
#define PTR1 %edx
#define PTR2 %ecx
@@ -101,6 +111,7 @@
movl 8(%ebp), %eax
movl 12(%ebp), %edx
#endif
+ INIT_PIC()
SETPTR(aes_round_keys, PTR2)
@@ -166,6 +177,17 @@
#endif
ret
ENDPROC(x86_aes_mangle)
+
+#if defined(__i386__) && defined(__PIC__)
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+.globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+#endif
+

View File

@@ -0,0 +1 @@
60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e rng-tools-5.tar.gz