control: tags -1 + moreinfo On Tue, Aug 4, 2015 at 5:12 AM, Marco d'Itri <[email protected]> wrote: > --- > checks/usrmerge.desc | 17 ++++++++++++++++ > checks/usrmerge.pm | 47 > ++++++++++++++++++++++++++++++++++++++++++++ > profiles/debian/main.profile | 2 +- > 3 files changed, 65 insertions(+), 1 deletion(-) > create mode 100644 checks/usrmerge.desc > create mode 100644 checks/usrmerge.pm > > diff --git a/checks/usrmerge.desc b/checks/usrmerge.desc > new file mode 100644 > index 0000000..33ae8d4 > --- /dev/null > +++ b/checks/usrmerge.desc > @@ -0,0 +1,17 @@ > +Check-Script: usrmerge > +Author: Marco d'Itri <[email protected]> > +Abbrev: usr > +Type: binary > +Needs-Info: unpacked > +Info: This script checks for files with the same name installed in / and > /usr. > + > +Tag: file-in-root-and-usr > +Severity: important > +Certainty: certain > +Info: The package ships the two (or more) files with the same name > + installed both in /{bin,sbin,lib*}/ and /usr/{bin,sbin,lib*}/. > + This is incompatible with the everything-in-usr directories scheme. > + . > + Packages which need to do this must create in postinst one of the files > + to be a symbolic link to the other one. > +Ref: > http://anonscm.debian.org/cgit/users/md/usrmerge.git/plain/debian/README.Debian
And this link should removed a deinstall time and you do not give example for migration and check for dpkg-divert ... So your description is not complete... Could you give exact script snippet to use ? Better could you in parallel create a dpkg-maintscript-helper in order to avoid common error ? The dpkg-maintscript-helper is not needed for merging this patch but giving exact snippet to use yes. This could be put in a debian wiki page, in order to give updatable best pratice and pitfalls but should be documented in Ref: Moreover for library why do we need to create the symlink ? I think one library shadow another and is still a bug. In this case you should duplicate the tag and create a new tag for library. > diff --git a/checks/usrmerge.pm b/checks/usrmerge.pm > new file mode 100644 > index 0000000..e222c9a > --- /dev/null > +++ b/checks/usrmerge.pm > @@ -0,0 +1,47 @@ > +# usrmerge -- lintian check script -*- perl -*- > + > +# Copyright (C) 2014 Marco d'Itri > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, you can find it on the World Wide > +# Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free > +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, > +# MA 02110-1301, USA. > + > +package Lintian::usrmerge; > +use strict; > +use warnings; > +use autodie; > + > +use Lintian::Tags qw(tag); > + > +sub run { > + my (undef, undef, $info) = @_; > + > + foreach my $file1 ($info->sorted_index) { > + next unless $file1 =~ m,^(?:s?bin|lib(?:|x?32|64))/,; > + my $file2 = $info->index("usr/$file1") or next; > + > + tag 'file-in-root-and-usr', $file1, $file2; > + } > + > + return; > +} You do not check if md5sum of both file are equal. If the file are different I think it deserve another tags.... Bastien > +1; > + > +# Local Variables: > +# indent-tabs-mode: nil > +# cperl-indent-level: 4 > +# End: > +# vim: syntax=perl sw=4 sts=4 sr et > diff --git a/profiles/debian/main.profile b/profiles/debian/main.profile > index 7c27ff3..f9bd6fb 100644 > --- a/profiles/debian/main.profile > +++ b/profiles/debian/main.profile > @@ -7,7 +7,7 @@ Enable-Tags-From-Check: apache2, automake, binaries, > changelog-file, changes-fil > duplicate-files, fields, filename-length, files, group-checks, > huge-usr-share, > infofiles, init.d, java, lintian, manpages, md5sums, menu-format, menus, > nmu, > ocaml, patch-systems, phppear, po-debconf, rules, scripts, shared-libs, > - source-copyright, standards-version, symlinks, systemd, testsuite, > + source-copyright, standards-version, symlinks, systemd, testsuite, usrmerge, > version-substvars, watch-file > Disable-Tags: hardening-no-stackprotector > > -- > 2.5.0 > -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

