On 2023/04/19 11:31, Renaud Allard wrote:
>
>
> On 4/19/23 11:29, Stuart Henderson wrote:
> > On 2023/04/18 08:58, Renaud Allard wrote:
> > > Hello,
> > >
> > > Here is an update to geo/traccar 5.7.
> > > There are no imcompatible changes. However default.xml config file has
> > > changed and now needs 3 times ../ in the changelog path for some reason.
> >
> > oh, that is a nuisance (and I don't see which commit does it..)
> >
> > Do you mind if I add a readme change as well, to reduce the chance that
> > users might need to edit default.xml?
> >
> I have no objection to that, it might be clearer
more important than being clearer, is that it means you don't need to
maintain a modified copy of default.xml and keep track of changes
during updates :)
> I also don't understand
> why a 3rd ../ is needed given base is supposed to be /var/empty.
> don't understand why they don't allow to put an absolute path, which would
> be way more convenient.
I do kind-of see why liquibase changed this, they were originally
searching for this file relative to all dirs in classPath, and that was
setup to include /.
They later changed to using searchPath which supposed can be set via a
system property, which I would normally expect to be able to set with
e.g. -Dliquibase.searchPath=/path/to/dir which, if it worked, would
allow upstream's default path - but that doesn't seem to be respected.
Anyway for whatever reason that's a liquibase thing and not really
in traccar's control. Well, traccar could use an absolute path, but
that would tie things down to a certain directory layout, so it wouldn't
be good for all of $random_linux / Windows / ..., whereas for most
people it should be OK to just use a path relative to traccar's install
dir.
Here's a different approach to allowing it to find the files, which
gets rid of most of the patches to default.xml and use the relative
paths. What do you think?
Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/traccar/Makefile,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile
--- Makefile 19 Apr 2023 09:46:00 -0000 1.30
+++ Makefile 19 Apr 2023 10:53:44 -0000
@@ -1,5 +1,6 @@
COMMENT = modern GPS tracking platform
V = 5.7
+REVISION = 0
PKGNAME = traccar-${V}
DISTNAME = traccar-other-${V}
EXTRACT_SUFX = .zip
Index: pkg/traccar.rc
===================================================================
RCS file: /cvs/ports/geo/traccar/pkg/traccar.rc,v
retrieving revision 1.4
diff -u -p -r1.4 traccar.rc
--- pkg/traccar.rc 24 May 2022 18:51:25 -0000 1.4
+++ pkg/traccar.rc 19 Apr 2023 10:53:44 -0000
@@ -2,6 +2,7 @@
daemon="${TRUEPREFIX}/share/traccar/tracker-server.jar"
daemon_user="_traccar"
+daemon_execdir="${TRUEPREFIX}/share/traccar"
. /etc/rc.d/rc.subr
Index: patches/patch-conf_default_xml
===================================================================
RCS file: /cvs/ports/geo/traccar/patches/patch-conf_default_xml,v
retrieving revision 1.12
diff -u -p -r1.12 patch-conf_default_xml
--- patches/patch-conf_default_xml 19 Apr 2023 09:46:00 -0000 1.12
+++ patches/patch-conf_default_xml 19 Apr 2023 10:53:44 -0000
@@ -1,15 +1,11 @@
-seems that database.changelog requires a relative path
-
Index: conf/default.xml
--- conf/default.xml.orig
+++ conf/default.xml
-@@ -11,7 +11,8 @@
- -->
+@@ -12,6 +12,7 @@
<entry key='web.port'>8082</entry>
-- <entry key='web.path'>./modern</entry>
+ <entry key='web.path'>./modern</entry>
+ <entry key='web.address'>127.0.0.1</entry>
-+ <entry key='web.path'>${LOCALBASE}/share/traccar/modern</entry>
<entry key='web.sanitize'>false</entry>
<entry key='web.persistSession'>false</entry>
@@ -22,22 +18,12 @@ Index: conf/default.xml
<entry key='logger.rotate'>true</entry>
<entry key='filter.enable'>true</entry>
-@@ -30,16 +31,14 @@
-
- <entry key='event.ignoreDuplicateAlerts'>true</entry>
-
-- <entry key='media.path'>./media</entry>
-+ <entry key='media.path'>${LOCALBASE}/share/traccar/media</entry>
+@@ -33,8 +34,6 @@
+ <entry key='media.path'>./media</entry>
<entry key='notificator.types'>web,mail,command</entry>
-
-- <entry key='server.statistics'>https://www.traccar.org/analytics/</entry>
-
- <entry key='commands.queueing'>true</entry>
+- <entry key='server.statistics'>https://www.traccar.org/analytics/</entry>
- <entry key='database.ignoreUnknown'>true</entry>
-- <entry key='database.changelog'>./schema/changelog-master.xml</entry>
-+ <entry
key='database.changelog'>../../..${LOCALBASE}/share/traccar/schema/changelog-master.xml</entry>
+ <entry key='commands.queueing'>true</entry>
- <entry key='gps103.port'>5001</entry>
- <entry key='tk103.port'>5002</entry>