Code Monkey home page Code Monkey logo

Comments (9)

ouwou avatar ouwou commented on June 4, 2024 2

since the problem is just the fallback location, ill change it so that if the ini isnt found the default location will write to ~/.config/abaddon/abaddon.ini and make the directories

from abaddon.

javsanpar avatar javsanpar commented on June 4, 2024

You are right, I also have this problem.

I must do a new version of the package, changing /opt/abaddon/abaddon.ini permissions. Or try to use move the config file to the user folder.

from abaddon.

javsanpar avatar javsanpar commented on June 4, 2024

I have been thinking about which should create the user config file.

Abaddon's execution should create ~/.config/abaddon/abaddon.ini if it not exists. It does not make sense for the package to create a config files for each user in the machine. Users created after package installation will not have the config file.

What do you think @ouwou and @NexAdn?

from abaddon.

NexAdn avatar NexAdn commented on June 4, 2024

Abaddon's execution should create ~/.config/abaddon/abaddon.ini if it not exists.

Definitely! Under no circumstance should a software depend on the currently existing users nor create files in their directories at build/install time. Stuff that happens in a user's home has to happen at runtine only and the software should be able to run with a completely empty home.

from abaddon.

NexAdn avatar NexAdn commented on June 4, 2024

@javsanpar I suggest a workaround: Move the abaddon binary to /usr/lib/abaddon and install a wrapper script in /usr/bin, which creates ~/.config/abaddon/abaddon.ini (and, if required, all parent directories) if it doesn't exist and then just runs exec /usr/lib/abaddon/abaddon.

I did a similar thing to make abaddon work under Gentoo before it had support for a config file in ~/.config.

EDIT: I have the wrapper still in my Git history: https://gitlab.com/NexAdn/nex-overlay/-/blob/a9fd003137f9e8bfb178df5a1754a0229e7d7a1a/net-im/abaddon/files/abaddon-9999-exe-wrapper

PS: If you are interested in the Gentoo way of packaging abaddon:
https://gitweb.gentoo.org/repo/proj/guru.git/tree/net-im/abaddon

from abaddon.

javsanpar avatar javsanpar commented on June 4, 2024

Thank you for the suggestion and the examples!

How are you now dealing with the creation of the config file if abaddon does not create it at run time, and you are not using anymore the wrapper script?

from abaddon.

NexAdn avatar NexAdn commented on June 4, 2024

Well, I wasn't aware of the issue with creating the files, since everything worked after the workaround and removing the wrapper didn't cause any failure.

Anyway, a wrapper script isn't really necessary on Gentoo. I just confirmed that abaddon-0.1.2 and the git version has no problem saving a config file. However, it saves it in pwd, not ~/.config/abaddon/abaddon.ini.

So it seems more like upstream isn't the problem here, but rather something downstream. Maybe re-check the packaging process. Anyway, this is nothing that is to be discussed in upstream's GitHub.

The only issue that remains for upstream is that abaddon creates the config file in pwd and not ~/.config/abaddon/abaddon.ini (possibly creating any necessary parent directories).

from abaddon.

ouwou avatar ouwou commented on June 4, 2024

i think that should take care of it lemme know if anything else needs changing

from abaddon.

Zander671 avatar Zander671 commented on June 4, 2024

That fixed it!

from abaddon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.