[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dpkg support for solaris-i386 architecture



Hi Guys,

Back in November 2005 Michael Schultheiss performed initial analysis of
dpkg patches at [1]. Our dpkg implementation has changed a bit since
than.

Attached is the first in the series of dpkg patches which adds
solaris-i386 architecture support used by NexentaOS.

We would like to start submitting patchsets for core packages like dpkg,
apt, debhelper, coreutils, gcc, xorg, and many others. Does it make
sense?

[1] http://lists.debian.org/debian-dpkg/2005/11/msg00017.html

Thanks,
Nexenta Team
Index: scripts/dpkg-architecture.pl
===================================================================
--- scripts/dpkg-architecture.pl	(.../pool/current)	(revision 19911)
+++ scripts/dpkg-architecture.pl	(.../trunk)	(revision 19911)
@@ -81,7 +81,7 @@
 sub split_debian {
     local ($_) = @_;
     
-    if (/^([^-]*)-(.*)/) {
+    if (/^([^-][a-zA-Z_]+)[\.\d]*-(.*)/) {
 	return ($1, $2);
     } else {
 	return ("linux", $_);
@@ -151,6 +151,7 @@
 # Set default values:
 
 chomp ($deb_build_arch = `dpkg --print-architecture`);
+($deb_os, $deb_cpu) = &split_debian($deb_host_arch);
 &syserr("dpkg --print-architecture failed") if $?>>8;
 $deb_build_gnu_type = &debian_to_gnu($deb_build_arch);
 
@@ -258,6 +259,14 @@
 	      DEB_HOST_ARCH DEB_HOST_ARCH_OS DEB_HOST_ARCH_CPU
 	      DEB_HOST_GNU_CPU DEB_HOST_GNU_SYSTEM DEB_HOST_GNU_TYPE);
 
+# nexenta fixups...
+if ($deb_os == "solaris") {
+	$deb_build_gnu_system = "solaris";
+	$deb_host_gnu_system = "solaris";
+	$deb_build_gnu_type =~ s/i486/i386/;
+	$deb_host_gnu_type =~ s/i486/i386/;
+}
+
 $env{'DEB_BUILD_ARCH'}=$deb_build_arch;
 $env{'DEB_BUILD_ARCH_OS'}=$deb_build_arch_os;
 $env{'DEB_BUILD_ARCH_CPU'}=$deb_build_arch_cpu;
Index: ostable
===================================================================
--- ostable	(.../pool/current)	(revision 19911)
+++ ostable	(.../trunk)	(revision 19911)
@@ -21,3 +21,4 @@
 netbsd		netbsd		netbsd[^-]*
 openbsd		openbsd		openbsd[^-]*
 hurd		gnu		gnu[^-]*
+solaris         pc-solaris2.11  solaris.*

Reply to: