Skip to content

Instantly share code, notes, and snippets.

View julian-klode's full-sized avatar

Julian Andres Klode julian-klode

View GitHub Profile
#!/usr/bin/env python
# coding: utf-8
# SPDX-FileCopyrightText: 2023 Julian Andres Klode <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# In[7]:
#!/usr/bin/python3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

subject: 'Dependency solving' title: | APT 3.0 dependency solver subtitle: | An orthodox approach to dependency solving, leading to a SAT solver comparable to DPLL. documentclass: scrartcl classoption: BCOR=0.5cm secnumdepth: 2 toc-depth: 1

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>APT 3.0 dependency solver</title>
<style>
html {
line-height: 1.5;
#include <list>
#include <queue>
#include <vector>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/policy.h>
namespace APT
{
#!/bin/sh
args=""
if [ $(id -u) -ne 0 ]; then
args=--user
fi
if echo $@ | grep update; then
args="$args -p ProtectSystem=strict -p ReadWritePaths=/var -p PrivateTmp=yes -p PrivateDevices=yes -p ProtectProc=invisible -p RestrictSUIDSGID=yes"
fi
exec systemd-run $args -q --wait -G --unit apt.service -Pt -p ProtectHome=yes -p NoNewPrivileges=yes -p ProtectHostname=yes -p ProtectClock=yes -p ProtectKernelTunables=yes -p ProtectKernelModules=yes -p ProtectKernelLogs=yes -p ProtectControlGroups=yes -p RestrictRealtime=yes -p SystemCallFilter=@system-service /usr/bin/apt "$@"
#!/bin/sh
args=""
if [ $(id -u) -ne 0 ]; then
args=--user
fi
if echo $@ | grep update; then
args="$args -p ProtectSystem=strict -p ReadWritePaths=/var/lib/apt -p ReadWritePaths=/var/cache/apt -p PrivateTmp=yes -p PrivateDevices=yes"
fi
exec systemd-run $args -q --wait -G --unit apt.service -Pt -p ProtectHome=yes -p NoNewPrivileges=yes -p ProtectHostname=yes -p ProtectClock=yes -p ProtectKernelTunables=yes -p ProtectKernelModules=yes -p ProtectKernelLogs=yes -p ProtectControlGroups=yes -p RestrictRealtime=yes -p SystemCallFilter=@system-service /usr/bin/apt "$@"
#!/bin/sh
args=""
if [ $(id -u) -ne 0 ]; then
args=--user
fi
if echo $@ | grep update; then
args="$args -p ProtectSystem=strict -p ReadWritePaths=/var -p PrivateTmp=yes -p PrivateDevices=yes"
fi
exec systemd-run $args -q --wait -G --unit apt.service -Pt -p ProtectHome=yes -p NoNewPrivileges=yes -p ProtectHostname=yes -p ProtectClock=yes -p ProtectKernelTunables=yes -p ProtectKernelModules=yes -p ProtectKernelLogs=yes -p ProtectControlGroups=yes -p RestrictRealtime=yes -p SystemCallFilter=@system-service /usr/bin/apt "$@"
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HRV</title><script src="file:///usr/share/javascript/requirejs/require.min.js"></script>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.