Closed pinecat closed 6 days ago
Ah, I see. Yes, we designed the drop-in assuming bash, since that is Fedora's default.
I think the better way forward would be to have the drop-in eval the correct init depending on the value of $SHELL
. That way, you won't have to run atuin init zsh
in your own .zshrc
, since the intention is to make it work without any further configuration.
Ok, I understand now. Yes, I think that's a good idea. I will try to put together a patch for it this week. Is there anything I need to include that doesn't get output from atuin init zsh
? Thanks for the insight!
I think that's all you need, at least, according to the docs. Thanks so much for taking on the work!
So, I guess this ended up taking longer than a week, but I have a patch that adds zsh support for this RPM (#14). However, I seemed to run into a few other issues on the way, so you may want to take a look at my fork, which contains a few other commits (https://github.com/pinecat/atuin-rpmspec). I have lots of notes in those commits, but I will lay them out here. Also, this was my first real foray into rust2rpm and rpmbuild, so it's totally possible I could be doing things wrong/backwards. Feel free to let me know if that is the case. Anyway:
.spec
file. There should, ideally, be a "single source of truth", and the spec file can always be regenerated from rust2rpm.toml
.url
and source-url
fields at the top of the file. It kept throwing the following error:
ERROR: The rust2rpm.toml configuration file specifies an override for
the package URL, but this is not valid for crates packaged from
crates.io.
I'm not sure if this is just something with newer versions of rust2rpm, but I had to remove them, and instead used:
rust2rpm -V -s atuin 18.3.0
to generate the spec file (and download the crate and vendor files). I added a Makefile to my fork so I didn't have to remember all the commands by rote. I could not find anything in the manpage for rust2rpm that would override this error.
bash-preexec.sh
(or it can use something called ble.sh
), in order to work. I did not see this file anywhere in rust2rpm.toml or atuin.spec, and consequently, after I got atuin compiled, packaged, and installed, it was not working with the bash shell for me. Not sure if you have some other mechanism to include this, but I added some more patches in my fork which cat this file into /etc/profile.d/atuin.sh. After that, everything was working out of the box, as expected, for both zsh and bash.I included a README in my fork, so if you'd like to test any of the other changes I made, it should be pretty simple. If you have fixes/workarounds for all of these things already, then feel free to just ignore this. Thank you!
Yeah, the spec file is a leftover from before rust2rpm was being used. Once https://github.com/SriRamanujam/atuin-rpmspec/pull/7 is ready, that'll remove the spec file entirely. It'll also add bash-preexec properly. A part of me does kind of like having the actual spec file right there, but it's not really a big deal.
The eventual goal is to get all of this accepted by Fedora so that it's available in the repos officially :)
Thanks for the clarification. I'll go ahead and close this out now, but I'll take a look at #7. I'd definitely be interested in getting this into the official repos, so I'll see if there is anything else I can do. Thanks for all your help!
Hello,
First off, thanks for your hard work maintaining this COPR. I've recently switched to your package for installing atuin on my computer. However, I have run into a small issue. It looks like the package is installing a file
atuin.sh
in/etc/profile.d
. It seems like this might have similar function to the bash-preexec.sh script that atuin's setup script installs? In any case, because this file is in/etc/profile.d
, it will be sourced by other shells than just bash. I typically use zsh, so I get the following error when starting up a new shell:Since I'm not using bash to begin with, I don't really care about this, and I think it makes sense to suppress the message. To get around this, I've edited
/etc/profile.d/atuin.sh
to check if$BASH_VERSINFO
is set before printing out the message (lines 9-12):Would it be possible to include some sort of check like this for the next release? Thanks for any help in advanced, cheers!