Bug#870640: Make source package bootstrappable
Hi, On Tue, Aug 29, 2017 at 04:27:16PM +0200, Mattia Rizzolo wrote: ... > tbh, I fail to properly read your sentence above, so I'll avoid doing a > guess of what you mean. hahaha... Basically it breaks my current lazy development work flow and asks me to do one extra step. "make test" in script directory. ... > > Anyway, if you insist logical solution: > […] > > something along this should solve all stupid perl module build > > dependency issues. If you like this way, I am OK with this. > > I don't see that as something too complex. Code itself is simple as it can be. > > > The following packages have unmet dependencies: > > > builddeps:/build/devscripts_2.17.10.dsc:arm64 : Depends: > > > libfile-desktopentry-perl:arm64 but it is not installable > > > Depends: > > > libfile-homedir-perl:arm64 but it is not installable > > > Depends: > > > libgit-wrapper-perl:arm64 but it is not installable > > > Depends: > > > liblist-compare-perl:arm64 but it is not installable > > > Depends: > > > liburi-perl:arm64 but it is not installable > > > Depends: > > > libwww-perl:arm64 but it is not installable If you apply my proposed changes provided as git diff, not just libgit-wrapper-perl but all these lib*-perl dependencies can be since these are used only in the test target and no-need to install these. Dependency comes from the perl syntax checker requiring modules in system. But if you don't run syntax checker, you don't need these. Regards, Osamu
Bug#870640: Make source package bootstrappable
On Tue, Aug 29, 2017 at 10:38:24PM +0900, Osamu Aoki wrote: > Valid points by itself. From the POV of logical factoring, yes I agree. > > But this is a Debian native package with script/Makefile already > mentioning data in debian/*. So being picky on this point serves little > benefits. Whilst it is true that devscripts is a Debian native package, it is also true that other distributions are packaging it, and they routinely need to patch it to remove too-specific Debian stuff (like dependencies on dpkg stuff). I'd rather try to keep things separated when that's easy enough to do. > From practical checking of code by running test/test_* directly after > updating the code, build system after logical factoring requires us to > run test target manually in advance. Extra work. tbh, I fail to properly read your sentence above, so I'll avoid doing a guess of what you mean. > Also test target will > likely to check all commands making it slow and non-focused. I don't see that as a problem. > Anyway, if you insist logical solution: […] > something along this should solve all stupid perl module build > dependency issues. If you like this way, I am OK with this. I don't see that as something too complex. > > The following packages have unmet dependencies: > > builddeps:/build/devscripts_2.17.10.dsc:arm64 : Depends: > > libfile-desktopentry-perl:arm64 but it is not installable > > Depends: > > libfile-homedir-perl:arm64 but it is not installable > > Depends: > > libgit-wrapper-perl:arm64 but it is not installable > > Depends: > > liblist-compare-perl:arm64 but it is not installable > > Depends: liburi-perl:arm64 > > but it is not installable > > Depends: libwww-perl:arm64 > > but it is not installable > > > Oh, unless you disable the target content in "devscripts.1: > devscripts.1.in" , perl is needed for building this manpage. It calls > perl via "perl ../debian/genmanpage.pl" Yeah, well. I haven't checked all of them, but it could be that they are most probably uninstallable due to something i those packages being at fault. I think that the only thing devscripts should try to do for now is to move libgit-wrapper-perl to a , that would make a good step already. -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `- signature.asc Description: PGP signature
Bug#870640: Make source package bootstrappable
Hi, Thanks for your reply. On Mon, Aug 28, 2017 at 06:49:02PM +0200, Mattia Rizzolo wrote: > On Mon, Aug 28, 2017 at 10:36:45PM +0900, Osamu Aoki wrote: ... > > Then the commit message made me wonder why perl library is needed for build > > script. It was unintuitive but reminded me of my own experience of > > writing buggy code and its failed test build for uscan.pl. It failed > > before even running "make test". This is because scripts/Makefile has > > "all" target from which the following code is run: > > > > perl -I ../lib -c $@ > > > > This is to catch syntax error but probably cause error if pertinent perl > > library modules are not available. (Actually, 2 such lines.) > > > > In order to skip such dependency to perl library modules during the > > build, I think, you need to disable these syntax checking lines by > > changing above mentioned lines to: > > > > ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) > > perl -I ../lib -c $@ > > endif > > Wouldn't make sense to move that thing to the test target instead? Also you mentioned later: > Well, rather not. Build profiles are a packaging thing, such check > should be done in d/rules, and have it call make with some other option. Valid points by itself. From the POV of logical factoring, yes I agree. But this is a Debian native package with script/Makefile already mentioning data in debian/*. So being picky on this point serves little benefits. >From practical checking of code by running test/test_* directly after updating the code, build system after logical factoring requires us to run test target manually in advance. Extra work. Also test target will likely to check all commands making it slow and non-focused. Anyway, if you insist logical solution: $ git diff # tab code broken diff --git a/scripts/Makefile b/scripts/Makefile index ece5455a..3a83cb0f 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -18,6 +18,8 @@ CFLAGS += -std=c99 LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) CWRAPPERS = debpkg-wrapper SCRIPTS = $(patsubst %.pl,%,$(PL_FILES)) $(patsubst %.sh,%,$(SH_FILES)) +PL_CHECKS $(patsubst %.pl,%.pl.check,$(PL_FILES)) +SH_CHECKS $(patsubst %.pl,%.sh.check,$(SH_FILES)) COMPL_FILES := $(wildcard *.bash_completion) BC_BUILD_DIR:=bash_completion COMPLETION = $(patsubst %.bash_completion,$(BC_BUILD_DIR)/%,$(COMPL_FILES)) @@ -44,17 +46,18 @@ ifeq ($(shell dpkg-vendor --query Vendor),Ubuntu) # will be for preparing PPA uploads. sed -i 's/get_ubuntu_devel_distro()/"$(shell lsb_release -cs)"/' $@ endif - perl -I ../lib -c $@ %.tmp: %.sh $(VERSION_FILE) sed -e "s/###VERSION###/$(VERSION)/" $< > $@ - bash -n $@ +%.sh.check: % + bash -n $< %.tmp: %.pl $(VERSION_FILE) sed -e "s/###VERSION###/$(VERSION)/" $< > $@ - perl -I ../lib -c $@ %: %.tmp cp $< $@ chmod +x $@ +%.pl.check: % + perl -I ../lib -c $< %.1: %.pl podchecker $< @@ -88,7 +91,7 @@ clean: rm -f $(SCRIPTS) $(patsubst %,%.tmp,$(SCRIPTS)) \ $(GEN_MAN1S) $(SCRIPT_LIBS) $(CWRAPPERS) -test: +test: $(PL_CHECKS) $(SH_CHECKS) python3 -m flake8 --max-line-length=99 $(PYTHON3_SCRIPTS) $(foreach python,$(shell py3versions -r ../debian/control),$(python) setup.py test$(\n)) something along this should solve all stupid perl module build dependency issues. If you like this way, I am OK with this. > The following packages have unmet dependencies: > builddeps:/build/devscripts_2.17.10.dsc:arm64 : Depends: > libfile-desktopentry-perl:arm64 but it is not installable > Depends: > libfile-homedir-perl:arm64 but it is not installable > Depends: > libgit-wrapper-perl:arm64 but it is not installable > Depends: > liblist-compare-perl:arm64 but it is not installable > Depends: liburi-perl:arm64 > but it is not installable > Depends: libwww-perl:arm64 > but it is not installable Oh, unless you disable the target content in "devscripts.1: devscripts.1.in" , perl is needed for building this manpage. It calls perl via "perl ../debian/genmanpage.pl" > Depends: perl:arm64 but it > is not going to be installed Osamu
Bug#870640: Make source package bootstrappable
On Mon, Aug 28, 2017 at 10:36:45PM +0900, Osamu Aoki wrote: > Here is an idea for improvement. Please check my idea is right or not. > I am not familiar with this bootstrapping tricks. (What does > means? If nocheck is defined, skip it for dependency? Yes. > Recent commits by Mattia Rizzolo made me wonder what is this . They are called build profiles: https://wiki.debian.org/BuildProfileSpec#Registered_profile_names > Then the commit message made me wonder why perl library is needed for build > script. It was unintuitive but reminded me of my own experience of > writing buggy code and its failed test build for uscan.pl. It failed > before even running "make test". This is because scripts/Makefile has > "all" target from which the following code is run: > > perl -I ../lib -c $@ > > This is to catch syntax error but probably cause error if pertinent perl > library modules are not available. (Actually, 2 such lines.) > > In order to skip such dependency to perl library modules during the > build, I think, you need to disable these syntax checking lines by > changing above mentioned lines to: > > ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) > perl -I ../lib -c $@ > endif Wouldn't make sense to move that thing to the test tartet instead? > I guess most lib*-perl packages in Build-Depends can be disabled with > , too. I tried each build dep one by one, so right now everything not marked with !nocheck is needed to build devscripts. > Another heavy dependency are: docbook-xsl and xsltproc > > These should be removed as Probably, but I don't see any pressing reason to. This what happened when I tried to cross build devscripts from amd64 to arm64 (note that this is not a resolutive solution as it doesn't highlight cycles, etc). Keep in mind that usually cross building is done by enabling the nocheck build profile, as you can't run binaries for another architecture. The following packages have unmet dependencies: builddeps:/build/devscripts_2.17.10.dsc:arm64 : Depends: libfile-desktopentry-perl:arm64 but it is not installable Depends: libfile-homedir-perl:arm64 but it is not installable Depends: libgit-wrapper-perl:arm64 but it is not installable Depends: liblist-compare-perl:arm64 but it is not installable Depends: liburi-perl:arm64 but it is not installable Depends: libwww-perl:arm64 but it is not installable Depends: perl:arm64 but it is not going to be installed it's all perl stuff. > if the following lines in > scripts/Makefile: > %.1: %.dbk > xsltproc --nonet -o $@ \ > /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl > $< > > are chenged to the following lines: > %.1: %.dbk > ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) > xsltproc --nonet -o $@ \ > /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl > $< > else > echo "Bogus manpage for boot strapping" > $@ > endif Well, rather not. Build profiles are a packaging thing, such check should be done in d/rules, and have it call make with some other option. -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `- signature.asc Description: PGP signature
Bug#870640: Make source package bootstrappable
Hi, Here is an idea for improvement. Please check my idea is right or not. I am not familiar with this bootstrapping tricks. (What does means? If nocheck is defined, skip it for dependency? Following script may need to flip logic ifeq/ifneq) Recent commits by Mattia Rizzolo made me wonder what is this . Then the commit message made me wonder why perl library is needed for build script. It was unintuitive but reminded me of my own experience of writing buggy code and its failed test build for uscan.pl. It failed before even running "make test". This is because scripts/Makefile has "all" target from which the following code is run: perl -I ../lib -c $@ This is to catch syntax error but probably cause error if pertinent perl library modules are not available. (Actually, 2 such lines.) In order to skip such dependency to perl library modules during the build, I think, you need to disable these syntax checking lines by changing above mentioned lines to: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) perl -I ../lib -c $@ endif Then the following will not cause trouble for missing libgit-wrapper-perl which Mattia reported. $ grep "Git::Wrapper" * grep: devscripts: Is a directory git-deborig.pl:use Git::Wrapper; git-deborig.pl:my $git = Git::Wrapper->new("."); I guess most lib*-perl packages in Build-Depends can be disabled with , too. Another heavy dependency are: docbook-xsl and xsltproc These should be removed as if the following lines in scripts/Makefile: %.1: %.dbk xsltproc --nonet -o $@ \ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl $< are chenged to the following lines: %.1: %.dbk ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) xsltproc --nonet -o $@ \ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl $< else echo "Bogus manpage for boot strapping" > $@ endif These should make building this package much easier for boot strapping. Regards, Osamu