Skip to content

Instantly share code, notes, and snippets.

View alexlarsson's full-sized avatar

Alexander Larsson alexlarsson

View GitHub Profile
INSTALL:
$ dnf copr enable -y mperina/hirte-snapshot
$ dnf install hirte hirte-agent
CONFIGURE:
$ cp myagent.conf /etc/hirte/agent.conf.d/
$ cp myhirte.conf /etc/hirte/hirte.conf.d/
$ systemctl start hirte-agent.service

Proxying Services

This daemon + template service file creates the ability to start a "proxy" service. This service will when started, either start or pick up an already running service of the given name and proxy its state (i.e. wheter its started or not, and whether activation succeeded).

So, starting test-proxy@foobar.service will start foobar.service if needed, and the proxy will be considered active when foobar becomes

#include <glib.h>
#include <gio/gio.h>
#include <gio/gunixinputstream.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
struct fsverity_descriptor {
#include <printf.h>
#include <stdio.h>
#include <glib.h>
G_LOCK_DEFINE_STATIC (unique_pointer);
static GHashTable *unique_pointer_ht = NULL;
static gsize unique_pointer_id = 0;
static gconstpointer
uniquify_pointer (gconstpointer ptr)
@alexlarsson
alexlarsson / build.sh
Last active April 3, 2019 12:14
fontconfig new cache test
#!/bin/sh
flatpak-builder --ccache --install-deps-from=flathub --user --repo=repo --keep-build-dirs --force-clean builddir org.fontconfig.Sdk.json
{
"app-id": "org.test.IBus",
"runtime": "org.gnome.Platform",
"runtime-version": "3.24",
"sdk": "org.gnome.Sdk",
"command": "/usr/bin/zenity",
"finish-args": [
/* X11 + XShm access */
"--share=ipc", "--socket=x11",
/* Wayland access */
{
"app-id": "org.test.MultiArch",
"runtime": "org.freedesktop.Platform",
"runtime-version": "1.6",
"sdk": "org.freedesktop.Sdk",
"command": "glxgears",
"finish-args": [
"--device=dri",
"--socket=x11",
"--allow=multiarch",
@alexlarsson
alexlarsson / test_seccomp.c
Last active May 30, 2017 14:02
seccomp test
/* Build with:
gcc -o test_seccomp `pkg-config --cflags --libs glib-2.0 libseccomp` test_seccomp.c
*/
#define _GNU_SOURCE
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/utsname.h>
/*
* Copyright © 2017 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
{
"id": "org.freedesktop.Platform.Icontheme.Paper",
"branch": "1.0",
"runtime": "org.freedesktop.Sdk",
"build-extension": true,
"sdk": "org.freedesktop.Sdk",
"runtime-version": "1.6",
"sdk-extensions": [],
"separate-locales": false,
"cleanup": [ "/share/info", "/share/man" ],