mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-24 11:25:40 +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
|
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
|
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 source code for the
|
||||||
|
kernel and packages
|
||||||
This container runs on a Pinata system and dumps out the GPL code it is running
|
|
||||||
|
|
||||||
```
|
```
|
||||||
docker build -t license .
|
docker build -t license .
|
||||||
docker run -it -v /etc:/hostetc -v /lib:/lib -v $PWD/output:/output 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
|
#!/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 )
|
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 )
|
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
|
cd /aports
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
gpl.lua | while read l
|
packages.lua | while read l
|
||||||
do
|
do
|
||||||
echo $l
|
echo $l
|
||||||
APORT_PACKAGE=$(echo $l | sed 's/ .*//')
|
APORT_PACKAGE=$(echo $l | sed 's/ .*//')
|
||||||
@ -42,17 +42,20 @@ do
|
|||||||
export srcdir=/output
|
export srcdir=/output
|
||||||
cd main/${APORT_ORIGIN}
|
cd main/${APORT_ORIGIN}
|
||||||
. ./APKBUILD
|
. ./APKBUILD
|
||||||
mkdir -p "$srcdir"/$pkgname-$pkgver
|
if [ ! -d "$srcdir"/$pkgname-$pkgver ]
|
||||||
for f in $source
|
then
|
||||||
do
|
mkdir -p "$srcdir"/$pkgname-$pkgver
|
||||||
if [ -f $f ]
|
for f in $source
|
||||||
then
|
do
|
||||||
cp -a $f "$srcdir"/$pkgname-$pkgver/
|
if [ -f $f ]
|
||||||
else
|
then
|
||||||
( cd "$srcdir"/$pkgname-$pkgver && \
|
cp -a $f "$srcdir"/$pkgname-$pkgver/
|
||||||
wget $f || ( printf "Cannot retrieve $f\n" && exit )
|
else
|
||||||
)
|
cd "$srcdir"/$pkgname-$pkgver && \
|
||||||
fi
|
wget $f || ( printf "Cannot retrieve $f\n" && exit ) && \
|
||||||
done
|
cd -
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
@ -5,9 +5,7 @@ f = io.open("/lib/apk/db/installed")
|
|||||||
|
|
||||||
for line in f:lines() do
|
for line in f:lines() do
|
||||||
if line == "" then
|
if line == "" then
|
||||||
if p.L:match("[Gg][Pg][Ll]") then
|
print(p.P, p.L, p.c)
|
||||||
print(p.P, p.L, p.c)
|
|
||||||
end
|
|
||||||
p = {}
|
p = {}
|
||||||
else
|
else
|
||||||
k, v = line:match("(%a):(.*)")
|
k, v = line:match("(%a):(.*)")
|
Loading…
Reference in New Issue
Block a user