Переглянути джерело

Add netbsd support, and support hypenated values in dpkg-architecture.

Adam Heath 23 роки тому
батько
коміт
eeb28765a5
5 змінених файлів з 26 додано та 12 видалено
  1. 6 0
      ChangeLog
  2. 1 0
      archtable
  3. 3 0
      debian/changelog
  4. 11 9
      scripts/dpkg-architecture.pl
  5. 5 3
      utils/start-stop-daemon.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Tue Apr 15 11:32:22 CDT 2003 Adam Heath <doogie@debian.org>
+
+  * archtable, utils/start-stop-daemon.c,  scripts/dpkg-architecture.pl:
+    Add netbsd support.
+  * scripts/dpkg-architecture.pl: Support hypenated values.
+
 Tue Apr 15 01:05:04 CDT 2003 Adam Heath <doogie@debian.org>
 
   * config.sub, config.guess: Updated.

+ 1 - 0
archtable

@@ -48,6 +48,7 @@ hppa1.1-linux-gnu	hppa		hppa
 hppa2.0-linux-gnu	hppa		hppa
 hppa64-linux-gnu	hppa		hppa
 i386-freebsd		freebsd-i386	freebsd-i386
+i386-netbsdelf-gnu	netbsd-i386	netbsd-i386
 s390-linux-gnu		s390		s390
 s390-ibm-linux-gnu	s390		s390
 s390-unknown-linux-gnu	s390		s390

+ 3 - 0
debian/changelog

@@ -6,6 +6,9 @@ dpkg (1.10.10) unstable; urgency=low
   * Strip trailing / from the file args in dpkg-statoverride.  Closes:
     #184239.
   * Modified to use autotools-dev.  Closes: #179656.
+  * Add netbsd support.  Closes: #179658, #179659.
+  * Support hypenated values in dpkg-architeture. Closes: #179661
+
 
  -- Adam Heath <doogie@debian.org>  UNRELEASED
 

+ 11 - 9
scripts/dpkg-architecture.pl

@@ -67,6 +67,7 @@ require 'controllib.pl';
 	    'ia64',		'ia64-linux',
 	    'openbsd-i386',	'i386-openbsd',
 	    'freebsd-i386',	'i386-freebsd',
+	    'netbsd-i386',	'i386-netbsdelf-gnu',
 	    'darwin-powerpc',	'powerpc-darwin',
 	    'darwin-i386',	'i386-darwin');
 
@@ -123,10 +124,9 @@ if ($?>>8) {
 }
 chomp $deb_build_arch;
 $deb_build_gnu_type = $archtable{$deb_build_arch};
-$deb_build_gnu_cpu = $deb_build_gnu_type;
-$deb_build_gnu_system = $deb_build_gnu_type;
-$deb_build_gnu_cpu =~ s/-.*$//;
-$deb_build_gnu_system =~ s/^.*-//;
+@deb_build_gnu_triple = split(/-/, $deb_build_gnu_type, 2);
+$deb_build_gnu_cpu = $deb_build_gnu_triple[0];
+$deb_build_gnu_system = $deb_build_gnu_triple[1];
 
 # Default host: Current gcc.
 $gcc = `\${CC:-gcc} --print-libgcc-file-name`;
@@ -153,8 +153,9 @@ if ($gcc ne '') {
 	$gcc=$archtable{$list[0]};
 	$deb_host_arch = $list[0];
 	$deb_host_gnu_type = $gcc;
-        ($deb_host_gnu_system = $gcc) =~ s/^.*-//;
-        ($deb_host_gnu_cpu = $gcc ) =~ s/-.*$//;
+	@deb_host_gnu_triple = split(/-/, $deb_host_gnu_type, 2);
+	$deb_host_gnu_cpu = $deb_host_gnu_triple[0];
+	$deb_host_gnu_system = $deb_host_gnu_triple[1];
     }
 }
 if (!defined($deb_host_arch)) {
@@ -213,9 +214,10 @@ die "couldn't parse GNU system type $req_host_gnu_type, must be arch-os or arch-
 
 $deb_host_arch = $req_host_arch if $req_host_arch ne '';
 if ($req_host_gnu_type ne '') {
-    $deb_host_gnu_cpu = $deb_host_gnu_system = $deb_host_gnu_type = $req_host_gnu_type;
-    $deb_host_gnu_cpu =~ s/-.*$//;
-    $deb_host_gnu_system =~ s/^.*-//;
+    $deb_host_gnu_type = $req_host_gnu_type;
+    @deb_host_gnu_triple = split(/-/, $deb_host_gnu_type, 2);
+    $deb_host_gnu_cpu = $deb_host_gnu_triple[0];
+    $deb_host_gnu_system = $deb_host_gnu_triple[1];
 }
 
 #$gcc = `\${CC:-gcc} --print-libgcc-file-name`;

+ 5 - 3
utils/start-stop-daemon.c

@@ -34,6 +34,8 @@
 #  define OShpux
 #elif defined(__FreeBSD__)
 #  define OSFreeBSD
+#elif defined(__NetBSD__)
+#  define OSNetBSD
 #else
 #  error Unknown architecture - cannot build start-stop-daemon
 #endif
@@ -45,7 +47,7 @@
 #  include <ps.h>
 #endif
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
 #include <sys/param.h>
 #include <sys/user.h>
 #include <sys/proc.h>
@@ -677,7 +679,7 @@ check(pid_t pid)
 {
 #if defined(OSLinux) || defined(OShpux)
 	if (execname && !pid_is_exec(pid, &exec_stat))
-#elif defined(OSHURD) || defined(OSFreeBSD)
+#elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD)
     /* I will try this to see if it works */
 	if (execname && !pid_is_cmd(pid, execname))
 #endif
@@ -771,7 +773,7 @@ do_procinit(void)
 #endif /* OSHURD */
 
 
-#if defined(OSOpenBSD) || defined(OSFreeBSD)
+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
 static int
 pid_is_cmd(pid_t pid, const char *name)
 {