This is a public archive. I've moved my personal projects to Codeberg, you can find my stuff there.
moonglum / exogenesis Goto Github PK
View Code? Open in Web Editor NEWBuild your dotfile installer, updater and teardown
License: MIT License
Build your dotfile installer, updater and teardown
License: MIT License
This is a public archive. I've moved my personal projects to Codeberg, you can find my stuff there.
Codename: The Cardiff Rift
exo get
git clones/pulls passengers repo to ~/.passengers
exo update
runs the update task for all passengers in the passengers.ymlexo update vim
runs update task only for the vim
passengerExogenesis::Passenger.create(:rvm) do
# instance_eval on Passenger.new
cover_emoji :bomb
cover_text "RVM"
required_config :rubies # basically needs to wrap def_delegator
setup do
# instance_eval on Task.new(:setup)
end
end
Somehow npm stopped working for me when doing npm -g update bower
. It prints out lot of this when doing it manually:
npm ERR! Object.keys called on non-object
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Darwin 14.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "update" "-g" "bower@latest"
npm ERR! node v0.10.34
npm ERR! npm v2.1.14
There is an issue for this.
Looks like pip does not like the --user
argument when updating itself anymore. I am getting this error when using exogenesis:
Exception:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 671, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 901, in move_wheel_files
pycompile=self.pycompile,
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/wheel.py", line 140, in move_wheel_files
scheme = distutils_scheme(name, user=user, home=home, root=root)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/locations.py", line 155, in distutils_scheme
i.finalize_options()
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 272, in finalize_options
raise DistutilsOptionError("can't combine user with prefix, "
DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
Storing debug log for failure in /Users/bodo/.pip/pip.log
And when I try it on the console and leave out the --user
, it works. With it, it stops with this message.
Add unit tests for the passengers. Please check off when done:
Currently we have no good documentation about the different package managers this project offers and how to configure them. This is confusing for people who want to start using this.
Let's start to discuss what form of documentation would be best fitting for this.
I am using vundle in my neovim and need to make the vundle thing to start neovim, not vim to update everything. What would you think is the best approach here?
I want to add a font module. Do you think it would be okay to have a font direcoty and recursivly walk through it and link every Font that was found into ~/Library/Fonts ?
If this simple approach is okay for you I will go and implement it π
Currently the @moonglum Fork of OhMyZsh is hardcoded in the script. This should be configured by the dotfile user. I use my own fork, too π
Instead of letting everyone add their own Rake Tasks, I think it would be better to have the rake tasks defined in exogenesis. What you you think?
Currently everything is in the should
syntax. I love the 'new' expcect
Syntax. Will change that in the next milestone. For now I allowed both expect
and should
in the spec helper.
In #20 we introduced Megingiard. There are some things that need to be changed:
I'm thinking about a big simplification. Currently there are the following tasks:
I'm thinking about reducing it to:
up
: Installs the package manager if it was not installed, installs all packages that were not installed, updates all packages and cleans updown
: Uninstalls all packages and the package manager itself.I have some command line utils that are delivered as gems. I think I want to have them installed via exogenesis.
Thoughts on this?
In this node ticket they explain that our update script is wrong. We should not use npm update
but this instead:
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g install "$package"
done
Because:
What that does is a bit surprising: without respecting semantic versioning, it updates all the
dependencies of bower (but not bower itself) to the latest available version.
Yep, sad πΌ .
@railsbros-dirk talked about his idea to create a thor-powered exogenesis command. And I thought about how one could implement this. So I came up with the following:
--file
option to give the path to a file. When you do not give a path, it will try exogenesis.yml
, .exogenesis.yml
and ~./exogenesis.yml
in that order. This way you can call exogenesis from wherever you are on your system right now. But when you set it up for the first time, you can just give the path to the checked out file in your dotfile repo.child nodes
of this node as arguments.An example for a YML file:
rvm:
rubies:
- ruby-1.9.3
- ruby-2.0.0
dotfiles:
path: "~/Code/dotfiles/tilde"
This would initialize the class RVM with the argument RVM.new(["ruby-1.9.3", "ruby-2.0.0"])
and the dotfiles class with Dotfile.new("~/Code/dotfiles/tilde")
. The names for the parameters are just for the convenience of the user and are not used in any way. Once Apple bundles Ruby 2.0 (In 2043 approx.) we can then use Keyword-arguments for this ^^
The command can be called like this:
exogenesis update
# or
exogenesis --file exogenesis.yml install
What do you think?
I'm using a ZSH theme (https://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme) for my oh-my-zsh setup. I set up the git_repo passenger to pull the repo.
A file needs to be executed afterwards to symlink the theme-file (similarly to #57). Not every repository I check out contains such an install script, so it would be nice to be able to symlink the file automatically.
How can this be achieved?
I think it would be a good idea to add an example Rakefile into the Readme that demonstrates the usage...or to link to your dotfile repo as an example?
When I enter rake update
and there are updates in homebrew, Homebrew is stuck in the upgrading brews state.
The stacktrace after I killed it:
code/exogenesis/lib/exogenesis/support/executor.rb:65:in `execute'
code/exogenesis/lib/exogenesis/homebrew.rb:36:in `update'
Sometimes homebrew has to update several packages with references to each other. And when updating package a it also automagically updates package b. But exogenesis also tries to update packages b without checking if it was already updated. This leads to errors like this:
Error: gettext-0.18.3.2 already installed
...at least I think this is why that happens. Is my hypothesis correct?
passengers
lib/exogenesis/passengers/
(move it to a folder passengers
), the according specs and some helper files like Rakefile, Houndfile etcpassengers
will be removedThe tool will then clone this to .passengers
which will be updated before every run of the commandline app.
@bitboxer asked:
In the Font and Dotfiles classes, what do we do with the update task? I think it should do the same as the install task to make it actually possible to add the new fonts. But I need to remember what fonts I have installed to check if the font directory had changes and remove the now missing fonts from the ~/Library/Fonts . Where do I store that?
This question is in my opinion way broader. Let's take Homebrew
as an example: If the user decides to remove one of the brews from his list, should the update task now remove this brew? I'm not really sure about that. It is not trivial to detect (just comparing the installed brews and the brews that should be installed doesn't do the trick because of dependencies) β and for other tasks it is almost impossible (Font comes to mind).
For Font the question has another facet: If you teardown
Font, what should happen? Should it remove all fonts it knows? Because it can't detect which fonts it installed by just looking at the files.
I think this question needs some thought, and I guess until we found a solution, update
should not remove brews, fonts, rubies or anything else.
I keep a defaults.sh
in my dotfiles-repository which contains some default settings for my Mac OSX.
After updating via rake up
the file should be executed.
How can this be implemented the best way?
A linter for passenger.yml
:
I am now working for a company that hired bitcrowd. For them I have created a nice little virtual machine. But I want to have all the comfort of my dotfiles in there, too.
Currently I just commented out the stuff that would not work on a linux box (aka homebrew). Which is not a very clean solution. Basically this would mean a new linux branch for the new machine.
What do you think about this? Should the recipies know that they only can run on osx or linux and prevent them to run otherwise? Is there another solution I don't see right now?
Let's add http://thechangelog.com/bpkg-bash-package-manager/ .
One thing I installed using it was: https://github.com/rauchg/wifi-password
Yep. I read changelog π
a module for the growing list of npm packages I use would be great π
I just installed the new powerline (which is created by the author of vim-powerline and is rewritten in Python. It can be used in Vim, tmux, the shell and iPython currently β using it in tmux only). This process included installing python, linking it and installing a pip package, in this case:
brew install python
brew link --overwrite python
pip install --user git+git://github.com/Lokaltog/powerline
I will add a new class that will be able to do just that π
man softwareupdate
)Some notes:
Yes, that is true. And it is something really ugly to test. As with the output stuff, I want to extract it into a different gem. This would then be tested with something like test construct. But first I want the API of the executor to solidify β there are some things that are bugging me right now π Therefore it is part of the next milestone, not this one!
I think the executor will become a mashup of the excellent standard libraries FileUtils and PathName plus nice output via Megingiard.
task_skip
should work like succeed
und failed
.Why no rbenv π ... I will fix that in the next week! With proper setup and teardown
Where do we want to store changes to the mac defaults?
E.g. if you want to disable the dashboard in your Mac, you need to run this:
defaults write com.apple.dashboard mcx-disabled -boolean YES
killall Dock
How do we want to implement this? A class that reads a yml/json file with all values that should be set?
https://github.com/caskroom/homebrew-fonts
The big advantage would be to get updated font versions "for free" instead of having to check for updates yourself.
Create a new demo video on ascii cinema
passengers
file: rubies
is always an Array that looks like this etc.passengers.yml
by checking:
Dotfiles
more flexible by providing the path to the folder in initialize (instead of assuming tilde
)I have a strange error during the brew phase. I am not sure why it complains about the line in the Gemfile?!
Updating Homebrew: β
An Error occured while executing `brew update`:
/Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:35:in `eval_gemfile': Gemfile syntax error: (Bundler::GemfileError)
/Users/bodo/code/dotfiles/Gemfile:2: syntax error, unexpected ':', expecting $end
gem 'exogenesis', git: "https://github.com/moonglum/exogenesis.git"
^
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/dsl.rb:7:in `evaluate'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:112:in `setup'
from /Users/bodo/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/setup.rb:17
Basically it happens too when you use "bundle exec brew update" . The fix was to change the line in the Gemfile to this:
gem 'exogenesis', {:git => "https://github.com/moonglum/exogenesis.git"}
But I have no clue, why this happens?!
I haven't dug far enough in the past to see why gcc42
is required for rvm, a couple of questions:
Traveling Ruby could solve the problem of exogenesis requiring to have a Ruby first before running exogenesis. Let's try it.
@klaustopher suggested that instead of classes, exogenesis "adapters" could be written with a DSL. I thought about it this weekend, and I think that this can be nicely combined with the methods of the executor. So for example this is the translation of the install task from Vundle.
# Define the Vundle Adapter
Exogenesis.describe :vundle do
# Describe the install task
install do
execute_interactive "Install", "vim +BundleInstall\! +qall"
execute_interactive "Clean", "vim +BundleClean\! +qall"
end
end
In this case the setup task would automatically call start_section
with :vundle
as its argument.
But a task like execute
would still need to take a block with Ruby code to check for certain things to skip the task.
What do you think?
I'll try to work on that soonβ’ (currently reinstalling my machine because the recovery thing just thought "lol, EFI partition, who needs dat?" π
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.