steveej / nix2aci Goto Github PK
View Code? Open in Web Editor NEWMachinery for creating and running ACIs on Linux systems where Nix(OS) and rkt are available
Machinery for creating and running ACIs on Linux systems where Nix(OS) and rkt are available
This is bothersome and has been fixed upstream in acbuild.
This can help to identify builds compromised due to known security vulnerabilities
First off, I love this program. We're using it to make ACIs for our production software, and it's effective, simple, and it works. So thanks for making it!
The handling of /etc
in mkACI.py
is broken. mkACI.py
uses cp -aL
when copying /etc
. Since this follows symlinks, this is broken if /etc
from the input derivations contains relative or absolute links outside of /nix/store
. For instance, if a derivation contains a /usr/share/whatever
directory, and /etc/whatever
is symlinked to it, when cp -aL
is ran, the files from /usr/share/whatever
on the host system will be used instead of the files from the derivation.
I'd be interested in fixing this, but I'm not sure what the best way to do so is, or what the rationale behind this behavior is.
It seems like some of this work could be shared with dockerTools
if we factored out common notions. That would help address NixOS/nixpkgs#20238 and such.
When one adds a mount point (and probably other things) that has a space in it, the space isn't properly escaped when passed into acbuild, causing acbuild to throw an error
...
++ acbuild --debug mount add config /var/lib/plexmediaserver/Library/Application Support
mount add: incorrect number of arguments
+ export EXT=0
+ EXT=0
+ /nix/store/6hrcxzwk3padb28i3phnmmz15bjjqaj3-findutils-4.4.2/bin/find .acbuild/ -type d -exec chmod +wr '{}' +
+ acbuild --debug end
Ending the build
+ exit
builder for '/nix/store/83cm1008c7q3f4jgyrjkb4xk7nbbk44q-plex.drv' failed with exit code 1
error: build of '/nix/store/83cm1008c7q3f4jgyrjkb4xk7nbbk44q-plex.drv' failed
The plex.nix file that causes this:
{ mkACI, pkgs, thin ? false, ... } @ args:
let
pkg = pkgs.plex;
in
mkACI rec {
inherit pkgs;
inherit thin;
packages = [ pkg ];
mounts = {
"config" = "/var/lib/plexmediaserver/Library/Application Support";
"media" = "/media";
};
ports = {
"https" = [ "tcp" "32400" ];
};
exec = "/usr/lib/plexmediaserver/Plex Media Server";
env = {
"PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" = "/var/lib/plexmediaserver/Library/Application Support";
"PLEX_MEDIA_SERVER_HOME" = "/usr/lib/plexmediaserver";
"PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS" = "6";
"PLEX_MEDIA_SERVER_TMPDIR" = "/tmp";
"LD_LIBRARY_PATH" = "/usr/lib/plexmediaserver";
"LC_ALL" = "en_US.UTF-8";
"LANG" = "en_US.UTF-8";
};
}
mkACI.py
can be replaced with a Nix expression, which would get rid of the dependency on Python.
Following functionality needs testing
$ ./result/postprocess.sh
/usr/bin/env: bash -e: No such file or directory
/cc @Mic92
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.