@@ -115,6 +115,7 @@ ifneq (,$(GNUPG))
115
115
DEBSIGN_ARGS += -p$(GNUPG)
116
116
endif
117
117
118
+ REPREPRO := $(firstword $(wildcard /usr/bin/reprepro $(DEBIAN_PLUGIN_DIR)/scripts/reprepro-wrapper))
118
119
119
120
EXTRA_REPREPRO_OPTS ?=
120
121
EXTRA_REPREPRO_OPTS += --ignore=surprisingbinary
@@ -291,33 +292,17 @@ update-repo-prepare:
291
292
if [ $$? -ne 0 ]; then \
292
293
echo "$$aptdistributions" >> $(UPDATE_REPO)/conf/distributions; \
293
294
fi
294
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo $(CHROOT_REPO_DIR)/tmp/qubes-deb 2>/dev/null || true
295
-
296
- @# Softlink to the first distribution called; it will be used to create and store repo
297
- @if ! [ -L $(CHROOT_REPO_DIR) ]; then \
298
- ln -sf chroot-${DIST} ${CHROOT_REPO_DIR}; \
299
- fi
300
- @if ! [ -d $(CHROOT_REPO_DIR)/tmp/qubes-deb/deb ]; then \
301
- mkdir -p $(CHROOT_REPO_DIR)/tmp/qubes-deb ;\
302
- sudo mount --bind $(BUILDER_REPO_DIR) $(CHROOT_REPO_DIR)/tmp/qubes-deb ;\
303
- fi
304
- @if ! [ -d $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo/dists ]; then \
305
- mkdir -p $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo ;\
306
- sudo mount --bind $(UPDATE_REPO) $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo ;\
307
- fi
308
295
309
296
update-repo: update-repo-prepare update-repo-do
310
297
update-repo-do:
311
298
ifndef UPDATE_REPO
312
299
$(error "You need to specify destination repo in UPDATE_REPO variable")
313
300
endif
314
301
@if [ -n "$(INCREMENT_DEVEL_VERSIONS)" -a -n "$(release_name_dist)" ]; then \
315
- sudo $(CHROOT_ENV) chroot $(CHROOT_REPO_DIR) su $(RUN_AS_USER) -c "reprepro $(EXTRA_REPREPRO_OPTS) -b /tmp/qubes-apt-repo include $(DEBIANVERSION)$(REPO_SUFFIX) /tmp/qubes- deb/deb/ $(release_name_dist)_amd64.changes </dev/null >/dev/null" || exit 1; \
302
+ $(REPREPRO) $(EXTRA_REPREPRO_OPTS) -b $(UPDATE_REPO) include $(DEBIANVERSION)$(REPO_SUFFIX) $(BUILDER_REPO_DIR)/ deb/$(release_name_dist)_amd64.changes </dev/null >/dev/null || exit 1; \
316
303
else \
317
- sudo $(CHROOT_ENV) chroot $(CHROOT_REPO_DIR) su $(RUN_AS_USER) -c "reprepro $(EXTRA_REPREPRO_OPTS) -b /tmp/qubes-apt-repo include $(DEBIANVERSION)$(REPO_SUFFIX) /tmp/qubes- deb/deb/ $(release_name_full)_amd64.changes </dev/null >/dev/null" || exit 1; \
304
+ $(REPREPRO) $(EXTRA_REPREPRO_OPTS) -b $(UPDATE_REPO) include $(DEBIANVERSION)$(REPO_SUFFIX) $(BUILDER_REPO_DIR)/ deb/$(release_name_full)_amd64.changes </dev/null >/dev/null || exit 1; \
318
305
fi
319
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo
320
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-deb
321
306
ifdef SNAPSHOT_FILE
322
307
@if [ -n "$(INCREMENT_DEVEL_VERSIONS)" -a -n "$(package_ver_dist)" ]; then \
323
308
echo '$$Source (== $(source_name)), Version (== $(package_ver_dist))' > $(SNAPSHOT_FILE); \
@@ -330,9 +315,7 @@ endif
330
315
update-repo-from-snapshot: pkg_filter = $(shell cat $(SNAPSHOT_FILE))
331
316
update-repo-from-snapshot: update-repo-prepare update-repo-from-snapshot-do
332
317
update-repo-from-snapshot-do:
333
- @sudo $(CHROOT_ENV) chroot $(CHROOT_REPO_DIR) su $(RUN_AS_USER) -c "reprepro --ignore=surprisingbinary -b /tmp/qubes-apt-repo copyfilter $(DIST)$(REPO_SUFFIX) $(DIST)$(SNAPSHOT_REPO_SUFFIX) '$(subst $$,\$$,$(pkg_filter))'"
334
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo
335
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-deb
318
+ $(REPREPRO) --ignore=surprisingbinary -b $(UPDATE_REPO) copyfilter $(DIST)$(REPO_SUFFIX) $(DIST)$(SNAPSHOT_REPO_SUFFIX) '$(subst $$,\$$,$(pkg_filter))'
336
319
337
320
ifeq (,$(DEBIAN_BUILD_DIRS))
338
321
check-repo:
@@ -344,19 +327,7 @@ check-repo:
344
327
ifndef UPDATE_REPO
345
328
$(error "You need to specify destination repo in UPDATE_REPO variable")
346
329
endif
347
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo $(CHROOT_REPO_DIR)/tmp/qubes-deb 2>/dev/null || true
348
-
349
- @# Softlink to the first distribution called; it will be used to create and store repo
350
- @if ! [ -L $(CHROOT_REPO_DIR) ]; then \
351
- ln -sf chroot-${DIST} ${CHROOT_REPO_DIR}; \
352
- fi
353
- @if ! [ -d $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo/dists ]; then \
354
- mkdir -p $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo ;\
355
- sudo mount --bind $(UPDATE_REPO) $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo ;\
356
- fi
357
-
358
- sudo $(CHROOT_ENV) chroot $(CHROOT_REPO_DIR) su $(RUN_AS_USER) -c "reprepro -b /tmp/qubes-apt-repo -T deb listfilter $(DEBIANVERSION)$(REPO_SUFFIX) '\$$Source (== $$source_name), Version (== $$package_ver+$(DIST_TAG)u1)'" | grep -q " "
359
- @sudo umount $(CHROOT_REPO_DIR)/tmp/qubes-apt-repo
330
+ $(REPREPRO) -b $(UPDATE_REPO) -T deb listfilter $(DEBIANVERSION)$(REPO_SUFFIX) '\$$Source (== $$source_name), Version (== $$package_ver+$(DIST_TAG)u1)' | grep -q " "
360
331
endif
361
332
362
333
ifeq (,$(PACKAGE_LIST))
0 commit comments