should port the GNOME cdbs custom rules to dh7

Bug #595008 reported by Sebastien Bacher on 2010-06-16
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cdbs (Ubuntu)
Medium
Martin Pitt
Natty
Undecided
Unassigned
Oneiric
Medium
Martin Pitt
gnome-pkg-tools (Debian)
Fix Released
Unknown
gnome-pkg-tools (Ubuntu)
Wishlist
Martin Pitt
Natty
Wishlist
Unassigned
Oneiric
Medium
Martin Pitt
pkgbinarymangler (Ubuntu)
Medium
Martin Pitt
Natty
Undecided
Unassigned
Oneiric
Medium
Martin Pitt

Bug Description

Binary package hint: debhelper

Currently our cdbs has some custom Ubuntu rules, we should port those to dh7:

* langpack.mk:
- run intltool-update after build to create a translation template for rosetta
- set gettext domain in .desktop and .server
- strip gconf schemas translations

* debhelper.mk:
- don't ship upstream changelogs by default to win CD space
- symlink identic documentation directories
- symlink identic files in the GNOME documentation (ie screenshot in translations identic to the english version)

Currently gnome.mk includes those which means the sources using the gnome rules don't need any change on Ubuntu. It would be nice to have a similar system working with dh7 since that system is becoming popular in Debian

Changed in debhelper (Ubuntu):
importance: Undecided → Wishlist
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Raphaël Hertzog (hertzog) wrote :

Which of those could be upstreamed to Debian?

> - symlink identic documentation directories
> - symlink identic files in the GNOME documentation (ie screenshot in translations identic to the english version)

Those look plausible at least. It could be a new debhelper script dedicated to the task.

If dropping the upstream changelog is really worthwhile for you, I don't see why it should only be done on packages using CDBS. So you should just fork dh_installchangelogs to not install it (on the long term, you could use a hook called by dpkg-deb -b, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570934 for the associated wishlist bug).

Also ScottK mentionned in #debian-ubuntu (on OFTC) that KUbuntu has also modifications in pkg-kde-tools for langpacks ported to dh7... so you might want to investigate/coordinate with them.

HTH.

Raphael Hertzog [2010-06-16 9:52 -0000]:
> If dropping the upstream changelog is really worthwhile for you, I don't
> see why it should only be done on packages using CDBS.

Because it's (Debian's) cdbs which installs it in the first place :-)

http://git.debian.org/?p=collab-maint/cdbs.git;a=blob;f=1/rules/debhelper.mk.in;h=b46838b2e5760a5d9a1353477d687586118bf28b;hb=HEAD#l113

So this bit is not relevant for the dh7 port.

Raphaël Hertzog (hertzog) wrote :

On Wed, 16 Jun 2010, Martin Pitt wrote:
> Because it's (Debian's) cdbs which installs it in the first place :-)
>
> http://git.debian.org/?p=collab-maint/cdbs.git;a=blob;f=1/rules/debhelper.mk.in;h=b46838b2e5760a5d9a1353477d687586118bf28b;hb=HEAD#l113
>
> So this bit is not relevant for the dh7 port.

Well, dh7 has the same kind of heuristic[1] to detect the upstream ChangeLog
so the end result would be the same and when it doesn't detect it
correctly, the maintainer is supposed to add an override for
dh_install_changelogs and pass it explicitly.

If you really want to strip them for all dehelper-using packages, you have to
modify dh_installchangelogs to not install it in the first place.

[1] See dh_installchangelogs(1):
       An upstream changelog file may be specified as an option. If none
       is specified, a few common filenames are tried. (In compatibility
       level 7 and above.)

Cheers,
--
Raphaël Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/

