Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Should be an upstream change but will have to see what happens...
|
|
|
|
In hopes of having a more stable branch.
|
|
|
|
|
|
|
|
|
|
|
|
Way nicer and easier to manage now; no fancy.
Couple of ways to do it:
1. stop nginx, update ssl key paths, restart anki-sync-server
2. update ssl key paths, restart nginx
Whereas previously, you run into an error trying to restart nginx and
restarting anki-sync-server didn't restart nginx.
Yay~
|
|
Was originally causing some problems with nginx but now they're
unlinked.
|
|
|
|
==
The original idea was that you could use:
1. Upholds
2. PropagatesReload
3. PropagatesStop
In order to have the convenience of controlling only this service
while propagating the same commands to the nginx service.
It turns out that _Reload_ and _Restart_ mean two different things.
Nginx doesn't support reload and there is no propagation of restart.
Since Upholds makes restarting nginx.service difficult (you have to
stop-and-start anki-sync-server.service instead). It doesn't make
sense to use upholds anymore (plus it would probably be a pain for
people who actually use nginx independently).
So the goal is to move from Upholds to Wants and remove propagation
altogether.
|
|
|
|
|
|
==
Since /etc/nginx/nginx.conf is modifed from this package and even
branched on in the post install, it could've made sense that the file
should've been added to the backup. However it turns out that this
package gets a warning for including it since this package is not the
package that supplies the file.
It turns out that the nginx package already does this anyway so it
doesn't really matter for this package. By removing it, this package
can avoid the warning and work normally anyways.
|
|
|
|
|
|
==
Following our pivot from symlinks to hard copies because of pacman's
ability to keep track of changes and whether to delete or not delete
these files. This file needed to be changed from a symlink to
hardcopy and was missed from an earlier branch.
These changes should hopefully remove the status of the file from
modified to unmodified within pacman -Qii.
|
|
|
|
Removes the servers from nginx and, if the directories are empty
afterwards, removes the directories as well.
Sites-available should be already handled by pacman.
|
|
==
Since we do sometimes make a symlink as part of the install, I think
it's probably a good idea to clean it up as well.
sites-available and sites-enable can also have a check for empty dir
prior to removal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
==
This package defaults to using the http server which doesn't require
anything extra to get working.
However, for use with something like the android version of ankiDroid
requires the use of an https server instead of an http server.
AnkiDroid in particular will simply refuse to work otherwise.
It is pretty simple to get nginx working with it and only requires a
little bit of:
1. manual server switching (which is already provided) and
2. cert creation (which pacman already has a self-signed local cert
generator tool)
|
|
|
|
The database files are never actually created when installing (or
updating or removing) the package so there's no need to back them up.
On the otherhand the service file (and the other files in the
backuplist) are modifed or directly created by our package so it makes
sense to back these up.
|
|
nginx is getting itself banned by systemctl.
I don't know if the upholds is just super quickly restarting or if
it's mirroring the settings set for anki-sync-server.service but I
figure it's worth a shot changing these settings anyway.
|
|
All the manual symlinking other than the one for sites-enabled has
been removed.
Some extra and also unnecessary stuff related to nginx or systemd have
also been removed.
|
|
==
Originally, symlinks were used because it seemed like a good idea to
keep all the files in one place. Then when it came time to uninstall,
there would be no left over remnants. However it seems that the
package manager knows to remove extra files created by the package
when it comes time to uninstall it.
It's useful then to just use cp instead since upgrading this package
could cause the original config files to change and therefore any
modifications it them.
|
|
|
|
Before it was going to set the http server to sites-enabled without
exception, which could break existing installations that are just
upgrading the package.
Moving it to the conditional will cause it to only happen on a fresh
install.
|
|
Learned that 0.0.0.0 refers to any ip which is a bit nicer
than forcing one particular ip only.
|
|
Just so it matches up with the default nginx config.
|
|
_/etc/nginx_ should contain _sites-enabled_ and _sites-available_.
The config file will then just wildcard include all sites-enabled.
sites-enabled are just symlinks to site-available so servers are
easily enabled and disabled via symlinks.
|
|
|
|
|
|
==
Adding two versions of the nginx server for anki-sync-server:
1. http
2. https
https requires an ssl certificate for which there will be instructions
for included in the manpage.
This means that we'll need to reconfigure our build scripts to copy
the two files to the right /opt directory, make the right directories
in /etc/nginx and add the appropriate lines to nginx config.
A good idea would probably be to default to enabling the http one so
that it works immediately as opposed to having the user wonder why
they're getting cryptic errors that just show up as a garbled mess
when sending https requests to an http server.
|
|
|
|
Testing out how upholds works without being annoying about it.
Currently with the default nginx.service file, the service will fail
and restart really really rapidly causing systemctl to ban it and
prevent it from starting ever again.
This is obviously a problem and resetting it requires you to not just
give it a restart but to infact turn off anki-sync-server completely
so it doesn't try to immediately auto restart nginx.
|