[equivs] 05/36: Import Debian version 2.0.8

Axel Beckert abe at deuxchevaux.org
Fri Jul 28 23:04:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository equivs.

commit 92f8c1b14b8484248794f77eb7ed4779071cce48
Author: Peter Samuelson <peter at p12n.org>
Date:   Tue Jan 19 22:28:13 2010 -0600

    Import Debian version 2.0.8
    
    equivs (2.0.8) unstable; urgency=low
    
      * Acknowledge NMU, thanks Zack.
      * Also thanks Tomáš Pospíšek for several patches.
      * Use dpkg-buildpackage instead of debuild; drop devscripts dependency.
        (Closes: #475936)
      * Stop specifying debhelper >=4, redundant in this day and age.  At the
        same time, I don't see the point in specifying a higher compat level.
      * Update and improve package description somewhat.  (Closes: #464871)
      * Document including multiple files via the "Files:" field:
        manpage (Closes: #565897), template file (Closes: #464888).
      * Allow +x bit to be specified on File: line.  (Closes: #535622)
      * Preserve +x bit for files in Files: section.  (Closes: #535623)
      * Allow Homepage field.  (Closes: #502395)
      * Fix Makefile pod2man rule.  (Closes: #364620)
      * Bump Standards-Version to 3.8.3 (no changes).
      * Honor $DEBEMAIL, $EMAIL, $DEBFULLNAME, and /etc/mailname for the
        default maintainer address.
    
    equivs (2.0.7-0.1) unstable; urgency=low
    
      * Non-maintainer upload.
      * equivs-build: add support for adding arbitrary extra files to a package.
        Thanks to Anthony Towns for the patch (Closes: #449542)
      * equivs-build: use date -R instead of deprecated 822-date.
        Thanks to Guillem Jover. (Closes: #415797)
      * equivs-build.pod: document the new "Files:" and "File:" fields
      * debian/control: bump Standards-Version to 3.7.3, no changes needed
      * debian/control: move debhelper dependency to Build-Depends, so that it is
        available upon clean
---
 debian/changelog                       |  35 ++++++++++
 debian/control                         |  24 +++----
 debian/equivs-build.pod                |  23 +++++++
 debian/rules                           |   2 +-
 usr/bin/equivs-build                   | 122 ++++++++++++++++++++++++++-------
 usr/share/equivs/template.ctl          |   3 +
 usr/share/equivs/template/debian/rules |   1 +
 7 files changed, 170 insertions(+), 40 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index e63acd5..c466d4c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,38 @@
+equivs (2.0.8) unstable; urgency=low
+
+  * Acknowledge NMU, thanks Zack.
+  * Also thanks Tomáš Pospíšek for several patches.
+  * Use dpkg-buildpackage instead of debuild; drop devscripts dependency.
+    (Closes: #475936)
+  * Stop specifying debhelper >=4, redundant in this day and age.  At the
+    same time, I don't see the point in specifying a higher compat level.
+  * Update and improve package description somewhat.  (Closes: #464871)
+  * Document including multiple files via the "Files:" field:
+    manpage (Closes: #565897), template file (Closes: #464888).
+  * Allow +x bit to be specified on File: line.  (Closes: #535622)
+  * Preserve +x bit for files in Files: section.  (Closes: #535623)
+  * Allow Homepage field.  (Closes: #502395)
+  * Fix Makefile pod2man rule.  (Closes: #364620)
+  * Bump Standards-Version to 3.8.3 (no changes).
+  * Honor $DEBEMAIL, $EMAIL, $DEBFULLNAME, and /etc/mailname for the
+    default maintainer address.
+
+ -- Peter Samuelson <peter at p12n.org>  Tue, 19 Jan 2010 22:28:13 -0600
+
+equivs (2.0.7-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * equivs-build: add support for adding arbitrary extra files to a package.
+    Thanks to Anthony Towns for the patch (Closes: #449542)
+  * equivs-build: use date -R instead of deprecated 822-date.
+    Thanks to Guillem Jover. (Closes: #415797)
+  * equivs-build.pod: document the new "Files:" and "File:" fields
+  * debian/control: bump Standards-Version to 3.7.3, no changes needed
+  * debian/control: move debhelper dependency to Build-Depends, so that it is
+    available upon clean
+
+ -- Stefano Zacchiroli <zack at debian.org>  Tue, 22 Jan 2008 12:26:38 +0100
+
 equivs (2.0.7) unstable; urgency=low
 
   * New maintainer.  (Closes: #350835)
diff --git a/debian/control b/debian/control
index 170890c..2959792 100644
--- a/debian/control
+++ b/debian/control
@@ -2,26 +2,22 @@ Source: equivs
 Section: admin
 Priority: extra
 Maintainer: Peter Samuelson <peter at p12n.org>
-Standards-Version: 3.6.2
-Build-Depends-Indep: debhelper (>= 4)
+Standards-Version: 3.8.3
+Build-Depends: debhelper
 
 Package: equivs
-Depends: perl, debhelper (>= 4), dpkg-dev, devscripts, make, fakeroot
+Depends: perl, debhelper, dpkg-dev, make, fakeroot
 Architecture: all
 Description: Circumvent Debian package dependencies
- This package provides a tool to create Debian packages that only
- contain dependency information.
+ This package provides a tool to create trivial Debian packages.
+ Typically these packages contain only dependency information, but they
+ can also include normal installed files like other packages do.
  .
  One use for this is to create a metapackage: a package whose sole
  purpose is to declare dependencies and conflicts on other packages so
  that these will be automatically installed, upgraded, or removed.
  .
- Another use is to circumvent dependency checking.  If a package P is
- not installed on the system, packages that depend on P cannot normally
- be installed.  However, if functionality equivalent to P is known to
- be installed, this tool can be used to trick the Debian package
- management system into believing that package P is actually installed.
- NOTE: this should be considered a crude hack to work around awkward
- situations, not a normal solution.  If you use equivs to work around
- bugs in other Debian packages, you should also file bug reports
- against those packages.
+ Another use is to circumvent dependency checking: by letting dpkg
+ think a particular package name and version is installed when it
+ isn't, you can work around bugs in other packages' dependencies.
+ (Please do still file such bugs, though.)
diff --git a/debian/equivs-build.pod b/debian/equivs-build.pod
index 6f76601..1943910 100644
--- a/debian/equivs-build.pod
+++ b/debian/equivs-build.pod
@@ -60,6 +60,29 @@ description (package developers-reference).
 A comma-separated list of files to copy to the 
 F</usr/share/doc/packagename> directory.
 
+=item Files:
+
+Files to be copied into some directory of the created package.  Each
+line contains a source filename and a destination directory,
+space-separated.  As with other multi-line headers, all lines but the
+first must be indented.  Example:
+
+  Files: foo-cron /etc/cron.d/
+   foo-cron-helper /usr/local/bin/
+
+=item File:
+
+Files to be copied into some directory of the created package,
+specified inline in the source control file. The field syntax is the
+name of the files to be created, followed by lines indented by 1
+space denoting file content; leading space will be trimmed.  An octal
+file mode may be specified after the filename; it defaults to 644, and
+will be normalised to 644 or 755.  Example:
+
+  File: /usr/local/bin/true 755
+   #!/bin/sh
+   exit 0
+
 =back
 
 See F</usr/share/doc/equivs/README.Debian> for more information.
diff --git a/debian/rules b/debian/rules
index d40afbf..3fc55f5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@ PKG := equivs
 MANPAGES := debian/equivs-control.1 debian/equivs-build.1
 
 %.1: %.pod
-	pod2man --section=1 --release="$(date +'%d %b %Y')" \
+	pod2man --section=1 --release="$$(date +'%d %b %Y')" \
 	--center="Debian/GNU" --date=' ' $< > $@
 
 build: $(MANPAGES)
diff --git a/usr/bin/equivs-build b/usr/bin/equivs-build
index 9a2863b..4360646 100755
--- a/usr/bin/equivs-build
+++ b/usr/bin/equivs-build
@@ -61,6 +61,57 @@ if ($debug) {
 # Copy any additional files
 
 my @extra_files = split ",", $control{'Extra-Files'} || "";
+my %install_files = ();
+for (split "\n", $control{'Files'} || "") {
+    $install_files{$2} = $1 if m/^\s*(\S+)\s+(\S+)\s*$/;
+}
+my %create_files = ();
+for (@{$control{'File'} || []}) {
+  if (m/^\s*(\S+)(?:\s+(\d+))?\s*\n(.*)$/s) {
+    my ($f,$m,$b) = ($1,$2,$3);
+    $m = (oct $m||0) || 0644;
+    $b =~ s/^ //mg;
+    $b =~ s/^[.]([.]*)$/$1/mg;
+    $create_files{$f} = [$b,$m];
+  }
+}
+
+mkdir "$builddir/install", 0755;
+open INSTALL, '>', "$builddir/debian/install" or
+  die "Cannot open $builddir/debian/install for writing: $!\n";
+foreach my $target (keys %install_files, keys %create_files) {
+  $target =~ s/ +//g;
+  my $dest;
+  my $cnt = 0;
+  if ($target =~ m/^(preinst|postinst|prerm|postrm)$/) {
+    $dest = "debian/$target";
+  } else {
+    do {
+      $dest = "install/$cnt";
+      mkdir "$builddir/$dest" unless -d "$builddir/$dest";
+      $dest .= "/" . basename($target);
+      $cnt++;
+    } while ( -e "$builddir/$dest" );
+    print INSTALL "$dest " . dirname($target) . "\n";
+  }
+  $dest = "$builddir/$dest";
+  if (defined $install_files{$target}) {
+    my $file = $install_files{$target};
+    copy $file, $dest
+      or die "Cannot copy $file to $dest: $!\n";
+    chmod -x $file ? 0755 : 0644, $dest
+      or die "Cannod chmod $dest: $!\n";
+  } else {
+    my ($content, $mode) = @{$create_files{$target}};
+    open CREATE, '>', $dest
+      or die "Cannot create file $dest: $!\n";
+    print CREATE "$content\n";
+    close CREATE;
+    chmod $mode, $dest
+      or die "Cannot chmod $dest: $!\n";
+  }
+}
+close INSTALL;
 
 mkdir "$builddir/docs", 0755;
 open DOCS, '>', "$builddir/debian/docs" or
@@ -68,21 +119,20 @@ open DOCS, '>', "$builddir/debian/docs" or
 
 foreach my $file (@extra_files){
   $file =~ s/ +//g;
-  my $destination = basename($file);
-  copy $file, "$builddir/docs/$destination" or
-    die "Cannot copy $file to $builddir/docs/$destination: $!\n";
-  print DOCS "docs/$destination\n";
+  my $dest = 'docs/' . basename($file);
+  copy $file, "$builddir/$dest" or
+    die "Cannot copy $file to $builddir/$dest: $!\n";
+  print DOCS "$dest\n";
 }
 close DOCS;
 
 foreach my $script (qw(Preinst Postinst Prerm Postrm)) {
     next unless defined $control{$script};
-    my $destination = lc($script);
-    copy $control{$script}, "$builddir/debian/$destination" or
-      die "Cannot copy $script to $builddir/debian/$destination: $!\n";
+    my $dest = 'debian/' . lc($script);
+    copy $control{$script}, "$builddir/$dest" or
+      die "Cannot copy $script to $builddir/$dest: $!\n";
 }
 
-
 write_control_file($builddir, \%control);
 
 if ($control{'Changelog'}) {
@@ -117,9 +167,9 @@ if ($arch) {
 }
 
 if ($full_package) {
-  push @build_cmd, 'debuild', '-rfakeroot';
+  push @build_cmd, qw(dpkg-buildpackage -rfakeroot);
 } else {
-  push @build_cmd, 'fakeroot', 'debian/rules', 'binary';
+  push @build_cmd, qw(fakeroot debian/rules binary);
 }
 system(@build_cmd) == 0 or
   die "Error in the build process: exit status " . ($?>>8) . "\n";
@@ -132,23 +182,29 @@ exit 0;
 
 sub read_control_file {
   my ($builddir, $control, $specific_arch, $file) = @_;
+  my @control = ();
   my $in;
 
   open($in, "$builddir/debian/control.in") or
     die "Cannot open control file: $!\n";
-  read_control_file_section($in, $control) or
+  read_control_file_section($in, \@control) or
     die "error: empty control file\n";
   close $in;
 
   # Set some field defaults: Maintainer, Architecture
-  my (@user) =  getpwuid $>;
-  my $gecos;
-  my ($username, $systemname, $fullname);
-
-  ($username, $gecos) = @user[0,6];
-  $fullname = (split ",", $gecos)[0];
+  my $fullname = $ENV{DEBFULLNAME};
+  ($fullname) = split ',', (getpwuid $>)[6]
+    unless defined $fullname;
+
+  my ($username, $systemname);
+  for (qw(DEBEMAIL EMAIL)) {
+      ($username, $systemname) = split '@', $ENV{$_}
+      if !$username and defined $ENV{$_};
+  }
+  $username ||= $ENV{USER} || $ENV{LOGNAME} || (getpwuid $>)[0];
+  chomp($systemname ||= qx(cat /etc/mailname 2>&- || hostname --fqdn));
 
-  chomp($systemname = qx(hostname --fqdn));
+  %{$control} = @control;
 
   $control->{'Maintainer'} = "$fullname <$username\@$systemname>";
 
@@ -157,10 +213,24 @@ sub read_control_file {
   open($in, $file) or
     die "Cannot open control file $file: $!\n";
 
-  read_control_file_section($in, $control) or
+  @control = ();
+  read_control_file_section($in, \@control) or
     die "error: empty control file\n";
   close $in;
 
+  for (my $i = 0; $i < $#control; $i += 2) {
+    my $k = $control[$i];
+    my $v = $control[$i+1];
+    if ($k eq "File") {
+      my $vv = [];
+      $vv = $control->{$k} if defined $control->{$k};
+      push @{$vv}, $v;
+      $control->{$k} = $vv;
+    } else {
+      $control->{$k} = $v;
+    }
+  }
+
   # Fix Source: entry
   $control->{'Source'} = $control->{'Package'};
 
@@ -177,17 +247,17 @@ sub read_control_file_section {
   my ($cf,$v);
   while (<$fh>) {
     chomp;
-    next if (m/^\s*$/ or m/^\s*#/);
+    next if (m/^\s*$/ or m/^#/);
 
     # new field?
     if (/^(\S+)\s*:\s*(.*?)\s*$/) {
       ($cf,$v) = (ucfirst lc $1, $2);
       $cf =~ s/(?<=-)([a-z])/uc $1/eg;
-      $pfields->{$cf} = $v;
+      push @{$pfields}, $cf, $v;
     } elsif (/^(\s+\S.*)$/) {
       $v = $1;
       defined($cf) or die "syntax error in control file: no field specified\n";
-      $pfields->{$cf} .= "\n$v";
+      $pfields->[-1] .= "\n$v";
     } else {
       die "syntax error in control file: $_\n";
     }
@@ -223,6 +293,7 @@ sub write_control_file {
 			   "Section",
 			   "Priority",
 			   "Maintainer",
+			   "Homepage",
 			   "Build-Depends",
 			   "Standards-Version");
   print OUT "\n";
@@ -243,15 +314,16 @@ sub write_control_file {
 
 sub make_changelog {
   my ($builddir, $control) = @_;
-  my ($version, $date);
+  my ($version, $suite, $date);
 
   $version = $control->{'Version'} || "1.0";
-  chomp ($date = qx(822-date));
+  $suite = $control->{'Suite'} || "unstable";
+  chomp ($date = qx(date -R));
 
   open OUT, '>', "$builddir/debian/changelog" or
     die "Couldn't write changelog: $!\n";
   print OUT <<EOINPUT;
-$control->{Package} ($version) unstable; urgency=low
+$control->{Package} ($version) $suite; urgency=low
 
   * First version
 
diff --git a/usr/share/equivs/template.ctl b/usr/share/equivs/template.ctl
index f0ec346..499994b 100644
--- a/usr/share/equivs/template.ctl
+++ b/usr/share/equivs/template.ctl
@@ -2,6 +2,7 @@
 ### Uncomment to edit them.
 Section: misc
 Priority: optional
+# Homepage: <enter URL here; no default>
 Standards-Version: 3.6.2
 
 Package: <package name; defaults to equivs-dummy>
@@ -18,6 +19,8 @@ Package: <package name; defaults to equivs-dummy>
 # Changelog: <changelog file; defaults to a generic changelog>
 # Readme: <README.Debian file; defaults to a generic one>
 # Extra-Files: <comma-separated list of additional files for the doc directory>
+# Files: <pair of space-separated paths; First is file to include, second is destination>
+#  <more pairs, if there's more than one file to include. Notice the starting space>
 Description: <short description; defaults to some wise words> 
  long description and info
  .
diff --git a/usr/share/equivs/template/debian/rules b/usr/share/equivs/template/debian/rules
index e60ad71..7b3f2f2 100755
--- a/usr/share/equivs/template/debian/rules
+++ b/usr/share/equivs/template/debian/rules
@@ -20,6 +20,7 @@ binary-indep: install
 binary-arch: install
 	dh_testdir
 	dh_testroot
+	dh_install
 	dh_installdocs
 	dh_installchangelogs
 	dh_compress

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/equivs.git



More information about the Pkg-perl-cvs-commits mailing list