Commit 5bfdbaa3 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproduce.debian.net: setup another instance on o4 and update installation docs

parent f7eaedea
Loading
Loading
Loading
Loading
+44 −20
Original line number Diff line number Diff line
@@ -13,35 +13,59 @@ http {
    server_tokens       off;

    server {
        listen          80;
        server_name     localhost;
        server_name     osuosl4-amd64.debian.net;
        index index.html index.htm
        root /var/www/html;

        listen 443 ssl;
        ssl_certificate /var/lib/dehydrated/certs/osuosl4-amd64.debian.net/fullchain.pem;
        ssl_certificate_key /var/lib/dehydrated/certs/osuosl4-amd64.debian.net/privkey.pem;

        ssl_session_cache shared:le_nginx_SSL:10m;
        ssl_session_timeout 1440m;
        ssl_session_tickets off;
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers off;
        ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-C
        HACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";

        location /snapshot {
            alias       /snapshot;
            autoindex   on;
        }

        location /snapshot/mr {
            include     uwsgi_params;
            rewrite     /snapshot/(.+) /$1 break;
            uwsgi_pass  unix:/var/run/snapshot/snapshot.sock;
        location /.well-known/acme-challenge/ {
            alias /var/lib/dehydrated/acme-challenges/;
            disable_symlinks off;
            autoindex off;
        }
        location /snapshot-experiment {
            alias       /srv/data/vagrant/snapshots;
            autoindex   on;

        location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ =404;
        }


location ~ /rebuilder-snapshot/api(.*) {
	proxy_pass  	http://127.0.0.1:5001/$1;
	include		proxy_params;
        location /api/ {
            proxy_pass http://127.0.0.1:8484;
        }

    }

location 		/rebuilder-snapshot/ {
	alias		/srv/data/rebuilder-snapshot/;
	autoindex	on;

    server {
        listen          80;
        server_name     osuosl4-amd64.debian.net;

        location /.well-known/acme-challenge/ {
            alias /var/lib/dehydrated/acme-challenges/;
            disable_symlinks off;
            autoindex off;
        }

        location / {
            return 301 https://$host$request_uri;
        }

        return 404;
    }


}
+53 −0
Original line number Diff line number Diff line
## rebuild all of archlinux core
[profile."archlinux-core"]
distro = "archlinux"
suite = "core"
architectures = ["x86_64"]
source = "https://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch"

## rebuild community packages of specific maintainers, or allow-list packages by name.
## If no filter is set, all packages are imported, if both filters are set the package only
## has to match one of them to be included.
#[profile."archlinux-community"]
#distro = "archlinux"
#suite = "community"
#architectures = ["x86_64"]
#source = "https://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch"
#maintainers = ["somebody"]
#pkgs = ["some-pkg", "python-*"]
#excludes = ["tensorflow*"]

[profile."debian-main"]
distro = "debian"
suite = "main"
architectures = ["amd64"]
#releases = ["buster", "sid"]
releases = ["trixie"]
source = "http://deb.debian.org/debian"

[profile."debian-anarchism"]
distro = "debian"
suite = "main"
architectures = ["amd64"]
releases = ["sid"]
pkgs = ["anarchism"]
source = "http://deb.debian.org/debian"

# a set of packages to test certain edge-cases
[profile."debian-misc"]
distro = "debian"
suite = "main"
architectures = ["amd64"]
releases = ["sid"]
pkgs = ["anarchism", "binutils-arm-none-eabi", "libglib2.0-bin", "libglib2.0-dev", "sniffglue", "librust-sniffglue-dev", "dfrs", "librust-dfrs-dev"]
source = "http://deb.debian.org/debian"

[profile."tails"]
distro = "tails"
suite = "stable"
source = "https://mirrors.wikimedia.org/tails/"

[profile."tails-alpha"]
distro = "tails"
suite = "alpha"
source = "https://mirrors.wikimedia.org/tails/"
+33 −0
Original line number Diff line number Diff line
## The rebuilderd to connect to
endpoint = "http://127.0.0.1:8484"
## The server would either allowlist our key or require a signup secret
#signup_secret = "your_signup_key"

[build]
#timeout = 86400 # 24 hours
## Set a maximum build log limit in bytes (default: none).
## When reaching this limit the log is truncated but the rebuilder backend is *not* terminated.
max_bytes = 10485760 # 10 MiB
## By default build output is forwarded to stdout/stderr.
## This can be disabled by settings this to true.
#silent = true

[diffoscope]
## Generate and attach diffs with diffoscope when rebuilding
enabled = false
## Pass additional arguments to diffoscope. Use wisely, some options might not work well.
#args = ["--max-container-depth", "2", "--fuzzy-threshold", "0"]
## Set a timeout in seconds after which diffoscope is terminated (default: 3600)
#timeout = 600 # 10 minutes
## Set a maximum diffoscope output limit in bytes (default: none).
## When reaching this limit, diffoscope is terminated and the output is truncated.
max_bytes = 41943040 # 40 MiB

[backend."archlinux"]
path = "/usr/libexec/rebuilderd/rebuilder-archlinux.sh"

[backend."debian"]
path = "/opt/usr/libexec/rebuilderd/rebuilder-debian.sh"

[backend."tails"]
path = "/usr/libexec/rebuilderd/rebuilder-tails.sh"
+11 −0
Original line number Diff line number Diff line
#!/bin/sh
set -xe
cd "$(dirname "$1")"

mkdir -p etc/apt
mkdir -p var/lib/apt/lists/
echo 'deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] https://deb.debian.org/debian trixie main' > etc/apt/sources.list
apt-get -o Dir=. update
apt-get -o Dir=. source --download-only "$(basename "$1" | cut -d_ -f1)"

/usr/bin/debrebuild --buildresult="${REBUILDERD_OUTDIR}" --builder=sbuild+unshare --cache=/srv/rebuilderd/cache -- "${1}"
+197 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
		osuosl4-amd64.debian.net - trixie/amd64
        </title>
        <style>
        body {
            font-family: sans-serif;
        }
        h1 {
            font-size: 24px;
        }

        #search-results {
            margin: 20px 0;
        }

        pre {
            margin: 0;
        }

        #search-results pre {
            margin: 12px 0;
        }

        .status {
            font-weight: bold;
        }

        .good {
            color: green;
        }

        .bad {
            color: red;
        }

        .unknown {
            color: #957fff;
        }

        footer {
            font-size: small;
            margin: 30px 0;
        }
        </style>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            // package search
            function spanWith(text) {
                let s = document.createElement('span');
                s.textContent = text;
                return s;
            }

            function linkTo(href, text) {
                let a = document.createElement('a');
                a.href = href;
                a.textContent = text;
                return a;
            }

            function searchPkgs(query) {
                let div = document.getElementById('search-results');
                let url = '/api/v0/pkgs/list?' + new URLSearchParams({
                    name: query,
                    distro: 'debian',
                });
                fetch(url)
                    .then(response => response.json())
                    .then(data => {
                        // clear children
                        div.innerHTML = '';

                        data.map(pkg => {
                            let build_id = pkg.build_id;
                            let r = document.createElement('pre');

                            r.appendChild(spanWith('['));
                            let status = pkg['status'];
                            let statusSpan = spanWith(status);
                            statusSpan.className += ' status';
                            if (status == 'GOOD') {
                                statusSpan.className += ' good';
                            } else if (status == 'BAD') {
                                statusSpan.className += ' bad';
                            } else {
                                statusSpan.className += ' unknown';
                            }
                            r.appendChild(statusSpan);
                            r.appendChild(spanWith(`] ${pkg['name']} ${pkg['version']}\t\t`));

                            if (build_id) {
                                r.appendChild(spanWith(' ['));
                                r.appendChild(linkTo(`/api/v0/builds/${build_id}/log`, 'log'));
                                r.appendChild(spanWith(']'));
                            }

                            if (pkg.has_attestation) {
                                r.appendChild(spanWith(' ['));
                                r.appendChild(linkTo(`/api/v0/builds/${build_id}/attestation`, 'attestation'));
                                r.appendChild(spanWith(']'));
                            }

                            if (pkg.has_diffoscope) {
                                r.appendChild(spanWith(' ['));
                                r.appendChild(linkTo(`/api/v0/builds/${build_id}/diffoscope`, 'diffoscope'));
                                r.appendChild(spanWith(']'));
                            }

                            div.appendChild(r);
                        });
                    });
            }

            if (location.hash) {
                searchPkgs(location.hash.substr(1));
            }

            document.getElementById('search').addEventListener('submit', function(e) {
                e.preventDefault();
                let query = document.getElementById('search-query').value;
                location.href = `#${query}`;
                searchPkgs(query);
            });

            // display stats
            function updateStats(data) {
                let div = document.getElementById('stats');
                // clear children
                div.innerHTML = '';
                // add rows
                data.map(row => {
                    let r = document.createElement('pre');
                    let key = row[0] + ': ';
                    r.textContent = key.padEnd(20) + row[1];
                    div.appendChild(r);
                });
            }

            function fetchStats() {
                fetch('/api/v0/dashboard')
                    .then(response => response.json())
                    .then(data => {
                        let div = document.getElementById('stats');
                        let main = data['suites']['main'];

                        let good = main['good'];
                        let bad = main['bad'];
                        let unknown = main['unknown'];

                        updateStats([
                            ['good', good],
                            ['bad', bad],
                            ['unknown', unknown],
                            ['build progress', (100 / (good + unknown + bad) * (good + bad)).toFixed(2) + '%'],
                            ['repro', (100 / (good + bad) * good).toFixed(2) + '%'],
                        ]);
                    });
            }

            setInterval(fetchStats, 60 * 1000);
            fetchStats();
        });
        </script>
    </head>
    <body>
        <h1>
		osuosl4-amd64.debian.net
        </h1>
        <h3>
		trixie/amd64
        </h3>

        <div id="stats">Loading stats...</div>

        <div>
            <h3>Search</h3>
            <form id="search">
                <input type="text" id="search-query" placeholder="2ping">
                <input type="submit" value="Search">
            </form>
        </div>
        <div id="search-results">
        </div>

        <footer>
            pew pew, <a href="https://github.com/kpcyrd/rebuilderd">rebuilderd</a> using <a href="https://tracker.debian.org/pkg/devscripts">debrebuild</a> to reproduce what Debian distributes via <code>deb.debian.org</code> ♥️
	    </br>
	    <!-- a href="/stats/">Statistics about BAD packages.</a> -->
	    </br>
	    <small>This setup is in it's infancy. (= don't take numbers seriously unless...!?)</small>
        </footer>
    </body>
</html>
Loading