This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=9c156327295c378201a47029dbbca2573c846abc commit 9c156327295c378201a47029dbbca2573c846abc Author: Guillem Jover <[email protected]> AuthorDate: Fri Dec 17 04:27:41 2021 +0100 Move shell scripts into src/ These are all program that are part of the core dpkg instead of the build tools. Move them with the rest of the run-time programs to apply the same constraints and infrastructure. --- scripts/.gitignore | 3 --- scripts/Makefile.am | 15 -------------- src/.gitignore | 3 +++ src/Makefile.am | 31 ++++++++++++++++++++++++++++- {scripts => src}/dpkg-db-backup.sh | 0 {scripts => src}/dpkg-maintscript-helper.sh | 4 ++-- {scripts => src}/dpkg-realpath.sh | 4 ++-- {scripts => src}/sh/dpkg-error.sh | 0 {scripts => src}/t/dpkg_realpath.t | 0 t/shellcheck.t | 6 +++--- 10 files changed, 40 insertions(+), 26 deletions(-) diff --git a/scripts/.gitignore b/scripts/.gitignore index 286bb3576..dd547fbdc 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -4,18 +4,15 @@ dpkg-architecture dpkg-buildflags dpkg-buildpackage dpkg-checkbuilddeps -dpkg-db-backup dpkg-distaddfile dpkg-fsys-usrunmess dpkg-genbuildinfo dpkg-genchanges dpkg-gencontrol dpkg-gensymbols -dpkg-maintscript-helper dpkg-mergechangelogs dpkg-name dpkg-parsechangelog -dpkg-realpath dpkg-scanpackages dpkg-scansources dpkg-shlibdeps diff --git a/scripts/Makefile.am b/scripts/Makefile.am index f17af7027..9d5fb4867 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -2,10 +2,6 @@ SUBDIRS = mk po -pkglibexec_SCRIPTS = \ - dpkg-db-backup \ - # EOL - sbin_SCRIPTS = \ dpkg-fsys-usrunmess \ # EOL @@ -20,11 +16,9 @@ bin_SCRIPTS = \ dpkg-genchanges \ dpkg-gencontrol \ dpkg-gensymbols \ - dpkg-maintscript-helper \ dpkg-mergechangelogs \ dpkg-name \ dpkg-parsechangelog \ - dpkg-realpath \ dpkg-scanpackages \ dpkg-scansources \ dpkg-shlibdeps \ @@ -37,18 +31,15 @@ EXTRA_DIST = \ dpkg-buildflags.pl \ dpkg-buildpackage.pl \ dpkg-checkbuilddeps.pl \ - dpkg-db-backup.sh \ dpkg-distaddfile.pl \ dpkg-fsys-usrunmess.pl \ dpkg-genbuildinfo.pl \ dpkg-genchanges.pl \ dpkg-gencontrol.pl \ dpkg-gensymbols.pl \ - dpkg-maintscript-helper.sh \ dpkg-mergechangelogs.pl \ dpkg-name.pl \ dpkg-parsechangelog.pl \ - dpkg-realpath.sh \ dpkg-scanpackages.pl \ dpkg-scansources.pl \ dpkg-shlibdeps.pl \ @@ -58,17 +49,12 @@ EXTRA_DIST = \ $(test_data) \ # EOL -nobase_dist_pkgdata_DATA = \ - sh/dpkg-error.sh \ - # EOL - dist_zshcompletions_DATA = \ zsh/_dpkg-parsechangelog \ # EOL CLEANFILES = \ $(test_data_objects) \ - $(pkglibexec_SCRIPTS) \ $(sbin_SCRIPTS) \ $(bin_SCRIPTS) \ # EOL @@ -260,7 +246,6 @@ test_scripts = \ t/Dpkg_Source_Archive.t \ t/Dpkg_Source_Package.t \ t/Dpkg_Dist_Files.t \ - t/dpkg_realpath.t \ t/dpkg_source.t \ t/dpkg_buildpackage.t \ t/merge_changelogs.t \ diff --git a/src/.gitignore b/src/.gitignore index bf6a355d1..9922e0170 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,7 +1,10 @@ dpkg +dpkg-db-backup dpkg-deb dpkg-divert +dpkg-maintscript-helper dpkg-query +dpkg-realpath dpkg-split dpkg-statoverride dpkg-trigger diff --git a/src/Makefile.am b/src/Makefile.am index ddb732bb2..a3cf09ae9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,9 +15,13 @@ LDADD = \ # EOL EXTRA_DIST = - +CLEANFILES = DISTCLEANFILES = +nobase_dist_pkgdata_DATA = \ + sh/dpkg-error.sh \ + # EOL + bin_PROGRAMS = \ dpkg \ dpkg-deb \ @@ -28,6 +32,26 @@ bin_PROGRAMS = \ dpkg-trigger \ # EOL +bin_SCRIPTS = \ + dpkg-maintscript-helper \ + dpkg-realpath \ + # EOL + +pkglibexec_SCRIPTS = \ + dpkg-db-backup \ + # EOL + +EXTRA_DIST += \ + dpkg-db-backup.sh \ + dpkg-maintscript-helper.sh \ + dpkg-realpath.sh \ + # EOL + +CLEANFILES += \ + $(bin_SCRIPTS) \ + $(pkglibexec_SCRIPTS) \ + # EOL + dpkg_SOURCES = \ common/actions.h \ common/force.c \ @@ -115,6 +139,10 @@ dpkg_trigger_SOURCES = \ trigger/main.c \ # EOL +SUFFIXES = + +include $(top_srcdir)/build-aux/subst.am + install-data-local: $(MKDIR_P) $(DESTDIR)$(pkgconfdir)/dpkg.cfg.d $(MKDIR_P) $(DESTDIR)$(admindir)/info @@ -125,6 +153,7 @@ test_tmpdir = t.tmp test_scripts = \ t/dpkg_divert.t \ + t/dpkg_realpath.t \ # EOL EXTRA_DIST += $(test_scripts) diff --git a/scripts/dpkg-db-backup.sh b/src/dpkg-db-backup.sh similarity index 100% rename from scripts/dpkg-db-backup.sh rename to src/dpkg-db-backup.sh diff --git a/scripts/dpkg-maintscript-helper.sh b/src/dpkg-maintscript-helper.sh similarity index 99% rename from scripts/dpkg-maintscript-helper.sh rename to src/dpkg-maintscript-helper.sh index cff3e87eb..d799aa8fe 100755 --- a/scripts/dpkg-maintscript-helper.sh +++ b/src/dpkg-maintscript-helper.sh @@ -600,10 +600,10 @@ if [ "$DPKG_ROOT" = "/" ]; then fi export DPKG_ROOT -PKGDATADIR_DEFAULT=scripts +PKGDATADIR_DEFAULT=src PKGDATADIR="${DPKG_DATADIR:-$PKGDATADIR_DEFAULT}" -# shellcheck source=scripts/sh/dpkg-error.sh +# shellcheck source=src/sh/dpkg-error.sh . "$PKGDATADIR/sh/dpkg-error.sh" setup_colors diff --git a/scripts/dpkg-realpath.sh b/src/dpkg-realpath.sh similarity index 98% rename from scripts/dpkg-realpath.sh rename to src/dpkg-realpath.sh index 10b5d4a93..84438b49e 100755 --- a/scripts/dpkg-realpath.sh +++ b/src/dpkg-realpath.sh @@ -22,10 +22,10 @@ PROGNAME=$(basename "$0") version="unknown" EOL="\n" -PKGDATADIR_DEFAULT=scripts +PKGDATADIR_DEFAULT=src PKGDATADIR="${DPKG_DATADIR:-$PKGDATADIR_DEFAULT}" -# shellcheck source=scripts/sh/dpkg-error.sh +# shellcheck source=src/sh/dpkg-error.sh . "$PKGDATADIR/sh/dpkg-error.sh" show_version() diff --git a/scripts/sh/dpkg-error.sh b/src/sh/dpkg-error.sh similarity index 100% rename from scripts/sh/dpkg-error.sh rename to src/sh/dpkg-error.sh diff --git a/scripts/t/dpkg_realpath.t b/src/t/dpkg_realpath.t similarity index 100% rename from scripts/t/dpkg_realpath.t rename to src/t/dpkg_realpath.t diff --git a/t/shellcheck.t b/t/shellcheck.t index 1e1932dfe..0da7ef1ee 100644 --- a/t/shellcheck.t +++ b/t/shellcheck.t @@ -37,9 +37,9 @@ my @files = qw( build-aux/run-script debian/dpkg.cron.daily debian/dpkg.postrm - scripts/dpkg-db-backup.sh - scripts/dpkg-maintscript-helper.sh - scripts/dpkg-realpath.sh + src/dpkg-db-backup.sh + src/dpkg-maintscript-helper.sh + src/dpkg-realpath.sh ); my @shellcheck_opts = ( '--external-sources', # Allow checking external source files. -- Dpkg.Org's dpkg

