Merge ~ahasenack/ubuntu/+source/zoneminder:focal-zoneminder-mysql8 into ~ahasenack/ubuntu/+source/zoneminder:master
- Git
- lp:~ahasenack/ubuntu/+source/zoneminder
- focal-zoneminder-mysql8
- Merge into master
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Andreas Hasenack | ||||||||||||
Approved revision: | 6dfc7d363f874e9417bd563ed95c96031ae9568b | ||||||||||||
Merged at revision: | ebdcb0ab8587f01cf4c6b448bf0d5773e2be7dcf | ||||||||||||
Proposed branch: | ~ahasenack/ubuntu/+source/zoneminder:focal-zoneminder-mysql8 | ||||||||||||
Merge into: | ~ahasenack/ubuntu/+source/zoneminder:master | ||||||||||||
Diff against target: |
569 lines (+484/-4) 9 files modified
debian/README.Debian (+9/-2) debian/changelog (+14/-0) debian/control (+2/-1) debian/patches/mysql8-password-deprecated.patch (+26/-0) debian/patches/mysql8-replace-password-call.patch (+58/-0) debian/patches/mysql8-reserved-keywords.patch (+326/-0) debian/patches/mysql8_my_bool.patch (+43/-0) debian/patches/series (+4/-0) debian/rules (+2/-1) |
||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt (community) | Approve | ||
Canonical Server | Pending | ||
Review via email: mp+379771@code.launchpad.net |
Commit message
Description of the change
PPA: https:/
zoneminder isn't in git-ubuntu, and currently fails to import (see bug #1864255).
This fixes several things:
- ftbfs due to mysql8
- another unrelated ftbfs
- runtime issue with mysql8
Newer upstream version claims to work with mysql8, but debian hasn't grabbed it yet. One of the upstream fixes isn't really a good candidate for a patch here, as it's a kind of a refactoring (getting rid of mysql's password()).
I decided to update d/README.Debian a bit because the instructions there didn't work out of the box, and I wanted to try out the package to avoid another bug like #1859295). At least now it comes up and one can see its web interface at http://<ip>/zm. I also updated the php links, expecting 7.4 for focal.
The auth issue workaround I gathered from https:/
I could add a simple dep8 test without too much extra effort, and that would be one that simply loaded the sql dump into mysql: cat /usr/share/
It would have caught one issue (using password() in that sql file), but not the rest. Let me know if you think it's worth it. I didn't do it now because it's late :)
All those other steps from the README.Debian file are also doable as a dep8 test, up to the license displayed at first in http://<ip>/zm. We can still do it after feature freeze.
Andreas Hasenack (ahasenack) wrote : | # |
Thanks, I filed https:/
I'll take a look at the tmpfile bit
Andreas Hasenack (ahasenack) wrote : | # |
Hmm, RUNDIR is set all over the place at /var/run, even in d/rules, just changing it in the systemd tmpfile would be incomplete, and I'm not ready to test such a larger change at this moment. I'll drop that bit for now, and file a bug to do it properly.
Andreas Hasenack (ahasenack) wrote : | # |
Andreas Hasenack (ahasenack) wrote : | # |
Uploading (no tagging, since this isn't in g-u) ebdcb0ab8587f01
$ dput ubuntu ../zoneminder_
Checking signature on .changes
gpg: ../zoneminder_
Checking signature on .dsc
gpg: ../zoneminder_
Uploading to ubuntu (via ftp to upload.ubuntu.com):
Uploading zoneminder_
Uploading zoneminder_
Uploading zoneminder_
Uploading zoneminder_
Successfully uploaded packages.
Joseph Yasi (joe-yasi) : | # |
Andreas Hasenack (ahasenack) : | # |
Preview Diff
1 | diff --git a/debian/README.Debian b/debian/README.Debian | |||
2 | index 712526a..1ee8bb5 100644 | |||
3 | --- a/debian/README.Debian | |||
4 | +++ b/debian/README.Debian | |||
5 | @@ -11,6 +11,13 @@ OR | |||
6 | 11 | echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";'\ | 11 | echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";'\ |
7 | 12 | | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql | 12 | | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql |
8 | 13 | 13 | ||
9 | 14 | With MySQL8: | ||
10 | 15 | |||
11 | 16 | echo "CREATE USER 'zmuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'zmpass';"\ | ||
12 | 17 | | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql | ||
13 | 18 | echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost;'\ | ||
14 | 19 | | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql | ||
15 | 20 | |||
16 | 14 | Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf" | 21 | Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf" |
17 | 15 | accordingly. | 22 | accordingly. |
18 | 16 | 23 | ||
19 | @@ -128,8 +135,8 @@ System time zone can be set by the following command: | |||
20 | 128 | PHP time zone can be configured by changing value of "date.timezone" in one | 135 | PHP time zone can be configured by changing value of "date.timezone" in one |
21 | 129 | of the following files: | 136 | of the following files: |
22 | 130 | 137 | ||
25 | 131 | /etc/php/7.2/fpm/php.ini | 138 | /etc/php/7.4/fpm/php.ini |
26 | 132 | /etc/php/7.2/apache2/php.ini | 139 | /etc/php/7.4/apache2/php.ini |
27 | 133 | 140 | ||
28 | 134 | Please note that MariaDB/MySQL time zone should be identical to system and | 141 | Please note that MariaDB/MySQL time zone should be identical to system and |
29 | 135 | PHP time zones. By default MariaDB uses system time zone but it might be | 142 | PHP time zones. By default MariaDB uses system time zone but it might be |
30 | diff --git a/debian/changelog b/debian/changelog | |||
31 | index 68b6007..3d575f6 100644 | |||
32 | --- a/debian/changelog | |||
33 | +++ b/debian/changelog | |||
34 | @@ -1,3 +1,17 @@ | |||
35 | 1 | zoneminder (1.32.3-2ubuntu1) focal; urgency=medium | ||
36 | 2 | |||
37 | 3 | * d/p/mysql8_my_bool.patch: Reintroduce my_bool to fix build with MySQL 8. | ||
38 | 4 | (LP: #1863026) | ||
39 | 5 | * d/rules: override build-dep to fix FTBFS (thanks to | ||
40 | 6 | robie.basak@canonical.com) (LP: #1863793, Closes: #951600) | ||
41 | 7 | * MySQL8 runtime fixes (LP: #1859295): | ||
42 | 8 | - d/p/mysql8-password-deprecated.patch: password() is deprecated | ||
43 | 9 | - d/p/mysql8-reserved-keywords.patch: quote MySQL8 reserved keywords | ||
44 | 10 | - d/p/mysql8-replace-password-call.patch: replace password() | ||
45 | 11 | * d/README.Debian: quick update for MySQL8 and Focal | ||
46 | 12 | |||
47 | 13 | -- Andreas Hasenack <andreas@canonical.com> Tue, 25 Feb 2020 10:22:20 -0300 | ||
48 | 14 | |||
49 | 1 | zoneminder (1.32.3-2build1) eoan; urgency=medium | 15 | zoneminder (1.32.3-2build1) eoan; urgency=medium |
50 | 2 | 16 | ||
51 | 3 | * No change rebuild for libmysqlclient21. | 17 | * No change rebuild for libmysqlclient21. |
52 | diff --git a/debian/control b/debian/control | |||
53 | index d435117..c561ce0 100644 | |||
54 | --- a/debian/control | |||
55 | +++ b/debian/control | |||
56 | @@ -2,7 +2,8 @@ Source: zoneminder | |||
57 | 2 | Section: net | 2 | Section: net |
58 | 3 | Priority: optional | 3 | Priority: optional |
59 | 4 | Standards-Version: 4.3.0 | 4 | Standards-Version: 4.3.0 |
61 | 5 | Maintainer: Dmitry Smirnov <onlyjob@debian.org> | 5 | Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
62 | 6 | XSBC-Original-Maintainer: Dmitry Smirnov <onlyjob@debian.org> | ||
63 | 6 | Uploaders: Chris Lamb <lamby@debian.org> | 7 | Uploaders: Chris Lamb <lamby@debian.org> |
64 | 7 | Build-Depends: debhelper (>= 11~) ,dh-linktree | 8 | Build-Depends: debhelper (>= 11~) ,dh-linktree |
65 | 8 | ,apache2-dev | 9 | ,apache2-dev |
66 | diff --git a/debian/patches/mysql8-password-deprecated.patch b/debian/patches/mysql8-password-deprecated.patch | |||
67 | 9 | new file mode 100644 | 10 | new file mode 100644 |
68 | index 0000000..f16dc63 | |||
69 | --- /dev/null | |||
70 | +++ b/debian/patches/mysql8-password-deprecated.patch | |||
71 | @@ -0,0 +1,26 @@ | |||
72 | 1 | From 5b896b5e5ca57fe9780e852d570a31c7a5b2ecfb Mon Sep 17 00:00:00 2001 | ||
73 | 2 | From: Isaac Connor <isaac@zoneminder.com> | ||
74 | 3 | Date: Mon, 8 Jul 2019 14:16:57 -0400 | ||
75 | 4 | Subject: [PATCH] Replace password('admin') with the resulting string because | ||
76 | 5 | use of password is deprecated | ||
77 | 6 | |||
78 | 7 | --- | ||
79 | 8 | db/zm_create.sql.in | 2 +- | ||
80 | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
81 | 10 | |||
82 | 11 | Origin: https://github.com/ZoneMinder/zoneminder/commit/5b896b5e5ca57fe9780e852d570a31c7a5b2ecfb | ||
83 | 12 | Bug: https://github.com/ZoneMinder/zoneminder/issues/2658 | ||
84 | 13 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/zoneminder/+bug/1859295 | ||
85 | 14 | Last-Updated: 2020-02-21 | ||
86 | 15 | |||
87 | 16 | --- a/db/zm_create.sql.in | ||
88 | 17 | +++ b/db/zm_create.sql.in | ||
89 | 18 | @@ -738,7 +738,7 @@ | ||
90 | 19 | -- | ||
91 | 20 | -- Create a default admin user. | ||
92 | 21 | -- | ||
93 | 22 | -insert into Users VALUES (NULL,'admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','Edit','Edit','',''); | ||
94 | 23 | +insert into Users VALUES (NULL,'admin','$2b$12$NHZsm6AM2f2LQVROriz79ul3D6DnmFiZC.ZK5eqbF.ZWfwH9bqUJ6','',1,'View','Edit','Edit','Edit','Edit','Edit','Edit','',''); | ||
95 | 24 | |||
96 | 25 | -- | ||
97 | 26 | -- Add a sample filter to purge the oldest 100 events when the disk is 95% full | ||
98 | diff --git a/debian/patches/mysql8-replace-password-call.patch b/debian/patches/mysql8-replace-password-call.patch | |||
99 | 0 | new file mode 100644 | 27 | new file mode 100644 |
100 | index 0000000..574bf24 | |||
101 | --- /dev/null | |||
102 | +++ b/debian/patches/mysql8-replace-password-call.patch | |||
103 | @@ -0,0 +1,58 @@ | |||
104 | 1 | Description: replace password() | ||
105 | 2 | password() is deprecated in MySQL8, replace it with an equivalent implementation: | ||
106 | 3 | . | ||
107 | 4 | mysql> select password('secret'),CONCAT('*',UPPER(SHA1(UNHEX(SHA1('secret'))))); | ||
108 | 5 | +-------------------------------------------+------------------------------------------------+ | ||
109 | 6 | | password('secret') | CONCAT('*',UPPER(SHA1(UNHEX(SHA1('secret'))))) | | ||
110 | 7 | +-------------------------------------------+------------------------------------------------+ | ||
111 | 8 | | *14E65567ABDB5135D0CFD9A70B3032C179A49EE7 | *14E65567ABDB5135D0CFD9A70B3032C179A49EE7 | | ||
112 | 9 | +-------------------------------------------+------------------------------------------------+ | ||
113 | 10 | Author: Joseph Yasi <joe.yasi@gmail.com> | ||
114 | 11 | Origin: other, https://bugs.launchpad.net/ubuntu/+source/zoneminder/+bug/1859295/comments/1 | ||
115 | 12 | Bug: https://github.com/ZoneMinder/zoneminder/issues/2659 | ||
116 | 13 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/zoneminder/+bug/1859295 | ||
117 | 14 | Last-Update: 2020-02-24 | ||
118 | 15 | --- | ||
119 | 16 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | ||
120 | 17 | --- a/src/zm_user.cpp | ||
121 | 18 | +++ b/src/zm_user.cpp | ||
122 | 19 | @@ -99,7 +99,7 @@ | ||
123 | 20 | int password_length = strlen(password); | ||
124 | 21 | char *safer_password = new char[(password_length * 2) + 1]; | ||
125 | 22 | mysql_real_escape_string(&dbconn, safer_password, password, password_length); | ||
126 | 23 | - snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, `System`+0, MonitorIds from Users where Username = '%s' and Password = password('%s') and Enabled = 1", safer_username, safer_password ); | ||
127 | 24 | + snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, `System`+0, MonitorIds from Users where Username = '%s' and Password = CONCAT('*',UPPER(SHA1(UNHEX(SHA1('%s'))))) and Enabled = 1", safer_username, safer_password ); | ||
128 | 25 | delete safer_password; | ||
129 | 26 | } else { | ||
130 | 27 | snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, `System`+0, MonitorIds from Users where Username = '%s' and Enabled = 1", safer_username ); | ||
131 | 28 | --- a/web/includes/actions.php | ||
132 | 29 | +++ b/web/includes/actions.php | ||
133 | 30 | @@ -960,7 +960,7 @@ | ||
134 | 31 | $changes = getFormChanges($dbUser, $_REQUEST['newUser'], $types); | ||
135 | 32 | |||
136 | 33 | if ( $_REQUEST['newUser']['Password'] ) | ||
137 | 34 | - $changes['Password'] = 'Password = password('.dbEscape($_REQUEST['newUser']['Password']).')'; | ||
138 | 35 | + $changes['Password'] = 'Password = CONCAT(\'*\',UPPER(SHA1(UNHEX(SHA1('.dbEscape($_REQUEST['newUser']['Password']).')))))'; | ||
139 | 36 | else | ||
140 | 37 | unset($changes['Password']); | ||
141 | 38 | |||
142 | 39 | @@ -1015,7 +1015,7 @@ | ||
143 | 40 | $changes = getFormChanges($dbUser, $_REQUEST['newUser'], $types); | ||
144 | 41 | |||
145 | 42 | if ( !empty($_REQUEST['newUser']['Password']) ) | ||
146 | 43 | - $changes['Password'] = 'Password = password('.dbEscape($_REQUEST['newUser']['Password']).')'; | ||
147 | 44 | + $changes['Password'] = 'Password = CONCAT(\'*\',UPPER(SHA1(UNHEX(SHA1('.dbEscape($_REQUEST['newUser']['Password']).')))))'; | ||
148 | 45 | else | ||
149 | 46 | unset($changes['Password']); | ||
150 | 47 | if ( count($changes) ) { | ||
151 | 48 | --- a/web/includes/auth.php | ||
152 | 49 | +++ b/web/includes/auth.php | ||
153 | 50 | @@ -27,7 +27,7 @@ | ||
154 | 51 | if ( $passwordHashed ) { | ||
155 | 52 | $sql .= ' AND Username=? AND Password=?'; | ||
156 | 53 | } else { | ||
157 | 54 | - $sql .= ' AND Username=? AND Password=password(?)'; | ||
158 | 55 | + $sql .= ' AND Username=? AND Password=CONCAT(\'*\',UPPER(SHA1(UNHEX(SHA1(?)))))'; | ||
159 | 56 | } | ||
160 | 57 | $sql_values = array($username, $password); | ||
161 | 58 | } else { | ||
162 | diff --git a/debian/patches/mysql8-reserved-keywords.patch b/debian/patches/mysql8-reserved-keywords.patch | |||
163 | 0 | new file mode 100644 | 59 | new file mode 100644 |
164 | index 0000000..bc067d1 | |||
165 | --- /dev/null | |||
166 | +++ b/debian/patches/mysql8-reserved-keywords.patch | |||
167 | @@ -0,0 +1,326 @@ | |||
168 | 1 | Description: Quote MySQL8 reserved keywords | ||
169 | 2 | Author: Joseph Yasi <joe.yasi@gmail.com> | ||
170 | 3 | Origin: other, https://bugs.launchpad.net/ubuntu/+source/zoneminder/+bug/1859295/comments/1 | ||
171 | 4 | Bug: https://github.com/ZoneMinder/zoneminder/issues/2659 | ||
172 | 5 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/zoneminder/+bug/1859295 | ||
173 | 6 | Last-Update: 2020-02-21 | ||
174 | 7 | --- | ||
175 | 8 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | ||
176 | 9 | --- a/scripts/zmtelemetry.pl.in | ||
177 | 10 | +++ b/scripts/zmtelemetry.pl.in | ||
178 | 11 | @@ -243,7 +243,7 @@ | ||
179 | 12 | sub getMonitorRef { | ||
180 | 13 | my $dbh = shift; | ||
181 | 14 | |||
182 | 15 | - my $sql = 'SELECT Id,Name,Type,Function,Width,Height,Colours,MaxFPS,AlarmMaxFPS FROM Monitors'; | ||
183 | 16 | + my $sql = 'SELECT Id,Name,Type,`Function`,Width,Height,Colours,MaxFPS,AlarmMaxFPS FROM Monitors'; | ||
184 | 17 | my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() ); | ||
185 | 18 | my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() ); | ||
186 | 19 | my $arrayref = $sth->fetchall_arrayref({}); | ||
187 | 20 | --- a/scripts/zmtrigger.pl.in | ||
188 | 21 | +++ b/scripts/zmtrigger.pl.in | ||
189 | 22 | @@ -333,7 +333,7 @@ | ||
190 | 23 | my %new_monitors = (); | ||
191 | 24 | |||
192 | 25 | my $sql = "SELECT * FROM Monitors | ||
193 | 26 | - WHERE find_in_set( Function, 'Modect,Mocord,Nodect' )". | ||
194 | 27 | + WHERE find_in_set( `Function`, 'Modect,Mocord,Nodect' )". | ||
195 | 28 | ( $Config{ZM_SERVER_ID} ? 'AND ServerId=?' : '' ) | ||
196 | 29 | ; | ||
197 | 30 | my $sth = $dbh->prepare_cached( $sql ) | ||
198 | 31 | --- a/scripts/zmx10.pl.in | ||
199 | 32 | +++ b/scripts/zmx10.pl.in | ||
200 | 33 | @@ -464,7 +464,7 @@ | ||
201 | 34 | |||
202 | 35 | my $sql = "SELECT M.*,T.* from Monitors as M | ||
203 | 36 | INNER JOIN TriggersX10 as T on (M.Id = T.MonitorId) | ||
204 | 37 | - WHERE find_in_set( M.Function, 'Modect,Record,Mocord,Nodect' ) | ||
205 | 38 | + WHERE find_in_set( M.`Function`, 'Modect,Record,Mocord,Nodect' ) | ||
206 | 39 | AND M.Enabled = 1 | ||
207 | 40 | AND find_IN_set( 'X10', M.Triggers )" | ||
208 | 41 | ; | ||
209 | 42 | --- a/scripts/ZoneMinder/lib/ZoneMinder/Database.pm | ||
210 | 43 | +++ b/scripts/ZoneMinder/lib/ZoneMinder/Database.pm | ||
211 | 44 | @@ -145,15 +145,15 @@ | ||
212 | 45 | |||
213 | 46 | if ( $function ) { | ||
214 | 47 | if ( $function == DB_MON_CAPT ) { | ||
215 | 48 | - $sql .= " where Function >= 'Monitor'"; | ||
216 | 49 | + $sql .= " where `Function` >= 'Monitor'"; | ||
217 | 50 | } elsif ( $function == DB_MON_ACTIVE ) { | ||
218 | 51 | - $sql .= " where Function > 'Monitor'"; | ||
219 | 52 | + $sql .= " where `Function` > 'Monitor'"; | ||
220 | 53 | } elsif ( $function == DB_MON_MOTION ) { | ||
221 | 54 | - $sql .= " where Function = 'Modect' or Function = 'Mocord'"; | ||
222 | 55 | + $sql .= " where `Function` = 'Modect' or `Function` = 'Mocord'"; | ||
223 | 56 | } elsif ( $function == DB_MON_RECORD ) { | ||
224 | 57 | - $sql .= " where Function = 'Record' or Function = 'Mocord'"; | ||
225 | 58 | + $sql .= " where `Function` = 'Record' or `Function` = 'Mocord'"; | ||
226 | 59 | } elsif ( $function == DB_MON_PASSIVE ) { | ||
227 | 60 | - $sql .= " where Function = 'Nodect'"; | ||
228 | 61 | + $sql .= " where `Function` = 'Nodect'"; | ||
229 | 62 | } | ||
230 | 63 | } | ||
231 | 64 | my $sth = $dbh->prepare_cached( $sql ); | ||
232 | 65 | --- a/src/zm_monitor.cpp | ||
233 | 66 | +++ b/src/zm_monitor.cpp | ||
234 | 67 | @@ -67,7 +67,7 @@ | ||
235 | 68 | // This is the official SQL (and ordering of the fields) to load a Monitor. | ||
236 | 69 | // It will be used whereever a Monitor dbrow is needed. WHERE conditions can be appended | ||
237 | 70 | std::string load_monitor_sql = | ||
238 | 71 | -"SELECT Id, Name, ServerId, StorageId, Type, Function+0, Enabled, LinkedMonitors, " | ||
239 | 72 | +"SELECT Id, Name, ServerId, StorageId, Type, `Function`+0, Enabled, LinkedMonitors, " | ||
240 | 73 | "AnalysisFPSLimit, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS," | ||
241 | 74 | "Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, " // V4L Settings | ||
242 | 75 | "Protocol, Method, Options, User, Pass, Host, Port, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, RTSPDescribe, " | ||
243 | 76 | @@ -1770,7 +1770,7 @@ | ||
244 | 77 | |||
245 | 78 | static char sql[ZM_SQL_MED_BUFSIZ]; | ||
246 | 79 | // This seems to have fallen out of date. | ||
247 | 80 | - snprintf( sql, sizeof(sql), "select Function+0, Enabled, LinkedMonitors, EventPrefix, LabelFormat, LabelX, LabelY, LabelSize, WarmupCount, PreEventCount, PostEventCount, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, AnalysisFPSLimit, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = '%d'", id ); | ||
248 | 81 | + snprintf( sql, sizeof(sql), "select `Function`+0, Enabled, LinkedMonitors, EventPrefix, LabelFormat, LabelX, LabelY, LabelSize, WarmupCount, PreEventCount, PostEventCount, AlarmFrameCount, SectionLength, FrameSkip, MotionFrameSkip, AnalysisFPSLimit, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS, FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, SignalCheckColour from Monitors where Id = '%d'", id ); | ||
249 | 82 | |||
250 | 83 | zmDbRow *row = zmDbFetchOne(sql); | ||
251 | 84 | if ( !row ) { | ||
252 | 85 | @@ -1904,7 +1904,7 @@ | ||
253 | 86 | |||
254 | 87 | db_mutex.lock(); | ||
255 | 88 | static char sql[ZM_SQL_SML_BUFSIZ]; | ||
256 | 89 | - snprintf(sql, sizeof(sql), "select Id, Name from Monitors where Id = %d and Function != 'None' and Function != 'Monitor' and Enabled = 1", link_ids[i] ); | ||
257 | 90 | + snprintf(sql, sizeof(sql), "select Id, Name from Monitors where Id = %d and `Function` != 'None' and `Function` != 'Monitor' and Enabled = 1", link_ids[i] ); | ||
258 | 91 | if ( mysql_query(&dbconn, sql) ) { | ||
259 | 92 | Error("Can't run query: %s", mysql_error(&dbconn)); | ||
260 | 93 | db_mutex.unlock(); | ||
261 | 94 | @@ -1961,7 +1961,7 @@ | ||
262 | 95 | #if ZM_HAS_V4L | ||
263 | 96 | int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose purpose ) { | ||
264 | 97 | |||
265 | 98 | - std::string sql = load_monitor_sql + " WHERE Function != 'None' AND Type = 'Local'"; | ||
266 | 99 | + std::string sql = load_monitor_sql + " WHERE `Function` != 'None' AND Type = 'Local'"; | ||
267 | 100 | |||
268 | 101 | if ( device[0] ) | ||
269 | 102 | sql += " AND Device='" + std::string(device) + "'"; | ||
270 | 103 | @@ -1972,7 +1972,7 @@ | ||
271 | 104 | #endif // ZM_HAS_V4L | ||
272 | 105 | |||
273 | 106 | int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const char *port, const char *path, Monitor **&monitors, Purpose purpose ) { | ||
274 | 107 | - std::string sql = load_monitor_sql + " WHERE Function != 'None' AND Type = 'Remote'"; | ||
275 | 108 | + std::string sql = load_monitor_sql + " WHERE `Function` != 'None' AND Type = 'Remote'"; | ||
276 | 109 | if ( staticConfig.SERVER_ID ) | ||
277 | 110 | sql += stringtf( " AND ServerId=%d", staticConfig.SERVER_ID ); | ||
278 | 111 | |||
279 | 112 | @@ -1982,7 +1982,7 @@ | ||
280 | 113 | } | ||
281 | 114 | |||
282 | 115 | int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose purpose ) { | ||
283 | 116 | - std::string sql = load_monitor_sql + " WHERE Function != 'None' AND Type = 'File'"; | ||
284 | 117 | + std::string sql = load_monitor_sql + " WHERE `Function` != 'None' AND Type = 'File'"; | ||
285 | 118 | if ( file[0] ) | ||
286 | 119 | sql += " AND Path='" + std::string(file) + "'"; | ||
287 | 120 | if ( staticConfig.SERVER_ID ) { | ||
288 | 121 | @@ -1993,7 +1993,7 @@ | ||
289 | 122 | |||
290 | 123 | #if HAVE_LIBAVFORMAT | ||
291 | 124 | int Monitor::LoadFfmpegMonitors(const char *file, Monitor **&monitors, Purpose purpose) { | ||
292 | 125 | - std::string sql = load_monitor_sql + " WHERE Function != 'None' AND Type = 'Ffmpeg'"; | ||
293 | 126 | + std::string sql = load_monitor_sql + " WHERE `Function` != 'None' AND Type = 'Ffmpeg'"; | ||
294 | 127 | if ( file[0] ) | ||
295 | 128 | sql += " AND Path = '" + std::string(file) + "'"; | ||
296 | 129 | |||
297 | 130 | @@ -2006,7 +2006,7 @@ | ||
298 | 131 | |||
299 | 132 | /* | ||
300 | 133 | std::string load_monitor_sql = | ||
301 | 134 | - "SELECT Id, Name, ServerId, StorageId, Type, Function+0, Enabled, LinkedMonitors, " | ||
302 | 135 | + "SELECT Id, Name, ServerId, StorageId, Type, `Function`+0, Enabled, LinkedMonitors, " | ||
303 | 136 | "AnalysisFPSLimit, AnalysisUpdateDelay, MaxFPS, AlarmMaxFPS," | ||
304 | 137 | "Device, Channel, Format, V4LMultiBuffer, V4LCapturesPerFrame, " // V4L Settings | ||
305 | 138 | "Protocol, Method, Options, User, Pass, Host, Port, Path, Width, Height, Colours, Palette, Orientation+0, Deinterlacing, RTSPDescribe, " | ||
306 | 139 | @@ -2811,7 +2811,7 @@ | ||
307 | 140 | // At the moment, only load groups once. | ||
308 | 141 | if ( ! groups.size() ) { | ||
309 | 142 | std::string sql = stringtf( | ||
310 | 143 | - "SELECT Id,ParentId,Name FROM Groups WHERE Groups.Id IN " | ||
311 | 144 | + "SELECT Id,ParentId,Name FROM `Groups` WHERE `Groups`.Id IN " | ||
312 | 145 | "(SELECT GroupId FROM Groups_Monitors WHERE MonitorId=%d)",id); | ||
313 | 146 | MYSQL_RES *result = zmDbFetch(sql.c_str()); | ||
314 | 147 | if ( !result ) { | ||
315 | 148 | --- a/src/zm_rtsp.cpp | ||
316 | 149 | +++ b/src/zm_rtsp.cpp | ||
317 | 150 | @@ -93,7 +93,7 @@ | ||
318 | 151 | int RtspThread::requestPorts() { | ||
319 | 152 | if ( !smMinDataPort ) { | ||
320 | 153 | char sql[ZM_SQL_SML_BUFSIZ]; | ||
321 | 154 | - strncpy( sql, "select Id from Monitors where Function != 'None' and Type = 'Remote' and Protocol = 'rtsp' and Method = 'rtpUni' order by Id asc", sizeof(sql) ); | ||
322 | 155 | + strncpy( sql, "select Id from Monitors where `Function` != 'None' and Type = 'Remote' and Protocol = 'rtsp' and Method = 'rtpUni' order by Id asc", sizeof(sql) ); | ||
323 | 156 | if ( mysql_query( &dbconn, sql ) ) { | ||
324 | 157 | Error( "Can't run query: %s", mysql_error( &dbconn ) ); | ||
325 | 158 | exit( mysql_errno( &dbconn ) ); | ||
326 | 159 | --- a/src/zmu.cpp | ||
327 | 160 | +++ b/src/zmu.cpp | ||
328 | 161 | @@ -691,9 +691,9 @@ | ||
329 | 162 | } | ||
330 | 163 | |||
331 | 164 | if ( function & ZMU_LIST ) { | ||
332 | 165 | - std::string sql = "select Id, Function+0 from Monitors"; | ||
333 | 166 | + std::string sql = "select Id, `Function`+0 from Monitors"; | ||
334 | 167 | if ( !verbose ) { | ||
335 | 168 | - sql += "where Function != 'None'"; | ||
336 | 169 | + sql += "where `Function` != 'None'"; | ||
337 | 170 | } | ||
338 | 171 | sql += " order by Id asc"; | ||
339 | 172 | |||
340 | 173 | --- a/src/zm_user.cpp | ||
341 | 174 | +++ b/src/zm_user.cpp | ||
342 | 175 | @@ -99,10 +99,10 @@ | ||
343 | 176 | int password_length = strlen(password); | ||
344 | 177 | char *safer_password = new char[(password_length * 2) + 1]; | ||
345 | 178 | mysql_real_escape_string(&dbconn, safer_password, password, password_length); | ||
346 | 179 | - snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Password = password('%s') and Enabled = 1", safer_username, safer_password ); | ||
347 | 180 | + snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, `System`+0, MonitorIds from Users where Username = '%s' and Password = password('%s') and Enabled = 1", safer_username, safer_password ); | ||
348 | 181 | delete safer_password; | ||
349 | 182 | } else { | ||
350 | 183 | - snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds from Users where Username = '%s' and Enabled = 1", safer_username ); | ||
351 | 184 | + snprintf( sql, sizeof(sql), "select Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, `System`+0, MonitorIds from Users where Username = '%s' and Enabled = 1", safer_username ); | ||
352 | 185 | } | ||
353 | 186 | |||
354 | 187 | if ( mysql_query( &dbconn, sql ) ) { | ||
355 | 188 | @@ -157,7 +157,7 @@ | ||
356 | 189 | |||
357 | 190 | Debug( 1, "Attempting to authenticate user from auth string '%s'", auth ); | ||
358 | 191 | char sql[ZM_SQL_SML_BUFSIZ] = ""; | ||
359 | 192 | - snprintf( sql, sizeof(sql), "SELECT Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, System+0, MonitorIds FROM Users WHERE Enabled = 1" ); | ||
360 | 193 | + snprintf( sql, sizeof(sql), "SELECT Id, Username, Password, Enabled, Stream+0, Events+0, Control+0, Monitors+0, `System`+0, MonitorIds FROM Users WHERE Enabled = 1" ); | ||
361 | 194 | |||
362 | 195 | if ( mysql_query( &dbconn, sql ) ) { | ||
363 | 196 | Error( "Can't run query: %s", mysql_error( &dbconn ) ); | ||
364 | 197 | --- a/utils/zm-alarm.pl | ||
365 | 198 | +++ b/utils/zm-alarm.pl | ||
366 | 199 | @@ -16,7 +16,7 @@ | ||
367 | 200 | my $dbh = zmDbConnect(); | ||
368 | 201 | |||
369 | 202 | my $sql = "SELECT * FROM Monitors | ||
370 | 203 | - WHERE find_in_set( Function, 'Modect,Mocord,Nodect' )". | ||
371 | 204 | + WHERE find_in_set( `Function`, 'Modect,Mocord,Nodect' )". | ||
372 | 205 | ( $Config{ZM_SERVER_ID} ? 'AND ServerId=?' : '' ) | ||
373 | 206 | ; | ||
374 | 207 | |||
375 | 208 | --- a/web/ajax/status.php | ||
376 | 209 | +++ b/web/ajax/status.php | ||
377 | 210 | @@ -16,7 +16,7 @@ | ||
378 | 211 | 'limit' => 1, | ||
379 | 212 | 'elements' => array( | ||
380 | 213 | 'MonitorCount' => array( 'sql' => 'count(*)' ), | ||
381 | 214 | - 'ActiveMonitorCount' => array( 'sql' => "count(if(Function != 'None',1,NULL))" ), | ||
382 | 215 | + 'ActiveMonitorCount' => array( 'sql' => "count(if(`Function` != 'None',1,NULL))" ), | ||
383 | 216 | 'State' => array( 'func' => 'daemonCheck()?'.translate('Running').':'.translate('Stopped') ), | ||
384 | 217 | 'Load' => array( 'func' => 'getLoad()' ), | ||
385 | 218 | 'Disk' => array( 'func' => 'getDiskPercent()' ), | ||
386 | 219 | --- a/web/includes/database.php | ||
387 | 220 | +++ b/web/includes/database.php | ||
388 | 221 | @@ -227,7 +227,7 @@ | ||
389 | 222 | } | ||
390 | 223 | |||
391 | 224 | function getEnumValues( $table, $column ) { | ||
392 | 225 | - $row = dbFetchOne( "describe $table $column" ); | ||
393 | 226 | + $row = dbFetchOne( "describe `$table` `$column`" ); | ||
394 | 227 | preg_match_all( "/'([^']+)'/", $row['Type'], $matches ); | ||
395 | 228 | return( $matches[1] ); | ||
396 | 229 | } | ||
397 | 230 | @@ -238,7 +238,7 @@ | ||
398 | 231 | |||
399 | 232 | function getUniqueValues( $table, $column, $asString=1 ) { | ||
400 | 233 | $values = array(); | ||
401 | 234 | - $sql = "select distinct $column from $table where (not isnull($column) and $column != '') order by $column"; | ||
402 | 235 | + $sql = "select distinct `$column` from `$table` where (not isnull(`$column`) and `$column` != '') order by `$column`"; | ||
403 | 236 | foreach( dbFetchAll( $sql ) as $row ) { | ||
404 | 237 | if ( $asString ) | ||
405 | 238 | $values[$row[$column]] = $row[$column]; | ||
406 | 239 | @@ -250,7 +250,7 @@ | ||
407 | 240 | |||
408 | 241 | function getTableColumns( $table, $asString=1 ) { | ||
409 | 242 | $columns = array(); | ||
410 | 243 | - $sql = "describe $table"; | ||
411 | 244 | + $sql = "describe `$table`"; | ||
412 | 245 | foreach( dbFetchAll( $sql ) as $row ) { | ||
413 | 246 | if ( $asString ) | ||
414 | 247 | $columns[$row['Field']] = $row['Type']; | ||
415 | 248 | @@ -267,7 +267,7 @@ | ||
416 | 249 | |||
417 | 250 | function getTableDescription( $table, $asString=1 ) { | ||
418 | 251 | $columns = array(); | ||
419 | 252 | - foreach( dbFetchAll( "describe $table" ) as $row ) { | ||
420 | 253 | + foreach( dbFetchAll( "describe `$table`" ) as $row ) { | ||
421 | 254 | $desc = array( | ||
422 | 255 | 'name' => $row['Field'], | ||
423 | 256 | 'required' => ($row['Null']=='NO')?true:false, | ||
424 | 257 | @@ -377,7 +377,7 @@ | ||
425 | 258 | } | ||
426 | 259 | |||
427 | 260 | function dbFetchGroup( $gid ) { | ||
428 | 261 | - return( dbFetchOne( 'select * from Groups where Id = ?', NULL, array($gid) ) ); | ||
429 | 262 | + return( dbFetchOne( 'select * from `Groups` where Id = ?', NULL, array($gid) ) ); | ||
430 | 263 | } | ||
431 | 264 | |||
432 | 265 | ?> | ||
433 | 266 | --- a/web/includes/Group.php | ||
434 | 267 | +++ b/web/includes/Group.php | ||
435 | 268 | @@ -16,7 +16,7 @@ | ||
436 | 269 | $row = NULL; | ||
437 | 270 | if ( $IdOrRow ) { | ||
438 | 271 | if ( is_integer($IdOrRow) or is_numeric($IdOrRow) ) { | ||
439 | 272 | - $row = dbFetchOne('SELECT * FROM Groups WHERE Id=?', NULL, array($IdOrRow)); | ||
440 | 273 | + $row = dbFetchOne('SELECT * FROM `Groups` WHERE Id=?', NULL, array($IdOrRow)); | ||
441 | 274 | if ( ! $row ) { | ||
442 | 275 | Error('Unable to load Group record for Id=' . $IdOrRow); | ||
443 | 276 | } | ||
444 | 277 | @@ -59,7 +59,7 @@ | ||
445 | 278 | } | ||
446 | 279 | |||
447 | 280 | public static function find( $parameters = null, $options = null ) { | ||
448 | 281 | - $sql = 'SELECT * FROM Groups '; | ||
449 | 282 | + $sql = 'SELECT * FROM `Groups` '; | ||
450 | 283 | $values = array(); | ||
451 | 284 | |||
452 | 285 | if ( $parameters ) { | ||
453 | 286 | @@ -125,7 +125,7 @@ | ||
454 | 287 | public function delete() { | ||
455 | 288 | if ( array_key_exists('Id', $this) ) { | ||
456 | 289 | dbQuery( 'DELETE FROM Groups_Monitors WHERE GroupId=?', array($this->{'Id'}) ); | ||
457 | 290 | - dbQuery( 'DELETE FROM Groups WHERE Id=?', array($this->{'Id'}) ); | ||
458 | 291 | + dbQuery( 'DELETE FROM `Groups` WHERE Id=?', array($this->{'Id'}) ); | ||
459 | 292 | if ( isset($_COOKIE['zmGroup']) ) { | ||
460 | 293 | if ( $this->{'Id'} == $_COOKIE['zmGroup'] ) { | ||
461 | 294 | unset($_COOKIE['zmGroup']); | ||
462 | 295 | @@ -239,11 +239,11 @@ | ||
463 | 296 | |||
464 | 297 | $MonitorIds = dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId'.$group_id_sql_part, 'MonitorId', $group_id); | ||
465 | 298 | |||
466 | 299 | - $MonitorIds = array_merge($MonitorIds, dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId IN (SELECT Id FROM Groups WHERE ParentId'.$group_id_sql_part.')', 'MonitorId', $group_id)); | ||
467 | 300 | + $MonitorIds = array_merge($MonitorIds, dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId IN (SELECT Id FROM `Groups` WHERE ParentId'.$group_id_sql_part.')', 'MonitorId', $group_id)); | ||
468 | 301 | } else { | ||
469 | 302 | $MonitorIds = dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId=?', 'MonitorId', array($group_id)); | ||
470 | 303 | |||
471 | 304 | - $MonitorIds = array_merge($MonitorIds, dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId IN (SELECT Id FROM Groups WHERE ParentId = ?)', 'MonitorId', array($group_id))); | ||
472 | 305 | + $MonitorIds = array_merge($MonitorIds, dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId IN (SELECT Id FROM `Groups` WHERE ParentId = ?)', 'MonitorId', array($group_id))); | ||
473 | 306 | } | ||
474 | 307 | $groupSql = " find_in_set( M.Id, '".implode(',', $MonitorIds)."' )"; | ||
475 | 308 | } | ||
476 | 309 | --- a/web/skins/classic/views/control.php | ||
477 | 310 | +++ b/web/skins/classic/views/control.php | ||
478 | 311 | @@ -25,13 +25,13 @@ | ||
479 | 312 | |||
480 | 313 | $groupSql = ''; | ||
481 | 314 | if ( !empty($_REQUEST['group']) ) { | ||
482 | 315 | - $row = dbFetchOne( 'SELECT * FROM Groups WHERE Id = ?', NULL, array($_REQUEST['group']) ); | ||
483 | 316 | + $row = dbFetchOne( 'SELECT * FROM `Groups` WHERE Id = ?', NULL, array($_REQUEST['group']) ); | ||
484 | 317 | $groupSql = " and find_in_set( Id, '".$row['MonitorIds']."' )"; | ||
485 | 318 | } | ||
486 | 319 | |||
487 | 320 | $mid = !empty($_REQUEST['mid']) ? validInt($_REQUEST['mid']) : 0; | ||
488 | 321 | |||
489 | 322 | -$sql = "SELECT * FROM Monitors WHERE Function != 'None' AND Controllable = 1$groupSql ORDER BY Sequence"; | ||
490 | 323 | +$sql = "SELECT * FROM Monitors WHERE `Function` != 'None' AND Controllable = 1$groupSql ORDER BY Sequence"; | ||
491 | 324 | $mids = array(); | ||
492 | 325 | foreach( dbFetchAll( $sql ) as $row ) { | ||
493 | 326 | if ( !visibleMonitor( $row['Id'] ) ) { | ||
494 | diff --git a/debian/patches/mysql8_my_bool.patch b/debian/patches/mysql8_my_bool.patch | |||
495 | 0 | new file mode 100644 | 327 | new file mode 100644 |
496 | index 0000000..cee2469 | |||
497 | --- /dev/null | |||
498 | +++ b/debian/patches/mysql8_my_bool.patch | |||
499 | @@ -0,0 +1,43 @@ | |||
500 | 1 | Description: Reintroduce my_bool to fix build with MySQL 8 | ||
501 | 2 | Author: Andreas Hasenack <andreas@canonical.com> | ||
502 | 3 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/1863026 | ||
503 | 4 | Forwarded: no | ||
504 | 5 | Last-Update: 2020-02-12 | ||
505 | 6 | --- | ||
506 | 7 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | ||
507 | 8 | diff --git a/src/zm_db.h b/src/zm_db.h | ||
508 | 9 | index c707ad2..9f3381f 100644 | ||
509 | 10 | --- a/src/zm_db.h | ||
510 | 11 | +++ b/src/zm_db.h | ||
511 | 12 | @@ -21,6 +21,7 @@ | ||
512 | 13 | #define ZM_DB_H | ||
513 | 14 | |||
514 | 15 | #include <mysql/mysql.h> | ||
515 | 16 | +typedef bool my_bool; | ||
516 | 17 | #include "zm_thread.h" | ||
517 | 18 | |||
518 | 19 | class zmDbRow { | ||
519 | 20 | diff --git a/src/zm_event.h b/src/zm_event.h | ||
520 | 21 | index 1e55ae5..c3225c0 100644 | ||
521 | 22 | --- a/src/zm_event.h | ||
522 | 23 | +++ b/src/zm_event.h | ||
523 | 24 | @@ -30,6 +30,7 @@ | ||
524 | 25 | #include <sys/stat.h> | ||
525 | 26 | #include <sys/types.h> | ||
526 | 27 | #include <mysql/mysql.h> | ||
527 | 28 | +typedef bool my_bool; | ||
528 | 29 | |||
529 | 30 | #include <set> | ||
530 | 31 | #include <map> | ||
531 | 32 | diff --git a/src/zm_logger.h b/src/zm_logger.h | ||
532 | 33 | index 8e2ab6c..c842a28 100644 | ||
533 | 34 | --- a/src/zm_logger.h | ||
534 | 35 | +++ b/src/zm_logger.h | ||
535 | 36 | @@ -29,6 +29,7 @@ | ||
536 | 37 | #include <sys/syscall.h> | ||
537 | 38 | #endif // HAVE_SYS_SYSCALL_H | ||
538 | 39 | #include <mysql/mysql.h> | ||
539 | 40 | +typedef bool my_bool; | ||
540 | 41 | |||
541 | 42 | class Logger { | ||
542 | 43 | public: | ||
543 | diff --git a/debian/patches/series b/debian/patches/series | |||
544 | index f16125a..c295979 100644 | |||
545 | --- a/debian/patches/series | |||
546 | +++ b/debian/patches/series | |||
547 | @@ -25,3 +25,7 @@ | |||
548 | 25 | 0009-Allow-generation-of-random-seeds-on-install-time-not.patch | 25 | 0009-Allow-generation-of-random-seeds-on-install-time-not.patch |
549 | 26 | 0010-Use-mootools-shipped-by-debian-rather-than-the-zonem.patch | 26 | 0010-Use-mootools-shipped-by-debian-rather-than-the-zonem.patch |
550 | 27 | include_path.patch | 27 | include_path.patch |
551 | 28 | mysql8_my_bool.patch | ||
552 | 29 | mysql8-password-deprecated.patch | ||
553 | 30 | mysql8-reserved-keywords.patch | ||
554 | 31 | mysql8-replace-password-call.patch | ||
555 | diff --git a/debian/rules b/debian/rules | |||
556 | index 98131b0..90031c5 100755 | |||
557 | --- a/debian/rules | |||
558 | +++ b/debian/rules | |||
559 | @@ -34,8 +34,9 @@ override_dh_clean: | |||
560 | 34 | dh_clean $(MANPAGES1) | 34 | dh_clean $(MANPAGES1) |
561 | 35 | $(RM) -r docs/_build docs/installationguide web/api/app/Plugin/Crud | 35 | $(RM) -r docs/_build docs/installationguide web/api/app/Plugin/Crud |
562 | 36 | 36 | ||
564 | 37 | build-indep: | 37 | override_dh_auto_build-indep: |
565 | 38 | $(MAKE) -C docs html | 38 | $(MAKE) -C docs html |
566 | 39 | dh_auto_build | ||
567 | 39 | 40 | ||
568 | 40 | MANPAGES1 = \ | 41 | MANPAGES1 = \ |
569 | 41 | dbuild/scripts/zmupdate.pl.1 \ | 42 | dbuild/scripts/zmupdate.pl.1 \ |
I don't think we need to add the test for it, would it be nice: yes; is it really necessary: no.
At least not needed right now.
The mysql8 patches are a bit messy, but I agree that it does the job in as-minimal- as-possible fashion. And when moving to the next version it can be dropped.
Changelog:
- [√] changelog entry correct version and targeted codename
- [√] changelog entries correct
- [√] update-maintainer has been run
Actual changes:
- [√] no further upstream version that we want right now
New Delta: patches/ series
- [√] new patches are good and while not matching the final way they are from upstream and do the job for now.
- [√] new patches correctly included in debian/
- [√] new patches have correct DEP3 metadata linking to discussions and such
Build/Test:
- [√] build is ok
- [√] sanity checks test fine
I tested it with mythzoneminder and the basics there worked - if we could long term add an autopkgtest that would be good (as discussed above).
I ran this with a mix of php 7.4 and zoneminder to represent how focal will soon look like: core-8. 0 ocl-icd-libopencl1 php-apcu php-apcu-bc php-gd php-mysql php7.3-cli php7.3-common php7.3-json php7.3-opcache
... mysql-server-8.0 mysql-server-
php7.3-phpdbg php7.3-readline php7.4-gd php7.4-mysql zoneminder zoneminder-doc ...
All the perl installs also looked a lot.
But so far things worked.
One thing you might want to look at before an upload is this (up to you): 2ubuntu1~ ppa2) ... zoneminder/ www/api/ app/Config/ core.php. default ...
Setting up zoneminder (1.32.3-
I: Generating /etc/zm/core.php from /usr/share/
zoneminder.conf:1: Line references path below legacy directory /var/run/, updating /var/run/zm → /run/zm; please update the tmpfiles.d/ drop-in file accordingly.
It feels a bit less stable than usual, but ok still: +1 for this