Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install script problems #1

Open
nsklaus opened this issue Aug 12, 2021 · 5 comments
Open

install script problems #1

nsklaus opened this issue Aug 12, 2021 · 5 comments

Comments

@nsklaus
Copy link

nsklaus commented Aug 12, 2021

hi,
i found your post on https://www.reddit.com/r/unixporn/comments/ot7thh/yabai_my_first_rice_on_macos/
and i wanted to give a try at installing your environment, however i got an error with the install script:

[ Downloads ]
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ZhongXiLu/dotfiles/master/init.sh)"

Error: No such keg: /opt/homebrew/Cellar/yadm
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 12d272abe to cd900ef71.
Updated 1 tap (homebrew/core).
==> New Formulae
alda                            fanyi                           notcurses                       sql-lint
alerter                         firefoxpwa                      ns-3                            stylua
apt                             fuse-overlayfs                  openliberty-jakartaee8          umple
bash_unit                       hubble                          openliberty-microprofile4       wildmidi
bupstash                        i2c-tools                       openliberty-webprofile8         xsel
conmon                          influxdb-cli                    pydocstyle                      zet
darglint                        licensefinder                   python-launcher
doc8                            linux-headers@4.15              rsc_2fa
docuum                          macos-term-size                 slirp4netns
==> Updated Formulae
Updated 1524 formulae.
==> Renamed Formulae
envoy@1.17 -> envoy@1.18                   parallelstl -> onedpl                      wxmac@3.0 -> wxwidgets@3.0
linux-headers -> linux-headers@4.4         wxmac -> wxwidgets
==> Deleted Formulae
giter8                                     terraform-provisioner-ansible              tj


==> Homebrew was updated to version 3.2.6
The changelog can be found at:
  https://github.com/Homebrew/brew/releases/tag/3.2.6
==> Downloading https://ghcr.io/v2/homebrew/core/yadm/manifests/3.1.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/yadm/blobs/sha256:1cb635f3e3a68bdd9e5e18830ac778527fac78890fa04e1c3ed42d5b84cd9d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:1cb635f3e3a68bdd9e5e18830ac778527fac78890fa0
######################################################################## 100.0%
==> Pouring yadm--3.1.0.all.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
==> Summary
🍺  /opt/homebrew/Cellar/yadm/3.1.0: 21 files, 194.7KB
yadm ✅
Cloning into 'repo.git'...
remote: Enumerating objects: 359, done.
remote: Counting objects: 100% (359/359), done.
remote: Compressing objects: 100% (226/226), done.
remote: Total 359 (delta 154), reused 268 (delta 82), pack-reused 0
Receiving objects: 100% (359/359), 1.46 MiB | 7.48 MiB/s, done.
Resolving deltas: 100% (154/154), done.
ERROR: Cannot execute bootstrap
'/Users/klaus/.config/yadm/bootstrap' is not an executable program.
[ Downloads ]
$
[ Downloads ]
$ ll ~/.config/yadm
total 0
drwxr-xr-x   2 klaus  staff    64B Aug 12 10:50 .
drwxr-xr-x  13 klaus  staff   416B Aug 12 10:50 ..
[ Downloads ]
$

so ~/.config/yadm dir is empty.
i tested this using iterm2, on macos 11.5.1, arch is apple M1

thanks

@nsklaus
Copy link
Author

nsklaus commented Aug 12, 2021

i had to fiddle with sdk command, to install it manualy, since, you missed calling the sdk init point:
source "$HOME/.sdkman/bin/sdkman-init.sh" so calling sdk command without doing this first resulted in error.
then your install script seemed to insist on installing a particular version of java which is unfortunately not available.
i modified it to accept something that is available and got past that java error, now i'm getting this:

[ Sources ]
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ZhongXiLu/dotfiles/master/init.sh)"

Executing /Users/klaus/.config/yadm/bootstrap
BetterDiscord ✅
Discrete Scroll ✅
iTerm2 ✅
macOS system preferences ✅
Oh My Zsh ✅

