git repository path for plugin

    • OMV 1.0

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • git repository path for plugin

      Hi,

      i have created my first omv plugin by using the tutorial in this forum.

      The files are placed in
      /usr/share/openmediavault/...
      and
      var/www/openmediavault/..

      Now i want to set up my git(-hub) repository with "git init"

      But i think creating the git-repository direct in the root node ( "/" ) wouldn´t be a good idea.

      So maybe someone can explain to me how i can get the same structure as the other omv-plugins (like github.com/OpenMediaVault-Plug…pers/openmediavault-nginx ).

      thx

      ocean
    • You can simply clone the repo.

      What is you first ovm plugin?
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • HK-47 wrote:

      If you're planning on using Github just create a repo there and follow the instructions. When the initial setup is done move your files into the cloned directory and commit them.


      yes sure. But which directory is my git root folder ( where i run "git init") ?
      I think it should be ~/myFirstOMVPlugin/
      but my plugin files stored in omv installation in /var/www/openmediavault/..

      when i would use ~/myFirstOMVPlugin/ i have to copy my changed plugin files from /var/www/openmediavault/.. to ~/myFirstOMVPlugin/ before i can commit the changes ( and copy back always when i pull some changes)

      i hope you see my problem :)
    • I don't think you have to do git init if you do it the way HK does. It seems he creates the repo on github. Then he uses git clone to bring the repo into a folder on his OMV. Then he adds the files there.

      Say you have /build folder. Then to clone:

      cd /build
      git clone github.com/OpenMediaVault-Plug…enmediavault-skeleton.git

      Then you can go in and add folders/files.

      I get my plugin working correctly and then I download the files with webmin and add into folders using github for windos.
    • In the Github for Windows you create a repo. Then you have a GitHub folder in Documents. After you created a repo (say skeleton) there will be a folder skeleton in the Github folder. I create the folder structure by right click and create new folder. I actually have folders that are always the same I can copy and paste. Then I download my files with webmin and put in appropriate folder in the skeleton repo in the GitHub folder. Once all files are there you sync the repo from the Github for Windows software. It syncs to Github, not my OMV. Then I add/edit the last things on Github on the internet. Then I create a deb package. When I install the deb package it is all finally synced in my OMV environment.

      You just have to decide what environment you like best to create the repo. I am always on a Windows machine so I prefer Github for Windows. Some others their desktop may be a linux machine. I think HK uses Arch as his desktop.
    • oceanBT wrote:

      yes sure. But which directory is my git root folder ( where i run "git init") ?
      I think it should be ~/myFirstOMVPlugin/


      Correct.

      oceanBT wrote:

      when i would use ~/myFirstOMVPlugin/ i have to copy my changed plugin files from /var/www/openmediavault/.. to ~/myFirstOMVPlugin/ before i can commit the changes ( and copy back always when i pull some changes)


      Everybody has that problem, but you can work around that by editing in the plugin git dir and copy every change from there.

      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • I see you problem but you can't git directly the file in /var/www/openmediavault/... Etc
      You should create a .deb packet with openmediavault-skeleton.
      Otherwise I don't know git openmediavault-skeleton and I like and I will use it in the future.
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • I work on the source code in a folder like /plugin/ and then create and install the package.
      omv 4.1.15 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • For me : /root/openmediavault-fail2ban ;)
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • I know, it's more comfortable and then you do dpkg -i .deb you must have root grant...
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • I use the developer plugin. Create a share for plugins. Then I access/modify the code over samba or ssh. Leaving the developer plugin open, I just click install. Very fast and everything is stored on server.
      omv 4.1.15 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!