www/cgi-bin is becoming the default pCP file directory. It should only contain cgi scripts. The cgi-bin directory is a special directory which allows external users to execute code on the local machine. This is a potential security issue. The cgi-bin directory and files will need to be tightly secured.
We need a structure something like this:
pcp (or picoreplayer)
----www
--------cgi-bin
--------images
--------ccs
--------js
----pcp
--------tmp
--------xxx
----addon1
----addon2
git needs to start at the top, not at www. By sticking files like config.cfg into cgi-bin git is not going to reflect what's really happening. The directory structure under www should remain a reflection the real directory. Temporary and transfer files should be in the pcp/pcp directory(ies).
Files like config.cfg, squeezelite, httpd, your configuration scripts can go in pcp/pcp directory and an install script can be used to distribute to files to the right location. A reverse to the install script could gather the modified files and place them in the pcp/pcp for uploading to git.
Hi Greg
I completely agree.
The question is how we do that. My thinking is something like this:
Steen
Hi Steen,
Looks like we are in agreement. I will prepare a document outlining a directory structure I think may work for your approval/modification. I think I know all the piCorePlayer files now but you never know.
It will be good to get ALL piCorePlayer files under GIT control.
I would like you to be the GIT master.
regards
Hi Steen,
BTW: GIT may allow restructuring of a directory. It must happen all the time in the life of a software project.
regards
OK, I think that we easily can rearrange the directory structure.
When we agree on the structure I can simply arrange my local GIT folder accordingly. These changes seems to be detected by SmartGit and I believe that a simple "push" from my side is all it needs.
Probably you will need to "pull" and hopefully we will be ready in no time.
I have done a preliminary document showing existing piCorePlayer directory structure. I need to convert this to a usable GIT directory structure.
Thanks.
I have added a few directories and files to the end of the list.
I have been wanting to drop the "old" setup via putty for some time (I haven't been touching these scripts for some time, and now with the new cards and all).
So what is your opinion on dropping the scripts present in /usr/local/sbin ?
By the way, how did you move the files around in your experiment with the GIT structure?
I have updated the document so it now contains a "recommended" GIT directory structure. I have updated my GIT repository pCP1.17b for your reference. In my repository there is a script get_files.sh in the pcp directory. If you create a /home/tc/pcp directory, copy the script to it and run it (sudo ./get_files.sh), it will create all the other directories with files. Sync the files to your PC GIT directory. You can simply move the www directories and files to the right location.
If files are not appearing in smartGIT, you may need to run:
git add -A
Don't start modifying files until everything is looking right.
You may need to do a git rm "old_directories" I can't remember the exact command.
Please ensure everything is backed up because I have only tested this once!!
I think we can close this one. Ongoing usage of the new restructure will prove if it worked OK.
Regarding version2
Here is a draft of a proposal for file structure. Please note that all files are not up to date. For the time being it is meant as a draft to discuss the directory structure.