java 18.ea.9-open is already installed.
SDKMAN! ✅
Sublime Text ✅
Cloning into '/Users/klaus/Library/Application Support/Übersicht/widgets/simple-bar'...
remote: Enumerating objects: 3687, done.
remote: Counting objects: 100% (1075/1075), done.
remote: Compressing objects: 100% (352/352), done.
remote: Total 3687 (delta 873), reused 846 (delta 722), pack-reused 2612
Receiving objects: 100% (3687/3687), 26.22 MiB | 6.57 MiB/s, done.
Resolving deltas: 100% (2536/2536), done.
simple-bar ✅
gpg: AES256.CFB encrypted data
gpg: problem with the agent: Timeout
gpg: encrypted with 1 passphrase
gpg: decryption failed: Bad session key
tar: Error opening archive: Unrecognized archive format
ERROR: Unable to extract encrypted files.
[ Sources ]
$

i'm not sure what that gpg passphrase i'm being asked is for, or which of the scripts is asking for that yet, but i'm reporting that both providing and not providing one, kills the install process.
both result in ERROR: Unable to extract encrypted files. exit.

*edit:
hmm apparently it's yadm decrypt --yadm-archive "$HOME/.config/yadm/archive" called from init.sh.
not sure what's supposed to be in that file. maybe i can bypass it and comment out that line ?

@nsklaus nsklaus changed the title install script problem install script problems Aug 12, 2021
@ZhongXiLu
Copy link
Owner

The dotfiles are mostly meant for my own personal use. In that archive file are the contents of my "secret" files, so to get these contents you would need to decrypt it using a key (which I only know 😛 ). Anyway, you can safely comment that line if you wish to proceed further.

Also, thanks for testing this out, I haven't gotten the chance yet to test this out on a new system 👍

@nsklaus
Copy link
Author

nsklaus commented Aug 12, 2021

about the archive file, i thought it was some kind of thing like this, your personal stuffs.
indeed, i commented it out, and the install script could finish and exit normaly.

though, there is still problems with that install procedure:

  • yabbai isn't getting installed, i had to do it manualy
  • when i log out / login again, nothing is changed, or started. it's plain old macos
  • i had to install and start yabbai manualy, and even after doing so,
    it's still missing a lot of things to look like your nice screenshot,
    for example themes aren't applied, the top bar is still the plain one from macos and such things..

my guess is that your install script, instead of exiting in the end, should try to do a bit of confirmation checks first, to see if everything was installed as intended, each required elements, and if not: display a summary in the term saying what went wrong / what's missing. so the user can get a clue what to try and attempt next.

also, even if at some point everything gets installed properly, there's still some missing hooks to start what is needed. services, daemons, and such.

@ZhongXiLu
Copy link
Owner

yabbai isn't getting installed, i had to do it manualy

Installing yabai is a bit hard. To install it with SIP disabled, you have to disable SIP first to install the scripting addition. This cannot really be done automatically, I believe. Also, I think yabai does not work yet with M1. More info.

when i log out / login again, nothing is changed, or started. it's plain old macos
for example themes aren't applied, the top bar is still the plain one from macos and such things..

It could be that you still have to manually do some things, like starting up the yabai/skhd service or Ubersicht (for the status bar) or hiding the default macOS status bar. I haven't automated these processes yet.

display a summary in the term saying what went wrong / what's missing

I didn't think someone (or many people) would install my dotfiles, so I didn't make it too user-friendly, but I could consider this.

there's still some missing hooks to start what is needed. services, daemons, and such.

Yes, there are probably still missing a few things.


Anyway, thanks again for testing things out. I'll see what I can do when I can find the time and I hope I didn't break your system too much. 😛

@nsklaus
Copy link
Author

nsklaus commented Aug 12, 2021

it's ok it's a test system, i don't worry too much about breaking it.
that being said, thanks for considering making your env more easy to install for others.
i'd like to suggest also an uninstall procedure.
that would be neat to enable people to test it out without damaging their own dotfiles and restore their system to previous-normal state, if for some reason they didn't like tiling wm or they just wanted a quick try, enabling them to do just that might attract more users..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants