Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Garden Linux source packages #7

Merged
merged 5 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ RUN apt-get update && \
apt-get upgrade -y --no-install-recommends python3-asyncpg python3-pip python3-poetry-core python3-requests python3-sqlalchemy/unstable && \
apt-get upgrade -y --no-install-recommends git curl debian-archive-keyring postgresql-client
COPY . /usr/local/src
COPY keyring.asc /etc/apt/trusted.gpg.d/keyring.asc
RUN pip install --break-system-packages --no-deps --editable /usr/local/src
6 changes: 6 additions & 0 deletions conf/ingest-debsrc/gardenlinux.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enabled: yes
Types: deb-src
URIs: https://packages.gardenlinux.io/gardenlinux
Suites: today
Components: main
Signed-By: /etc/apt/trusted.gpg.d/keyring.asc
79 changes: 24 additions & 55 deletions ingest-postgres.sh
Original file line number Diff line number Diff line change
@@ -1,72 +1,41 @@
#!/bin/bash

set -euo pipefail
set -x

mkdir -p data/ingest-debsec/{debian,gardenlinux}/CVE
mkdir -p data/ingest-debsec/debian/CVE
mkdir -p data/ingest-debsrc/debian
mkdir -p data/ingest-debsrc/var/lib/dpkg
touch data/ingest-debsrc/var/lib/dpkg/status
mkdir -p /usr/local/src/data/ingest-debsec/{debian,gardenlinux}/CVE
mkdir -p /usr/local/src/data/ingest-debsec/debian/CVE
mkdir -p /usr/local/src/data/ingest-debsrc/debian
mkdir -p /usr/local/src/data/ingest-debsrc/var/lib/dpkg
touch /usr/local/src/data/ingest-debsrc/var/lib/dpkg/status
curl https://salsa.debian.org/security-tracker-team/security-tracker/-/raw/master/data/CVE/list?ref_type=heads \
--output data/ingest-debsec/debian/CVE/list
mkdir -p conf/ingest-debsrc/
curl https://raw.githubusercontent.com/gardenlinux/glvd-data-ingestion/main/conf/ingest-debsrc/apt.conf \
--output conf/ingest-debsrc/apt.conf
curl https://raw.githubusercontent.com/gardenlinux/glvd-data-ingestion/main/conf/ingest-debsrc/debian.sources \
--output conf/ingest-debsrc/debian.sources
APT_CONFIG=conf/ingest-debsrc/apt.conf apt-get -q update \
-o Dir="$PWD/data/ingest-debsrc/" \
-o Dir::Etc::sourcelist="$PWD/conf/ingest-debsrc/debian.sources" \
-o Dir::State="$PWD/data/ingest-debsrc/"
git clone --depth=1 https://salsa.debian.org/security-tracker-team/security-tracker
--output /usr/local/src/data/ingest-debsec/debian/CVE/list
mkdir -p /usr/local/src/conf/ingest-debsrc/

export APT_CONFIG=/usr/local/src/conf/ingest-debsrc/apt.conf

mkdir -p gardenlinux-packages
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.0/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.0.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.1/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.1.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.2/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.2.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.3/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.3.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.5/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.5.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.7/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.7.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.8/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.8.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.9/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.9.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1443.10/main/binary-amd64/Packages.gz > gardenlinux-packages/1443.10.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1592.0/main/binary-amd64/Packages.gz > gardenlinux-packages/1592.0.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/1592.1/main/binary-amd64/Packages.gz > gardenlinux-packages/1592.1.gz
curl -s https://packages.gardenlinux.io/gardenlinux/dists/today/main/binary-amd64/Packages.gz > gardenlinux-packages/today.gz
gunzip gardenlinux-packages/1443*.gz
gunzip gardenlinux-packages/1592*.gz
gunzip gardenlinux-packages/today.gz
apt-get -q update \
-o Dir="/usr/local/src/data/ingest-debsrc/" \
-o Dir::Etc::sourcelist="/usr/local/src/conf/ingest-debsrc/debian.sources" \
-o Dir::State="/usr/local/src/data/ingest-debsrc/"

apt-get update \
-o Dir="/usr/local/src/data/ingest-debsrc/" \
-o Dir::Etc::sourcelist="/usr/local/src/conf/ingest-debsrc/gardenlinux.sources" \
-o Dir::State="/usr/local/src/data/ingest-debsrc/"

git clone --depth=1 https://salsa.debian.org/security-tracker-team/security-tracker

echo "Run data ingestion (ingest-debsrc - debian trixie)"
glvd-data ingest-debsrc debian trixie data/ingest-debsrc/lists/deb.debian.org_debian_dists_trixie_main_source_Sources
echo "Run data ingestion (ingest-debsrc - debian bookworm)"
glvd-data ingest-debsrc debian bookworm data/ingest-debsrc/lists/deb.debian.org_debian_dists_bookworm_main_source_Sources
echo "Run data ingestion (ingest-debsec - debian)"
glvd-data ingest-debsec debian security-tracker/data

echo "Run data ingestion (ingest-debsrc - gardenlinux today)"
glvd-data ingest-debsrc gardenlinux today ./gardenlinux-packages/today
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.0)"
glvd-data ingest-debsrc gardenlinux 1443.0 ./gardenlinux-packages/1443.0
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.1)"
glvd-data ingest-debsrc gardenlinux 1443.1 ./gardenlinux-packages/1443.1
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.2)"
glvd-data ingest-debsrc gardenlinux 1443.2 ./gardenlinux-packages/1443.2
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.3)"
glvd-data ingest-debsrc gardenlinux 1443.3 ./gardenlinux-packages/1443.3
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.5)"
glvd-data ingest-debsrc gardenlinux 1443.5 ./gardenlinux-packages/1443.5
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.7)"
glvd-data ingest-debsrc gardenlinux 1443.7 ./gardenlinux-packages/1443.7
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.8)"
glvd-data ingest-debsrc gardenlinux 1443.8 ./gardenlinux-packages/1443.8
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.9)"
glvd-data ingest-debsrc gardenlinux 1443.9 ./gardenlinux-packages/1443.9
echo "Run data ingestion (ingest-debsrc - gardenlinux 1443.10)"
glvd-data ingest-debsrc gardenlinux 1443 ./gardenlinux-packages/1443.10
echo "Run data ingestion (ingest-debsrc - gardenlinux 1592.0)"
glvd-data ingest-debsrc gardenlinux 1592.0 ./gardenlinux-packages/1592.0
echo "Run data ingestion (ingest-debsrc - gardenlinux 1592.1)"
glvd-data ingest-debsrc gardenlinux 1592 ./gardenlinux-packages/1592.1
glvd-data ingest-debsrc gardenlinux today /usr/local/src/data/ingest-debsrc/lists/packages.gardenlinux.io_gardenlinux_dists_today_main_source_Sources

echo "Run data ingestion (nvd)"
glvd-data ingest-nvd
echo "Run data combination (combine-deb)"
Expand Down
29 changes: 29 additions & 0 deletions keyring.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBGWWkc0BEADgVQK4Jh/nhsEtUGUYVaAAPp0kk2LKypX5NcEZ+67QsawhosZV
U/Rw4taDKL4nCh1yE7he2SnvIupYauh7WvjXaJTaWC+DC48M3GZdWMLJb4eg2TsE
IYD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