Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
54f64095ea | |||
989a8b831e | |||
2dce9e4e8b | |||
ab96d598fb |
41
README.md
41
README.md
@ -13,7 +13,6 @@ heavy lifting for you, including dependencies.
|
|||||||
$ chmod +x hotfix-installer.run
|
$ chmod +x hotfix-installer.run
|
||||||
$ ./hotfix-installer.run
|
$ ./hotfix-installer.run
|
||||||
|
|
||||||
|
|
||||||
### Manual install
|
### Manual install
|
||||||
|
|
||||||
If you would like to install it manually:
|
If you would like to install it manually:
|
||||||
@ -21,35 +20,33 @@ If you would like to install it manually:
|
|||||||
$ curl -O ~/bin/hotfix http://files.noccy.com/hotfix/hotfix
|
$ curl -O ~/bin/hotfix http://files.noccy.com/hotfix/hotfix
|
||||||
$ chmod +x ~/bin/hotfix
|
$ chmod +x ~/bin/hotfix
|
||||||
|
|
||||||
|
## Using Hotfixes
|
||||||
|
|
||||||
### Security precautions
|
To use a hotfix, you need to have the publishers public key imported. For my hotfixes,
|
||||||
|
you need to do:
|
||||||
|
|
||||||
If you want to make sure that you are using an official build of the hotfix utility,
|
$ curl http://files.noccy.com/hotfix/signing-key.asc | gpg --import -
|
||||||
you should verify the hotfix executable using the NoccyLabs signing key. Make sure
|
|
||||||
you import the key as specified below, and then download the signature into the same
|
|
||||||
directory as the executable:
|
|
||||||
|
|
||||||
$ curl http://files.noccy.com/hotfix/hotfix.sig > hotfix.sig
|
Next, create a file at `~/.hotfix.conf` containing:
|
||||||
$ gpg --verify hotfix.sig
|
|
||||||
|
|
||||||
You should get output confirming a good signature.
|
[alias]
|
||||||
|
noccy=http://files.noccy.com/hotfix/{fix}.fix.signed
|
||||||
|
|
||||||
### How do I import the public key?
|
And finally, apply the desired hotfix:
|
||||||
|
|
||||||
$ curl http://files.noccy.com/hotfix/signing-key.gpg | gpg --import -
|
$ hotfix apply noccy:install-processing
|
||||||
|
|
||||||
## Available Hotfixes
|
Without a defined alias you would do:
|
||||||
|
|
||||||
### Processing
|
|
||||||
|
|
||||||
This will install the latest version of Processing into `/opt`.
|
|
||||||
|
|
||||||
$ hotfix apply http://files.noccy.com/hotfix/install-processing.fix.signed
|
$ hotfix apply http://files.noccy.com/hotfix/install-processing.fix.signed
|
||||||
|
|
||||||
### Spotify
|
## Publishing Hotfixes
|
||||||
|
|
||||||
This hotfix will enable the official Spotify debian repositories and install the Spotify client.
|
|
||||||
It is not compatible with any other distros at this time.
|
|
||||||
|
|
||||||
$ hotfix apply http://files.noccy.com/hotfix/install-spotify.fix.signed
|
|
||||||
|
|
||||||
|
1. Create your hotfix in a text editor. You can use one of the examples as a
|
||||||
|
starting point.
|
||||||
|
2. Test the fix locally, using `hotfix apply -I <file>` to make sure it works
|
||||||
|
as intended.
|
||||||
|
3. Once everything works as intended, sign the hotfix using `hotfix sign <file>`
|
||||||
|
and upload the `.fix.signed` file to your location of choice.
|
||||||
|
4. Put a link to your public key in your forum signature, on your about page etc.
|
||||||
|
5. Publish your fix together with the relevant information.
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define("APP_VERSION", "0.1-pre");
|
if (!defined('APP_VERSION')) define("APP_VERSION", "0.1-pre");
|
||||||
|
|
||||||
require_once __DIR__."/../vendor/autoload.php";
|
require_once __DIR__."/../vendor/autoload.php";
|
||||||
require_once __DIR__."/systemtest.php";
|
require_once __DIR__."/systemtest.php";
|
||||||
|
4
build/app.prop
Normal file
4
build/app.prop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# comment
|
||||||
|
|
||||||
|
APP_VERSION=0.2.x
|
||||||
|
APP_NAME=hotfix
|
10
build/gitprops.php
Normal file
10
build/gitprops.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$git = trim(exec("git describe --tags"));
|
||||||
|
$git = explode("-",$git);
|
||||||
|
if (count($git)>1) {
|
||||||
|
$git = array_slice($git,0,2);
|
||||||
|
}
|
||||||
|
$git = join(".",$git);
|
||||||
|
|
||||||
|
echo "APP_VERSION={$git}\n";
|
@ -18,6 +18,7 @@
|
|||||||
"symfony/console": "^3.0",
|
"symfony/console": "^3.0",
|
||||||
"symfony/yaml": "^3.0",
|
"symfony/yaml": "^3.0",
|
||||||
"noccylabs/downloader": "@dev",
|
"noccylabs/downloader": "@dev",
|
||||||
"symfony/expression-language": "^3.2"
|
"symfony/expression-language": "^3.2",
|
||||||
|
"noccylabs/tinyphar": "^0.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
18
installer/install.sh
Normal file
18
installer/install.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -d ~/bin ]; then
|
||||||
|
echo "Creating ~/bin..."
|
||||||
|
mkdir ~/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing hotfix executable..."
|
||||||
|
cp hotfix ~/bin/hotfix
|
||||||
|
echo "Fixing permissions..."
|
||||||
|
chmod +x ~/bin/hotfix
|
||||||
|
|
||||||
|
if [ -e ~/.hotfix.conf ]; then
|
||||||
|
echo "Configuration file ~/.hotfix.conf already exists"
|
||||||
|
else
|
||||||
|
echo "Installing configuration file..."
|
||||||
|
cp hotfix.conf ~/.hotfix.conf
|
||||||
|
fi
|
11
installer/message
Normal file
11
installer/message
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
This will install hotfix into the bin directory of the current user (as ~/bin/hotfix). If
|
||||||
|
the directory does not exist, it will be created. Most Linux distributions will add the
|
||||||
|
~/bin directory to the path if it is found. If hotfix isn't callable from the command line
|
||||||
|
after restarting your shell and/or rebooting, please consult the documentation.
|
||||||
|
|
||||||
|
Some basic aliases will be installed into ~/.hotfix.conf if the file doesn't already exist.
|
||||||
|
Just remember to import the keys of the publishers whose hotfixes you are applying!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
This installer was created on %{installer.date}
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"output": "hotfix",
|
|
||||||
"include": [
|
|
||||||
"bin",
|
|
||||||
"src",
|
|
||||||
"vendor"
|
|
||||||
],
|
|
||||||
"stub": "bin/bootstrap.php",
|
|
||||||
"options": {
|
|
||||||
"chmod": "0777"
|
|
||||||
},
|
|
||||||
"compress": 3
|
|
||||||
}
|
|
32
selfie.conf
Normal file
32
selfie.conf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package "NoccyLabs Hotfix" {
|
||||||
|
|
||||||
|
output "setup-hotfix.run";
|
||||||
|
destination "~/bin";
|
||||||
|
|
||||||
|
res "app.version" "v0.2";
|
||||||
|
|
||||||
|
// screens
|
||||||
|
screen "welcome" type="message" entry=true {
|
||||||
|
title "Welcome to the %{app.name} %{app.version} installer";
|
||||||
|
text "@{installer:MESSAGE}";
|
||||||
|
next "license";
|
||||||
|
}
|
||||||
|
screen "license" type="license" {
|
||||||
|
title "Open Source License";
|
||||||
|
license "GNU GPL v3 or later";
|
||||||
|
text "@{installer:LICENSE}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// bundles
|
||||||
|
bundle "installer" {
|
||||||
|
file "LICENSE" src="LICENSE";
|
||||||
|
file "MESSAGE" src="installer/message";
|
||||||
|
}
|
||||||
|
bundle "app" default=true {
|
||||||
|
file "hotfix";
|
||||||
|
file "hotfix.conf";
|
||||||
|
file "install.sh" src="installer/install.sh";
|
||||||
|
script "install.sh";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -57,7 +57,7 @@ class ApplyCommand extends Command
|
|||||||
$header = $hotfix->getHeader();
|
$header = $hotfix->getHeader();
|
||||||
$output->writeln(" Hotfix: <fg=yellow;options=bold>".$header->getName()."</fg=yellow;options=bold>");
|
$output->writeln(" Hotfix: <fg=yellow;options=bold>".$header->getName()."</fg=yellow;options=bold>");
|
||||||
$output->writeln(" Author: <comment>".$header->getAuthor()."</comment>");
|
$output->writeln(" Author: <comment>".$header->getAuthor()."</comment>");
|
||||||
$info = explode("\n",wordwrap(trim($header->getInfo()), 60));
|
$info = explode("\n",wordwrap(trim($header->getInfo()), 80));
|
||||||
$info = "<comment>".join("</comment>\n <comment>", $info)."</comment>";
|
$info = "<comment>".join("</comment>\n <comment>", $info)."</comment>";
|
||||||
$output->writeln(" Info: ".$info);
|
$output->writeln(" Info: ".$info);
|
||||||
$output->writeln("");
|
$output->writeln("");
|
||||||
|
Reference in New Issue
Block a user