mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
include all source not just GPL
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
e734661558
commit
dfd70a1d1d
@ -4,6 +4,6 @@ RUN apk update && apk add lua git
|
||||
|
||||
RUN git clone https://github.com/alpinelinux/aports.git
|
||||
|
||||
ADD license.sh gpl.lua /usr/bin/
|
||||
ADD license.sh packages.lua /usr/bin/
|
||||
|
||||
CMD license.sh
|
||||
|
@ -1,12 +1,9 @@
|
||||
Extract GPL source from Moby
|
||||
Extract source from Moby
|
||||
|
||||
WORK IN PROGRESS SOME ISSUES STILL
|
||||
|
||||
This container runs on a Pinata system and dumps out the GPL code it is running
|
||||
This container runs on a Pinata system and dumps out the source code for the
|
||||
kernel and packages
|
||||
|
||||
```
|
||||
docker build -t license .
|
||||
docker run -it -v /etc:/hostetc -v /lib:/lib -v $PWD/output:/output license
|
||||
```
|
||||
|
||||
TODO add kernel to this, there is now a patch to get the metadata in.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
cat /hostetc/issue | grep -q Moby || ( printf "You must run this script with -v /etc:/hostetc -v /lib:/lib\n" && exit 1 )
|
||||
|
||||
apk info | grep -q fuse || ( printf "You must run this script with -v /etc:/etc -v /lib:/lib\n" && exit 1 )
|
||||
@ -29,7 +29,7 @@ rm -rf .git
|
||||
cd /aports
|
||||
git pull
|
||||
|
||||
gpl.lua | while read l
|
||||
packages.lua | while read l
|
||||
do
|
||||
echo $l
|
||||
APORT_PACKAGE=$(echo $l | sed 's/ .*//')
|
||||
@ -42,6 +42,8 @@ do
|
||||
export srcdir=/output
|
||||
cd main/${APORT_ORIGIN}
|
||||
. ./APKBUILD
|
||||
if [ ! -d "$srcdir"/$pkgname-$pkgver ]
|
||||
then
|
||||
mkdir -p "$srcdir"/$pkgname-$pkgver
|
||||
for f in $source
|
||||
do
|
||||
@ -49,10 +51,11 @@ do
|
||||
then
|
||||
cp -a $f "$srcdir"/$pkgname-$pkgver/
|
||||
else
|
||||
( cd "$srcdir"/$pkgname-$pkgver && \
|
||||
wget $f || ( printf "Cannot retrieve $f\n" && exit )
|
||||
)
|
||||
cd "$srcdir"/$pkgname-$pkgver && \
|
||||
wget $f || ( printf "Cannot retrieve $f\n" && exit ) && \
|
||||
cd -
|
||||
fi
|
||||
done
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
@ -5,9 +5,7 @@ f = io.open("/lib/apk/db/installed")
|
||||
|
||||
for line in f:lines() do
|
||||
if line == "" then
|
||||
if p.L:match("[Gg][Pg][Ll]") then
|
||||
print(p.P, p.L, p.c)
|
||||
end
|
||||
p = {}
|
||||
else
|
||||
k, v = line:match("(%a):(.*)")
|
Loading…
Reference in New Issue
Block a user