forked from public/airgap
automate snapshot date bump
This commit is contained in:
parent
f806367aa6
commit
ba24e9f786
4
Makefile
4
Makefile
|
@ -119,11 +119,15 @@ update-packages:
|
||||||
--user $(userid):$(groupid) \
|
--user $(userid):$(groupid) \
|
||||||
--volume $(PWD)/config:/home/build/config \
|
--volume $(PWD)/config:/home/build/config \
|
||||||
--volume $(PWD)/scripts:/home/build/scripts \
|
--volume $(PWD)/scripts:/home/build/scripts \
|
||||||
|
--env GIT_EPOCH="$(GIT_EPOCH)" \
|
||||||
$(IMAGE) tail -f /dev/null
|
$(IMAGE) tail -f /dev/null
|
||||||
$(docker) exec -it --user=root "$(NAME)" update-packages
|
$(docker) exec -it --user=root "$(NAME)" update-packages
|
||||||
$(docker) cp \
|
$(docker) cp \
|
||||||
"$(NAME):/etc/apt/packages.list" \
|
"$(NAME):/etc/apt/packages.list" \
|
||||||
"$(PWD)/config/container/packages.list"
|
"$(PWD)/config/container/packages.list"
|
||||||
|
$(docker) cp \
|
||||||
|
"$(NAME):/etc/apt/sources.list" \
|
||||||
|
"$(PWD)/config/container/sources.list"
|
||||||
$(docker) rm -f "$(NAME)"
|
$(docker) rm -f "$(NAME)"
|
||||||
|
|
||||||
## Make Helpers
|
## Make Helpers
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
[ -f /.dockerenv ] || { echo "please run in supplied container"; exit 1; }
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
apt update -y
|
apt update -y
|
||||||
|
|
||||||
apt upgrade -y
|
apt upgrade -y
|
||||||
|
|
||||||
dpkg -l | awk '{ if ($1 == "ii") print $2 "=" $3 }' > /etc/apt/packages.list
|
dpkg -l | awk '{ if ($1 == "ii") print $2 "=" $3 }' > /etc/apt/packages.list
|
||||||
|
|
||||||
|
snapshot_date=$(date -d @${GIT_EPOCH} +"%Y%m%dT000000Z")
|
||||||
|
cat <<-EOF > /etc/apt/sources.list
|
||||||
|
deb http://snapshot.debian.org/archive/debian/${snapshot_date} buster main
|
||||||
|
deb http://snapshot.debian.org/archive/debian-security/${snapshot_date} buster/updates main
|
||||||
|
deb http://snapshot.debian.org/archive/debian/${snapshot_date} buster-updates main
|
||||||
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue