Skip to content

Commit

Permalink
[stack-base] update npm to install gitea
Browse files Browse the repository at this point in the history
Use `debian-backports` to update npm from `5.8.0+ds6-4+deb10u2` to
`6.14.8+ds-1~bpo10+1`.

Why:
To help fix an issue encountered when building the `images/gitea.tar` artifact,
which was failing to build because of an npm install error.
See #4 for more information.

What/How:
Add backported packages from the debian-backports repository to build
with a newer version of npm.

Resolved issue by following the documented debian backport instructions:
https://backports.debian.org/Instructions/

NPM Package References:
- buster npm package: https://packages.debian.org/buster/npm
- buster-backports npm package: https://packages.debian.org/buster-backports/npm

Testing:
- clean images `rm -f images/*.tar`
- build image: `make images/gitea.tar`
- verify image builds :)
  • Loading branch information
jnaulty committed Nov 29, 2020
1 parent 1cc2978 commit 602f831
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
2 changes: 2 additions & 0 deletions images/stack-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ADD files /

RUN apt-install

RUN apt update && apt-get -y -t buster-backports install "npm"

RUN enable-faketime

RUN useradd -ms /bin/bash build
Expand Down
27 changes: 20 additions & 7 deletions images/stack-base/files/etc/apt/packages.list
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
libpq5=11.9-0+deb10u1
libpq-dev=11.9-0+deb10u1
haskell-stack=1.7.1-3
flex=2.6.4-6.2
bison=2:3.3.2.dfsg-1
musl-tools=1.1.21-2
adduser=3.118
apt=1.8.2.1
autoconf=2.69-11
Expand All @@ -15,6 +9,7 @@ bash=5.0-4
binutils=2.31.1-16
binutils-common:amd64=2.31.1-16
binutils-x86-64-linux-gnu=2.31.1-16
bison=2:3.3.2.dfsg-1
bsdutils=1:2.33.1-0.1
build-essential=12.6
bzip2=1.0.6-9.2~deb10u1
Expand All @@ -40,6 +35,7 @@ fakeroot=1.23-1
fdisk=2.33.1-0.1
file=1:5.35-4+deb10u1
findutils=4.6.0+git+20190209-2
flex=2.6.4-6.2
g++=4:8.3.0-1
g++-8=8.3.0-6
gcc=4:8.3.0-1
Expand Down Expand Up @@ -70,6 +66,7 @@ gpgv=2.2.12-1+deb10u1
grep=3.3-1
gyp=0.1+20180428git4d467626-3
gzip=1.9-3
haskell-stack=1.7.1-3
hostname=3.21
init-system-helpers=1.56+nmu1
iproute2=4.20.0-2
Expand All @@ -92,6 +89,7 @@ libattr1:amd64=1:2.4.48-4
libaudit-common=1:2.8.4-3
libaudit1:amd64=1:2.8.4-3
libbinutils:amd64=2.31.1-16
libbison-dev:amd64=2:3.3.2.dfsg-1
libblkid1:amd64=2.33.1-0.1
libbrotli1:amd64=1.0.7-2
libbsd0:amd64=0.9.1-2
Expand Down Expand Up @@ -127,14 +125,18 @@ libfaketime:amd64=0.9.7-3
libfdisk1:amd64=2.33.1-0.1
libffi6:amd64=3.2.1-9
libfile-fcntllock-perl=0.22-3+b5
libfl-dev:amd64=2.6.4-6.2
libfl2:amd64=2.6.4-6.2
libgcc-8-dev:amd64=8.3.0-6
libgcc1:amd64=1:8.3.0-6
libgcrypt20:amd64=1.8.4-5
libgdbm-compat4:amd64=1.18.1-4
libgdbm6:amd64=1.18.1-4
libglib2.0-0:amd64=2.58.3-2+deb10u2
libglib2.0-data=2.58.3-2+deb10u2
libgmp-dev:amd64=2:6.1.2+dfsg-4
libgmp10:amd64=2:6.1.2+dfsg-4
libgmpxx4ldbl:amd64=2:6.1.2+dfsg-4
libgnutls30:amd64=3.6.7-4+deb10u5
libgomp1:amd64=8.3.0-6
libgpg-error0:amd64=1.35-1
Expand Down Expand Up @@ -175,8 +177,10 @@ libmodule-find-perl=0.13-1
libmodule-scandeps-perl=1.27-1
libmount1:amd64=2.33.1-0.1
libmpc3:amd64=1.1.0-1
libmpdec2:amd64=2.4.2-2
libmpfr6:amd64=4.0.2-1
libmpx2:amd64=8.3.0-6
libncurses-dev:amd64=6.1+20181013-2+deb10u2
libncurses6:amd64=6.1+20181013-2+deb10u2
libncursesw6:amd64=6.1+20181013-2+deb10u2
libnetfilter-conntrack3:amd64=1.0.7-1
Expand All @@ -200,15 +204,20 @@ libpam0g:amd64=1.3.1-5
libpcre2-8-0:amd64=10.32-5
libpcre3:amd64=2:8.39-12
libperl5.28:amd64=5.28.1-6+deb10u1
libpq-dev=11.9-0+deb10u1
libpq5:amd64=11.9-0+deb10u1
libproc-processtable-perl=0.56-1
libpsl5:amd64=0.20.2-2
libpython-stdlib:amd64=2.7.16-1
libpython2-stdlib:amd64=2.7.16-1
libpython2.7-minimal:amd64=2.7.16-2+deb10u1
libpython2.7-stdlib:amd64=2.7.16-2+deb10u1
libpython3-stdlib:amd64=3.7.3-1
libpython3.7-minimal:amd64=3.7.3-2+deb10u2
libpython3.7-stdlib:amd64=3.7.3-2+deb10u2
libquadmath0:amd64=8.3.0-6
libreadline7:amd64=7.0-5
libreadline-dev:amd64=7.0-5
libreadline7:amd64=7.0-5
librtmp1:amd64=2.4+20151223.gitfa8646d.1-2
libsasl2-2:amd64=2.1.27+dfsg-1+deb10u1
libsasl2-modules:amd64=2.1.27+dfsg-1+deb10u1
Expand Down Expand Up @@ -248,6 +257,7 @@ libxext6:amd64=2:1.3.3-1+b2
libxml2:amd64=2.9.4+dfsg1-7+b3
libxmuu1:amd64=2:1.1.2-2+b3
libxtables12:amd64=1.8.2-4
libyaml-0-2:amd64=0.2.1-1
libzstd1:amd64=1.3.8+dfsg-3
linux-libc-dev:amd64=4.19.152-1
login=1:4.5-1.1
Expand Down Expand Up @@ -527,7 +537,10 @@ python2-minimal=2.7.16-1
python2.7=2.7.16-2+deb10u1
python2.7-minimal=2.7.16-2+deb10u1
python3=3.7.3-1
python3-minimal=3.7.3-1
python3-yaml=3.13-2
python3.7=3.7.3-2+deb10u2
python3.7-minimal=3.7.3-2+deb10u2
readline-common=7.0-5
runc=1.0.0~rc6+dfsg1-3
sed=4.7-1
Expand Down
8 changes: 5 additions & 3 deletions images/stack-base/files/etc/apt/sources.list
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
deb http://deb.debian.org/debian buster main
deb http://snapshot.debian.org/archive/debian/20201125T000000Z buster main
deb http://snapshot.debian.org/archive/debian/20201129T000000Z buster main
deb http://security.debian.org/debian-security buster/updates main
deb http://snapshot.debian.org/archive/debian-security/20201125T000000Z buster/updates main
deb http://snapshot.debian.org/archive/debian-security/20201129T000000Z buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb http://snapshot.debian.org/archive/debian/20201125T000000Z buster-updates main
deb http://snapshot.debian.org/archive/debian/20201129T000000Z buster-updates main
# Add buster-backports to update npm
deb http://deb.debian.org/debian buster-backports main
1 change: 1 addition & 0 deletions make/images.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ images/gitea.tar: images/gitea images/stack-go.tar images/git.tar
docker load -i images/stack-go.tar
docker load -i images/git.tar
docker build \
--no-cache \
--tag $(REGISTRY)/gitea \
--cache-from $(REGISTRY)/stack-go \
--build-arg GIT_FROM=$(REGISTRY)/git \
Expand Down

0 comments on commit 602f831

Please sign in to comment.