Didier Roche (didrocks) on 2010-11-16
Changed in debhelper (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → Didier Roche (didrocks)

Sorry, I missed this bug when I created bug 735934 this morning. I am mostly done with creating a dh_translations (dh-translations package built from pkgbinarymangler) which takes over all functionality of our cdbs langpacks.mk.

The remaining Ubuntu customizations to gnome.mk, as well as the stuff that Debian does as well should still be ported to debhelper, and the resulting dh_gnome should move to gnome-pkg-tools. Then Ubuntu's gnome-pkg-tools would just need to depend on dh-translations, and we wouldn't need any other delta.

summary: - should port the Ubuntu cdbs custom rules to dh7
+ should port the GNOME Ubuntu cdbs custom rules to dh7
affects: debhelper (Ubuntu) → gnome-pkg-tools (Ubuntu)
Martin Pitt (pitti) on 2011-03-16
summary: - should port the GNOME Ubuntu cdbs custom rules to dh7
+ should port the GNOME cdbs custom rules to dh7
Changed in gnome-pkg-tools (Ubuntu):
status: New → Incomplete
status: Incomplete → Triaged
Changed in gnome-pkg-tools (Debian):
status: Unknown → Fix Released
Martin Pitt (pitti) wrote :

In Oneiric, I'll merge gnome-pkg-tools and integrate dh_translations, so that we have a similar effect as our current cdbs gnome.mk rules.

Changed in gnome-pkg-tools (Ubuntu Oneiric):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → Triaged
Changed in gnome-pkg-tools (Ubuntu):
assignee: Didier Roche (didrocks) → Martin Pitt (pitti)
Martin Pitt (pitti) wrote :

Too late for natty, though (and not really needed).

Changed in gnome-pkg-tools (Ubuntu Natty):
assignee: Martin Pitt (pitti) → nobody
status: Triaged → Won't Fix
Martin Pitt (pitti) wrote :

The other part of this is that this current cdbs delta should move to pkgbinarymangler:

    - 1/rules/debhelper.mk.in:
      + Do not install upstream changelogs by default. They are huge and thus
        waste a lot of archive and CD space, quite uninteresting for ordinary
        users, and easy to get by downloading the source package or visiting the
        upstream page pointed out in copyright.
      + Symlink /usr/share/doc/ files to identical versions in any depending
        package which is built by the source package (except copyright, to
        adhere to Debian Policy). This can be disabled by setting
        $CDBS_NO_DOC_SYMLINKING.
      + Symlink identical Gnome help files (like untranslated images). This
        can be disabled by setting $CDBS_NO_GNOME_HELP_SYMLINKING. Add fdupes
        dependency for this.

(rewritten to not use fdupes, but native shell or perl)

Once we have that, our remaining cdbs specialties are

    - 1/class/gnome.mk.in: Call dh_translations.
    - 1/rules/debhelper.mk.in: Call dh_scour. debian/control.in: Add scour
      build and binary dependency (build dep for test suite).

Changed in pkgbinarymangler (Ubuntu Natty):
status: New → Won't Fix
Changed in pkgbinarymangler (Ubuntu Oneiric):
importance: Undecided → Medium
status: New → Triaged
Martin Pitt (pitti) wrote :

Actually, pkgbinarymangler already takes care of removing the upstream changelogs, so this cdbs delta is already obsolete. I reverted this delta in lp:ubuntu/cdbs now.

Martin Pitt (pitti) on 2011-05-05
Changed in pkgbinarymangler (Ubuntu Oneiric):
status: Triaged → In Progress
assignee: nobody → Martin Pitt (pitti)
Changed in cdbs (Ubuntu Natty):
status: New → Invalid
Changed in cdbs (Ubuntu Oneiric):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: New → In Progress
Martin Pitt (pitti) wrote :

pkgbinarymangler bzr head now provides GNOME help and identical doc symlinking, so we can throw this out of cdbs and it will apply to non-cdbs packages as well.

Changed in pkgbinarymangler (Ubuntu Oneiric):
status: In Progress → Fix Committed
Martin Pitt (pitti) on 2011-05-06
Changed in cdbs (Ubuntu Oneiric):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 96

---------------
pkgbinarymangler (96) oneiric; urgency=low

  * pkgstripfiles: Symlink identical documentation to depending packages. This
    was ported from cdbs' debhelper.mk, but makes more sense here because more
    packages use dh7 these days, we want to reduce the cdbs delta to Debian,
    and we want to centralize all our Ubuntu specific package mangling to one
    place to reduce confusion. This can be suppressed by setting
    $NO_DOC_PKG_MANGLE, or $CDBS_NO_DOC_SYMLINKING for backwards
    compatibility. (First part of LP #595008)
  * pkgstriptranslations: Symlink identical GNOME help files (which often
    happens for images which are just copied verbatim from C, but are not
    actually translated). In the new test case for this also check that the
    static translation tarball is correct. This provides another Ubuntu
    specific general packaging change which previously was done in cdbs'
    debhelper.mk. (LP: #595008)
  * pkgstripfiles: Break down into separate functions, to make the code easier
    to read and maintain.
  * test/run: Simplify code with recently introduced sed_control() helper
    method.
  * test/run: Replace obsolete assert_() and failIf() calls with assertTrue()
    and assertFalse().
  * test/run, test/pickle_argv: Port to Python 3. Change build dependency from
    python to python3.
 -- Martin Pitt <email address hidden> Fri, 06 May 2011 09:59:01 +0200

Changed in pkgbinarymangler (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Martin Pitt (pitti) on 2011-05-06
Changed in gnome-pkg-tools (Ubuntu Oneiric):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-pkg-tools - 0.18.0ubuntu2

---------------
gnome-pkg-tools (0.18.0ubuntu2) oneiric; urgency=low

  * dh/gnome.pm: Run dh_translations and dh_scour, to match behaviour of our cdbs
    gnome.mk. Add dh-translations and python-scour dependencies for this, and
    also depend on python-rsvg and python-cairo so that dh_scour can do the
    correctness test. (LP: #595008)
 -- Martin Pitt <email address hidden> Fri, 06 May 2011 10:26:24 +0200

Changed in gnome-pkg-tools (Ubuntu Oneiric):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cdbs - 0.4.93ubuntu2

---------------
cdbs (0.4.93ubuntu2) oneiric; urgency=low

  * debian/control{,.in}: Remove Vcs-Bzr, we move to lp:ubuntu/cdbs now that
    the UDD branch is working again.
  * 1/rules/debhelper.mk.in: Revert our delta to not install upstream
    changelogs by default. pkgbinarymangler already takes care of weeding them
    out.
  * 1/rules/debhelper.mk.in: Revert our delta to symlink identical GNOME help
    files and files in /usr/share/doc/. pkgbinarymangler 96 does that now.
    (LP: #595008)
  * Drop 1/rules/clean-la.mk.in. It's already shipped by and used from
    gnome-pkg-tools.
 -- Martin Pitt <email address hidden> Fri, 06 May 2011 09:43:03 +0200

Changed in cdbs (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Colin Watson (cjwatson) wrote :

I've had to drop the python-rsvg and python-cairo dependencies from gnome-pkg-tools, sorry. They are currently rendering atk1.0 unbuildable on armel, which blocks the entire desktop stack from being installable there, and there is a wider problem along the same lines:

gnome-pkg-tools (0.18.0ubuntu3) oneiric; urgency=low

  * Drop the python-rsvg and python-cairo dependencies for now. This
    creates a build-dependency loop that e.g. renders atk1.0 unbuildable if
    it is uploaded and not built by all architectures in the same publisher
    cycle.

 -- Colin Watson <email address hidden> Fri, 06 May 2011 23:49:49 +0100

Can you figure out some other way to achieve this goal that doesn't create this problematic loop?

Colin Watson (cjwatson) wrote :

(Note that this only affects checking scoured SVG files for correctness, not actually achieving the size reduction.)

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

Other bug subscribers

Remote bug watches

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