Coder Social home page Coder Social logo

Comments (2)

tthoma24 avatar tthoma24 commented on August 22, 2024

This blocks #9 and #10

from macathena.

tthoma24 avatar tthoma24 commented on August 22, 2024

I got part of an answer, which was to use post-activate step to copy the files with some TCL code like this:

post-destroot {
       file rename "${destroot}${prefix}/etc/ssh/sshd_config" "${destroot}${prefix}/etc/ssh/sshd_config.macathena.dist"
       file rename "${destroot}${prefix}/etc/ssh/ssh_config" "${destroot}${prefix}/etc/ssh/ssh_config.macathena.dist"
}
post-activate {
    if {![file exists "${prefix}/etc/ssh/sshd_config"]} {
        copy "${prefix}/etc/ssh/sshd_config.macathena.dist" "${prefix}/etc/ssh/sshd_config"
    }
    if {![file exists "${prefix}/etc/ssh/ssh_config"]} {
        copy "${prefix}/etc/ssh/ssh_config.macathena.dist" "${prefix}/etc/ssh/ssh_config"
}

This gets us part of the way there, in that we can check for the config file before copying ours in, but it doesn’t help us with uninstalls. For that, I think we would need to be doing the config copy during the destroot phase, but I’m stuck on how to actually achieve that, since this isn’t a compiled package where you would use make.

The downside is that according to http://www.mail-archive.com/[email protected]/msg31136.html, there is currently no provision for MacPorts to later remove files created that way. We'd also have to worry about config files that conflict with those provided by other ports, such as ssh_config and sshd_config conflicting with MacPorts provided OpenSSH..

I suppose, in the interim, we could just make people install Kerberos Extras from the IS&T website, or just stage the files in ${prefix}/etc/foo/foo.macathena.dist, and make a note for people to opy them into place. The reason I'm trying to avoid Kerberos Extras is I’d rather not depend on IS&T to continue packaging that, and it’s also an extra step that deviates from how DebAthena does it.

from macathena.

Related Issues (19)

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.