config-package-dev 5.2 broke transforms

Bug #1725110 reported by Geoffrey Thomas
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
config-package-dev (Ubuntu)
Fix Released
Undecided
Unassigned
Artful
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

As reported at https://bugs.debian.org/873966 , a patch in config-package-dev 5.2 broke the transform functionality entirely. Any attempt to use transforms in a config package causes the build to fail with

Can't use string ("/ARRAY(0x7fda137152e0)") as an ARRAY ref while "strict refs" in use at /usr/bin/dh_configpackage line 394.

config-package-dev is a tool used as a build-dependency in private (third-party) Debian packages, so this causes those packages to FTBFS in artful when they built successfully in older releases.

Bruno Maitre reported the problem and provided a patch to fix the bug, which has been incorporated into version 5.3 in Debian.

[Test Case]

config-package-dev ships one example that uses the transform functionality, but the version in 5.2 doesn't quite build right in artful (or in Debian unstable). So the easiest way is to grab the updated example from git:

apt install config-package-dev debhelper lynx
wget http://github.com/sipb/config-package-dev/archive/master.tar.gz
tar xf master.tar.gz
cd config-package-dev-master/examples/debhelper/debathena-transform-example-1.0
dpkg-buildpackage

With config-package-dev 5.2, this will FTBFS at the "dh_configpackage" step; with the fixed version, the package will build. (If you're curious you can try dpkg -i'ing the resulting package, which will change lynx's home page to default to web.mit.edu.)

[Regression Potential]

I'm attaching two debdiffs to this bug. One backports version 5.4 from Debian unstable, which in addition to fixing this bug, fixes the examples to build on unstable, adds an autopkgtest to make sure the examples build, and makes no other code changes. The other just cherry-picks the one change.

Arguably the regression potential for the autopkgtest version is less, since if tests pass that gives us confidence that the new version works on Ubuntu. (I have been doing my testing on Debian.) I'd prefer this version, under the rules for SRUing an upstream microrelease of a package with a test suite. But it does change more; if you prefer the targeted fix that's fine with me too.

The regression potential compared to 5.2 is extremely low, since 5.2 is definitely broken for packages that use transforms, and Bruno's patch only affects the code that handles transforms. I am also confident in the patch now that I have added autopkgtests and they pass on Debian unstable, stretch, and jessie (thanks, travis.debian.net!).

Also, as noted the previous time we SRU'd config-package-dev (LP #899732), nothing in the Ubuntu or Debian archive build-depends on config-package-dev; it's a tool used by external packages. So even if there is a regression it will be low-severity.

Revision history for this message
Geoffrey Thomas (geofft) wrote :
Revision history for this message
Geoffrey Thomas (geofft) wrote :

Above is a backport of the patch (a two-line fix to some Perl) to 5.2.

This is a backport of the entire 5.4 version, which includes autopkgtests and fixes the examples to successfully build. The diff might be easier to read on GitHub: https://github.com/sipb/config-package-dev/compare/5.2...5.4

(I can provide these two as Git branches if that's easier for anyone)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in config-package-dev (Ubuntu):
status: New → Confirmed
Geoffrey Thomas (geofft)
description: updated
Revision history for this message
Geoffrey Thomas (geofft) wrote :

Ran update-maintainer

Revision history for this message
Nish Aravamudan (nacc) wrote :

Synced to bionic. I'll wait for that to propogate and then sponsor for artful.

Changed in config-package-dev (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Geoffrey Thomas (geofft) wrote :

This seems to be in bionic now - nacc, want to sponsor it for artful?

Nish Aravamudan (nacc)
Changed in config-package-dev (Ubuntu):
status: Fix Committed → Fix Released
Changed in config-package-dev (Ubuntu Artful):
status: Confirmed → In Progress
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Nish Aravamudan (nacc) wrote :

Sponsored 5.2ubuntu0.1 for artful. It will need to be accepted by an SRU team member and go through the normal SRU process.

Changed in config-package-dev (Ubuntu Artful):
status: In Progress → Fix Committed
assignee: Nish Aravamudan (nacc) → nobody
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Geoffrey, or anyone else affected,

Accepted config-package-dev into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/config-package-dev/5.2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-artful
Revision history for this message
Geoffrey Thomas (geofft) wrote :
Download full text (4.5 KiB)

Thanks, Brian! I can confirm that this fixes the problem in an artful build chroot (on my Debian jessie host):

titan:~ geofft$ schroot -c artful-amd64-sbuild -u root (artful-amd64-sbuild)root@titan:~# apt-get install config-package-dev lynx wget debhelper
[...]
(artful-amd64-sbuild)root@titan:~# wget http://github.com/sipb/config-package-dev/archive/master.tar.gz
[...]
(artful-amd64-sbuild)root@titan:~# tar xf master.tar.gz
(artful-amd64-sbuild)root@titan:~# cd config-package-dev-master/examples/debhelper/debathena-transform-example-1.0/
(artful-amd64-sbuild)root@titan:~/config-package-dev-master/examples/debhelper/debathena-transform-example-1.0# dpkg-buildpackage --no-sign
dpkg-buildpackage: info: source package debathena-transform-example
dpkg-buildpackage: info: source version 1.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Geoffrey Thomas <email address hidden>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build debathena-transform-example-1.0
debian/rules clean
dh clean --with=config-package
dh_auto_clean
dh_clean
dpkg-source -b debathena-transform-example-1.0
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building debathena-transform-example in debathena-transform-example_1.0.tar.xz
dpkg-source: info: building debathena-transform-example in debathena-transform-example_1.0.dsc
 debian/rules build
dh build --with=config-package
   dh_update_autotools_config
   dh_auto_configure
   dh_auto_build
   dh_auto_test
 debian/rules binary dh binary --with=config-package
   dh_testroot
   dh_prep
   dh_auto_install
   dh_installdocs
   dh_installchangelogs
   dh_perl
   dh_configpackage
Can't use string ("/ARRAY(0x7f74f5dde2c0)") as an ARRAY ref while "strict refs" in use at /usr/bin/dh_configpackage line 394.
debian/rules:4: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

(artful-amd64-sbuild)root@titan:~/config-package-dev-master/examples/debhelper/debathena-transform-example-1.0# echo 'deb http://archive.ubuntu.com/ubuntu/ artful-proposed restricted main multiverse universe' >> /etc/apt/sources.list
(artful-amd64-sbuild)root@titan:~/config-package-dev-master/examples/debhelper/debathena-transform-example-1.0# apt-get update
[...]
(artful-amd64-sbuild)root@titan:~/config-package-dev-master/examples/debhelper/debathena-transform-example-1.0# apt-get install config-package-dev
[...]
Unpacking config-package-dev (5.2ubuntu0.1) over (5.2) ...
[...]
(artful-amd64-sbuild)root@titan:~/config-package-dev-master/examples/debhelper/debathena-transform-example-1.0# dpkg-buildpackage --no-sign
dpkg-buildpackage: info: source package debathena-transform-example
dpkg-buildpackage: info: source version 1.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Geoffrey Thomas <email address hidden>
dpkg-buildpackage: info: host architecture amd64
 dpkg-so...

Read more...

tags: added: verification-done-artful
removed: verification-needed-artful
Revision history for this message
Geoffrey Thomas (geofft) wrote :

For what it's worth, all the other examples build successfully, too, and the resulting debathena-transform-example_1.0.deb works properly when installed (it reconfigures lynx so its home page is web.mit.edu).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package config-package-dev - 5.2ubuntu0.1

---------------
config-package-dev (5.2ubuntu0.1) artful; urgency=medium

  * Cherry-pick 354f042a from 5.3 (LP: #1725110):
    - Fix a regression in the change that permitted omission of leading
      slashes, which completely broke transforms (Closes: #873966).
      Thanks to Bruno Maitre for the report and the patch.

 -- Geoffrey Thomas <email address hidden> Mon, 06 Nov 2017 14:52:37 -0800

Changed in config-package-dev (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for config-package-dev has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.