--- migrationtools-47.orig/debian/copyright_hints +++ migrationtools-47/debian/copyright_hints @@ -0,0 +1,106 @@ +Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=REVISION +Name: Untrusted draft - double-check copyrights yourself! + +Files: migrate_aliases.pl + migrate_all_netinfo_offline.sh + migrate_all_netinfo_online.sh + migrate_all_nis_offline.sh + migrate_all_nis_online.sh + migrate_all_nisplus_offline.sh + migrate_all_nisplus_online.sh + migrate_all_offline.sh + migrate_all_online.sh + migrate_automount.pl + migrate_base.pl + migrate_common.ph + migrate_fstab.pl + migrate_group.pl + migrate_hosts.pl + migrate_netgroup.pl + migrate_netgroup_byhost.pl + migrate_netgroup_byuser.pl + migrate_networks.pl + migrate_passwd.pl + migrate_protocols.pl + migrate_rpc.pl + migrate_services.pl +Copyright: 1997-2003, Luke Howard +License: BSD (4 clause) + +Files: Make.rules + debian/README.Debian + debian/README.cdbs-tweaks + debian/README.source + debian/TODO + debian/compat + debian/control + debian/control.in + debian/gbp.conf + debian/links + debian/migrationtools.install + debian/patches/1001_utf8_support.patch + debian/patches/1002_uid-gid-limit_support.patch + debian/patches/1003_no_default_mail_host.patch + debian/patches/1004_use_krb5-kdc_scheme.patch + debian/patches/1005_use_mktemp.patch + debian/patches/1006_allow_override_slapadd.patch + debian/patches/1007_distinguish_identically_named_services.patch + debian/patches/2002_admin_instead_of_manager.patch + debian/patches/README + debian/patches/series + debian/watch +Copyright: *No copyright* +License: UNKNOWN + +Files: ads/migrate_base.pl + ads/migrate_common.ph + ads/migrate_group_ads.pl +Copyright: 1997, Luke Howard +License: BSD (4 clause) + +Files: ads/migrate_all_nis_online_ads.sh + ads/migrate_all_online_ads.sh + ads/migrate_passwd_ads.pl +Copyright: 1997-2006, Luke Howard +License: BSD (4 clause) + +Files: migrate_slapd_conf.pl +Copyright: 2001-2003, Luke Howard +License: BSD (4 clause) (GENERATED FILE) + +Files: migrate_profile.pl +Copyright: 2001-2003, Luke Howard +License: BSD (4 clause) + +Files: debian/cdbs/1/rules/buildinfo.mk +Copyright: 2004-2007, Jonas Smedegaard +License: GPL + +Files: debian/cdbs/1/rules/upstream-tarball.mk +Copyright: 2007-2008, Jonas Smedegaard +License: GPL + +Files: debian/cdbs/1/rules/package-relations.mk +Copyright: 2008, Jonas Smedegaard +License: GPL + +Files: debian/cdbs/1/rules/copyright-check.mk +Copyright: \s*(\S.*?)\s*\ +License: GPL + +Files: CVSVersionInfo.txt +Copyright: *No copyright* +License: UNKNOWN (GENERATED FILE) + +Files: README +Copyright: 1996-2001, Luke Howard. All rights reserved +License: UNKNOWN + +Files: debian/rules +Copyright: 2004-2008, Jonas Smedegaard +License: UNKNOWN + +Files: MigrationTools.spec +Copyright: BSD +License: UNKNOWN + --- migrationtools-47.orig/debian/preinst +++ migrationtools-47/debian/preinst @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$1" = "upgrade" ]; then + if dpkg --compare-versions "$2" lt 47-8ubuntu2 ; then + # migrate_common.ph was a stale link, should be removed to + # ensure it's replaced on upgrade + if [ -L /etc/migrationtools/migrate_common.ph ]; then + rm -f /etc/migrationtools/migrate_common.ph + fi + fi +fi --- migrationtools-47.orig/debian/changelog +++ migrationtools-47/debian/changelog @@ -0,0 +1,370 @@ +migrationtools (47-8ubuntu2) maverick; urgency=low + + * Install migrate_common.ph in /etc (like in Debian) and link + /usr/share/perl5/migrate_common.ph to it so that changes made to + that file are not lost on upgrades (LP: #610103) + * Remove dead link before upgrade to ensure its replacement + + -- Thierry Carrez (ttx) Thu, 12 Aug 2010 16:42:15 +0200 + +migrationtools (47-8ubuntu1) lucid; urgency=low + + * Merge from debian testing, remaining changes: + - Install migrate_common.ph into the right spot. (LP: #196749) + - Update maintainer according to spec. + + -- Chuck Short Thu, 12 Nov 2009 15:23:23 +0000 + +migrationtools (47-8) unstable; urgency=low + + * Simple rebuild using correct pristine upstream tarball. + + -- Jonas Smedegaard Sun, 01 Nov 2009 14:29:25 +0100 + +migrationtools (47-7) unstable; urgency=low + + * Add README.source. + * Update local CDBS snippets: + + Minor updates to buildinfo.mk + + Major rewrite of copyright-check.mk + + Add and use new snippet package-relations.mk (replacing custom + cleanup in debian/rules). + + Drop auto-update.mk (replaced by DEB_MAINTAINER_MODE flag) + + Implement fail-source-not-repackaged rule in upstream-tarball.mk. + * Add DEB_MAINTAINER_MODE in debian/rules (thanks to Romain Beauxis). + * Add git-buildpackage configfile, enabling signed tags and use of + pristine-tar. + * Extend patch 1007 to first add protocol suffix and only add port + suffix if needed too. Closes: bug#541296, thanks to Peter Marschall. + * Fix tighten build-dependency on debhelper. + * Depend on ${misc:Depends} (thanks to lintian). + + -- Jonas Smedegaard Sun, 01 Nov 2009 13:43:54 +0100 + +migrationtools (47-6ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - Install migrate_common.ph into the right sport. (LP: #196749) + - Update maintainer according to spec. + + -- Chuck Short Mon, 30 Jun 2008 02:01:05 +0100 + +migrationtools (47-6) unstable; urgency=medium + + * Dummy rerelease, using proper tarball (lost in switch to Git). + * Keep urgency=medium from release 47.4. + + -- Jonas Smedegaard Sun, 29 jun 2008 14:41:10 +0200 + +migrationtools (47-5) unstable; urgency=medium + + * Add note about access to shadow passwords to README.Debian. This + closes: bug#375007, thanks to James Westby. + * Keep urgency=medium... + + -- Jonas Smedegaard Sun, 29 jun 2008 13:48:10 +0200 + +migrationtools (47-4) unstable; urgency=medium + + * Packaging moved to collab-maint Git at Alioth. Add VCS-* hints to + debian/control. + * Only apply access rights to files (not the symlink). Closes: + bug#464294, thanks to Lucas Nussbaum. + * Move Homepage to own field (from pseudo-field in long description) + in debian/control. + * Update local cdbs snippets: + + Update copyright-check.mk to parse licensecheck output using perl: + + No longer randomly drops newlines + + More compact hint file (and ordered more like wiki-proposed new + copyright syntax). + + No longer ignore files without copyright. + + Relax to only warn about its discoveries. This is a potential + FTBFS (see bug#487065). + + Drop wget options broken with recent versions of wget in + update-tarball.mk. + + Cosmetic updates to README.cdbs-tweaks. + + Cleanup duplicate build-dependencies in debian/rules. + * Update debian/copyright-hints. + * Bump debhelper compatibility level to 6. + * Semi-auto-update debian/control to update build-dependencies: + DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean + * Set urgency=medium due to multiple FTBFS bugfixes. + + -- Jonas Smedegaard Sun, 29 jun 2008 13:41:12 +0200 + +migrationtools (47-3ubuntu2) hardy; urgency=low + + * Install migrate_common.ph into the right spot. (LP: #196749) + * Update maintainer. + + -- Chuck Short Fri, 29 Feb 2008 11:29:30 -0500 + +migrationtools (47-3ubuntu1) hardy; urgency=low + + * Fix FTBFS. + * Added warning about /etc/shadow in README.Debian. + + -- Chuck Short Tue, 12 Feb 2008 14:32:00 -0500 + +migrationtools (47-3) unstable; urgency=low + + * Rewrite utf8 patch: + + Actually works again now + + ASCII-encodes most Latin1 characters. + + Properly handles mixture of ISO8859-1 and UTF8 user data. + * Add patch 1007 to distinguish different but identically named + services across protocols (e.g. tcp/udp echo vs. ddp echo). This + closes: bug#307618, reported by gary ng, fix written by me. + * Add some new ideas to TODO. + * Update cdbs tweaks: + + Improved report when copyrights change. + + New snippet upstream-tarball.mk, with get-orig-source target and + more. + + Update README.cdbs-tweaks. + + -- Jonas Smedegaard Sat, 07 Apr 2007 00:11:56 +0200 + +migrationtools (47-2) unstable; urgency=low + + * Improve utf8 patch to only base64-encode non-ASCII strings. + * Add TODO with a few ideas for further improvements. + + -- Jonas Smedegaard Thu, 18 Jan 2007 22:49:10 +0100 + +migrationtools (47-1) unstable; urgency=low + + * Mew upstream release. + + Add password age info only when non-empty. + * Acknowledge NMU. + * Improve tempfile patch: + + Also use mktemp for temporary ldif files. + + Exit if mktemp fails (not only on empty output). + + Drop no longer needed process number for filenames in tempdir. + + Remove tempdir after succesful use. + + Use same indentation as upstream. + + Save as patch file in source package. + * Reorganize patches: + + Switch to using quilt. + + Renumber patches, and add README to source package documenting it. + + Separate UTF8 and uid/gid patches, and merge with their config + settings. + * Add patch 1006 to allow overriding slapadd in migrate_all_offline. + * Add/update local cdbs tweaks, and add README.cdbs-tweaks to source + package, documenting their purpose. + * Bump up standards-version to 3.7.2 (no changes needed). + * Change website line in long description to proper " Homepage" hint. + * Use build-depends (not build-depends-indep, that was a mistake). + * Semi-auto-update debian/control, bumping up debhelper dependency. + + -- Jonas Smedegaard Wed, 10 Jan 2007 22:09:50 +0100 + +migrationtools (46-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix insecure tempfile creation (closes: #338920) + + -- Stephen Gran Sun, 29 Jan 2006 15:15:25 +0000 + +migrationtools (46-2) unstable; urgency=low + + * Patch to use krb5Principal and krb5PrincipalName from krb5-kdc + scheme (not unknown kerberosSecurityObject and krbName). + * Rewrite patches more compact (saves space and patching time a bit). + * Standards-Version: 3.6.2 (no changes needed). + * Watch file version 3 (no changes). + * Use cdbs debian/control auto-build, but only when environment + includes DEB_BUILD_OPTIONS=update. + * Auto-update build-dependencies (and manually rip out build-essential + buggily sneaking in). + * Drop fallback dependency on umich-ldap-utils (no longer relevant). + + -- Jonas Smedegaard Sun, 16 Oct 2005 00:25:27 +0200 + +migrationtools (46-1) unstable; urgency=high + + * New upstream release: + + Define objectClass: inetLocalMailRecipient (not mailRecipient). + + Preserve prepared LDIF on failure applying it. + + Declare "objectClass: account" only if not using $EXTENDED_SCHEMA. + * Use generic (but unofficial) buildinfo cdbs snippet. + * Set urgency=high to hopefully get this into sarge in time (the + changes are small but valuable). + * Tighten debhelper build-dependency to please linda. + + -- Jonas Smedegaard Wed, 3 Nov 2004 22:33:37 +0100 + +migrationtools (45-2) unstable; urgency=low + + * Correct uid gid confusion in hack. Closes: Bug#261063 (thanks to + Vaclav Smilauer ). + * Enable 8bit tweak by default: 8bit characters are interpreted as + ISO8859-1 and encoded as Base64 (except gecos field where they + instead are replaced with similar 7bit characters: The LDAP schema + seems to be more restrictive than Debian shadow tools). The other + tweak - exclusion of Debian system users and groups - is still + disabled by default (the scripts attempts to migrate loads of system + stuff by default anyway). + * Recode this changelog as UTF8. + * Improve watch file: + + Add hint on usage + + Use web URL (instead of ftp) + + Tweak regex slightly + * Repackage using cdbs. + * Use dh-buildinfo. + * Cleaned up debian/copyright: + + Use web URL as origin + + Replace info contained in changelog with note on "GNU systems". + + Declare each topic more strictly. + + Mention "licensing info" together with copyright. + * Improved long descriptions: + + Website URL added + + -- Jonas Smedegaard Fri, 23 Jul 2004 16:09:07 +0200 + +migrationtools (45-1) unstable; urgency=low + + * New upstream release. + * Standards-Version: 3.6.1 (no changes needed). + * Really behave as upstream by default (UTF8 was accidentally enabled + by default), and correct documentation of added options in + README.Debian. + * Add watch file. + + -- Jonas Smedegaard Mon, 20 Oct 2003 00:53:40 +0200 + +migrationtools (44-6) unstable; urgency=low + + * Fix double cn entry (thanks to Wladimir Mutel + ). + + -- Jonas Smedegaard Sat, 21 Sep 2002 18:54:15 +0200 + +migrationtools (44-5) unstable; urgency=low + + * Minor fixes against v 44-2 for grammar and not assuming `.' is in + PATH, thanks to Dave Love (closes: #161082). + * Use binary-indep build target, not binary-arch. + + -- Jonas Smedegaard Tue, 17 Sep 2002 15:44:16 +0200 + +migrationtools (44-4) unstable; urgency=low + + * Really correct the utf8 calls, thanks to Wladimir Mutel + . + + -- Jonas Smedegaard Wed, 11 Sep 2002 20:23:20 +0200 + +migrationtools (44-3) unstable; urgency=low + + * Really correct calls to utf8 subroutine, thanks to Wladimir Mutel + . + + -- Jonas Smedegaard Tue, 10 Sep 2002 11:08:42 +0200 + +migrationtools (44-2) unstable; urgency=low + + * Fix typo in utf8 hack. Thanks to Louis-David Mitterrand + for spotting it (Closes: #159317). + * Add a comment about how to migrate on top of a default slapd install + (closes: #159318). + + -- Jonas Smedegaard Mon, 2 Sep 2002 20:03:12 +0200 + +migrationtools (44-1) unstable; urgency=low + + * New upstream release. + + -- Jonas Smedegaard Mon, 19 Aug 2002 22:44:57 +0200 + +migrationtools (42-1) unstable; urgency=low + + * Newer upstream version. + + -- Jonas Smedegaard Wed, 3 Jul 2002 22:45:51 +0200 + +migrationtools (40-3) unstable; urgency=low + + * Correctly use gid instead of uid in migrate_group.pl. Thanks to + Raimund Sacherer for spotting the error. + + -- Jonas Smedegaard Tue, 21 May 2002 07:13:58 +0200 + +migrationtools (40-2) unstable; urgency=low + + * Suggest slapd instead of similar older packages. Closes: Bug#142865. + + -- Jonas Smedegaard Fri, 17 May 2002 01:29:46 +0200 + +migrationtools (40-1) unstable; urgency=low + + * Release officially. Closes Bug#80993. + + -- Jonas Smedegaard Wed, 10 Apr 2002 04:50:29 +0200 + +migrationtools (40-0.0.jones7) unstable; urgency=low + + * Remove emacs noise in this Changelog file. + * Add full license in copyright. + + -- Jonas Smedegaard Fri, 29 Mar 2002 01:41:40 +0100 + +migrationtools (40-0.0.jones6) unstable; urgency=low + + * Don't ignore system users and groups per default (this is still + primarily a tool to migrate NIS to LDAP). + * Fix UTF8 regexp. + * UTF8-encode surname (sn). + + -- Jonas Smedegaard Thu, 28 Mar 2002 22:00:39 +0100 + +migrationtools (40-0.0.jones5) unstable; urgency=low + + * Correctly 7bit-ify "Ã¥" (å) into "aa", not "ae". + * Disable sendmail support per default (no support in any known + schemas for "mailRecipient" objectclass). + * Hack migrate_passwd.pl to handle UTF8 (except gecos for some unknown + reason). + + -- Jonas Smedegaard Thu, 28 Mar 2002 18:53:49 +0100 + +migrationtools (40-0.0.jones4) unstable; urgency=low + + * Let's try againg: Add option IGNORE_SYSTEM_ACCOUNTS. + * Document IGNORE_SYSTEM_ACCOUNTS in README.Debian. + * Bumb up Standards-version (no changes necessary). + * Add build-depends. + * Cleanup debian/rules. + + -- Jonas Smedegaard Tue, 26 Mar 2002 13:22:18 +0100 + +migrationtools (40-0.0.jones3) unstable; urgency=low + + * Default manager is admin. + * Add option. + + -- Jonas Smedegaard Sun, 17 Mar 2002 01:46:49 +0100 + +migrationtools (40-0.0.jones2) unstable; urgency=low + + * Change architecture any -> all (how embarrasing). + + -- Jonas Smedegaard Fri, 15 Mar 2002 23:48:51 +0100 + +migrationtools (40-0.0.jones1) unstable; urgency=low + + * Unofficial release of newer upstream source. + + -- Jonas Smedegaard Fri, 15 Mar 2002 20:04:32 +0100 + +migrationtools (37-0.0.jones1) unstable; urgency=low + + * Unofficial release of newer upstream source. + + -- Jonas Smedegaard Fri, 16 Mar 2001 16:20:16 +0100 + +migrationtools (24-0.1) unstable; urgency=low + + * Initial unofficial release. + + -- Jonas Smedegaard Fri, 16 Mar 2001 16:17:03 +0100 + --- migrationtools-47.orig/debian/README.Debian +++ migrationtools-47/debian/README.Debian @@ -0,0 +1,34 @@ +migrationtools for Debian +------------------------- + +Edit /etc/migrationtools/migrate_common.ph, move to /usr/share/migrationtools +and run one of the scripts there (the scripts require you to be in the same +folder). + +The scripts have been hacked for Debian to include the following extra options: + + IGNORE_UID_BELOW + IGNORE_GID_BELOW + IGNORE_UID_ABOVE + IGNORE_GID_ABOVE + Avoid accounts with uid<1000 or gid<100 + Avoid groups with gid<100 + + USE_UTF8 + Encode using UTF8 instead of 7bit ascii with transformation of some + common iso8859-1 letters. + +Per default the UTF8 tweak is enabled but the uid/gid is not. + +Debian slapd creates a ou=People object which migrate_all_online.sh then +fails to overwrite. If you want to ignore the error, run the script like this: + LDAPADD="/usr/bin/ldapadd -c" ./migrate_all_online.sh + +If you use shadow passwords then ensure that the user executing the script +is able to read from /etc/shadow or the passwords entered in to the ldap server +will not reflect those from the original system. Note that with recent versions +of sudo by default most environment variables will not be passed to the +command run as root, so if you would like to use the env var features of these +scripts find another method (eg using an actual root shell). + + -- Jonas Smedegaard , Sun, 29 Jun 2008 13:47:48 +0200 --- migrationtools-47.orig/debian/README.source +++ migrationtools-47/debian/README.source @@ -0,0 +1,52 @@ +Building this package for Debian +-------------------------------- + +This source package uses quilt to apply and remove its patches. Please +refer to /usr/share/doc/quilt/README.source for information about how to +use quilt for source packages. + + +Developing this package for Debian +---------------------------------- + +The source of this package is developed using git and the helper tool +git-buildpackage, with all official releases tagged and signed and +binary diffs of tarballs stored using pristine-tar. This is documented +below /usr/share/doc/git-buildpackage/manual-html/ . + +A custom build target shows current upstream and packaging versions: + + debian/rules print-version + +Current upstream tarball can be prepared using this other build target: + + debian/rules get-orig-source + +To switch to newer upstream source, first add a dummy changelog entry +and comment out DEB_UPSTREAM_TARBALL_MD5 before getting the source: + + dch -v ${new_upstream_version}-1 "Dummy changelog entry" + sed -i -e 's/^\(DEB_UPSTREAM_TARBALL_MD5\b\)/#\1/' debian/rules + debian/rules get-orig-source + +Store new md5sum to help ensure identical source is received later. + +Setting DEB_MAINTAINER_MODE=1 enables additional build routines helpful +during development of the package, but unfit for normal builds. This +typically includes the CDBS feature of auto-updating debian/control with +CDBS-related build-dependencies, which is forbidden by Debian Policy as +build environment must not change during automated builds. + + +Maintaining packaging build routines +------------------------------------ + +This source package wraps debhelper commands and other tedious parts of +the build routines using the CDBS framework. Please refer to the actual +makefile snippets included from debian/rules for details on their +purpose and ways to override defaults. Additionally, makefile snippets +included from below /usr/share/cdbs may also be documented in +/usr/share/doc/cdbs/cdbs-doc.pdf.gz . + + + -- Jonas Smedegaard Thu, 26 Feb 2009 21:28:29 +0100 --- migrationtools-47.orig/debian/migrationtools.install +++ migrationtools-47/debian/migrationtools.install @@ -0,0 +1,3 @@ +migrate_*.ph etc/migrationtools/ +migrate_*.pl usr/share/migrationtools/ +migrate_*.sh usr/share/migrationtools/ --- migrationtools-47.orig/debian/control.in +++ migrationtools-47/debian/control.in @@ -0,0 +1,18 @@ +Source: migrationtools +Section: net +Priority: optional +Maintainer: Jonas Smedegaard +Build-Depends: @cdbs@ +Standards-Version: 3.8.3 +Vcs-Git: git://git.debian.org/git/collab-maint/migrationtools.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/migrationtools.git;a=summary +Homepage: http://www.padl.com/OSS/MigrationTools.html + +Package: migrationtools +Architecture: all +Depends: openldap-utils, ${perl:Depends}, ${misc:Depends} +Suggests: slapd +Description: Migration scripts for LDAP + The MigrationTools are a set of Perl scripts for migrating users, groups, + aliases, hosts, netgroups, networks, protocols, RPCs, and services from + existing nameservices (flat files, NIS, and NetInfo) to LDAP. --- migrationtools-47.orig/debian/rules +++ migrationtools-47/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2009 Jonas Smedegaard +# Description: Main Debian packaging script for migrationtools +# +# 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, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +ifneq (,$(DEB_MAINTAINER_MODE)) + # Enable stuff not policy compliant (eg. unsuitable for build daemons) + DEB_COPYRIGHT_CHECK_STRICT = yes + DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes +endif +include debian/cdbs/1/rules/upstream-tarball.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk +include debian/cdbs/1/rules/copyright-check.mk +include debian/cdbs/1/rules/buildinfo.mk + +DEB_UPSTREAM_URL = ftp://ftp.padl.com/pub +DEB_UPSTREAM_PACKAGE = MigrationTools + +DEB_UPSTREAM_TARBALL_FETCH_OPTIONS += --no-passive-ftp + +DEB_UPSTREAM_TARBALL_MD5 = 3faf83eb8482e55979bda47f1d1e6501 + +# Make sure all scripts are executable +common-binary-post-install-indep:: + find debian/migrationtools/usr/share/migrationtools -type f -exec chmod 755 '{}' ';' + +# Resolve, cleanup and apply CDBS-declared dependencies +include debian/cdbs/1/rules/package-relations.mk --- migrationtools-47.orig/debian/watch +++ migrationtools-47/debian/watch @@ -0,0 +1,3 @@ +# Run the "uscan" command to check for upstream updates and more. +version=3 +http://www.padl.com/download/MigrationTools-(.*)\.tar\.gz debian uupdate --- migrationtools-47.orig/debian/copyright +++ migrationtools-47/debian/copyright @@ -0,0 +1,36 @@ +This is MigrationTools packaged for Debian GNU systems. + +Upstream source: ftp://ftp.padl.com/pub/ + +Upstream Authors: Luke Howard + +Copyright and licensing info: + +# Copyright (c) 1997 Luke Howard. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by Luke Howard. +# 4. The name of the other may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE LUKE HOWARD ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL LUKE HOWARD BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. --- migrationtools-47.orig/debian/TODO +++ migrationtools-47/debian/TODO @@ -0,0 +1,17 @@ + * Allow environment override of more variables (including the new + USE_UTF8 and IGNORE_?ID_*). + * Merge the upstream forked ads scripts, and use a flag instead. + * Support ~/.migrationtools.ph file overriding site defaults. + * Offer to strip (as alternative to recode) unsupported characters. + * Interactively ask about recoding/stripping (and only if needed). + * Use prefix {md5} for passwords starting with $1$, and {CRYPT} only + as fallback. Closes: bug#400343, thanks to Michael Burschik. + * Generate only one entry for each service (suppressing multiple ones, + eg. when both udp and tcp variants of a service is parsed). This + closes: bug#307618, thanks to gary ng. + * Use unusual object classes only optionally: + - nisMailAlias (uses non-default misc scheme) + - krb5Principal (uses unofficial and discouraged krb5-kdc scheme) + This closes bug#307616, thanks to gary ng. + * Investigate the dependency on perl: We don't use any modules, so + perhaps perl-base (which is required, so no to declare) is enough? --- migrationtools-47.orig/debian/links +++ migrationtools-47/debian/links @@ -0,0 +1 @@ +etc/migrationtools/migrate_common.ph usr/share/perl5/migrate_common.ph --- migrationtools-47.orig/debian/compat +++ migrationtools-47/debian/compat @@ -0,0 +1 @@ +6 --- migrationtools-47.orig/debian/gbp.conf +++ migrationtools-47/debian/gbp.conf @@ -0,0 +1,5 @@ +# Configuration file for git-buildpackage and friends + +[DEFAULT] +pristine-tar = True +sign-tags = True --- migrationtools-47.orig/debian/control +++ migrationtools-47/debian/control @@ -0,0 +1,19 @@ +Source: migrationtools +Section: net +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Jonas Smedegaard +Build-Depends: cdbs (>= 0.4.39), debhelper (>= 6), quilt, patchutils (>= 0.2.25), devscripts (>= 2.10.7), dh-buildinfo +Standards-Version: 3.8.3 +Vcs-Git: git://git.debian.org/git/collab-maint/migrationtools.git +Vcs-Browser: http://git.debian.org/?p=collab-maint/migrationtools.git;a=summary +Homepage: http://www.padl.com/OSS/MigrationTools.html + +Package: migrationtools +Architecture: all +Depends: openldap-utils, ${perl:Depends}, ${misc:Depends} +Suggests: slapd +Description: Migration scripts for LDAP + The MigrationTools are a set of Perl scripts for migrating users, groups, + aliases, hosts, netgroups, networks, protocols, RPCs, and services from + existing nameservices (flat files, NIS, and NetInfo) to LDAP. --- migrationtools-47.orig/debian/patches/1006_allow_override_slapadd.patch +++ migrationtools-47/debian/patches/1006_allow_override_slapadd.patch @@ -0,0 +1,27 @@ +diff -ruN migrationtools-47.orig/migrate_all_offline.sh migrationtools-47/migrate_all_offline.sh +--- migrationtools-47.orig/migrate_all_offline.sh 2007-01-10 22:50:00.000000000 +0100 ++++ migrationtools-47/migrate_all_offline.sh 2007-01-10 22:55:16.000000000 +0100 +@@ -100,15 +100,19 @@ + LDIF2LDBM="$NSHOME/bin/slapd/server/ns-slapd ldif2db -f $NSHOME/slapd-$serverID" + elif [ -x /usr/iplanet/servers/bin/slapd/server/dsimport ]; then + LDIF2LDBM="/usr/iplanet/servers/bin/slapd/server/dsimport" +- elif [ -x /usr/local/sbin/slapadd ]; then ++ fi ++fi ++if [ "X$SLAPADD" = "X" ]; then ++ if [ -x /usr/local/sbin/slapadd ]; then + SLAPADD="/usr/local/sbin/slapadd" + elif [ -x /usr/sbin/slapadd ]; then + SLAPADD="/usr/sbin/slapadd" +- else +- echo "Can't find ldif2ldbm or slapadd!" +- exit 2 + fi + fi ++if [ "X$LDIF2LDBM" = "X" ] && [ "X$SLAPADD" = "X" ]; then ++ echo "Can't find ldif2ldbm or slapadd!" ++ exit 2 ++fi + + echo "Creating naming context entries..." + $PERL migrate_base.pl > $DB --- migrationtools-47.orig/debian/patches/1007_distinguish_identically_named_services.patch +++ migrationtools-47/debian/patches/1007_distinguish_identically_named_services.patch @@ -0,0 +1,45 @@ +diff -ruN migrationtools-47.orig/migrate_services.pl migrationtools-47/migrate_services.pl +--- migrationtools-47.orig/migrate_services.pl 2006-01-25 05:18:16.000000000 +0100 ++++ migrationtools-47/migrate_services.pl 2009-10-31 17:45:00.000000000 +0100 +@@ -154,11 +154,13 @@ sub build_service_records + { + my $Rh_services = shift; + my $Rh_portmap = shift; ++ my @ports = sort {$a <=> $b} (keys %{$Rh_services}); + +- foreach $port (sort {$a <=> $b} (keys %{$Rh_services})) { ++ foreach $port (@ports) { + foreach $servicename (keys %{$Rh_services->{$port}}) { +- my @protocols = (keys %{$Rh_services->{$port}{$servicename}}); ++ my @protocols = sort(keys %{$Rh_services->{$port}{$servicename}}); + my %tmpaliases = (); ++ my @other_ports_with_same_name = grep { ($_ != $port) && defined($Rh_services->{$_}{$servicename}) } @ports; + + # Note on the suffix: + # If a service name applies to a range of +@@ -172,12 +174,24 @@ sub build_service_records + # ugly; the alternative is to change the schema or + # the format of the services file. "Irresistable + # Force, meet Immovable Object..." ++ # A similar case arises if the same name is ++ # associatied to different port/protocol combinations ++ # as e.g. with echo 4/ddgp vs. echo 7/tcp + + my $suffix = ''; ++ ++ # add suffix, if another port with same name exists ++ # This is only necessary if the ports differ in the ++ # protocols associated (but it does not hurt to not ++ # check and I do not consider it worth the effort) ++ if (@other_ports_with_same_name && @protocols) { ++ $suffix .= "+ipServiceProtocol=" . &escape_metacharacters($protocols[0]); ++ } ++ + foreach $proto (@protocols) { + # Only add suffix if it's absolutely necessary + if (scalar(keys(%{$Rh_portmap->{$servicename}{$proto}})) > 1) { +- $suffix = "+ipServicePort=" . &escape_metacharacters($port); ++ $suffix .= "+ipServicePort=" . &escape_metacharacters($port); + } + + # Normalize aliases across protocols. Yet --- migrationtools-47.orig/debian/patches/README +++ migrationtools-47/debian/patches/README @@ -0,0 +1,3 @@ +0xxx: Grabbed from upstream development. +1xxx: Possibly relevant for upstream adoption. +2xxx: Only relevant for official Debian release. --- migrationtools-47.orig/debian/patches/1003_no_default_mail_host.patch +++ migrationtools-47/debian/patches/1003_no_default_mail_host.patch @@ -0,0 +1,12 @@ +diff -ruN migrationtools-47.orig/migrate_common.ph migrationtools-47/migrate_common.ph +--- migrationtools-47.orig/migrate_common.ph 2007-01-10 22:35:26.000000000 +0100 ++++ migrationtools-47/migrate_common.ph 2007-01-10 22:45:31.000000000 +0100 +@@ -83,7 +83,7 @@ + ##### CUT HERE ##### + # where /etc/mail/ldapdomains contains names of ldap_routed + # domains (similiar to MASQUERADE_DOMAIN_FILE). +-$DEFAULT_MAIL_HOST = "mail.padl.com"; ++#$DEFAULT_MAIL_HOST = "mail.padl.com"; + + # turn this on to support more general object clases + # such as person. --- migrationtools-47.orig/debian/patches/2002_admin_instead_of_manager.patch +++ migrationtools-47/debian/patches/2002_admin_instead_of_manager.patch @@ -0,0 +1,17 @@ +diff -ruN migrationtools-47.orig/migrate_all_online.sh migrationtools-47/migrate_all_online.sh +--- migrationtools-47.orig/migrate_all_online.sh 2007-01-10 22:50:00.000000000 +0100 ++++ migrationtools-47/migrate_all_online.sh 2007-01-10 22:51:50.000000000 +0100 +@@ -132,11 +132,11 @@ + fi + + if [ "X$LDAP_BINDDN" = "X" ]; then +- question="Enter the manager DN: [cn=manager,$LDAP_BASEDN]:" ++ question="Enter the manager DN: [cn=admin,$LDAP_BASEDN]:" + echo "$question " | tr -d '\012' > /dev/tty + read LDAP_BINDDN + if [ "X$LDAP_BINDDN" = "X" ]; then +- LDAP_BINDDN="cn=manager,$LDAP_BASEDN" ++ LDAP_BINDDN="cn=admin,$LDAP_BASEDN" + fi + fi + export LDAP_BINDDN --- migrationtools-47.orig/debian/patches/1005_use_mktemp.patch +++ migrationtools-47/debian/patches/1005_use_mktemp.patch @@ -0,0 +1,322 @@ +diff -ruN migrationtools-47.orig/ads/migrate_all_nis_online_ads.sh migrationtools-47/ads/migrate_all_nis_online_ads.sh +--- migrationtools-47.orig/ads/migrate_all_nis_online_ads.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/ads/migrate_all_nis_online_ads.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -41,16 +41,19 @@ + export PATH + + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-#ETC_SERVICES="$TMPDIR/services.$$.ldap" +-#ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-#ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-#ETC_RPC="$TMPDIR/rpc.$$.ldap" +-#ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-#ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-#ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++#ETC_SERVICES="$TEMP_DIR/services.ldap" ++#ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++#ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++#ETC_RPC="$TEMP_DIR/rpc.ldap" ++#ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++#ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++#ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NIS domain to import from (optional): " +@@ -83,4 +86,4 @@ + #rm -f $ETC_HOSTS + #rm -f $ETC_NETWORKS + #rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/ads/migrate_all_online_ads.sh migrationtools-47/ads/migrate_all_online_ads.sh +--- migrationtools-47.orig/ads/migrate_all_online_ads.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/ads/migrate_all_online_ads.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -39,7 +39,10 @@ + SHELL=/bin/sh + export SHELL + +-DB=/tmp/nis.$$.ldif ++DB="$(mktemp -t nis.ldif.XXXXXXXXXX)" || { ++ echo "Can't create temporary file" >&2 ++ exit 1 ++} + + #if [ "X$ETC_ALIASES" = "X" ]; then + # ETC_ALIASES=/etc/aliases +diff -ruN migrationtools-47.orig/migrate_all_netinfo_offline.sh migrationtools-47/migrate_all_netinfo_offline.sh +--- migrationtools-47.orig/migrate_all_netinfo_offline.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_netinfo_offline.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -39,16 +39,19 @@ + PATH=$PATH:. + export PATH + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-ETC_SERVICES="$TMPDIR/services.$$.ldap" +-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-ETC_RPC="$TMPDIR/rpc.$$.ldap" +-ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++ETC_SERVICES="$TEMP_DIR/services.ldap" ++ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++ETC_RPC="$TEMP_DIR/rpc.ldap" ++ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NetInfo domain to import from [/]:" +@@ -79,4 +82,4 @@ + rm -f $ETC_HOSTS + rm -f $ETC_NETWORKS + rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/migrate_all_netinfo_online.sh migrationtools-47/migrate_all_netinfo_online.sh +--- migrationtools-47.orig/migrate_all_netinfo_online.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_netinfo_online.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -39,16 +39,19 @@ + PATH=$PATH:. + export PATH + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-ETC_SERVICES="$TMPDIR/services.$$.ldap" +-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-ETC_RPC="$TMPDIR/rpc.$$.ldap" +-ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++ETC_SERVICES="$TEMP_DIR/services.ldap" ++ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++ETC_RPC="$TEMP_DIR/rpc.ldap" ++ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NetInfo domain to import from [/]:" +@@ -79,4 +82,4 @@ + rm -f $ETC_HOSTS + rm -f $ETC_NETWORKS + rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/migrate_all_nis_offline.sh migrationtools-47/migrate_all_nis_offline.sh +--- migrationtools-47.orig/migrate_all_nis_offline.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_nis_offline.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -39,16 +39,19 @@ + PATH=$PATH:. + export PATH + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-ETC_SERVICES="$TMPDIR/services.$$.ldap" +-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-ETC_RPC="$TMPDIR/rpc.$$.ldap" +-ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++ETC_SERVICES="$TEMP_DIR/services.ldap" ++ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++ETC_RPC="$TEMP_DIR/rpc.ldap" ++ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NIS domain to import from (optional): " +@@ -81,4 +84,4 @@ + rm -f $ETC_HOSTS + rm -f $ETC_NETWORKS + rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/migrate_all_nis_online.sh migrationtools-47/migrate_all_nis_online.sh +--- migrationtools-47.orig/migrate_all_nis_online.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_nis_online.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -40,16 +40,19 @@ + export PATH + + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-ETC_SERVICES="$TMPDIR/services.$$.ldap" +-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-ETC_RPC="$TMPDIR/rpc.$$.ldap" +-ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++ETC_SERVICES="$TEMP_DIR/services.ldap" ++ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++ETC_RPC="$TEMP_DIR/rpc.ldap" ++ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NIS domain to import from (optional): " +@@ -82,4 +85,4 @@ + rm -f $ETC_HOSTS + rm -f $ETC_NETWORKS + rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/migrate_all_nisplus_offline.sh migrationtools-47/migrate_all_nisplus_offline.sh +--- migrationtools-47.orig/migrate_all_nisplus_offline.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_nisplus_offline.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -39,17 +39,20 @@ + PATH=$PATH:/usr/lib/nis:. + export PATH + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-ETC_SERVICES="$TMPDIR/services.$$.ldap" +-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-ETC_RPC="$TMPDIR/rpc.$$.ldap" +-ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-ETC_NETGROUP="$TMPDIR/netgroup.$$.ldap" +-ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++ETC_SERVICES="$TEMP_DIR/services.ldap" ++ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++ETC_RPC="$TEMP_DIR/rpc.ldap" ++ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++ETC_NETGROUP="$TEMP_DIR/netgroup.ldap" ++ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NIS+ domain to import from (optional): " +@@ -84,4 +87,4 @@ + rm -f $ETC_NETWORKS + rm -f $ETC_NETGROUP + rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/migrate_all_nisplus_online.sh migrationtools-47/migrate_all_nisplus_online.sh +--- migrationtools-47.orig/migrate_all_nisplus_online.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_nisplus_online.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -40,17 +40,20 @@ + export PATH + + +-TMPDIR="/tmp" +-ETC_PASSWD="$TMPDIR/passwd.$$.ldap" +-ETC_GROUP="$TMPDIR/group.$$.ldap" +-ETC_SERVICES="$TMPDIR/services.$$.ldap" +-ETC_PROTOCOLS="$TMPDIR/protocols.$$.ldap" +-ETC_FSTAB="$TMPDIR/fstab.$$.ldap" +-ETC_RPC="$TMPDIR/rpc.$$.ldap" +-ETC_HOSTS="$TMPDIR/hosts.$$.ldap" +-ETC_NETWORKS="$TMPDIR/networks.$$.ldap" +-ETC_NETGROUP="$TMPDIR/netgroup.$$.ldap" +-ETC_ALIASES="$TMPDIR/aliases.$$.ldap" ++TEMP_DIR="$(mktemp -dt)" || { ++ echo "Can't create temporary directory" >&2 ++ exit 1 ++} ++ETC_PASSWD="$TEMP_DIR/passwd.ldap" ++ETC_GROUP="$TEMP_DIR/group.ldap" ++ETC_SERVICES="$TEMP_DIR/services.ldap" ++ETC_PROTOCOLS="$TEMP_DIR/protocols.ldap" ++ETC_FSTAB="$TEMP_DIR/fstab.ldap" ++ETC_RPC="$TEMP_DIR/rpc.ldap" ++ETC_HOSTS="$TEMP_DIR/hosts.ldap" ++ETC_NETWORKS="$TEMP_DIR/networks.ldap" ++ETC_NETGROUP="$TEMP_DIR/netgroup.ldap" ++ETC_ALIASES="$TEMP_DIR/aliases.ldap" + EXIT=no + + question="Enter the NIS+ domain to import from (optional): " +@@ -85,4 +88,4 @@ + rm -f $ETC_NETWORKS + rm -f $ETC_NETGROUP + rm -f $ETC_ALIASES +- ++rm -d $TEMP_DIR +diff -ruN migrationtools-47.orig/migrate_all_offline.sh migrationtools-47/migrate_all_offline.sh +--- migrationtools-47.orig/migrate_all_offline.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_offline.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -41,7 +41,10 @@ + # Luke Howard April 1997 + # + +-DB="/tmp/nis.$$.ldif" ++DB="$(mktemp -t nis.ldif.XXXXXXXXXX)" || { ++ echo "Can't create temporary file" >&2 ++ exit 1 ++} + + if [ "X$ETC_ALIASES" = "X" ]; then + ETC_ALIASES=/etc/aliases +diff -ruN migrationtools-47.orig/migrate_all_online.sh migrationtools-47/migrate_all_online.sh +--- migrationtools-47.orig/migrate_all_online.sh 2007-01-10 21:49:59.000000000 +0100 ++++ migrationtools-47/migrate_all_online.sh 2007-01-10 22:50:00.000000000 +0100 +@@ -38,7 +38,10 @@ + SHELL=/bin/sh + export SHELL + +-DB=/tmp/nis.$$.ldif ++DB="$(mktemp -t nis.ldif.XXXXXXXXXX)" || { ++ echo "Can't create temporary file" >&2 ++ exit 1 ++} + + if [ "X$ETC_ALIASES" = "X" ]; then + ETC_ALIASES=/etc/aliases --- migrationtools-47.orig/debian/patches/series +++ migrationtools-47/debian/patches/series @@ -0,0 +1,8 @@ +1001_utf8_support.patch +1002_uid-gid-limit_support.patch +1003_no_default_mail_host.patch +1004_use_krb5-kdc_scheme.patch +1005_use_mktemp.patch +1006_allow_override_slapadd.patch +1007_distinguish_identically_named_services.patch +2002_admin_instead_of_manager.patch --- migrationtools-47.orig/debian/patches/1001_utf8_support.patch +++ migrationtools-47/debian/patches/1001_utf8_support.patch @@ -0,0 +1,273 @@ +diff -ruN migrationtools-47.orig/migrate_common.ph migrationtools-47/migrate_common.ph +--- migrationtools-47.orig/migrate_common.ph 2006-01-25 05:18:16.000000000 +0100 ++++ migrationtools-47/migrate_common.ph 2007-04-07 00:05:52.000000000 +0200 +@@ -89,6 +89,9 @@ + # such as person. + $EXTENDED_SCHEMA = 0; + ++# Comment this out if your ldap server does not support UTF8 encoding ++$USE_UTF8 = 1; ++ + # + # allow environment variables to override predefines + # +diff -ruN migrationtools-47.orig/migrate_passwd.pl migrationtools-47/migrate_passwd.pl +--- migrationtools-47.orig/migrate_passwd.pl 2006-01-25 05:18:16.000000000 +0100 ++++ migrationtools-47/migrate_passwd.pl 2007-04-07 00:06:13.000000000 +0200 +@@ -36,6 +36,7 @@ + # + # Thanks to Peter Jacob Slot . + # ++# UTF8 support by Jonas Smedegaard . + + require 'migrate_common.ph'; + +@@ -53,28 +54,6 @@ + next if /^#/; + next if /^\+/; + +- s/Ä/Ae/g; +- s/Ë/Ee/g; +- s/Ï/Ie/g; +- s/Ö/Oe/g; +- s/Ü/Ue/g; +- +- s/ä/ae/g; +- s/ë/ee/g; +- s/ï/ie/g; +- s/ö/oe/g; +- s/ü/ue/g; +- s/ÿ/ye/g; +- s/ß/ss/g; +- s/é/e/g; +- +- s/Æ/Ae/g; +- s/æ/ae/g; +- s/Ø/Oe/g; +- s/ø/oe/g; +- s/Å/Ae/g; +- s/å/ae/g; +- + local($user, $pwd, $uid, $gid, $gecos, $homedir, $shell) = split(/:/); + + if ($use_stdout) { +@@ -100,25 +79,25 @@ + $sn = $tmp[$#tmp]; + pop(@tmp); + $givenname=join(' ',@tmp); +- ++ + print $HANDLE "dn: uid=$user,$NAMINGCONTEXT\n"; + print $HANDLE "uid: $user\n"; +- print $HANDLE "cn: $cn\n"; ++ &print_utf8($HANDLE, "cn", $cn); + + if ($EXTENDED_SCHEMA) { + if ($wphone) { +- print $HANDLE "telephoneNumber: $wphone\n"; ++ &print_utf8($HANDLE, "telephoneNumber", $wphone); + } + if ($office) { +- print $HANDLE "roomNumber: $office\n"; ++ &print_utf8($HANDLE, "roomNumber", $office); + } + if ($hphone) { +- print $HANDLE "homePhone: $hphone\n"; ++ &print_utf8($HANDLE, "homePhone", $hphone); + } + if ($givenname) { +- print $HANDLE "givenName: $givenname\n"; ++ &print_utf8($HANDLE, "givenName", $givenname); + } +- print $HANDLE "sn: $sn\n"; ++ &print_utf8($HANDLE, "sn", $sn); + if ($DEFAULT_MAIL_DOMAIN) { + print $HANDLE "mail: $user\@$DEFAULT_MAIL_DOMAIN\n"; + } +@@ -174,7 +153,7 @@ + } + + if ($gecos) { +- print $HANDLE "gecos: $gecos\n"; ++ &print_ascii($HANDLE, "gecos", $gecos); + } + + print $HANDLE "\n"; +@@ -225,3 +204,177 @@ + } + } + ++sub print_utf8 ++{ ++ my($HANDLE, $attribute, $content) = @_; ++ ++ if (&validate_ascii($content)) { ++ print $HANDLE "$attribute: $content\n"; ++ } elsif ($USE_UTF8) { ++# $content = &recode_custom_to_utf8($content); ++ $content = &recode_latin1_to_utf8($content); ++ if (&validate_utf8($content)) { ++ $content = &encode_base64($content, ""); ++ print $HANDLE "$attribute\:: $content\n"; ++ } else { ++ die "ERROR: Illegal character(s) in UTF-8 string: \"$content\""; ++ } ++ } else { ++ &print_ascii($HANDLE, "$attribute", "$content"); ++ } ++} ++ ++sub print_ascii ++{ ++ my($HANDLE, $attribute, $content) = @_; ++ ++ if (&validate_utf8($content)) { ++ $content = &recode_utf8_to_latin1($content); ++ } else { ++ $content = &recode_latin1_to_utf8($content); ++ $content = &recode_utf8_to_latin1($content); ++ } ++ $content = &recode_custom_to_ascii($content); ++ if (&validate_ascii($content)) { ++ print $HANDLE "$attribute: $content\n"; ++ } else { ++ my $badchars = $content; ++ for ($badchars) { ++ s/[\x20-\x7E]//g; ++ } ++ die "ERROR: Illegal character(s) \"$badchars\" in ASCII string: \"$content\""; ++ } ++} ++ ++sub recode_latin1_to_utf8 ++{ ++ my ($content) = @_; ++ for ($content) { ++ s/([\x80-\xFF])/chr(0xC0|ord($1)>>6).chr(0x80|ord($1)&0x3F)/eg; ++ } ++ return ($content) ++} ++ ++sub recode_utf8_to_latin1 ++{ ++ my ($content) = @_; ++ for ($content) { ++ s/([\xC2\xC3])([\x80-\xBF])/chr(ord($1)<<6&0xC0|ord($2)&0x3F)/eg; ++ } ++ return ($content) ++} ++ ++sub recode_custom_to_ascii ++{ ++ my ($content) = @_; ++ for ($content) { ++ s/\xc0/A/g; # latin capital letter a with grave ++ s/\xc1/A/g; # latin capital letter a with acute ++ s/\xc2/A/g; # latin capital letter a with circumflex ++ s/\xc3/A/g; # latin capital letter a with tilde ++ s/\xc4/Ae/g; # latin capital letter a with diaeresis ++ s/\xc5/Aa/g; # latin capital letter a with ring above ++ s/\xc6/Ae/g; # latin capital letter ae ++ s/\xc7/C/g; # latin capital letter c with cedilla ++ s/\xc8/E/g; # latin capital letter e with grave ++ s/\xc9/E/g; # latin capital letter e with acute ++ s/\xca/E/g; # latin capital letter e with circumflex ++ s/\xcb/Ee/g; # latin capital letter e with diaeresis ++ s/\xcc/I/g; # latin capital letter i with grave ++ s/\xcd/I/g; # latin capital letter i with acute ++ s/\xce/I/g; # latin capital letter i with circumflex ++ s/\xcf/Ie/g; # latin capital letter i with diaeresis ++ s/\xd0/Dh/g; # latin capital letter eth (icelandic) ++ s/\xd1/N/g; # latin capital letter n with tilde ++ s/\xd2/O/g; # latin capital letter o with grave ++ s/\xd3/O/g; # latin capital letter o with acute ++ s/\xd4/O/g; # latin capital letter o with circumflex ++ s/\xd5/O/g; # latin capital letter o with tilde ++ s/\xd6/Oe/g; # latin capital letter o with diaeresis ++ s/\xd8/Oe/g; # latin capital letter o with stroke ++ s/\xd9/U/g; # latin capital letter u with grave ++ s/\xda/U/g; # latin capital letter u with acute ++ s/\xdb/U/g; # latin capital letter u with circumflex ++ s/\xdc/Ue/g; # latin capital letter u with diaeresis ++ s/\xdd/Y/g; # latin capital letter y with acute ++ s/\xde/TH/g; # latin capital letter thorn (icelandic) ++ s/\xdf/ss/g; # latin small letter sharp s (german) ++ s/\xe0/a/g; # latin small letter a with grave ++ s/\xe1/a/g; # latin small letter a with acute ++ s/\xe2/a/g; # latin small letter a with circumflex ++ s/\xe3/a/g; # latin small letter a with tilde ++ s/\xe4/ae/g; # latin small letter a with diaeresis ++ s/\xe5/aa/g; # latin small letter a with ring above ++ s/\xe6/ae/g; # latin small letter ae ++ s/\xe7/c/g; # latin small letter c with cedilla ++ s/\xe8/e/g; # latin small letter e with grave ++ s/\xe9/e/g; # latin small letter e with acute ++ s/\xea/e/g; # latin small letter e with circumflex ++ s/\xeb/ee/g; # latin small letter e with diaeresis ++ s/\xec/i/g; # latin small letter i with grave ++ s/\xed/i/g; # latin small letter i with acute ++ s/\xee/i/g; # latin small letter i with circumflex ++ s/\xef/ii/g; # latin small letter i with diaeresis ++ s/\xf0/dh/g; # latin small letter eth (icelandic) ++ s/\xf1/n/g; # latin small letter n with tilde ++ s/\xf2/o/g; # latin small letter o with grave ++ s/\xf3/o/g; # latin small letter o with acute ++ s/\xf4/o/g; # latin small letter o with circumflex ++ s/\xf5/o/g; # latin small letter o with tilde ++ s/\xf6/oe/g; # latin small letter o with diaeresis ++ s/\xf8/oe/g; # latin small letter o with stroke ++ s/\xf9/u/g; # latin small letter u with grave ++ s/\xfa/u/g; # latin small letter u with acute ++ s/\xfb/u/g; # latin small letter u with circumflex ++ s/\xfc/ue/g; # latin small letter u with diaeresis ++ s/\xfd/y/g; # latin small letter y with acute ++ s/\xfe/th/g; # latin small letter thorn (icelandic) ++ s/\xff/ye/g; # latin small letter y with diaeresis ++ } ++ return ($content); ++} ++ ++sub encode_base64 ++# Found in email by Baruzzi Giovanni on openldap mailinglist ++ ++# Historically this module has been implemented as pure perl code. ++# The XS implementation runs about 20 times faster, but the Perl ++# code might be more portable, so it is still here. ++{ ++ my $res = ""; ++ my $eol = $_[1]; ++ $eol = "\n" unless defined $eol; ++ pos($_[0]) = 0; # ensure start at the beginning ++ while ($_[0] =~ /(.{1,45})/gs) { ++ $res .= substr(pack('u', $1), 1); ++ chop($res); ++ } ++ $res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs ++ # fix padding at the end ++ my $padding = (3 - length($_[0]) % 3) % 3; ++ $res =~ s/.{$padding}$/'=' x $padding/e if $padding; ++ # break encoded string into lines of no more than 76 characters each ++ if (length $eol) { ++ $res =~ s/(.{1,76})/$1$eol/g; ++ } ++ $res; ++} ++ ++sub validate_ascii ++{ ++ my ($content) = @_; ++ $content =~ /^[\x20-\x7E]*$/; ++} ++ ++sub validate_utf8 ++{ ++ my ($content) = @_; ++ if (&validate_ascii($content)) { ++ return 1; ++ } ++ if ($] >= 5.8) { ++ ## No Perl support for UTF-8! ;-/ ++ return undef; ++ } ++ $content =~ /^[\x20-\x7E\x{0080}-\x{FFFF}]*$/; ++} --- migrationtools-47.orig/debian/patches/1002_uid-gid-limit_support.patch +++ migrationtools-47/debian/patches/1002_uid-gid-limit_support.patch @@ -0,0 +1,50 @@ +diff -ruN migrationtools-47.orig/migrate_common.ph migrationtools-47/migrate_common.ph +--- migrationtools-47.orig/migrate_common.ph 2007-01-10 22:20:42.000000000 +0100 ++++ migrationtools-47/migrate_common.ph 2007-01-10 22:35:26.000000000 +0100 +@@ -92,6 +92,14 @@ + # Comment this out if your ldap server does not support UTF8 encoding + $USE_UTF8 = 1; + ++# Uncomment these to exclude system users and groups ++#$IGNORE_UID_BELOW = 1000; ++#$IGNORE_GID_BELOW = 100; ++ ++# And here's the opposite for completeness ++#$IGNORE_UID_ABOVE = 9999; ++#$IGNORE_GID_ABOVE = 9999; ++ + # + # allow environment variables to override predefines + # +diff -ruN migrationtools-47.orig/migrate_group.pl migrationtools-47/migrate_group.pl +--- migrationtools-47.orig/migrate_group.pl 2006-01-25 05:18:16.000000000 +0100 ++++ migrationtools-47/migrate_group.pl 2007-01-10 22:39:25.000000000 +0100 +@@ -51,7 +51,10 @@ + next if /^\+/; + + local($group, $pwd, $gid, $users) = split(/:/); +- ++ ++ next if (int($IGNORE_GID_BELOW) and int($gid) < int($IGNORE_GID_BELOW)); ++ next if (int($IGNORE_GID_ABOVE) and int($gid) > int($IGNORE_GID_ABOVE)); ++ + if ($use_stdout) { + &dump_group(STDOUT, $group, $pwd, $gid, $users); + } else { +diff -ruN migrationtools-47.orig/migrate_passwd.pl migrationtools-47/migrate_passwd.pl +--- migrationtools-47.orig/migrate_passwd.pl 2007-01-10 22:18:18.000000000 +0100 ++++ migrationtools-47/migrate_passwd.pl 2007-01-10 22:42:14.000000000 +0100 +@@ -55,7 +55,12 @@ + next if /^\+/; + + local($user, $pwd, $uid, $gid, $gecos, $homedir, $shell) = split(/:/); +- ++ ++ next if (int($IGNORE_UID_BELOW) and int($uid) < int($IGNORE_UID_BELOW)); ++ next if (int($IGNORE_UID_ABOVE) and int($uid) > int($IGNORE_UID_ABOVE)); ++ next if (int($IGNORE_GID_BELOW) and int($gid) < int($IGNORE_GID_BELOW)); ++ next if (int($IGNORE_GID_ABOVE) and int($gid) > int($IGNORE_GID_ABOVE)); ++ + if ($use_stdout) { + &dump_user(STDOUT, $user, $pwd, $uid, $gid, $gecos, $homedir, $shell); + } else { --- migrationtools-47.orig/debian/patches/1004_use_krb5-kdc_scheme.patch +++ migrationtools-47/debian/patches/1004_use_krb5-kdc_scheme.patch @@ -0,0 +1,21 @@ +diff -ruN migrationtools-47.orig/migrate_passwd.pl migrationtools-47/migrate_passwd.pl +--- migrationtools-47.orig/migrate_passwd.pl 2007-01-10 22:42:14.000000000 +0100 ++++ migrationtools-47/migrate_passwd.pl 2007-01-10 22:47:58.000000000 +0100 +@@ -122,7 +122,7 @@ + print $HANDLE "objectClass: top\n"; + + if ($DEFAULT_REALM) { +- print $HANDLE "objectClass: kerberosSecurityObject\n"; ++ print $HANDLE "objectClass: krb5Principal\n"; + } + + if ($shadowUsers{$user} ne "") { +@@ -132,7 +132,7 @@ + } + + if ($DEFAULT_REALM) { +- print $HANDLE "krbName: $user\@$DEFAULT_REALM\n"; ++ print $HANDLE "krb5PrincipalName: $user\@$DEFAULT_REALM\n"; + } + + if ($shell) { --- migrationtools-47.orig/debian/cdbs/1/rules/copyright-check.mk +++ migrationtools-47/debian/cdbs/1/rules/copyright-check.mk @@ -0,0 +1,113 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2005-2008 Jonas Smedegaard +# Description: Check for changes to copyright notices in source +# +# 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, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_copyright_check +_cdbs_rules_copyright_check := 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7) + +# Set to yes to fail on changed/new hints are found +#DEB_COPYRIGHT_CHECK_STRICT := yes + +# Single regular expression for files to include or ignore +DEB_COPYRIGHT_CHECK_REGEX = .* +#DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$ +DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^debian/(changelog|copyright(|_hints|_newhints))$ + +pre-build:: debian/stamp-copyright-check + +debian/stamp-copyright-check: + @echo 'Scanning upstream source for new/changed copyright notices...' + @echo licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + "| some-output-filtering..." + +# Perl in shell in make requires extra care: +# * Single-quoting ('...') protects against shell expansion +# * Double-dollar ($$) expands to plain dollar ($) in make + @licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + | LC_ALL=C perl -e \ + 'print "Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=REVISION\n";'\ + 'print "Name: Untrusted draft - double-check copyrights yourself!\n\n";'\ + '$$n=0; while (<>) {'\ + ' s/[^[:print:]]//g;'\ + ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\ + ' $$files[$$n]{name}=$$1;'\ + ' $$files[$$n]{license}=$$2;'\ + ' };'\ + ' if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\ + ' $$files[$$n]{copyright}=$$1;'\ + ' };'\ + ' /^$$/ and $$n++;'\ + '};'\ + 'foreach $$file (@files) {'\ + ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\ + ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\ + ' $$file->{license} =~ s/\s+\(v([^)]+)\)/-$$1/;'\ + ' $$file->{license} =~ s/\s*(\*No copyright\*)\s*// and $$file->{copyright} = $$1;'\ + ' $$file->{license} =~ s/^\s*(GENERATED FILE)/UNKNOWN ($$1)/;'\ + ' $$file->{license} =~ s/\s+(GENERATED FILE)/ ($$1)/;'\ + ' $$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*[,-]\s*((??{$$y+1}))\b/-$$2/g;'\ + ' $$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\ + ' $$file->{copyright} =~ s/\b(\d{4})\s+([\S^\d])/$$1, $$2/g;'\ + ' $$file->{copyright} =~ s/^\W*\s+\/\s+//g;'\ + ' $$file->{copyright} =~ s/\s+\/\s+\W*$$//;'\ + ' $$file->{copyright} =~ s/\s+\/\s+/\n\t/g;'\ + ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\ + ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\ + '};'\ + 'foreach $$pattern ( sort {'\ + ' @{$$patternfiles{$$b}} <=> @{$$patternfiles{$$a}}'\ + ' ||'\ + ' $$a cmp $$b'\ + ' } keys %patternfiles ) {'\ + ' ($$license, $$copyright) = $$pattern =~ /(.*) \[(.*)\]/s;'\ + ' print "Files: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' print "Copyright: $$copyright\n";'\ + ' print "License: $$license\n\n";'\ + '};'\ + > debian/copyright_newhints + @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \ + echo "Found $$patterncount different copyright and licensing combinations." + @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi + @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \ + if [ -n "$$newstrings" ]; then \ + echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \ + echo; \ + echo "$$newstrings"; \ + echo; \ + echo "To fix the situation please do the following:"; \ + echo " 1) Investigate the above changes and update debian/copyright as needed"; \ + echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \ + $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \ + else \ + echo 'No new copyright notices found - assuming no news is good news...'; \ + rm -f debian/copyright_newhints; \ + fi + touch $@ + +clean:: + rm -f debian/stamp-copyright-check + +endif --- migrationtools-47.orig/debian/cdbs/1/rules/buildinfo.mk +++ migrationtools-47/debian/cdbs/1/rules/buildinfo.mk @@ -0,0 +1,40 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2007 Jonas Smedegaard +# Description: Generate and include build information +# +# 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, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_buildinfo +_cdbs_rules_buildinfo = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo + +common-install-arch common-install-indep:: debian/stamp-buildinfo + +debian/stamp-buildinfo: + dh_buildinfo + touch debian/stamp-buildinfo + +clean:: + rm -f debian/stamp-buildinfo + +endif --- migrationtools-47.orig/debian/cdbs/1/rules/upstream-tarball.mk +++ migrationtools-47/debian/cdbs/1/rules/upstream-tarball.mk @@ -0,0 +1,150 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2007-2008 Jonas Smedegaard +# Description: Convenience rules for dealing with upstream tarballs +# +# 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, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_upstream_tarball +_cdbs_rules_upstream_tarball := 1 + +include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.39) + +# Prefix for upstream location of all upstream tarballs (mandatory!) +#DEB_UPSTREAM_URL = + +DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE) +DEB_UPSTREAM_TARBALL_VERSION = $(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_VERSION:$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)=),$(DEB_UPSTREAM_VERSION)) +DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz +# Checksum to ensure integrity of downloadeds using get-orig-source (optional) +#DEB_UPSTREAM_TARBALL_MD5 = + +DEB_UPSTREAM_WORKDIR = ../tarballs + +# Base filename (without extension) as used in upstream URL +DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)-$(DEB_UPSTREAM_TARBALL_VERSION) + +# Perl regexp to change locally used string into that in upstream URL and srcdir +#DEB_UPSTREAM_TARBALL_BASENAME_MANGLE = + +# Base directory within tarball +DEB_UPSTREAM_TARBALL_SRCDIR = $(cdbs_upstream_tarball_basename) + +# Space-delimited list of directories and files to strip (optional) +#DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt +DEB_UPSTREAM_REPACKAGE_TAG = dfsg +DEB_UPSTREAM_REPACKAGE_DELIMITER = ~ + +# TODO: Move this to buildcore.mk +cdbs_findargs-path-or-name = $(if $(findstring /,$(firstword $(1))),-path './$(patsubst ./%,%,$(firstword $(1)))',-name '$(firstword $(1))') $(foreach obj,$(wordlist 2,$(words $(1)),$(1)),-or $(if $(findstring /,$(obj)),-path './$(obj:./%=%)',-name '$(obj)')) + +cdbs_upstream_tarball_basename = $(if $(strip $(DEB_UPSTREAM_TARBALL_BASENAME_MANGLE)),$(shell echo '$(DEB_UPSTREAM_TARBALL_BASENAME)' | perl -pe '$(DEB_UPSTREAM_TARBALL_BASENAME_MANGLE)'),$(DEB_UPSTREAM_TARBALL_BASENAME)) +cdbs_upstream_tarball = $(cdbs_upstream_tarball_basename).$(DEB_UPSTREAM_TARBALL_EXTENSION) +cdbs_upstream_received_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(if $(findstring $(DEB_UPSTREAM_TARBALL_EXTENSION),tgz),tar.gz,$(DEB_UPSTREAM_TARBALL_EXTENSION)) +cdbs_upstream_local_basename = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION)$(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)) +cdbs_upstream_local_srcdir = $(cdbs_upstream_tarball_basename)$(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)) + +# # These variables are deprecated +_cdbs_deprecated_vars += DEB_UPSTREAM_TARBALL DEB_UPSTREAM_LOCAL_TARBALL DEB_UPSTREAM_REPACKAGE_TARBALL DEB_UPSTREAM_TARBALL_VERSION_MANGLE +_cdbs_deprecated_vars += DEB_UPSTREAM_REPACKAGE_EXCLUDES +DEB_UPSTREAM_REPACKAGE_EXCLUDE += $(DEB_UPSTREAM_REPACKAGE_EXCLUDES) + +print-version: + @@echo "Debian version: $(DEB_VERSION)" + @@echo "Upstream version: $(DEB_UPSTREAM_TARBALL_VERSION)" + +get-orig-source: + @@dh_testdir + @@mkdir -p "$(DEB_UPSTREAM_WORKDIR)" + + @if [ ! -s "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ] ; then \ + if [ -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ] ; then \ + rm "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \ + fi ; \ + echo "Downloading $(cdbs_upstream_received_tarball) from $(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball) ..." ; \ + wget -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" "$(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball)" ; \ + else \ + echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \ + fi + + @md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" | sed -e 's/ .*//'`; \ + if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \ + echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \ + echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \ + echo "Purging downloaded file. Try new download." ; \ + rm -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \ + false ; \ + else \ + echo "Upstream tarball is trusted!" ; \ + fi; \ + else \ + echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \ + fi + +# TODO: Rewrite using make variables like cdbs_upstream_unpack_cmd and +# DEB_UPSTREAM_SUPPORTED_COMPRESSIONS (recent dpkg supports bz2) +# TODO: Add .orig suffix to top folder inside tarball when only +# recompressing (when $uncompress set and ...REPACKAGE_EXCLUDE unset) + @untar="tar -x -C"; \ + case "$(cdbs_upstream_received_tarball)" in \ + *.tar.gz) unpack="gunzip -c";; \ + *.tar.bz2) unpack="bunzip2 -c"; uncompress="bunzip2";; \ + *.tar.Z) unpack="uncompress -c"; uncompress="uncompress";; \ + *.zip) unpack="unzip -q"; uncompress="false"; untar="-d"; nopipe="true";; \ + *.tar) unpack="cat"; uncompress="true";; \ + *) echo "Unknown extension for upstream tarball $(cdbs_upstream_received_tarball)"; false;; \ + esac && \ + if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ] || [ "$$uncompress" = "false" ]; then \ + echo "Repackaging tarball ..." && \ + mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \ + if [ -n "$$nopipe" ]; then \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" \ + $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + else \ + $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" \ + | $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \ + fi && \ + if [ "$(DEB_UPSTREAM_TARBALL_SRCDIR)" != "$(cdbs_upstream_local_srcdir)" ]; then \ + mv -T "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(DEB_UPSTREAM_TARBALL_SRCDIR)" "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(cdbs_upstream_local_srcdir)"; \ + fi && \ + GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_basename).orig.tar.gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_local_srcdir)" && \ + echo "Cleaning up" && \ + rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \ + elif [ -n "$$uncompress" ]; then \ + echo "Recompressing tarball ..." && \ + $$uncompress "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)"; \ + gzip -9 "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_basename).orig.tar"; \ + fi + +fail-source-not-repackaged: + @if find . $(call cdbs_findargs-path-or-name,$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)) | grep '.*'; then \ + echo; \ + echo 'ERROR: Source contains the files/paths listed above'; \ + echo ' which was intended to not be distributed with the source.'; \ + echo ' Please repackage source with these items stripped!'; \ + echo ' (get-orig-source target can automate this - see README.source)'; \ + exit 1; \ + fi + +DEB_PHONY_RULES += print-version get-orig-source fail-source-not-repackaged + +endif --- migrationtools-47.orig/debian/cdbs/1/rules/package-relations.mk +++ migrationtools-47/debian/cdbs/1/rules/package-relations.mk @@ -0,0 +1,66 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2008 Jonas Smedegaard +# Description: Resolve, cleanup and apply package relationships +# +# 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, 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class + +ifndef _cdbs_rules_package_relations +_cdbs_rules_package_relations = 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +# Merge build-dependencies on same packages +# TODO: rewrite (in perl, probably) to be more generic +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.43)/ s/\bcdbs *\(,\|(>= \(0.4.23-1.1\|0.4.27\|0.4.39\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/\bcdbs *\(,\|(>= \(0.4.23-1.1\|0.4.27\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.27)/ s/\bcdbs *\(,\|(>= \(0.4.23-1.1\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 7.0.1)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\|5.0.44\|6\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 6)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\|5.0.44\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.44)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.37.2)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.28)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.21)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\))\)/, /g') +CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.0)/ s/\bdebhelper *\(,\|(>= \(4.1.60\))\)/, /g') + +# TODO: Move these to buildcore.mk +cdbs_curvar = $(or $($(1)_$(cdbs_curpkg)),$($1)) +cdbs_squash_commas = $(shell echo '$1' | sed -e 's/ *,[ ,]*/, /g' -e 's/^[ ,]*//' -e 's/[ ,]*$$//') + +# Cleanup superfluous commas and whitespace +CDBS_BUILD_DEPENDS := $(call cdbs_squash_commas,$(CDBS_BUILD_DEPENDS)) + +comma = , +cdbs_all_cur_squash_commas = $(call cdbs_squash_commas,$($(1)_ALL)$(comma) $(call cdbs_curvar,$1)) + +# Apply CDBS-declared dependencies to binary packages +$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%: + @echo 'Adding cdbs dependencies to debian/$(cdbs_curpkg).substvars' + @echo 'cdbs:Depends=$(call cdbs_all_cur_squash_commas,CDBS_DEPENDS)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Pre-Depends=$(call cdbs_all_cur_squash_commas,CDBS_PREDEPENDS)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Recommends=$(call cdbs_all_cur_squash_commas,CDBS_RECOMMENDS)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Suggests=$(call cdbs_all_cur_squash_commas,CDBS_SUGGESTS)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Breaks=$(call cdbs_all_cur_squash_commas,CDBS_BREAKS)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Provides=$(call cdbs_all_cur_squash_commas,CDBS_PROVIDES)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Replaces=$(call cdbs_all_cur_squash_commas,CDBS_REPLACES)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Conflicts=$(call cdbs_all_cur_squash_commas,CDBS_CONFLICTS)' >> debian/$(cdbs_curpkg).substvars + @echo 'cdbs:Enhances=$(call cdbs_all_cur_squash_commas,CDBS_ENHANCES)' >> debian/$(cdbs_curpkg).substvars + +endif