packages: mdadm/mdadm.spec, mdadm/mdadm-hostname.patch (NEW) - rel 4; alway...

arekm arekm at pld-linux.org
Thu Sep 17 11:39:10 CEST 2009


Author: arekm                        Date: Thu Sep 17 09:39:10 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 4; always set some hostname

---- Files affected:
packages/mdadm:
   mdadm.spec (1.93 -> 1.94) , mdadm-hostname.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/mdadm/mdadm.spec
diff -u packages/mdadm/mdadm.spec:1.93 packages/mdadm/mdadm.spec:1.94
--- packages/mdadm/mdadm.spec:1.93	Thu Sep  3 12:36:24 2009
+++ packages/mdadm/mdadm.spec	Thu Sep 17 11:39:05 2009
@@ -8,7 +8,7 @@
 Summary(pl.UTF-8):	Narzędzie do tworzenia i obsługi programowych macierzy RAID
 Name:		mdadm
 Version:	3.0
-Release:	3
+Release:	4
 License:	GPL v2+
 Group:		Base
 Source0:	http://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.bz2
@@ -20,6 +20,7 @@
 Source5:	%{name}-initramfs-hook
 Source6:	%{name}-initramfs-local-top
 Patch0:		%{name}-degraded.patch
+Patch1:		%{name}-hostname.patch
 URL:		http://www.kernel.org/pub/linux/utils/raid/mdadm/
 BuildRequires:	groff
 BuildRequires:	rpmbuild(macros) >= 1.213
@@ -82,6 +83,7 @@
 # just setup system with / on RAID1 and try to boot with the 1st or
 # the 2nd disk disconnected
 #%patch0 -p1
+%patch1 -p1
 
 %build
 %if %{with initrd}
@@ -190,6 +192,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.94  2009/09/17 09:39:05  arekm
+- rel 4; always set some hostname
+
 Revision 1.93  2009/09/03 10:36:24  arekm
 - rel 3; require latest rc-scripts
 

================================================================
Index: packages/mdadm/mdadm-hostname.patch
diff -u /dev/null packages/mdadm/mdadm-hostname.patch:1.1
--- /dev/null	Thu Sep 17 11:39:10 2009
+++ packages/mdadm/mdadm-hostname.patch	Thu Sep 17 11:39:05 2009
@@ -0,0 +1,34 @@
+--- mdadm-3.0/mdadm.c~	2009-06-02 07:48:29.000000000 +0200
++++ mdadm-3.0/mdadm.c	2009-09-17 11:35:48.599193152 +0200
+@@ -1016,10 +1016,11 @@
+ 	if (homehost == NULL)
+ 		homehost = conf_get_homehost(&require_homehost);
+ 	if (homehost == NULL || strcmp(homehost, "<system>")==0) {
+-		if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0) {
++		if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0)
+ 			sys_hostname[sizeof(sys_hostname)-1] = 0;
+-			homehost = sys_hostname;
+-		}
++		else
++			sprintf(sys_hostname, "%s", "<unknown>");
++		homehost = sys_hostname;
+ 	}
+ 
+ 	ident.autof = autof;
+--- mdadm-3.0/mapfile.c~	2009-06-02 07:48:29.000000000 +0200
++++ mdadm-3.0/mapfile.c	2009-09-17 11:37:04.422518848 +0200
+@@ -308,10 +308,11 @@
+ 	char *homehost = conf_get_homehost(&require_homehost);
+ 
+ 	if (homehost == NULL || strcmp(homehost, "<system>")==0) {
+-		if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0) {
++		if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0)
+ 			sys_hostname[sizeof(sys_hostname)-1] = 0;
+-			homehost = sys_hostname;
+-		}
++		else
++			sprintf(sys_hostname, "%s", "(unknown)");
++		homehost = sys_hostname;
+ 	}
+ 
+ 	for (md = mdstat ; md ; md = md->next) {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/mdadm/mdadm.spec?r1=1.93&r2=1.94&f=u



More information about the pld-cvs-commit mailing list