This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[macro_use] extern crate quick_error; | |
| quick_error! { | |
| #[derive(Debug)] | |
| pub enum SomeError { | |
| Io(err: io::Error, path: PathBuf) { | |
| display("I/O error at {path}: {err}", err=err, path=path) | |
| description(err.description()) | |
| } | |
| ApplicationError | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try!(File::open(&path) | |
| .map_err(|e| SomeError::Io(e, path.to_path_buf()))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| containers: | |
| printer: | |
| setup: | |
| - !Ubuntu trusty | |
| - !Sh "dpkg -i brdcp7030lpr-2.0.2-1.i386.deb" | |
| - !Sh "dpkg -i cupswrapperDCP7030-2.0.2-1.i386.deb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| containers: | |
| printer: | |
| setup: | |
| - !Ubuntu trusty | |
| - !Sh "dpkg --add-architecture i386" | |
| - !Install ["libc6:i386", "cups-client"] | |
| - !EnsureDir "/usr/share/cups/model" | |
| - !Sh "dpkg -i brdcp7030lpr-2.0.2-1.i386.deb" | |
| - !Sh "dpkg -i cupswrapperDCP7030-2.0.2-1.i386.deb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commands: | |
| wrapper: !Command | |
| container: printer | |
| run: ["/usr/lib/cups/filter/brlpdwrapperDCP7030"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mkdir /var/lib/printer | |
| sudo cp vagga.yaml .vagga /var/lib/printer | |
| cd ~/dev/vagga | |
| sudo PREFIX=/var/lib/printer ./install.sh | |
| cd /var/lib/printer | |
| sudo chown -R cups:lp . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mkdir /var/lib/printer | |
| sudo cp vagga.yaml .vagga /var/lib/printer | |
| cd ~/dev/vagga | |
| sudo PREFIX=/var/lib/printer ./install.sh | |
| cd /var/lib/printer | |
| sudo chown -R cups:lp . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| printer: | |
| uids: [0] | |
| gids: [0] | |
| setup: | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {pkgs, stdenv}: | |
| pkgs.writeTextFile { | |
| name = "brlpdwrapperDCP7030"; | |
| destination = "/lib/cups/filter/brlpdwrapperDCP7030"; | |
| executable = true; | |
| text = '' | |
| #!/bin/sh | |
| cd /var/lib/printer | |
| export PATH=$PATH:/var/setuid-wrappers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {pkgs, stdenv}: | |
| pkgs.writeTextFile { | |
| name = "brlpdwrapperDCP7030"; | |
| destination = "/lib/cups/filter/brlpdwrapperDCP7030"; | |
| executable = true; | |
| text = '' | |
| #!/bin/sh | |
| cd /var/lib/printer | |
| export PATH=$PATH:/var/setuid-wrappers |