Debian Codegraph @

debian/patches/debian-changes

raw
1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
2 index 423807f40cad15b787004db891f0ea19cdcd5997..a3240a084f5f4374c38470467d51462e4d6bf905 100644
3 --- a/.gitlab-ci.yml
4 +++ b/.gitlab-ci.yml
5 @@ -1,104 +1,6 @@
6 -stages:
7 - - approve
8 - - test
9 -
10 -approve1:
11 - stage: approve
12 - script:
13 - - echo "Approved..."
14 - rules:
15 - # TODO: Filter only safe repositories, or user in developers
16 - - if: $CI_PROJECT_PATH != "csonto/lvm2" && $CI_PROJECT_PATH != "lvmteam/lvm2"
17 - when: manual
18 - # TODO: for other branches than main/rhel: run pipeline only when requested:
19 - - if: $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH !~ "^rhel.*"
20 - when: manual
21 - - when: on_success
22 - allow_failure: false
23 -
24 -
25 -pages:
26 - image: elecnix/ikiwiki
27 - stage: test
28 - script:
29 - - ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib
30 - artifacts:
31 - paths:
32 - - public
33 - only:
34 - refs:
35 - - main
36 - changes:
37 - - doc/**/*
38 - - ikiwiki.setup
39 -
40 -
41 -# TODO:
42 -# - check results of autoreconf and make generate - may need additional commit
43 -# - we need a particular setup (rawhide OR latest supported fedora?)
44 -# - do make rpm and publish results as artifacts - we will use packit/COPR for this eventually
45 -
46 -# Run on any commits to main (master), rhel8, rhel9 branches
47 -test-job:
48 - stage: test
49 - parallel:
50 - matrix:
51 - - TAG: rhel8
52 - CONFIGURE: >
53 - --with-cluster=internal
54 - --enable-cmirrord
55 - - TAG: rhel9
56 - CONFIGURE: >
57 - --with-default-use-devices-file=1
58 - --enable-app-machineid
59 - --enable-editline
60 - --disable-readline
61 - artifacts:
62 - paths:
63 - - test/results/
64 - expire_in: 1 week
65 - tags:
66 - - ${TAG}
67 - timeout: 2h
68 - script:
69 - # Common options go here, diffs to the above matrix
70 - - >
71 - ./configure ${CONFIGURE}
72 - --enable-fsadm
73 - --enable-write_install
74 - --enable-pkgconfig
75 - --enable-cmdlib
76 - --enable-dmeventd
77 - --enable-blkid_wiping
78 - --enable-udev_sync
79 - --with-thin=internal
80 - --with-cache=internal
81 - --enable-lvmpolld
82 - --enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol
83 - --enable-lvmlockd-sanlock
84 - --enable-dbus-service --enable-notify-dbus
85 - --enable-dmfilemapd
86 - --with-writecache=internal
87 - --with-vdo=internal --with-vdo-format=/usr/bin/vdoformat
88 - --with-integrity=internal
89 - --disable-silent-rules
90 - - make
91 - - rm -rf test/results
92 - - mkdir -p /dev/shm/lvm2-test
93 - - mount -o remount,dev /dev/shm
94 - # TODO: Need to distinguish failed test from failed harness
95 - # TODO: Also need a way to find if run is incomplete, e.g. full disk resulting in many skipped tests
96 - - VERBOSE=0 BATCH=1 LVM_TEST_DIR=/dev/shm/lvm2-test make check || true
97 - - rm -rf /dev/shm/lvm2-test
98 - - cut -d' ' -f2 test/results/list | sort | uniq -c
99 - # Filter artifacts - keep only logs from tests which are not pass
100 - - cd test/results && rm $(grep 'passed$' list | cut -d' ' -f1 | sed -e 's|/|_|g' -e 's|.*|\0.txt|')
101 - # TODO: Keep a list of known failures, and translate into regexp - or simply use python...
102 - - if grep failed test/results/list | grep -v '\\\(dbustest\|lvconvert-mirror\)\.sh' | sort; then false; else true; fi
103 - rules:
104 - # Filter only safe repositories, or user in developers:
105 - # NOTE: Already done in approve stage, may be more caution than necessary
106 - - if: $CI_PROJECT_PATH != "csonto/lvm2" && $CI_PROJECT_PATH != "lvmteam/lvm2"
107 - when: manual
108 - - when: on_success
109 -
110 +include:
111 +- local: debian/pipeline/workflow.yml
112 +- local: debian/pipeline/variables.yml
113 +- local: debian/pipeline/source.yml
114 +- local: debian/pipeline/build.yml
115 +- local: debian/pipeline/test.yml
116 diff --git a/configure.ac b/configure.ac
117 index e5e5e71ce1bf8df56b62b284490c167d4b1b594a..121d2b61b200299b606aa85368d10d993e36ac55 100644
118 --- a/configure.ac
119 +++ b/configure.ac
120 @@ -1742,11 +1742,7 @@ AS_IF([test "$BUILD_DMFILEMAPD" = "yes"], [
121 ])
122
123 ################################################################################
124 -AC_PATH_TOOL(MODPROBE_CMD, modprobe, [], [$PATH_SBIN])
125 -
126 -AS_IF([test -n "$MODPROBE_CMD"], [
127 - AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
128 -])
129 +AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["/sbin/modprobe"], [The path to 'modprobe', if available.])
130
131 SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
132
133 diff --git a/daemons/dmeventd/.exported_symbols b/daemons/dmeventd/.exported_symbols
134 index fab74dc1d6f3dd8e740a3806d8424855bb399df6..46c14fb5ae4935104891f41e2cd626078baf22f9 100644
135 --- a/daemons/dmeventd/.exported_symbols
136 +++ b/daemons/dmeventd/.exported_symbols
137 @@ -1,4 +1,4 @@
138 -init_fifos
139 -fini_fifos
140 -daemon_talk
141 +dm_event_daemon_init_fifos
142 +dm_event_daemon_fini_fifos
143 +dm_event_daemon_talk
144 dm_event_get_version
145 diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
146 index b823a0476e267db1b40579051c19866b37434fce..97249515ce5bb8e5a60e4605d281fef6fa156648 100644
147 --- a/daemons/dmeventd/dmeventd.c
148 +++ b/daemons/dmeventd/dmeventd.c
149 @@ -2025,7 +2025,7 @@ static int _reinstate_registrations(struct dm_event_fifos *fifos)
150 unsigned long mask_value, timeout_value;
151 int i, ret;
152
153 - ret = daemon_talk(fifos, &msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0);
154 + ret = dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0);
155 free(msg.data);
156 msg.data = NULL;
157
158 @@ -2058,7 +2058,7 @@ static int _reinstate_registrations(struct dm_event_fifos *fifos)
159 continue;
160 }
161
162 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_REGISTER_FOR_EVENT,
163 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_REGISTER_FOR_EVENT,
164 dso_name,
165 dev_name,
166 (enum dm_event_mask) mask_value,
167 @@ -2083,7 +2083,7 @@ static int _info_dmeventd(const char *name, struct dm_event_fifos *fifos)
168 }
169
170 /* Get the list of registrations from the running daemon. */
171 - if (!init_fifos(fifos)) {
172 + if (!dm_event_daemon_init_fifos(fifos)) {
173 fprintf(stderr, "Could not initiate communication with existing dmeventd.\n");
174 return 0;
175 }
176 @@ -2099,7 +2099,7 @@ static int _info_dmeventd(const char *name, struct dm_event_fifos *fifos)
177 goto out;
178 }
179
180 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_STATUS, "-", "-", 0, 0)) {
181 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_STATUS, "-", "-", 0, 0)) {
182 fprintf(stderr, "Failed to acquire status from existing dmeventd.\n");
183 goto out;
184 }
185 @@ -2121,7 +2121,7 @@ static int _info_dmeventd(const char *name, struct dm_event_fifos *fifos)
186 printf("%s does not monitor any device.\n", name);
187
188 if (version >= 2) {
189 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_PARAMETERS, "-", "-", 0, 0)) {
190 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_PARAMETERS, "-", "-", 0, 0)) {
191 fprintf(stderr, "Failed to acquire parameters from existing dmeventd.\n");
192 goto out;
193 }
194 @@ -2131,7 +2131,7 @@ static int _info_dmeventd(const char *name, struct dm_event_fifos *fifos)
195
196 ret = 1;
197 out:
198 - fini_fifos(fifos);
199 + dm_event_daemon_fini_fifos(fifos);
200
201 return ret;
202 }
203 @@ -2151,7 +2151,7 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
204 }
205
206 /* Get the list of registrations from the running daemon. */
207 - if (!init_fifos(fifos)) {
208 + if (!dm_event_daemon_init_fifos(fifos)) {
209 fprintf(stderr, "WARNING: Could not initiate communication with existing dmeventd.\n");
210 return 0;
211 }
212 @@ -2168,7 +2168,7 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
213 goto bad;
214 }
215
216 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_STATUS, "-", "-", 0, 0))
217 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_STATUS, "-", "-", 0, 0))
218 goto bad;
219
220 message = strchr(msg.data, ' ') + 1;
221 @@ -2192,7 +2192,7 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
222 }
223
224 if (version >= 2) {
225 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_PARAMETERS, "-", "-", 0, 0)) {
226 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_GET_PARAMETERS, "-", "-", 0, 0)) {
227 fprintf(stderr, "Failed to acquire parameters from old dmeventd.\n");
228 goto bad;
229 }
230 @@ -2212,7 +2212,7 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
231 }
232 #endif
233
234 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_DIE, "-", "-", 0, 0)) {
235 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_DIE, "-", "-", 0, 0)) {
236 fprintf(stderr, "Old dmeventd refused to die.\n");
237 goto bad;
238 }
239 @@ -2221,7 +2221,7 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
240 ((e = getenv(SD_ACTIVATION_ENV_VAR_NAME)) && strcmp(e, "1")))
241 _systemd_activation = 1;
242
243 - fini_fifos(fifos);
244 + dm_event_daemon_fini_fifos(fifos);
245
246 /* Give a few seconds dmeventd to finish */
247 _wait_for_new_pid();
248 @@ -2230,7 +2230,7 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
249 return 2; // continue with dmeventd start up
250
251 /* Reopen fifos. */
252 - if (!init_fifos(fifos)) {
253 + if (!dm_event_daemon_init_fifos(fifos)) {
254 fprintf(stderr, "Could not initiate communication with new instance of dmeventd.\n");
255 return 0;
256 }
257 @@ -2240,10 +2240,10 @@ static int _restart_dmeventd(struct dm_event_fifos *fifos)
258 goto bad;
259 }
260
261 - fini_fifos(fifos);
262 + dm_event_daemon_fini_fifos(fifos);
263 return 1;
264 bad:
265 - fini_fifos(fifos);
266 + dm_event_daemon_fini_fifos(fifos);
267 return 0;
268 }
269
270 diff --git a/daemons/dmeventd/dmeventd.h b/daemons/dmeventd/dmeventd.h
271 index e8e22765e99b05846a6a94afaaa39ad355b56ba4..9d5253736560b31daaf5f01729b3f80d8f6e576d 100644
272 --- a/daemons/dmeventd/dmeventd.h
273 +++ b/daemons/dmeventd/dmeventd.h
274 @@ -67,12 +67,12 @@ struct dm_event_fifos {
275
276 /* Implemented in libdevmapper-event.c, but not part of public API. */
277 // FIXME misuse of bitmask as enum
278 -int daemon_talk(struct dm_event_fifos *fifos,
279 +int dm_event_daemon_talk(struct dm_event_fifos *fifos,
280 struct dm_event_daemon_message *msg, int cmd,
281 const char *dso_name, const char *dev_name,
282 unsigned evmask, uint32_t timeout);
283 -int init_fifos(struct dm_event_fifos *fifos);
284 -void fini_fifos(struct dm_event_fifos *fifos);
285 +int dm_event_daemon_init_fifos(struct dm_event_fifos *fifos);
286 +void dm_event_daemon_fini_fifos(struct dm_event_fifos *fifos);
287 int dm_event_get_version(struct dm_event_fifos *fifos, int *version);
288
289 #endif /* __DMEVENTD_DOT_H__ */
290 diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c
291 index 485f04605c3ae550b5282a6e89b1eadf7c2f2619..d46defde8b6a15364c0c1ccebbc07adbe4ac4201 100644
292 --- a/daemons/dmeventd/libdevmapper-event.c
293 +++ b/daemons/dmeventd/libdevmapper-event.c
294 @@ -349,7 +349,7 @@ static int _daemon_write(struct dm_event_fifos *fifos,
295 return bytes == size;
296 }
297
298 -int daemon_talk(struct dm_event_fifos *fifos,
299 +int dm_event_daemon_talk(struct dm_event_fifos *fifos,
300 struct dm_event_daemon_message *msg, int cmd,
301 const char *dso_name, const char *dev_name,
302 unsigned evmask, uint32_t timeout)
303 @@ -528,7 +528,7 @@ static int _start_daemon(char *dmeventd_path, struct dm_event_fifos *fifos)
304 return ret;
305 }
306
307 -int init_fifos(struct dm_event_fifos *fifos)
308 +int dm_event_daemon_init_fifos(struct dm_event_fifos *fifos)
309 {
310 /* FIXME? Is fifo the most suitable method? Why not share
311 comms/daemon code with something else e.g. multipath? */
312 @@ -569,10 +569,10 @@ static int _init_client(char *dmeventd_path, struct dm_event_fifos *fifos)
313 if (!_start_daemon(dmeventd_path, fifos))
314 return_0;
315
316 - return init_fifos(fifos);
317 + return dm_event_daemon_init_fifos(fifos);
318 }
319
320 -void fini_fifos(struct dm_event_fifos *fifos)
321 +void dm_event_daemon_fini_fifos(struct dm_event_fifos *fifos)
322 {
323 if (fifos->client >= 0 && close(fifos->client))
324 log_sys_debug("close", fifos->client_path);
325 @@ -661,16 +661,16 @@ static int _do_event(int cmd, char *dmeventd_path, struct dm_event_daemon_messag
326 goto_out;
327 }
328
329 - ret = daemon_talk(&fifos, msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0);
330 + ret = dm_event_daemon_talk(&fifos, msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0);
331
332 free(msg->data);
333 msg->data = 0;
334
335 if (!ret)
336 - ret = daemon_talk(&fifos, msg, cmd, dso_name, dev_name, evmask, timeout);
337 + ret = dm_event_daemon_talk(&fifos, msg, cmd, dso_name, dev_name, evmask, timeout);
338 out:
339 /* what is the opposite of init? */
340 - fini_fifos(&fifos);
341 + dm_event_daemon_fini_fifos(&fifos);
342
343 return ret;
344 }
345 @@ -880,7 +880,7 @@ int dm_event_get_version(struct dm_event_fifos *fifos, int *version) {
346 struct dm_event_daemon_message msg = { 0 };
347 int ret = 0;
348
349 - if (daemon_talk(fifos, &msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0))
350 + if (dm_event_daemon_talk(fifos, &msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0))
351 return 0;
352 p = msg.data;
353 *version = 0;
354 diff --git a/daemons/lvmdbusd/Makefile.in b/daemons/lvmdbusd/Makefile.in
355 index 08b061fb29707886b0bc113ee998aa8cabd66318..745a9fb0af12b00ff92f9d364ae0bf6f65ea65cb 100644
356 --- a/daemons/lvmdbusd/Makefile.in
357 +++ b/daemons/lvmdbusd/Makefile.in
358 @@ -58,8 +58,6 @@ install_lvmdbusd: $(LVMDBUSD)
359 $(Q) $(INSTALL_DIR) $(lvmdbusdir) $(lvmdbusdir)/__pycache__
360 $(Q) (cd $(srcdir); $(INSTALL_DATA) $(LVMDBUS_SRCDIR_FILES) $(lvmdbusdir))
361 $(Q) $(INSTALL_DATA) $(LVMDBUS_BUILDDIR_FILES) $(lvmdbusdir)
362 - $(Q) PYTHON=$(PYTHON3) $(PYCOMPILE) --destdir "$(DESTDIR)" --basedir "$(lvmdbuspydir)" $(LVMDBUS_SRCDIR_FILES) $(LVMDBUS_BUILDDIR_FILES)
363 - $(Q) $(CHMOD) 444 $(lvmdbusdir)/__pycache__/*.py[co]
364
365 install_lvm2: install_lvmdbusd
366
367 diff --git a/make.tmpl.in b/make.tmpl.in
368 index a80aca167a07004a5945bb7a346872b1e1264162..5f3a804f3cf827ecb0fc5d1ae10b01449a92cd05 100644
369 --- a/make.tmpl.in
370 +++ b/make.tmpl.in
371 @@ -521,7 +521,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
372 %.o: %.cpp $(DEPS)
373 $(SHOW) " [CXX] $(<F)"
374 @mkdir -p $(@D)
375 - $(Q) $(CXX) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
376 + $(Q) $(CXX) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $(CPPFLAGS) $< -o $@
377
378 %.pot: %.c $(DEPS)
379 $(SHOW) " [CC] $(<F)"
380 diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
381 index f7a6eef8fa772f7bec37d375d954dc7daf1f672f..ce0ab8ca176695027283229f266d5810081fb391 100644
382 --- a/udev/69-dm-lvm.rules.in
383 +++ b/udev/69-dm-lvm.rules.in
384 @@ -85,8 +85,14 @@ LABEL="lvm_scan"
385 # it's better suited to appearing in the journal.
386
387 IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
388 +TEST!="/run/systemd/system", GOTO="lvm_direct_vgchange"
389 +
390 ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
391 GOTO="lvm_end"
392
393 +LABEL="lvm_direct_vgchange"
394 +ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
395 +GOTO="lvm_end"
396 +
397 LABEL="lvm_end"
398
399 diff --git a/udev/Makefile.in b/udev/Makefile.in
400 index 166a4572ab7e7e5a8d9c0986abed0f409fe029a9..00d9e4f7e0b2e4954fbb13a2c1ebaac799899c47 100644
401 --- a/udev/Makefile.in
402 +++ b/udev/Makefile.in
403 @@ -17,8 +17,8 @@ top_builddir = @top_builddir@
404
405 include $(top_builddir)/make.tmpl
406
407 -DM_RULES=10-dm.rules 13-dm-disk.rules 95-dm-notify.rules
408 -LVM_RULES=11-dm-lvm.rules 69-dm-lvm.rules
409 +DM_RULES=55-dm.rules 60-persistent-storage-dm.rules 95-dm-notify.rules
410 +LVM_RULES=56-lvm.rules 69-lvm.rules
411
412 DM_DIR=$(shell $(AWK) '/^.define DM_DIR/ {print $$3}' $(top_srcdir)/libdm/misc/dm-ioctl.h)
413
414 @@ -46,6 +46,18 @@ endif
415 %.rules: $(srcdir)/%.rules.in
416 $(Q) $(SED) -e "s+(DM_DIR)+$(DM_DIR)+;s+(SYSTEMDRUN)+$(SYSTEMDRUN)+;s+(BLKID_RULE)+$(BLKID_RULE)+;s+(DM_EXEC_RULE)+$(DM_EXEC_RULE)+;s+(DM_EXEC)+$(DM_EXEC)+;s+(LVM_EXEC_RULE)+$(LVM_EXEC_RULE)+;s+(LVM_EXEC)+$(LVM_EXEC)+;" $< >$@
417
418 +55-dm.rules: 10-dm.rules
419 + ln -s $< $@
420 +
421 +56-lvm.rules: 11-dm-lvm.rules
422 + ln -s $< $@
423 +
424 +60-persistent-storage-dm.rules: 13-dm-disk.rules
425 + ln -s $< $@
426 +
427 +69-lvm.rules: 69-dm-lvm.rules
428 + ln -s $< $@
429 +
430 %_install: %.rules
431 $(SHOW) " [INSTALL] $<"
432 $(Q) $(INSTALL_DATA) -D $< $(udevdir)/$(<F)