i started building my own image, starting from the almost perfect hnyman image for R7800 and changing a couple of things (for example, adding nginx and sftp server)
incredibly it works and i can install the image
but i have a couple of problems:
i lost the system->software menu item in Luci and i don't know why
i put in the files folder also my config files for nginx, but the default config installed by nginx wins. i assume it is created after. how can i fix this?
nginx: I guess, that your nginx is auto started by standard script in /etc/init.d
Which will provide the "default" config via/from uci to nginx.
Disable the automatic start of nginx (i.e. using /etc/uci-defaults), and do the start of nginx yourself, i.e. from rc.local
ok it makes sense, i see two scripts in uci-defaults related with nginx, i'll try working on those (or adding one more to be executed later..)
any idea on the luci "software" menu item missing?
i'm amused i can build my own image with all the packages i use (now i also have transmission and minidlna working, i'll be turning off my qnap nas soon lol), but there is still something i can't understand with reference to the "files" directory and the "uci-defaults" script.
I put some files in the files/etc/nginx folder (well, my configuration files and my ssl certs)
Then i also created a uci-defaults script to make the router overwrite the standard config file of nginx with the one i need.
Well, this is not working.
I intend that:
the content in the "files/etc" folder does not overwrite files already existant (and the etc folder is kept by the system in case of update)
similarly, the uci-defaults script can't overwrite files
Am i wrong? if this is the case, is there an alternative method to do the above?
Thanks a lot
i think the point is that "if you "keep settings" in a sysupgrade, your old/current the config files will then overwrite the files embbeded in the image (and will be placed in /overlay)."
So the files kept are overwriting the files in the image. Ok this explains the behaviour i'm seeing..
Basically i "keep settings" because i don't know where the general config is saved (pppoe connection, wifi config and so on), but probably i should look for these files and include them in the build, avoiding the keep settings.
I'm using uci-defaults to:
ok, i understand why my question sounded so stupid
i did a backup of config files so now i can have a image full functional without keeping old settings
i still have one problem with nginx. the package has a couple of uci-defaults script that are messing up my config file embedded in the image.
is there a way to avoid the uci-defaults script to be used?
should i for example use a uci-defaults script to delete the wrong ones?
may i ask you what do you use to create your patch file?
i assume this should be the right way to modify my nginx package..
i tries with the "diff" linux command, but the output file is not like yours..
if there are conflicts when nginx Makefile is updated next time, git will notify you and you will need to edit the conflicts away. Normal git work... (e.g. a simple package upstream version update does not usually cause conflicts, but if the package maintainer makes heavy edits to the Makefile, you may need to fix things...)