rpms/s390utils/devel 0001-s390-tools-1.5.0-su.patch, NONE, 1.1 0002-s390-tools-1.5.0-fdasd-raid.patch, NONE, 1.1 0003-s390-tools-1.5.0-fmtpercentage.patch, NONE, 1.1 0004-s390-tools-1.8.0-automenu.patch, NONE, 1.1 0005-s390-tools-1.5.3-lvm.patch, NONE, 1.1 0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch, NONE, 1.1 0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch, NONE, 1.1 0008-s390-tools-1.8.0-zipl-timeout.patch, NONE, 1.1 0009-s390-tools-1.8.0-zipl-target.patch, NONE, 1.1 0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch, NONE, 1.1 0011-s390-tools-1.5.3-fdasd-raid.patch, NONE, 1.1 0012-s390-tools-1.8.0-initscript-fix.patch, NONE, 1.1 0013-s390-tools-1.8.0-cflags.patch, NONE, 1.1 cmsfs-1.1.8-kernel26.patch, NONE, 1.1 cmsfs-1.1.8-warnings.patch, NONE, 1.1 dasd.udev, NONE, 1.1 s390.csh, NONE, 1.1 s390.sh, NONE, 1.1 s390utils.spec, NONE, 1.1 src_vipa-2.0.4-locations.patch, NONE, 1.1 zfcp.udev, NONE, 1.1 zfcpconf.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Dan Horák sharkcz at fedoraproject.org
Tue Apr 7 08:03:09 UTC 2009


Author: sharkcz

Update of /cvs/pkgs/rpms/s390utils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10970

Modified Files:
	.cvsignore sources 
Added Files:
	0001-s390-tools-1.5.0-su.patch 
	0002-s390-tools-1.5.0-fdasd-raid.patch 
	0003-s390-tools-1.5.0-fmtpercentage.patch 
	0004-s390-tools-1.8.0-automenu.patch 
	0005-s390-tools-1.5.3-lvm.patch 
	0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch 
	0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch 
	0008-s390-tools-1.8.0-zipl-timeout.patch 
	0009-s390-tools-1.8.0-zipl-target.patch 
	0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch 
	0011-s390-tools-1.5.3-fdasd-raid.patch 
	0012-s390-tools-1.8.0-initscript-fix.patch 
	0013-s390-tools-1.8.0-cflags.patch cmsfs-1.1.8-kernel26.patch 
	cmsfs-1.1.8-warnings.patch dasd.udev s390.csh s390.sh 
	s390utils.spec src_vipa-2.0.4-locations.patch zfcp.udev 
	zfcpconf.sh 
Log Message:
initial import

0001-s390-tools-1.5.0-su.patch:

--- NEW FILE 0001-s390-tools-1.5.0-su.patch ---
>From 118f2f03b639dd2ccfb518ceb82e89fcb1eaf024 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sat, 19 Jul 2008 16:30:04 +0200
Subject: [PATCH] s390-tools-1.5.0-su

---
 fdasd/fdasd.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
index 5bec7cc..dce9ed3 100644
--- a/fdasd/fdasd.c
+++ b/fdasd/fdasd.c
@@ -1851,10 +1851,12 @@ fdasd_get_geometry (fdasd_anchor_t *anc)
 	if (anc->verbose) printf("disk type check     : ok\n");
 
         if (dasd_info.FBA_layout != 0) {
-                snprintf(err_str, ERROR_STRING_SIZE, 
-			"%s is not formatted with z/OS compatible "
-			"disk layout!", options.device);
-                fdasd_error(anc, wrong_disk_format, err_str);
+                if(!anc->silent) {
+                    snprintf(err_str, ERROR_STRING_SIZE, 
+			    "%s is not formatted with z/OS compatible "
+			    "disk layout!", options.device);
+                    fdasd_error(anc, wrong_disk_format, err_str);
+                }
         }      
 
 	if (anc->verbose) printf("disk layout check   : ok\n");
-- 
1.6.0.6


0002-s390-tools-1.5.0-fdasd-raid.patch:

--- NEW FILE 0002-s390-tools-1.5.0-fdasd-raid.patch ---
>From b492189d95a523e9176c1dac4de0fb1216a3af14 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sat, 19 Jul 2008 16:32:00 +0200
Subject: [PATCH] s390-tools-1.5.0-fdasd-raid

---
 fdasd/fdasd.c |   55 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
index dce9ed3..d011b69 100644
--- a/fdasd/fdasd.c
+++ b/fdasd/fdasd.c
@@ -214,10 +214,10 @@ fdasd_error(fdasd_anchor_t *anc, enum fdasd_failure why, char *str)
 static int
 read_line(void) 
 {
-	bzero(line_buffer, LINE_LENGTH);
 	line_ptr = line_buffer;
         if (!fgets(line_buffer, LINE_LENGTH, stdin))
 		return 0;
+	line_buffer[LINE_LENGTH-1] = 0;
 	while (*line_ptr && !isgraph(*line_ptr))
 		line_ptr++;
 	return *line_ptr;
@@ -278,6 +278,8 @@ fdasd_partition_type (char *str)
 		strcpy(str, "Linux native");
 	else if (strncmp("SWAP  ", str, 6) == 0)
 		strcpy(str, "Linux swap");
+	else if (strncmp("RAID  ", str, 6) == 0)
+		strcpy(str, "Linux Raid");
 	else
 		strcpy(str, "unknown");
 
@@ -1062,6 +1064,7 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc)
 			strncpy(c1, s2, 31);
 		}
 		else {
+			char str[20];
 			char *tmp = strstr(ch, "SWAP");
 
 			/* create a new data set name */
@@ -1069,7 +1072,15 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc)
 				k++;
 
 			setpos(anc, k, i-1);
-			
+
+			strncpy(s2, ch, 44);
+			s2[44]=0;
+			vtoc_ebcdic_dec(s2, s2, 44);
+			c2 = strstr(s2, "PART");
+			if (c2 != NULL) strncpy(str, c2+=9, 6);
+			str[6] = '\0';
+			fdasd_partition_type(str);
+
 			strncpy(ch, "LINUX.V               "
 				"                      ", 44);
 
@@ -1087,8 +1098,16 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc)
 			c1 += 4;
 			if (tmp)
 				strncpy(c1, ".SWAP", 5);
-			else
-				strncpy(c1, ".NATIVE", 7);
+			else {
+				if (strcmp("unknown", str) == 0) {
+					strncpy(c1, ".NATIVE", 7);
+				}
+				else {
+					strncpy(c1, ".", 1);
+					strncpy(c1+1, c2, 6);
+				}
+			}
+
 		}
 		vtoc_ebcdic_enc(ch, ch, 44);
 		if (anc->verbose) printf("f1 ");
@@ -1325,9 +1344,10 @@ fdasd_change_part_type (fdasd_anchor_t *anc)
 
 	printf("current partition type is: %s\n\n", fdasd_partition_type(str));
 	printf("   1  Linux native\n" \
-	       "   2  Linux swap\n\n");
+	       "   2  Linux swap\n" \
+	       "   3  Linux raid\n\n");
 	part_type = 0;
-	while ((part_type < 1) || (part_type > 2)) {
+	while ((part_type < 1) || (part_type > 3)) {
         	while (!isdigit(part_type = 
 				read_char("new partition type: ")));
         	part_type -= 48;
@@ -1340,6 +1360,9 @@ fdasd_change_part_type (fdasd_anchor_t *anc)
         case 2:
 		strncpy(str, "SWAP  ", 6);
                 break;
+        case 3:
+		strncpy(str, "RAID  ", 6);
+                break;
         default:
                 printf("'%d' is not supported!\n", part_type);
         }
@@ -1503,7 +1526,7 @@ fdasd_process_invalid_vtoc(fdasd_anchor_t *anc)
 static void
 fdasd_process_valid_vtoc(fdasd_anchor_t *anc, unsigned long blk)
 {
-	int f1_counter = 0, f7_counter = 0, f5_counter = 0;
+	int f1_counter = 0, f7_counter = 0, f5_counter = 0, oldfmt = 0;
 	int i, part_no, f1_size = sizeof(format1_label_t);
 	partition_info_t *part_info = anc->first;
 	format1_label_t f1_label;
@@ -1538,14 +1561,26 @@ fdasd_process_valid_vtoc(fdasd_anchor_t *anc, unsigned long blk)
 			vtoc_ebcdic_enc(part_info->f1->DS1DSNAM,
 					part_info->f1->DS1DSNAM, 44);
 
-			if ((part_no < 0) || (part_no >= USABLE_PARTITIONS))
+			/* this dasd has data set names 0000-0002
+                           but we use now 0001-0003 */
+                        if (part_no == -1)
+                                oldfmt++;
+
+			if (((oldfmt == 0) && (part_no < 0))
+			    || (part_no >= USABLE_PARTITIONS))
 				printf("WARNING: partition number (%i) found "
 				       "in data set name of an existing "
 				       "partition\ndoes not match range of "
 				       "possible partition numbers (1-%d)\n\n",
 				       part_no + 1, USABLE_PARTITIONS);
-			else
-				setpos(anc, part_no, f1_counter);
+			else {
+				if (oldfmt) /* correct +1 */ {
+					setpos(anc, part_no+1, f1_counter);
+					printf("Correcting f1 header number!\n");
+				}
+				else
+					setpos(anc, part_no, f1_counter);
+			}
 
 			part_info = part_info->next;
 			f1_counter++;
-- 
1.6.0.6


0003-s390-tools-1.5.0-fmtpercentage.patch:

--- NEW FILE 0003-s390-tools-1.5.0-fmtpercentage.patch ---
>From 6e939e7804c33e54577a6801e266bab9a8c6a24c Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sat, 19 Jul 2008 16:32:52 +0200
Subject: [PATCH] s390-tools-1.5.0-fmtpercentage

---
 dasdfmt/dasdfmt.c |   32 +++++++++++++++++++++++++++++---
 dasdfmt/dasdfmt.h |    4 +++-
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/dasdfmt/dasdfmt.c b/dasdfmt/dasdfmt.c
index 55616cc..54e8950 100644
--- a/dasdfmt/dasdfmt.c
+++ b/dasdfmt/dasdfmt.c
@@ -47,6 +47,7 @@ static void exit_usage(int exitcode)
 	       "       -V or --version  means print version\n"
 	       "       -L or --no_label means don't write disk label\n"
 	       "       -p or --progressbar means show a progress bar\n"
+	       "       -P or --percentage means show a progress bar\n"
 	       "       -m x or --hashmarks=x means show a hashmark every x "
 	       "cylinders\n"
 	       "       -v means verbose mode\n"
@@ -169,6 +170,7 @@ static void init_info(dasdfmt_info_t *info)
 	info->print_progressbar = 0;
 	info->print_hashmarks   = 0;
 	info->hashstep          = 0;
+	info->print_percentage  = 0;
 	info->force             = 0;
 	info->writenolabel      = 0;
 	info->labelspec         = 0;
@@ -550,7 +552,7 @@ static void dasdfmt_format(dasdfmt_info_t *info, struct hd_geometry *drive_geo,
 			   format_data_t *format_params)
 {
 	format_data_t format_step;
-	int j, k, cyl, tmp, p1, p2;
+	int j, k, cyl, tmp, p1, p2, p;
 
 	if (info->print_hashmarks) {
 		if ((info->hashstep < 1) || (info->hashstep > 1000)) {
@@ -609,6 +611,24 @@ static void dasdfmt_format(dasdfmt_info_t *info, struct hd_geometry *drive_geo,
 				printf("#");
 				fflush(stdout);
 			}
+                if(info->print_percentage)
+                {
+                        p2 = p1;
+                        p1 = cyl*100/drive_geo->cylinders;
+                        if (p1 != p2)
+                         {
+                                p = (k - format_params->start_unit) * 100 /
+                                    (format_params->stop_unit
+                                     - format_params->start_unit);
+                                printf("cyl %5d of %5d |  %3d%%\n",
+                                    (k - format_params->start_unit)
+                                    / drive_geo->heads,
+                                    (format_params->stop_unit
+                                     - format_params->start_unit)
+                                    / drive_geo->heads, p);
+                                fflush(stdout);
+                        }
+                }
 
 		if (k % drive_geo->heads == 0) {
 			k += drive_geo->heads;
@@ -840,11 +860,17 @@ int main(int argc,char *argv[])
 			break;
 
 		case 'p':
-			if (!info.print_hashmarks) info.print_progressbar=1;
+			if (!info.print_hashmarks && !info.print_percentage)
+				info.print_progressbar=1;
+			break;
+
+                case 'P':
+                        if (!info.print_hashmarks && !info.print_progressbar)
+                                info.print_percentage=1;
 			break;
 
 		case 'm':
-			if (!info.print_progressbar) 
+			if (!info.print_progressbar && !info.print_percentage) 
 			{
 				hashstep_str=optarg;
 				info.print_hashmarks=1;
diff --git a/dasdfmt/dasdfmt.h b/dasdfmt/dasdfmt.h
index 2dc1583..32d0803 100644
--- a/dasdfmt/dasdfmt.h
+++ b/dasdfmt/dasdfmt.h
@@ -147,7 +147,7 @@ struct hd_geometry {
 	if (*endptr) ERRMSG_EXIT(EXIT_MISUSE,"%s: " str " "    \
 	"is in invalid format\n",prog_name);}
 
-#define dasdfmt_getopt_string "b:n:l:f:d:m:hpLtyvVFk"
+#define dasdfmt_getopt_string "b:n:l:f:d:m:hpPLtyvVFk"
 
 static struct option dasdfmt_getopt_long_options[]=
 {
@@ -158,6 +158,7 @@ static struct option dasdfmt_getopt_long_options[]=
         { "force",       0, 0, 'F'},
         { "progressbar", 0, 0, 'p'},
         { "hashmarks",   1, 0, 'm'},
+	{ "percentage",  0, 0, 'P'},
         { "label",       1, 0, 'l'},
         { "devno",       1, 0, 'n'},
         { "device",      1, 0, 'f'},
@@ -192,6 +193,7 @@ typedef struct dasdfmt_info {
         int   withoutprompt;
         int   print_progressbar;
         int   print_hashmarks, hashstep;
+	int   print_percentage;
         int   force;
         int   writenolabel;
         int   labelspec;
-- 
1.6.0.6


0004-s390-tools-1.8.0-automenu.patch:

--- NEW FILE 0004-s390-tools-1.8.0-automenu.patch ---
>From 91275200e3d22d56d8722ec308617c6b3ba9911b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Mar 2009 10:33:22 +0100
Subject: [PATCH] s390-tools-1.8.0-automenu.patch

---
 zipl/man/zipl.8 |    7 +++
 zipl/src/job.c  |  162 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 zipl/src/scan.c |    4 +-
 zipl/src/zipl.c |    1 +
 4 files changed, 168 insertions(+), 6 deletions(-)

diff --git a/zipl/man/zipl.8 b/zipl/man/zipl.8
index 8a83c01..6ebf240 100644
--- a/zipl/man/zipl.8
+++ b/zipl/man/zipl.8
@@ -249,6 +249,13 @@ whether they contain a dump signature or not.
 This option can only be used together with
 .BR \-\-mvdump .
 
+.TP
+.BR "\-x" " or " "\-\-no-automenu"
+Disables the automatic creation of a multiboot menu. Specifying a menu with the
+"-m <MENU>" option or a section disables this feature, too. This option was
+added for compatibility with previous versions of the multiboot version of
+zipl.
+
 .SH EXAMPLE
 1. Scenario: prepare disk for booting a Linux kernel image using the
 following parameters:
diff --git a/zipl/src/job.c b/zipl/src/job.c
index 2f69104..388e63a 100644
--- a/zipl/src/job.c
+++ b/zipl/src/job.c
@@ -43,6 +43,7 @@ static struct option options[] = {
 	{ "version",		no_argument,		NULL, 'v'},
 	{ "verbose",		no_argument,		NULL, 'V'},
 	{ "add-files",		no_argument,		NULL, 'a'},
+	{ "no-automenu",        no_argument,            NULL, 'x'},
 	{ "tape",		required_argument,	NULL, 'T'},
 	{ "dry-run",		no_argument,		NULL, '0'},
 	{ "force",		no_argument,		NULL, 'f'},
@@ -50,7 +51,7 @@ static struct option options[] = {
 };
 
 /* Command line option abbreviations */
-static const char option_string[] = "-c:t:i:r:p:P:d:D:M:s:m:hHnVvaT:f";
+static const char option_string[] = "-c:t:i:r:p:P:d:D:M:s:m:hHnVvaxT:f";
 
 struct command_line {
 	char* data[SCAN_KEYWORD_NUM];
@@ -62,11 +63,14 @@ struct command_line {
 	int version;
 	int verbose;
 	int add_files;
+	int automenu;
 	int dry_run;
 	int force;
 	enum scan_section_type type;
 };
 
+/* Global variable for default boot target. Ugly but necessary... */
+static char *default_target;
 
 static int
 store_option(struct command_line* cmdline, enum scan_keyword_id keyword,
@@ -92,6 +96,7 @@ get_command_line(int argc, char* argv[], struct command_line* line)
 	int i;
 
 	memset((void *) &cmdline, 0, sizeof(struct command_line));
+	cmdline.automenu = 1;
 	cmdline.type = section_invalid;
 	is_keyword = 0;
 	/* Process options */
@@ -101,16 +106,22 @@ get_command_line(int argc, char* argv[], struct command_line* line)
 		switch (opt) {
 		case 'd':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_dumpto,
 					  optarg);
 			break;
 		case 'D':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_dumptofs,
 					  optarg);
 			break;
 		case 'M':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_mvdump,
 					  optarg);
 #ifndef __s390x__
@@ -121,35 +132,49 @@ get_command_line(int argc, char* argv[], struct command_line* line)
 			break;
 		case 'i':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_image,
 					  optarg);
 			break;
 		case 'P':
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_parameters,
 					  optarg);
 			break;
 		case 'p':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_parmfile,
 					  optarg);
 			break;
 		case 'r':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_ramdisk,
 					  optarg);
 			break;
 		case 's':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_segment,
 					  optarg);
 			break;
 		case 't':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_target,
 					  optarg);
 			break;
 		case 'T':
 			is_keyword = 1;
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
 			rc = store_option(&cmdline, scan_keyword_tape,
 					  optarg);
 			break;
@@ -190,6 +215,10 @@ get_command_line(int argc, char* argv[], struct command_line* line)
 		case 'f':
 			cmdline.force = 1;
 			break;
+		case 'x':
+			cmdline.automenu = 0;
+			scan_key_table[1][8] = req;
+			break;
 		case 1:
 			/* Non-option is interpreted as section name */
 			if (cmdline.section != NULL) {
@@ -214,6 +243,10 @@ get_command_line(int argc, char* argv[], struct command_line* line)
 	if (cmdline.help || cmdline.version) {
 		/* Always accept --help and --version */
 	} else if ((cmdline.menu != NULL) || (cmdline.section != NULL)) {
+		/* If either menu or section has been selected disable
+		   automenu generation */
+		cmdline.automenu = 0;
+		scan_key_table[1][8] = req;
 		/* Config file mode */
 		if ((cmdline.menu != NULL) && (cmdline.section != NULL)) {
 			error_reason("Option 'menu' cannot be used when "
@@ -832,7 +865,14 @@ get_job_from_section_data(char* data[], struct job_data* job, char* section)
 		/* IPL job */
 		job->id = job_ipl;
 		/* Fill in name of bootmap directory */
-		job->bootmap_dir = misc_strdup(data[(int) scan_keyword_target]);
+		if (data[(int) scan_keyword_target] == NULL) {
+			if (default_target == NULL) {
+				error_text("Unable to find default section in your config file.");
+				break;
+			}
+			job->bootmap_dir = misc_strdup(default_target);
+		} else
+			job->bootmap_dir = misc_strdup(data[(int) scan_keyword_target]);
 		if (job->bootmap_dir == NULL)
 			return -1;
 		/* Fill in name and address of image file */
@@ -1102,6 +1142,8 @@ get_menu_job(struct scan_token* scan, char* menu, struct job_data* job)
 		if (temp_job == NULL)
 			return -1;
 		memset((void *) temp_job, 0, sizeof(struct job_data));
+		if (data[(int) scan_keyword_target] == NULL)
+			data[(int) scan_keyword_target] = misc_strdup(job->bootmap_dir);
 		rc = get_job_from_section_data(data, temp_job,
 					job->data.menu.entry[current].name);
 		if (rc) {
@@ -1268,10 +1310,109 @@ get_section_job(struct scan_token* scan, char* section, struct job_data* job,
 }
 
 
+/* Create a fake menu to simulate the old s390utils-1.1.7 multiboot
+ * behaviour. */
+static struct scan_token *
+create_fake_menu(struct scan_token *scan)
+{
+	int i, j, pos, numsec, size, defaultpos;
+	char *name;
+	char *target;
+	char *seclist[1024];
+	char *defaultsection;
+	char buf[1024];
+	struct scan_token *tmp;
+
+	/* Count # of sections */
+	numsec = 0;
+	name = NULL;
+	target = NULL;
+	for (i = 0; (int) scan[i].id != 0; i++) {
+		if (scan[i].id == scan_id_section_heading) {
+			name = scan[i].content.section.name;
+			if (strcmp(DEFAULTBOOT_SECTION, name))
+				seclist[numsec++] = name;
+		}
+		if (scan[i].id == scan_id_keyword_assignment &&
+		    (scan[i].content.keyword.keyword == scan_keyword_dumpto ||
+		     scan[i].content.keyword.keyword == scan_keyword_dumptofs)) {
+			numsec--;
+			continue;
+		}
+		if (scan[i].id == scan_id_keyword_assignment &&
+		    scan[i].content.keyword.keyword == scan_keyword_target &&
+		    !strcmp(DEFAULTBOOT_SECTION, name))
+			target = scan[i].content.keyword.value;
+	}
+	get_default_section(scan, &defaultsection, &j);
+
+	if (defaultsection == NULL) {
+		error_text("Unable to find default section in your config file.");
+		return NULL;
+	}
+
+	if (target == NULL) {
+		error_text("Keyword target is missing in default section.");
+		return NULL;
+	}
+
+	default_target = misc_strdup(target);
+
+	size = i+6+numsec;
+	tmp = (struct scan_token *) misc_malloc(size * sizeof(struct scan_token));
+	if (tmp == NULL) {
+		error_text("Couldn't allocate memory for menu entries");
+		return NULL;
+	}
+
+	memset(tmp, 0, size * sizeof(struct scan_token));
+	memcpy(tmp, scan, i * sizeof(struct scan_token)); 
+	free(scan);
+	scan = tmp;
+
+	defaultpos = 0;
+	for (j = 0; j < numsec; j++) {
+		if (!strcmp(defaultsection, seclist[j]))
+			defaultpos = j+1;
+	}
+
+	snprintf(buf, 1024, "%d", defaultpos);
+
+	scan[i].id = scan_id_menu_heading;
+	scan[i].line = i;
+	scan[i++].content.menu.name = misc_strdup("rh-automatic-menu");
+	scan[i].id = scan_id_keyword_assignment;
+	scan[i].line = i;
+	scan[i].content.keyword.keyword = scan_keyword_target;
+	scan[i++].content.keyword.value = misc_strdup(target);
+	scan[i].id = scan_id_keyword_assignment;
+	scan[i].line = i;
+	scan[i].content.keyword.keyword = scan_keyword_default;
+	scan[i++].content.keyword.value = misc_strdup(buf);
+	scan[i].id = scan_id_keyword_assignment;
+	scan[i].line = i;
+	scan[i].content.keyword.keyword = scan_keyword_prompt;
+	scan[i++].content.keyword.value = misc_strdup("1");
+	scan[i].id = scan_id_keyword_assignment;
+	scan[i].line = i;
+	scan[i].content.keyword.keyword = scan_keyword_timeout;
+	scan[i++].content.keyword.value = misc_strdup("15");
+
+	pos = i;
+	for (i = 0; i<numsec; i++) {
+		scan[pos].id = scan_id_number_assignment;
+		scan[pos].line = pos;
+		scan[pos].content.number.number = i+1;
+		scan[pos++].content.number.value = misc_strdup(seclist[i]);
+	}
+
+	return scan;
+}
+
 static int
 get_job_from_config_file(struct command_line* cmdline, struct job_data* job)
 {
-	struct scan_token* scan;
+	struct scan_token* scan, *nscan;
 	char* filename;
 	char* source;
 	int rc;
@@ -1303,9 +1444,22 @@ get_job_from_config_file(struct command_line* cmdline, struct job_data* job)
 		scan_free(scan);
 		return rc;
 	}
+
+	if (cmdline->automenu) {
+		nscan = create_fake_menu(scan);
+		if (nscan == NULL) {
+			scan_free(scan);
+			return -1;
+		}
+		scan = nscan;
+	}
+
 	/* Get job from config file data */
-	if (cmdline->menu != NULL)
+	if (cmdline->menu != NULL || cmdline->automenu) {
+		if (cmdline->automenu)
+			cmdline->menu = misc_strdup("rh-automatic-menu");
 		rc = get_menu_job(scan, cmdline->menu, job);
+	}
 	else {
 		rc = get_section_job(scan, cmdline->section, job,
 				cmdline->data[(int) scan_keyword_parameters]);
diff --git a/zipl/src/scan.c b/zipl/src/scan.c
index 9948092..7227a33 100644
--- a/zipl/src/scan.c
+++ b/zipl/src/scan.c
@@ -33,9 +33,9 @@ enum scan_key_state scan_key_table[SCAN_SECTION_NUM][SCAN_KEYWORD_NUM] = {
  *			     rs                                 enu
  */
 /* defaultboot	*/
-	{opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, opt, inv, inv},
+	{opt, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, opt, inv, inv},
 /* ipl		*/
-	{inv, inv, inv, req, opt, opt, opt, inv, req, inv, inv, inv, inv, inv},
+	{inv, inv, inv, req, opt, opt, opt, inv, opt, inv, inv, inv, inv, inv},
 /* segment load */
 	{inv, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv, inv},
 /* part dump	*/
diff --git a/zipl/src/zipl.c b/zipl/src/zipl.c
index e466e34..9dfb469 100644
--- a/zipl/src/zipl.c
+++ b/zipl/src/zipl.c
@@ -71,6 +71,7 @@ static const char* usage_text[] = {
 "-n, --noninteractive            Answer all confirmation questions with 'yes'",
 "-V, --verbose                   Provide more verbose output",
 "-a, --add-files                 Add all referenced files to bootmap file",
+"-x, --no-automenu               Don't autogenerate multiboot menu",
 "    --dry-run                   Simulate run but don't modify IPL records"
 };
 
-- 
1.6.0.6


0005-s390-tools-1.5.3-lvm.patch:

--- NEW FILE 0005-s390-tools-1.5.3-lvm.patch ---
>From 1e1e66f65675343567b47406ceb4d4ff50a25dce Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sun, 20 Jul 2008 09:14:30 +0200
Subject: [PATCH] s390-tools-1.5.3-lvm

---
 fdasd/fdasd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
index d011b69..9101c01 100644
--- a/fdasd/fdasd.c
+++ b/fdasd/fdasd.c
@@ -280,6 +280,8 @@ fdasd_partition_type (char *str)
 		strcpy(str, "Linux swap");
 	else if (strncmp("RAID  ", str, 6) == 0)
 		strcpy(str, "Linux Raid");
+	else if (strncmp("LVM   ", str, 6) == 0)
+		strcpy(str, "Linux LVM");
 	else
 		strcpy(str, "unknown");
 
-- 
1.6.0.6


0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch:

--- NEW FILE 0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch ---
>From 52473d7292d58ec0343123ee10b1005d9ff62d37 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sun, 20 Jul 2008 09:22:48 +0200
Subject: [PATCH] s390-tools-1.5.3-dumpconf-vmlinuz

---
 etc/init.d/dumpconf |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 etc/init.d/dumpconf

diff --git a/etc/init.d/dumpconf b/etc/init.d/dumpconf
old mode 100755
new mode 100644
index 17a7c29..1f719f5
--- a/etc/init.d/dumpconf
+++ b/etc/init.d/dumpconf
@@ -287,6 +287,13 @@ status_vmcmd()
 
 start()
 {
+	# create zfcp dump symlink
+	if [ -f /boot/vmlinuz-`uname -r`kdump ]; then
+		ln -sf /boot/vmlinuz-`uname -r`kdump /boot/zfcpdump
+	else
+		rm -f /boot/zfcpdump
+	fi
+	
 	if [ "$ON_PANIC" == "" ]; then
 		ON_PANIC="stop"
 	fi
-- 
1.6.0.6


0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch:

--- NEW FILE 0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch ---
>From 1536e0140cbce3c8837478cfc25ea45dc3681cce Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sun, 20 Jul 2008 09:24:05 +0200
Subject: [PATCH] s390-tools-1.5.3-zipl-zfcpdump-2

---
 common.mak |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common.mak b/common.mak
index 62c17e2..3acb534 100644
--- a/common.mak
+++ b/common.mak
@@ -38,8 +38,8 @@ GROUP		= $(shell id -gn)
 export INSTROOT BINDIR LIBDIR MANDIR OWNER GROUP
 
 # Special defines for zfcpdump
-ZFCPDUMP_DIR    = /usr/local/share/zfcpdump
-ZFCPDUMP_IMAGE  = zfcpdump.image
+ZFCPDUMP_DIR    = /boot
+ZFCPDUMP_IMAGE  = zfcpdump
 ZFCPDUMP_RD     = zfcpdump.rd
 export ZFCPDUMP_DIR ZFCPDUMP_IMAGE ZFCPDUMP_RD
 endif
-- 
1.6.0.6


0008-s390-tools-1.8.0-zipl-timeout.patch:

--- NEW FILE 0008-s390-tools-1.8.0-zipl-timeout.patch ---
>From a43e6e889fe44cae8a4da73ac3d81c1389fee905 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Mar 2009 10:34:50 +0100
Subject: [PATCH] s390-tools-1.8.0-zipl-timeout

---
 zipl/src/job.c  |   11 ++++++++++-
 zipl/src/scan.c |    2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/zipl/src/job.c b/zipl/src/job.c
index 388e63a..fe3286e 100644
--- a/zipl/src/job.c
+++ b/zipl/src/job.c
@@ -1318,6 +1318,7 @@ create_fake_menu(struct scan_token *scan)
 	int i, j, pos, numsec, size, defaultpos;
 	char *name;
 	char *target;
+	char *timeout;
 	char *seclist[1024];
 	char *defaultsection;
 	char buf[1024];
@@ -1327,6 +1328,7 @@ create_fake_menu(struct scan_token *scan)
 	numsec = 0;
 	name = NULL;
 	target = NULL;
+	timeout = NULL;
 	for (i = 0; (int) scan[i].id != 0; i++) {
 		if (scan[i].id == scan_id_section_heading) {
 			name = scan[i].content.section.name;
@@ -1343,6 +1345,10 @@ create_fake_menu(struct scan_token *scan)
 		    scan[i].content.keyword.keyword == scan_keyword_target &&
 		    !strcmp(DEFAULTBOOT_SECTION, name))
 			target = scan[i].content.keyword.value;
+
+		if (scan[i].id == scan_id_keyword_assignment &&
+		    scan[i].content.keyword.keyword == scan_keyword_timeout)
+			timeout = scan[i].content.keyword.value;
 	}
 	get_default_section(scan, &defaultsection, &j);
 
@@ -1396,7 +1402,10 @@ create_fake_menu(struct scan_token *scan)
 	scan[i].id = scan_id_keyword_assignment;
 	scan[i].line = i;
 	scan[i].content.keyword.keyword = scan_keyword_timeout;
-	scan[i++].content.keyword.value = misc_strdup("15");
+	if (timeout)
+		scan[i++].content.keyword.value = misc_strdup(timeout);
+	else
+		scan[i++].content.keyword.value = misc_strdup("15");
 
 	pos = i;
 	for (i = 0; i<numsec; i++) {
diff --git a/zipl/src/scan.c b/zipl/src/scan.c
index 7227a33..caca3cf 100644
--- a/zipl/src/scan.c
+++ b/zipl/src/scan.c
@@ -33,7 +33,7 @@ enum scan_key_state scan_key_table[SCAN_SECTION_NUM][SCAN_KEYWORD_NUM] = {
  *			     rs                                 enu
  */
 /* defaultboot	*/
-	{opt, inv, inv, inv, inv, inv, inv, inv, req, inv, inv, opt, inv, inv},
+	{opt, inv, inv, inv, inv, inv, inv, inv, req, inv, opt, opt, inv, inv},
 /* ipl		*/
 	{inv, inv, inv, req, opt, opt, opt, inv, opt, inv, inv, inv, inv, inv},
 /* segment load */
-- 
1.6.0.6


0009-s390-tools-1.8.0-zipl-target.patch:

--- NEW FILE 0009-s390-tools-1.8.0-zipl-target.patch ---
>From a4d2366cc716f8ce3f159fd8e8b585b04b7a5924 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Mar 2009 10:35:14 +0100
Subject: [PATCH] s390-tools-1.8.0-zipl-target

---
 zipl/src/job.c |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/zipl/src/job.c b/zipl/src/job.c
index fe3286e..3be5520 100644
--- a/zipl/src/job.c
+++ b/zipl/src/job.c
@@ -246,7 +246,6 @@ get_command_line(int argc, char* argv[], struct command_line* line)
 		/* If either menu or section has been selected disable
 		   automenu generation */
 		cmdline.automenu = 0;
-		scan_key_table[1][8] = req;
 		/* Config file mode */
 		if ((cmdline.menu != NULL) && (cmdline.section != NULL)) {
 			error_reason("Option 'menu' cannot be used when "
@@ -1226,19 +1225,35 @@ get_section_job(struct scan_token* scan, char* section, struct job_data* job,
 {
 	char* data[SCAN_KEYWORD_NUM];
 	char* buffer;
+	char* default_section;
 	int rc;
 	int i;
 
+	rc = get_default_section(scan, &default_section, &i);
+	if (rc)
+		return rc;
 	if (section == NULL) {
-		rc = get_default_section(scan, &section, &i);
-		if (rc)
-			return rc;
+		section = default_section;
 		if (i) {
 			/* 'defaultmenu' was specified */
 			rc = get_menu_job(scan, section, job);
 			return rc;
 		}
 	}
+	else
+	{
+		char* name = NULL;
+		
+		for (i = 0; (int) scan[i].id != 0; i++) {
+			if (scan[i].id == scan_id_section_heading) {
+				name = scan[i].content.section.name;
+			}
+			if (scan[i].id == scan_id_keyword_assignment &&
+			    scan[i].content.keyword.keyword == scan_keyword_target &&
+			    !strcmp(DEFAULTBOOT_SECTION, name))
+				default_target = misc_strdup(scan[i].content.keyword.value);
+		}
+	}
 	if (strcmp(section, DEFAULTBOOT_SECTION) == 0) {
 		error_reason("Special section '" DEFAULTBOOT_SECTION "' cannot "
 			     "be used as target section");
-- 
1.6.0.6


0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch:

--- NEW FILE 0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch ---
>From eedf33ef46224a67e09c38ee58c57f3dd8d9acf8 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Sun, 20 Jul 2008 09:26:13 +0200
Subject: [PATCH] s390-tools-1.5.3-zipl-zfcpdump-man

---
 zipl/man/zipl.8 |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/zipl/man/zipl.8 b/zipl/man/zipl.8
index 6ebf240..8d2b42c 100644
--- a/zipl/man/zipl.8
+++ b/zipl/man/zipl.8
@@ -198,6 +198,10 @@ larger than any single ECKD DASD partition could hold.
 It is not possible to specify both this parameter and the name of a menu
 or configuration section on the command line at the same time.
 
+Note that before using this option the "kernel-kdump" rpm has to be installed
+and the dumpconf service script has to be started using
+"service dumpconf start".
+
 .TP
 .BR "\-m <MENU>" " or " "--menu=<MENU>"
 Install the multi-boot configuration defined in menu section <MENU> of the
-- 
1.6.0.6


0011-s390-tools-1.5.3-fdasd-raid.patch:

--- NEW FILE 0011-s390-tools-1.5.3-fdasd-raid.patch ---
>From 1fc8467cdb52feb751a711c304ef0fc88ec82155 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan at danny.cz>
Date: Fri, 25 Jul 2008 13:57:00 +0200
Subject: [PATCH] s390-tools-1.5.3-fdasd-raid

---
 fdasd/fdasd.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c
index 9101c01..f63ce5a 100644
--- a/fdasd/fdasd.c
+++ b/fdasd/fdasd.c
@@ -1068,6 +1068,7 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc)
 		else {
 			char str[20];
 			char *tmp = strstr(ch, "SWAP");
+			char *tmp1 = strstr(ch, "RAID");
 
 			/* create a new data set name */
 			while (getpos(anc, k) > -1)
@@ -1098,9 +1099,12 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc)
 			strncpy(c1, dsno, 4);
 
 			c1 += 4;
-			if (tmp)
-				strncpy(c1, ".SWAP", 5);
-			else {
+			if (tmp || tmp1) {
+				if (tmp)
+					strncpy(c1, ".SWAP", 5);
+				if (tmp1)
+					strncpy(c1, ".RAID", 5);
+			} else {
 				if (strcmp("unknown", str) == 0) {
 					strncpy(c1, ".NATIVE", 7);
 				}
-- 
1.6.0.6


0012-s390-tools-1.8.0-initscript-fix.patch:

--- NEW FILE 0012-s390-tools-1.8.0-initscript-fix.patch ---
>From 6235108700462cc4b425ae7a697915f8147f46c3 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Fri, 13 Mar 2009 10:37:36 +0100
Subject: [PATCH] s390-tools-1.8.0-initscript-fix

---
 etc/init.d/cpuplugd  |   21 +++++++++++++++------
 etc/init.d/dumpconf  |    9 ++++++---
 etc/init.d/mon_statd |   31 ++++++++++++++++++++++---------
 3 files changed, 43 insertions(+), 18 deletions(-)

diff --git a/etc/init.d/cpuplugd b/etc/init.d/cpuplugd
index f8df06b..cbd5f90 100755
--- a/etc/init.d/cpuplugd
+++ b/etc/init.d/cpuplugd
@@ -1,16 +1,18 @@
 #!/bin/bash
 ### BEGIN INIT INFO
 # Provides: cpuplugd
-# Required-Start: $remote_fs
-# Required-Stop: $remote_fs
-# Default-Start:  1 2 3 4 5
-# Default-Stop: 0 6
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Should-Start: 
+# Should-Stop: 
+# Default-Start: 
+# Default-Stop: 0 1 2 3 4 5 6
 # Short-Description: Start the cpu hotplug daemon for Linux on System z
 # Description: Starts the cpuplugd. It uses the configuration
 #              file /etc/sysconfig/cpuplugd
 ### END INIT INFO
 
-# chkconfig: 12345 01 99
+# chkconfig: - 01 99
 
 DAEMON=cpuplugd
 DAEMON_PATH=/usr/sbin/cpuplugd
@@ -26,7 +28,13 @@ start()
 {
 	if [ ! -f $RUN_PID_FILE ]; then
 		echo -n $"Starting $DAEMON:"
-		$DAEMON_PATH $OPTIONS && log_success_msg || log_failure_msg
+		$DAEMON_PATH $OPTIONS
+		if [ $? == "0" ]; then
+			touch /var/lock/subsys/cpuplugd
+			log_success_msg
+		else
+			log_failure_msg
+		fi
 		echo
 	else
 		echo "$DAEMON (pid $(cat $RUN_PID_FILE)) is already running..."
@@ -41,6 +49,7 @@ stop()
 		killproc $DAEMON_PATH -TERM
 		log_success_msg
 		rm -f $RUN_PID_FILE
+		rm -f /var/lock/subsys/cpuplugd
 	else
 		log_failure_msg
 	fi
diff --git a/etc/init.d/dumpconf b/etc/init.d/dumpconf
index 1f719f5..3935582 100644
--- a/etc/init.d/dumpconf
+++ b/etc/init.d/dumpconf
@@ -3,14 +3,14 @@
 # Provides: dumpconf
 # Required-Start: $local_fs
 # Required-Stop: $local_fs
-# Default-Start:  1 2 3 4 5
-# Default-Stop: 0 6
+# Default-Start: 
+# Default-Stop: 0 1 2 3 4 5 6
 # Short-Description: Configure s390 dump feature
 # Description: Configures the s390 dump feature. It uses the configuration file
 #              /etc/sysconfig/dumpconf
 ### END INIT INFO
 
-# chkconfig: 12345 01 99
+# chkconfig: - 01 99
 
 DUMP_CONFIG_FILE=/etc/sysconfig/dumpconf
 
@@ -320,6 +320,8 @@ start()
 		echo stop > $ON_PANIC_CONFIG_FILE
 		echo "ERROR: $ERRMSG Check $DUMP_CONFIG_FILE!" >&2
 		return $RETVAL
+	else
+		touch /var/lock/subsys/dumpconf
 	fi
 
 	return $RETVAL
@@ -334,6 +336,7 @@ stop()
 	else
 		echo "Disabling dump on panic failed" >&2
 	fi
+	rm -f /var/lock/subsys/dumpconf
 	return $RETVAL
 }
 
diff --git a/etc/init.d/mon_statd b/etc/init.d/mon_statd
index 18f920b..fe1e0e4 100755
--- a/etc/init.d/mon_statd
+++ b/etc/init.d/mon_statd
@@ -1,16 +1,18 @@
 #!/bin/bash
 ### BEGIN INIT INFO
 # Provides: mon_statd
-# Required-Start: $remote_fs
-# Required-Stop: $remote_fs
-# Default-Start:  1 2 3 4 5
-# Default-Stop: 0 6
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Should-Start: 
+# Should-Stop: 
+# Default-Start: 
+# Default-Stop: 0 1 2 3 4 5 6
 # Short-Description: Configure the mon_fsstatd and mon_procd daemons.
 # Description: Configures the mon_fsstatd and mon_procd daemons. It uses the
 #              configuration file /etc/sysconfig/mon_statd.
 ### END INIT INFO
 
-# chkconfig: 12345 01 99
+# chkconfig: - 01 99
 
 DAEMON=mon_statd
 FSSTATD=mon_fsstatd
@@ -45,16 +47,26 @@ start()
 
 	if [ ! -f $FSSTATD_PID_FILE -a "$FSSTAT" = "yes" ]; then
 		echo -n $"Starting $FSSTATD:"
-		$FSSTATD_PATH -i $FSSTAT_INTERVAL && log_success_msg ||
-						     log_failure_msg
+		$FSSTATD_PATH -i $FSSTAT_INTERVAL
+		if [ $? == 0 ]; then
+			touch /var/lock/subsys/mon_statd
+			log_success_msg
+		else
+			log_failure_msg
+		fi
 	elif [ "$FSSTAT" = "yes" ]; then
 		echo "$FSSTATD (pid $(cat $FSSTATD_PID_FILE)) is already running..."
 	fi
 
 	if [ ! -f $PROCD_PID_FILE -a "$PROC" = "yes" ]; then
 		echo -n $"Starting $PROCD:"
-		$PROCD_PATH -i $PROC_INTERVAL && log_success_msg ||
-						 log_failure_msg
+		$PROCD_PATH -i $PROC_INTERVAL
+		if [ $? == 0 ]; then
+			touch /var/lock/subsys/mon_statd
+			log_success_msg
+		else
+			log_failure_msg
+		fi
 	elif [ "$PROC" = "yes" ]; then
 		echo "$PROCD (pid $(cat $PROCD_PID_FILE)) is already running..."
 	fi
@@ -80,6 +92,7 @@ stop()
 	else
 		log_failure_msg
 	fi
+	rm -f /var/lock/subsys/mon_statd
 	echo
 }
 
-- 
1.6.0.6


0013-s390-tools-1.8.0-cflags.patch:

--- NEW FILE 0013-s390-tools-1.8.0-cflags.patch ---
>From a6ca2114c948a71c0bb5c9a5e7d0392315f1cefd Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Wed, 25 Mar 2009 08:56:38 +0100
Subject: [PATCH] allow override of default optimization level

---
 common.mak |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common.mak b/common.mak
index 3acb534..0aff3ba 100644
--- a/common.mak
+++ b/common.mak
@@ -22,7 +22,7 @@ STRIP           = $(CROSS_COMPILE)strip
 OBJCOPY         = $(CROSS_COMPILE)objcopy
 OBJDUMP         = $(CROSS_COMPILE)objdump
 INSTALL         = install # FIXME: We need s390-install (strip)
-CFLAGS		= $(OPT_FLAGS) -Wall -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE)
+CFLAGS		= -Wall -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) $(OPT_FLAGS)
 export AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP INSTALL CFLAGS
 
 # Support alternate install root
-- 
1.6.0.6


cmsfs-1.1.8-kernel26.patch:

--- NEW FILE cmsfs-1.1.8-kernel26.patch ---
diff -urN cmsfs-1.1.8/cmsfssed.sh cmsfs-1.1.8_/cmsfssed.sh
--- cmsfs-1.1.8/cmsfssed.sh	2003-02-28 17:52:59.000000000 -0500
+++ cmsfs-1.1.8_/cmsfssed.sh	2004-05-28 16:36:22.000000000 -0400
@@ -85,7 +85,7 @@
         DRIVER_SOURCE="cmsfs22x.c"
         MODULES_DIRECTORY="/lib/modules/`uname -r`/fs"
         ;;
-    2.4*|2.5*)
+    2.4*|2.5*|2.6*)
         LINUX_RELEASE="2.4"
 #       ln -s cmsfs24x.c cmsfsvfs.c
         INCLUDES="-I/lib/modules/`uname -r`/build/include"

cmsfs-1.1.8-warnings.patch:

--- NEW FILE cmsfs-1.1.8-warnings.patch ---
--- cmsfs-1.1.8/cmsfsvol.c.warnings	2003-07-18 01:38:57.000000000 +0200
+++ cmsfs-1.1.8/cmsfsvol.c	2005-09-06 16:57:15.000000000 +0200
@@ -52,7 +52,7 @@
 
     /*  print a header;  looks like CMS  */
     (void) printf("LABEL  VDEV M  STAT   CYL TYPE \
-BLKSZ   FILES  BLKS USED-(%) BLKS LEFT  BLK TOTAL\n");
+BLKSZ   FILES  BLKS USED-(%%) BLKS LEFT  BLK TOTAL\n");
 
     for (      ; i < argc ; i++)
       {


--- NEW FILE dasd.udev ---
KERNEL=="dasd*[a-z]", SUBSYSTEM=="block", PROGRAM=="/bin/sh -c 'cd /sys/block/$kernel/device;a=$$(pwd -P);echo $${a##*/}'", SYMLINK+="dasd/%c/disc"
KERNEL=="dasd*[0-9]", SUBSYSTEM=="block", PROGRAM=="/bin/sh -c 'cd /sys/block/$parent/device;a=$$(pwd -P);echo $${a##*/}'", SYMLINK+="dasd/%c/part%n"


--- NEW FILE s390.csh ---
# /etc/profile.d/s390.csh - set TERM variable

if ( `/sbin/consoletype` == "serial" ) then
    setenv TERM dumb
endif


--- NEW FILE s390.sh ---
# /etc/profile.d/s390.sh - set TERM variable

contype=`/sbin/consoletype`
if [ "$contype" == "serial" ]; then
    export TERM=dumb
fi


--- NEW FILE s390utils.spec ---
%define cmsfsver 1.1.8c
%define vipaver 2.0.4
%define hbaapiver 2.0

%{!?_initddir: %define _initddir %{_initrddir}}

Name:           s390utils
Summary:        Utilities and daemons for IBM System/z
Group:          System Environment/Base
Version:        1.8.0
Release:        5%{?dist}
Epoch:          2
License:        GPLv2 and GPLv2+ and CPL
Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch:  s390 s390x
URL:            http://www.ibm.com/developerworks/linux/linux390/s390-tools.html
# http://www.ibm.com/developerworks/linux/linux390/s390-tools-%{version}.html
Source0:        http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/s390-tools-%{version}.tar.bz2
Source2:        s390.sh
Source3:        s390.csh
Source4:        http://www.linuxvm.org/Patches/S390/cmsfs-%{cmsfsver}.tar.gz
Source5:        zfcpconf.sh
# http://www.ibm.com/developerworks/linux/linux390/src_vipa-%{vipaver}.html
Source6:        http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/src_vipa-%{vipaver}.tar.gz
Source7:        zfcp.udev
Source8:        dasd.udev
# http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi-%{hbaapiver}.html
Source9:        http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/lib-zfcp-hbaapi-%{hbaapiver}.tar.gz
Patch1:         0001-s390-tools-1.5.0-su.patch
Patch2:         0002-s390-tools-1.5.0-fdasd-raid.patch
Patch3:         0003-s390-tools-1.5.0-fmtpercentage.patch
Patch4:         0004-s390-tools-1.8.0-automenu.patch
Patch5:         0005-s390-tools-1.5.3-lvm.patch
Patch6:         0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch
Patch7:         0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch
Patch8:         0008-s390-tools-1.8.0-zipl-timeout.patch
Patch9:         0009-s390-tools-1.8.0-zipl-target.patch
Patch10:        0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch
Patch11:        0011-s390-tools-1.5.3-fdasd-raid.patch
Patch12:        0012-s390-tools-1.8.0-initscript-fix.patch
Patch13:        0013-s390-tools-1.8.0-cflags.patch
Patch100:       cmsfs-1.1.8-warnings.patch
Patch101:       cmsfs-1.1.8-kernel26.patch
Patch200:       src_vipa-2.0.4-locations.patch
Requires:       s390utils-base = %{epoch}:%{version}-%{release}
Requires:       s390utils-osasnmpd = %{epoch}:%{version}-%{release}
Requires:       s390utils-cpuplugd = %{epoch}:%{version}-%{release}
Requires:       s390utils-mon_statd = %{epoch}:%{version}-%{release}
Requires:       s390utils-ziomon = %{epoch}:%{version}-%{release}
Requires:       s390utils-libzfcphbaapi = %{epoch}:%{version}-%{release}
Requires:       s390utils-libzfcphbaapi-devel = %{epoch}:%{version}-%{release}
Requires:       s390utils-cmsfs = %{epoch}:%{version}-%{release}


%description
This is a meta package for installing all s390-tools sub packages.
If you do not need all sub packages, it is recommended to install the
required sub packages separately.

The s390utils packages contain a set of user space utilities that should to
be used together with the zSeries (s390) Linux kernel and device drivers.

%prep
%setup -q -n s390-tools-%{version} -a 4 -a 6 -a 9

# Fix to honor the silent flag for wrongly formated disks
%patch1 -p1 -b .su

# Enhancement to add raid partiton support to dasds
%patch2 -p1 -b .fdasd-raid

# Enhancement to add a percentage output bar to dasdfmt, needed for anaconda
%patch3 -p1 -b .fmtpercentage

# Patch to maintain backwards compatibility with older zipl multiboot feature
%patch4 -p1 -b .automenu

# Patch to fix installer LVM partitions that show up as "unknown" in fdasd (#250176)
%patch5 -p1 -b .lvm

# Added zfcpdump kernel symlink to dumpconf init script (#430550)
%patch6 -p1 -b .dumpconf-vmlinuz

# Updates for cleanup SCSI dumper code for upstream integration - tool (#253118)
%patch7 -p1 -b .zipl-zfcpdump-2

# Add support for timeout parameter in /etc/zipl.conf (#323651)
%patch8 -p1 -b .zipl-timeout

# Fix for zipl fail when section is specified and target is not repeated for all sections (#381201)
%patch9 -p1 -b .zipl-target

# Update documentation for zfcpdump (#437477)
%patch10 -p1 -b .zipl-zfcpdump-man

# fix the Linux Raid partition type is not retained when changed through fdasd (#445271)
%patch11 -p1 -b .fdasd-raid

# fix init scripts of cpuplugd, dumpconf and mon_statd
%patch12 -p1 -b .initscripts-fix

# allow override of optimization level in CFLAGS
%patch13 -p1 -b .cflags

#
# cmsfs
#
pushd cmsfs-%{cmsfsver}
# Patch to fix a couple of code bugs
%patch100 -p1 -b .warnings

# build on kernel-2.6, too
%patch101 -p1 -b .cmsfs26
popd

#
# src_vipa
#
pushd src_vipa-%{vipaver}
# fix location of the library
%patch200 -p1 -b .locations
popd

# remove --strip from install
find . -name Makefile | xargs sed -i 's/$(INSTALL) -s/$(INSTALL)/g'

pushd cmsfs-%{cmsfsver}
# cmdfs: fix encoding
iconv -f ISO8859-1 -t UTF-8 -o README.new README
touch -r README README.new
mv README.new README
# prepare docs
mv README README.cmsfs
mv CREDITS CREDITS.cmsfs
popd


pushd lib-zfcp-hbaapi-%{hbaapiver}
# lib-zfcp-hbaapi: fix perms
chmod a-x *.h AUTHORS README ChangeLog LICENSE
# update sg3_utils library name
%if 0%{?fedora} >= 10
sed -i 's/-lsgutils/-lsgutils2/g' Makefile.in
%endif
popd


%build
make OPT_FLAGS="$RPM_OPT_FLAGS"

pushd cmsfs-%{cmsfsver}
./configure
make CC="gcc $RPM_OPT_FLAGS"
popd

pushd src_vipa-%{vipaver}
make CC_FLAGS="$RPM_OPT_FLAGS -fPIC" LIBDIR=%{_libdir}
popd

pushd lib-zfcp-hbaapi-%{hbaapiver}
%configure --disable-static --enable-vendor-lib=no
make EXTRA_CFLAGS="$RPM_OPT_FLAGS"
popd

%install
rm -rf ${RPM_BUILD_ROOT}

mkdir -p $RPM_BUILD_ROOT{%{_lib},%{_libdir},/sbin,/bin,/boot,%{_mandir}/man1,%{_mandir}/man8,%{_sbindir},%{_bindir},%{_sysconfdir}/{profile.d,udev/rules.d,rc.d/init.d,sysconfig}}

make install \
        INSTROOT=$RPM_BUILD_ROOT \
        MANDIR=$RPM_BUILD_ROOT%{_mandir} \
        LIBDIR=${RPM_BUILD_ROOT}/%{_lib}

%{__mkdir} -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_initddir}
%{__mkdir} -p ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d
%{__mkdir} -p ${RPM_BUILD_ROOT}/sbin

install -p -m 644 zipl/boot/tape0.bin $RPM_BUILD_ROOT/boot/tape0
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -p -m 755 %{SOURCE5} $RPM_BUILD_ROOT/sbin
install -p -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/56-zfcp.rules
install -p -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/56-dasd.rules

install -m 644 etc/sysconfig/dumpconf ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 755 etc/init.d/dumpconf ${RPM_BUILD_ROOT}%{_initddir}/dumpconf

install -m 644 etc/sysconfig/mon_statd ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 755 etc/init.d/mon_statd ${RPM_BUILD_ROOT}%{_initddir}/mon_statd

install -m 644 etc/sysconfig/cpuplugd ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 755 etc/init.d/cpuplugd ${RPM_BUILD_ROOT}%{_initddir}/cpuplugd

install -D -m 644 etc/udev/rules.d/57-osasnmpd.rules ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d

install -p -m 755 cmsfs-%{cmsfsver}/cmsfscat $RPM_BUILD_ROOT%{_sbindir}
install -p -m 755 cmsfs-%{cmsfsver}/cmsfslst $RPM_BUILD_ROOT%{_sbindir}
install -p -m 755 cmsfs-%{cmsfsver}/cmsfsvol $RPM_BUILD_ROOT%{_sbindir}
install -p -m 755 cmsfs-%{cmsfsver}/cmsfscp  $RPM_BUILD_ROOT%{_sbindir}
install -p -m 755 cmsfs-%{cmsfsver}/cmsfsck  $RPM_BUILD_ROOT%{_sbindir}
install -p -m 644 cmsfs-%{cmsfsver}/cmsfscat.8 $RPM_BUILD_ROOT%{_mandir}/man8
install -p -m 644 cmsfs-%{cmsfsver}/cmsfslst.8 $RPM_BUILD_ROOT%{_mandir}/man8
install -p -m 644 cmsfs-%{cmsfsver}/cmsfsvol.8 $RPM_BUILD_ROOT%{_mandir}/man8
install -p -m 644 cmsfs-%{cmsfsver}/cmsfscp.8  $RPM_BUILD_ROOT%{_mandir}/man8
install -p -m 644 cmsfs-%{cmsfsver}/cmsfsck.8  $RPM_BUILD_ROOT%{_mandir}/man8

# src_vipa
pushd src_vipa-%{vipaver}
make install LIBDIR=%{_libdir} INSTROOT=$RPM_BUILD_ROOT
popd

pushd lib-zfcp-hbaapi-%{hbaapiver}
%makeinstall docdir=$RPM_BUILD_ROOT%{_docdir}/lib-zfcp-hbaapi-devel-%{hbaapiver}
# keep only html docs
rm -rf $RPM_BUILD_ROOT%{_docdir}/lib-zfcp-hbaapi-devel-%{hbaapiver}/latex
popd


%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root,-)
%doc README

#
# ************************* s390-tools base package  *************************
#
%package base
# src_vipa is CPL, the rest is GPLv2 or GPLv2+
License:        GPLv2 and GPLv2+ and CPL
Summary:        S390 base tools
Group:          System Environment/Base
Requires:       perl gawk sed coreutils
Requires:       sysfsutils
Requires(pre):   chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts


%description base
s390 base tools. This collection provides the following utilities:
   * dasdfmt:
     Low-level format ECKD DASDs with the classical linux disk layout or the
     new z/OS compatible disk layout.

   * fdasd:
     Create or modify partitions on ECKD DASDs formatted with the z/OS
     compatible disk layout.

   * dasdview:
     Display DASD and VTOC information or dump the contents of a DASD to the
     console.

   * dasdinfo:
     Display unique DASD ID, either UID or volser.

   * udev rules:
     - 59-dasd.rules: rules for unique DASD device nodes created in /dev/disk/.

   * zipl:
     Make DASDs or tapes bootable for system IPL or system dump.

   * zgetdump:
     Retrieve system dumps from either tapes or DASDs.

   * qetharp:
     Read and flush the ARP cache on OSA Express network cards.

   * tape390_display:
     Display information on the message display facility of a zSeries tape
     device.

   * tape390_crypt:
     Control and query crypto settings for 3592 zSeries tape devices.

   * qethconf:
     bash shell script simplifying the usage of qeth IPA (IP address
     takeover), VIPA (Virtual IP address) and Proxy ARP.

   * dbginfo.sh:
     Shell script collecting useful information about the current system for
     debugging purposes.

   * zfcpdump:
     Dump tool to create system dumps on fibre channel attached SCSI disks.
     It is installed using the zipl command.

   * zfcpdump_v2:
     Version 2 of the zfcpdump tool. Now based on the upstream 2.6.26 Linux
     kernel.

   * ip_watcher:
     Provides HiperSockets Network Concentrator functionality.
     It looks for addresses in the HiperSockets and sets them as Proxy ARP
     on the OSA cards. It also adds routing entries for all IP addresses
     configured on active HiperSockets devices.
     Use start_hsnc.sh to start HiperSockets Network Concentrator.

   * tunedasd:
     Adjust tunable parameters on DASD devices.

   * vmconvert:
     Convert system dumps created by the z/VM VMDUMP command into dumps with
     LKCD format. These LKCD dumps can then be analyzed with the dump analysis
     tool lcrash.

   * vmcp:
     Allows Linux users to send commands to the z/VM control program (CP).
     The normal usage is to invoke vmcp with the command you want to
     execute. The response of z/VM is written to the standard output.

   * vmur:
     Allows to work with z/VM spool file queues (reader, punch, printer).

   * zfcpdbf:
     Display debug data of zfcp. zfcp provides traces via the s390 debug
     feature. Those traces are filtered with the zfcpdbf script, i.e. merge
     several traces, make it more readable etc.

   * scsi_logging_level:
     Create, get or set the logging level for the SCSI logging facility.

   * zconf:
     Set of scripts to configure and list status information of Linux for
     zSeries IO devices.
     - chccwdev: Modify generic attributes of channel attached devices.
     - lscss:    List channel subsystem devices.
     - lsdasd:   List channel attached direct access storage devices (DASD).
     - lsqeth:   List all qeth-based network devices with their corresponding
                 settings.
     - lstape:   List tape devices, both channel and FCP attached.
     - lszfcp:   Shows information contained in sysfs about zfcp adapters,
                 ports and units that are online.
     - lschp:    List information about available channel-paths.
     - chchp:    Modify channel-path state.
     - lsluns:   List available SCSI LUNs depending on adapter or port.
     - lszcrypt: Show Information about zcrypt devices and configuration.
     - chzcrypt: Modify zcrypt configuration.

   * dumpconf:
     Allows to configure the dump device used for system dump in case a kernel
     panic occurs. This tool can also be used as an init script for etc/init.d.
     Prerequisite for dumpconf is a Linux kernel with the "dump on panic"
     feature.

   * ipl_tools:
     Tools set to configure and list reipl and shutdown actions.
     - lsreipl: List information of reipl device.
     - chreipl: Change reipl device settings.
     - lsshut:  List actions which will be done in case of halt, poff, reboot
                or panic.
     - chshut:  Change actions which should be done in case of halt, poff,
                reboot or panic.

For more information refer to the following publications:
   * "Device Drivers, Features, and Commands" chapter "Useful Linux commands"
   * "Using the dump tools"

%post base
/sbin/chkconfig --add dumpconf

%preun base
if [ $1 = 0 ]; then
        # not for updates
        /sbin/service dumpconf stop > /dev/null 2>&1
        /sbin/chkconfig --del dumpconf
fi
:

%files base
%defattr(-,root,root,-)
%doc README
%doc LICENSE
/sbin/vmur
/sbin/zipl
/sbin/dasdfmt
/sbin/dasdinfo
/sbin/dasdview
/sbin/fdasd
/sbin/chccwdev
/sbin/chchp
/sbin/chzcrypt
/sbin/lschp
/sbin/lscss
/sbin/lsdasd
/sbin/lsluns
/sbin/lsqeth
/sbin/lstape
/sbin/lszcrypt
/sbin/lszfcp
/sbin/scsi_logging_level
/sbin/zfcpdbf
/sbin/qetharp
/sbin/qetharp-2.4
/sbin/qetharp-2.6
/sbin/qethconf
/sbin/tape390_display
/sbin/tape390_crypt
/sbin/tunedasd
/sbin/vmcp
/sbin/zgetdump
/sbin/dbginfo.sh
%{_sbindir}/lsreipl
%{_sbindir}/lsshut
%{_sbindir}/chreipl
%{_sbindir}/chshut
%{_sbindir}/ip_watcher.pl
%{_sbindir}/start_hsnc.sh
%{_sbindir}/xcec-bridge
%{_bindir}/vmconvert
%{_initddir}/dumpconf
%config(noreplace) %{_sysconfdir}/sysconfig/dumpconf
%{_mandir}/man1/zfcpdbf.1*
%{_mandir}/man4/prandom.4*
%{_mandir}/man5/zipl.conf.5*
%{_mandir}/man8/chccwdev.8*
%{_mandir}/man8/chchp.8*
%{_mandir}/man8/chreipl.8*
%{_mandir}/man8/chshut.8*
%{_mandir}/man8/chzcrypt.8*
%{_mandir}/man8/dasdfmt.8*
%{_mandir}/man8/dasdinfo.8*
%{_mandir}/man8/dasdview.8*
%{_mandir}/man8/dumpconf.8*
%{_mandir}/man8/fdasd.8*
%{_mandir}/man8/lschp.8*
%{_mandir}/man8/lscss.8*
%{_mandir}/man8/lsdasd.8*
%{_mandir}/man8/lsluns.8*
%{_mandir}/man8/lsqeth.8*
%{_mandir}/man8/lsreipl.8*
%{_mandir}/man8/lsshut.8*
%{_mandir}/man8/lstape.8*
%{_mandir}/man8/lszcrypt.8*
%{_mandir}/man8/lszfcp.8*
%{_mandir}/man8/qetharp.8*
%{_mandir}/man8/qethconf.8*
%{_mandir}/man8/tape390_crypt.8*
%{_mandir}/man8/tape390_display.8*
%{_mandir}/man8/tunedasd.8*
%{_mandir}/man8/vmconvert.8*
%{_mandir}/man8/vmcp.8*
%{_mandir}/man8/vmur.8*
%{_mandir}/man8/zgetdump.8*
%{_mandir}/man8/zipl.8*

# Additional Redhat specific stuff
/boot/tape0
%{_sysconfdir}/profile.d/s390.csh
%{_sysconfdir}/profile.d/s390.sh
%config(noreplace) %{_sysconfdir}/udev/rules.d/56-dasd.rules
%config(noreplace) %{_sysconfdir}/udev/rules.d/56-zfcp.rules
/sbin/zfcpconf.sh

# src_vipa
%{_sbindir}/src_vipa.sh
%{_libdir}/src_vipa.so
%{_mandir}/man8/src_vipa.8.gz

#
# *********************** s390-tools osasnmpd package  ***********************
#
%package osasnmpd
License:        GPLv2+
Summary:        SNMP sub-agent for OSA-Express cards
Group:          System Environment/Daemons
Requires:       net-snmp
BuildRequires:  net-snmp-devel openssl-devel

%description osasnmpd
UCD-SNMP/NET-SNMP sub-agent implementing MIBs provided by OSA-Express
features Fast Ethernet, Gigabit Ethernet, High Speed Token Ring and
ATM Ethernet LAN Emulation in QDIO mode.

%files osasnmpd
%defattr(-,root,root,-)
%{_sbindir}/osasnmpd-2.4
%{_sbindir}/osasnmpd-2.6
%{_sbindir}/osasnmpd
%config(noreplace) %{_sysconfdir}/udev/rules.d/57-osasnmpd.rules
%{_mandir}/man8/osasnmpd.8*

#
# *********************** s390-tools mon_statd package  **********************
#
%package mon_statd
License:         GPLv2
Summary:         Monitoring daemons for Linux in z/VM
Group:           System Environment/Daemons
Requires:        redhat-lsb coreutils
Requires(pre):   chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts

%description mon_statd
Monitoring daemons for Linux in z/VM:

  - mon_fsstatd: Daemon that writes file system utilization data to the
                 z/VM monitor stream.

  - mon_procd:   Daemon that writes process information data to the z/VM
                 monitor stream.

%post mon_statd
/sbin/chkconfig --add mon_statd

%preun mon_statd
if [ $1 = 0 ]; then
        # not for updates
        /sbin/service mon_statd stop > /dev/null 2>&1
        /sbin/chkconfig --del mon_statd
fi
:

%files mon_statd
%defattr(-,root,root,-)
%{_sbindir}/mon_fsstatd
%{_sbindir}/mon_procd
%config(noreplace) %{_sysconfdir}/sysconfig/mon_statd
%{_initddir}/mon_statd
%{_mandir}/man8/mon_fsstatd.8*
%{_mandir}/man8/mon_procd.8*

#
# *********************** s390-tools cpuplugd package  ***********************
#
%package cpuplugd
License:         GPLv2+
Summary:         Daemon that manages CPU and memory resources
Group:           System Environment/Daemons
Requires:        redhat-lsb coreutils
Requires(pre):   chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts

%description cpuplugd
Daemon that manages CPU and memory resources based on a set of rules.
Depending on the workload CPUs can be enabled or disabled. The amount of
memory can be increased or decreased exploiting the CMM1 feature.

%post cpuplugd
/sbin/chkconfig --add cpuplugd

%preun cpuplugd
if [ $1 = 0 ]; then
        # not for updates
        /sbin/service cpuplugd stop > /dev/null 2>&1
        /sbin/chkconfig --del cpuplugd
fi
:

%files cpuplugd
%defattr(-,root,root,-)
%{_initddir}/cpuplugd
%config(noreplace) %{_sysconfdir}/sysconfig/cpuplugd
%{_sbindir}/cpuplugd
%{_mandir}/man5/cpuplugd.conf.5*
%{_mandir}/man8/cpuplugd.8*

#
# *********************** s390-tools ziomon package  *************************
#
%package ziomon
License:        GPLv2
Summary:        S390 ziomon tools
Group:          Applications/System
Requires:       perl lsscsi coreutils blktrace >= 1.0

%description ziomon
Tool set to collect data for zfcp performance analysis.

%files ziomon
%defattr(-,root,root,-)
/sbin/ziomon
/sbin/ziomon_fcpconf
/sbin/ziomon_mgr
/sbin/ziomon_util
/sbin/ziomon_zfcpdd
%{_mandir}/man8/ziomon.8*
%{_mandir}/man8/ziomon_fcpconf.8*
%{_mandir}/man8/ziomon_mgr.8*
%{_mandir}/man8/ziomon_util.8*
%{_mandir}/man8/ziomon_zfcpdd.8*

#
# *********************** libzfcphbaapi package  ***********************
#
%package libzfcphbaapi
License:       CPL
Summary:       ZFCP HBA API Library -- HBA API for the zfcp device driver
Group:         System Environment/Libraries
URL:           http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi.html
BuildRequires: automake autoconf
BuildRequires: doxygen libsysfs-devel
BuildRequires: sg3_utils-devel


%description libzfcphbaapi
ZFCP HBA API Library is an implementation of FC-HBA (see www.t11.org ) for
the zfcp device driver.

%post libzfcphbaapi -p /sbin/ldconfig

%postun libzfcphbaapi -p /sbin/ldconfig

%files libzfcphbaapi
%defattr (-,root,root,-)
%doc lib-zfcp-hbaapi-%{hbaapiver}/README
%doc lib-zfcp-hbaapi-%{hbaapiver}/COPYING
%doc lib-zfcp-hbaapi-%{hbaapiver}/ChangeLog
%doc lib-zfcp-hbaapi-%{hbaapiver}/AUTHORS
%doc lib-zfcp-hbaapi-%{hbaapiver}/LICENSE
%{_libdir}/libzfcphbaapi.so.0*
%{_mandir}/man3/libzfcphbaapi.3*
%{_mandir}/man3/SupportedHBAAPIs.3*
%{_mandir}/man3/UnSupportedHBAAPIs.3*
%{_mandir}/man3/hbaapi.h.3*

#
# *********************** libzfcphbaapi-devel package  ***********************
#
%package libzfcphbaapi-devel
License:  CPL
Summary:  ZFCP HBA API Library -- Development
Group:    Development/Libraries
URL:      http://www.ibm.com/developerworks/linux/linux390/zfcp-hbaapi.html
Requires: %{name}-libzfcphbaapi = %{epoch}:%{version}-%{release}

%description libzfcphbaapi-devel
Headers, libraries and documentation for development to link against
ZFCP HBA API Library.


%files libzfcphbaapi-devel
%defattr (-,root,root,-)
%docdir %{_docdir}/lib-zfcp-hbaapi-devel-%{hbaapiver}
%{_docdir}/lib-zfcp-hbaapi-devel-%{hbaapiver}/
%{_includedir}/hbaapi.h
%{_libdir}/libzfcphbaapi.so
%exclude %{_libdir}/libzfcphbaapi.la

#
# *********************** cmsfs package  ***********************
#
%package cmsfs
License:        GPLv2
Summary:        CMS file system tools
Group:          System Environment/Base
URL:            http://www.casita.net/pub/cmsfs/cmsfs.html
# Requires:

%description cmsfs
This package contains the CMS file system tools.

%files cmsfs
%defattr(-,root,root,-)
%{_sbindir}/cmsfscat
%{_sbindir}/cmsfsck
%{_sbindir}/cmsfscp
%{_sbindir}/cmsfslst
%{_sbindir}/cmsfsvol
%{_mandir}/man8/cmsfscat.8*
%{_mandir}/man8/cmsfsck.8*
%{_mandir}/man8/cmsfscp.8*
%{_mandir}/man8/cmsfslst.8*
%{_mandir}/man8/cmsfsvol.8*


%changelog
* Wed Mar 25 2009 Dan Horák <dan[at]danny.cz> 2:1.8.0-5
- reword the summaries a bit
- add downloadable URLs for Sources
- fix CFLAGS usage

* Fri Mar 13 2009 Dan Horák <dan[at]danny.cz> 2:1.8.0-4
- next round of clean-up for compliance with Fedora

* Sun Mar  8 2009 Dan Horák <dan[at]danny.cz> 2:1.8.0-3
- little clean-up for compliance with Fedora

* Fri Dec 12 2008 Hans-Joachim Picht <hans at linux.vnet.ibm.com> 2:1.8.0-2
- Adapted package for F9

* Tue Dec 8 2008 Michael Holzheu <michael.holzheu at de.ibm.com> 2:1.8.0-1
- Changed spec file to create sub packages
- Updated to zfcphbaapi version 2.0

* Tue Oct 28 2008 Dan Horák <dan[at]danny.cz> 2:1.7.0-4
- disable build-id feature in zipl (#468017)

* Wed Sep 24 2008 Dan Horák <dan[at]danny.cz> 2:1.7.0-3
- drop the mon_tools patch (mon_statd service starts both mon_procd and mon_fsstatd since 1.7.0)

* Thu Aug 28 2008 Dan Horák <dan[at]danny.cz> 2:1.7.0-2
- preserve timestamps on installed files
- add proper handling of initscripts
- fix permissions for some files

* Tue Aug 12 2008 Dan Horák <dan[at]danny.cz> 2:1.7.0-1
- update to s390-tools 1.7.0, src_vipa 2.0.4 and cmsfs 1.1.8c
- rebase or drop RHEL5 patches

* Fri Jul 25 2008 Dan Horák <dhorak at redhat.com> 2:1.5.3-19.el5
- fix use "vmconvert" directly on the vmur device node (#439389)
- fix the Linux Raid partition type is not retained when changed through fdasd (#445271)
- include missing files into the package (#442584)
- Resolves: #439389, #445271, #442584

* Fri Jul 25 2008 Dan Horák <dhorak at redhat.com> 2:1.5.3-18.el5
- split the warnings patch into s390-tools and cmsfs parts
- mismatch between installed /etc/zfcp.conf and zfcpconf.sh expected format (#236016)
- dbginfo.sh exits before running all tests and drops errors (#243299)
- updates for cleanup SCSI dumper code for upstream integration - tool (#253118)
- fix segfault when using LD_PRELOAD=/usr/lib64/src_vipa.so (#282751)
- add support for timeout parameter in /etc/zipl.conf (#323651)
- fixes not listing all the dasds passed as arguments to lsdasd command (#369891)
- fix for zipl fail when section is specified and target is not repeated for all sections (#381201)
- fix for dasdview -s option fails to ignore the garbage value passed (#412951)
- update documentation for zfcpdump (#437477)
- update documentation for lsqeth (#455908)
- Resolves: #236016, #243299, #253118, #282751, #323651, #369891, #381201, #412951, #437477, #455908

* Fri Mar 28 2008 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-17.el5
- Fix error messages and proc/0 entry are not handled correctly (#438819)

* Wed Feb 06 2008 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-16.el5
- Fixed a build problem with the mon_tools patch (#253029)

* Mon Feb 04 2008 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-14.el5
- Added zfcpdump kernel symlink to dumpconf init script (#430550)

* Fri Jan 18 2008 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-13.el5
- Fix tape390_crypt query shows wrong msg 'Kernel does not support tape encryption' (#269181)

* Wed Jan 16 2008 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-12.el5
- Add System z guest file system size in Monitor APPLDATA (#253029)
- Add Dynamic CHPID reconfiguration via SCLP - tools (#253076)
- Add z/VM unit-record device driver - tools (#253078)
- Cleanup SCSI dumper code for upstream integration - tool (#253118)

* Tue Jan 08 2008 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-11.el5
- Fix installer LVM partitions that show up as "unknown" in fdasd (#250176)
- Fixed zfcpconf.sh failure if / and /usr are separated (#279201)

* Mon Sep 24 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.14
- Added missing openssl-devel buildrequires (#281361)

* Thu Aug 23 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.13
- Last updage for -t parameter patch (#202086)

* Tue Aug 14 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.12
- Fix handling of external timer interrupts (#250352)

* Tue Jul 31 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.11
- Update fix for -t parameter for image operations (#202086)

* Fri Jul 27 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.10
- Fixed udev regression from RHEL 4 with /dev/dasd/ (#208189)
- Fixed missing -d option for zgetdump (#228094)

* Thu Jun 28 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.9
- Fix optional -t parameter for image operations (#202086)

* Wed Jun 27 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.8
- Fix wrong manpage (#202250)
- Fix zfcp devices not showing up after boot (#223569)
- Fix help menu of lsqeth showing wrong file (#225159)
- Add tape encryption userspace tool (#228080)
- Add dump on panic initscript and sysconf (#228094)
- Fix a off-by-one error in zfcpdbf (#230527)
- Fix zipl aborting with floating point exception if the target specified is a logical volume (#231240)
- Fix boot menu use wrong conversion table for input on LPAR (#240399)

* Mon Jan 22 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.6
- Fixed problem with invisible zfcp devices after boot (#223569)

* Mon Jan 15 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.5
- Extended fix for automenu bug (#202086)

* Thu Jan 11 2007 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.4
- Updated dbginfo.sh patch to final fix from IBM (#214805)

* Wed Nov 29 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.3
- Fixed problem with missing debugfs for dbginfo.sh (#214805)

* Thu Nov 09 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.2
- Fixed lszfcp bug related to sysfsutils (#210515)

* Tue Nov 07 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10.el5.1
- Removed wrong additional $ in src_vipa.sh (#213395)
- Release and Buildroot specfile fixes

* Wed Sep 13 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-10
- Needed to bump release

* Tue Sep 12 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-9
- Added libsysfs requirement (#201863)
- Fixed zipl problem with missing default target for automenus (#202086)

* Thu Aug 10 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-8
- Added missing sysfsutils requirement for lszfcp (#201863)

* Tue Jul 25 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-7
- Included zfcpdbf, dbginfo.sh and the man1 manpages to package (#184812)

* Tue Jul 18 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-6
- Disabled sysfs support due to API changes in sysfs-2.0.0

* Fri Jul 14 2006 Karsten Hopp <karsten at redhat.de> 2:1.5.3-5
- buildrequire net-snmp-devel

* Fri Jul 14 2006 Jesse Keating <jkeating at redhat.com> - 2:1.5.3-4
- rebuild
- Add missing br libsysfs-devel, indent, zlib-devel

* Wed May 17 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.3-1
- Made src_vipa build on current toolchain again

* Tue May 16 2006 Phil Knirsch <pknirsch at redhat.com>
- Update to s390-tools-1.5.3 from IBM
- Included vmconvert
- Dropped obsolete asm patch

* Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> - 2:1.5.0-2.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Mon Jan 30 2006 Phil Knirsch <pknirsch at redhat.com> 2:1.5.0-2
- Fixed problem with s390-tools-1.5.0-fdasd-raid.patch
- Don't try to remove the non empty _bindir
- Some more install cleanups

* Thu Jan 26 2006 Phil Knirsch <pknirsch at redhat.com>
- Fixed some .macro errors in zipl/boot

* Fri Dec 09 2005 Jesse Keating <jkeating at redhat.com>
- rebuilt

* Thu Oct 20 2005 Phil Knirsch <pknirsch at redhat.com> 2:1.5.0-1
- Large update from 1.3.2 to 1.5.0
- Include osasnmpd and vmcp now by default

* Tue Sep 06 2005 Phil Knirsch <pknirsch at redhat.com> 2:1.3.2-7
- Fixed a couple of code bugs (#143808)

* Fri Jul 29 2005 Phil Knirsch <pknirsch at redhat.com> 2:1.3.2-6
- Corrected filelist for libdir to only include *.so files

* Tue Jun 21 2005 Phil Knirsch <pknirsch at redhat.com> 2:1.3.2-5
- Added src_vipa to s390utils

* Wed Mar 02 2005 Phil Knirsch <pknirsch at redhat.com> 2:1.3.2-4
- bump release and rebuild with gcc 4

* Tue Oct 26 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.2-3
- Put binaries for system recovery in /sbin again.

* Fri Oct 15 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.2-1
- Update to s390-tools-1.3.2
- Added qetharp, qethconf, ip_watcher, tunedasd and various other tools to
  improve functionality on s390(x).

* Wed Oct 06 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.1-7
- Made the raid patch less verbose (#129656)

* Thu Sep 16 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.1-6
- Added prompt=1 and timeout=15 to automatically generated menu

* Tue Aug 31 2004 Karsten Hopp <karsten at redhat.de> 2:1.3.1-5
- install zfcpconf.sh into /sbin

* Tue Aug 24 2004 Karsten Hopp <karsten at redhat.de> 2:1.3.1-4 
- add zfcpconf.sh to read /etc/zfcp.conf and configure the zfcp
  devices

* Thu Jun 24 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.1-3
- Fixed another automenu bug with dumpto and dumptofs (#113204).

* Thu Jun 17 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.1-2
- Fixed automenu patch.
- Fixed problem with installation from tape (#121788).

* Wed Jun 16 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.3.1-1
- Updated to latest upstream version s390-tools-1.3.1

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Mon Jun 07 2004 Karsten Hopp <karsten at redhat.com>
- add cmsfs utils

* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Thu Feb 19 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.2.4-4
- Fixed rebuilt on fc2.

* Thu Feb 19 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.2.4-3
- Fixed automenu patch, was allocating 1 line to little.

* Mon Feb 16 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.2.4-2
- rebuilt

* Mon Feb 16 2004 Phil Knirsch <pknirsch at redhat.com> 2:1.2.4-1
- Updated to latest developerworks release 1.2.4
- Disabled zfcpdump build until i find a way to build it as none-root.

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com> 2:1.2.3-3
- rebuilt

* Thu Dec 04 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.3-2
- Fixed zfcpdump build.

* Fri Nov 28 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.3-1
- New bugfix release 1.2.3 came out today, updated again.

* Wed Nov 26 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.2-1
- Updated to latest Developerworks version 1.2.2
- Cleaned up specfile and patches a little.

* Wed Nov 12 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.1-4.1
- rebuilt

* Wed Nov 12 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.1-4
- Another fix for the new automenu patch. Target was an optional parameter in
  old s390utils, provided compatibility behaviour.

* Mon Oct 20 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.1-3.1
- rebuilt

* Mon Oct 20 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.1-3
- Small fix for the new automenu patch, default section didn't work correctly

* Mon Oct 20 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.1-2.1
- rebuilt

* Fri Oct 17 2003 Phil Knirsch <pknirsch at redhat.com> 2:1.2.1-2
- Patched new zipl to be backwards compatible to old multiboot feature.

* Thu Oct  9 2003 Harald Hoyer <harald at redhat.de> 2:1.2.1-1
- second round at updating to 1.2.1

* Thu Oct 09 2003 Florian La Roche <Florian.LaRoche at redhat.de>
- first round at updating to 1.2.1

* Sat Sep 27 2003 Florian La Roche <Florian.LaRoche at redhat.de>
- add /boot/tape0 for .tdf tape boots

* Fri Jul 25 2003 Florian La Roche <Florian.LaRoche at redhat.de>
- apply dasdfmt patch from 1.2.1

* Fri Jun 20 2003 Phil Knirsch <pknirsch at redhat.com> 1.1.7-1
- Updated to latest upstream version 1.1.7

* Fri May 02 2003 Pete Zaitcev <zaitcev at redhat.com> 1.1.6-7
- Fix usage of initialized permissions for bootmap.

* Tue Apr 29 2003 Florian La Roche <Florian.LaRoche at redhat.de>
- add extra tape loader from Pete Zaitcev

* Mon Apr 14 2003 Karsten Hopp <karsten at redhat.de> 2:1.1.6-5
- drop cpint support

* Mon Mar 24 2003 Karsten Hopp <karsten at redhat.de> 1.1.6-4
- use multiboot as default
- add option to disable multiboot 

* Sat Mar 22 2003 Karsten Hopp <karsten at redhat.de> 1.1.6-3
- add multiboot patch

* Mon Mar 10 2003 Karsten Hopp <karsten at redhat.de> 1.1.6-2
- added percentage patch (used by anaconda to display progress bars)

* Thu Feb 27 2003 Phil Knirsch <pknirsch at redhat.com> 1.1.6-1
- Updated to newest upstream version 1.1.6

* Tue Feb 04 2003 Phil Knirsch <pknirsch at redhat.com> 1.1.5-1
- Updated to newest upstream version 1.1.5

* Tue Feb 04 2003 Karsten Hopp <karsten at redhat.de> 1.1.4-3
- install libraries in /lib*, not /usr/lib*, they are required
  by some tools in /sbin

* Sun Feb 02 2003 Florian La Roche <Florian.LaRoche at redhat.de>
- fix filelist to not include debug files

* Fri Jan 24 2003 Phil Knirsch <pknirsch at redhat.com> 1.1.4-1
- Updated to latest upstream version of IBM.
- Removed all unecessary patches and updated still needed patches.
- Fixed version number. Needed to introduce epoch though.
- A little specfile cleanup.
- Dropped oco-setver and oco-convert as we don't need them anymore.

* Wed Jan 22 2003 Phil Knirsch <pknirsch at redhat.com> 20020226-4
- Added ExclusiveArch tag.

* Mon Oct 21 2002 Phil Knirsch <pknirsch at redhat.com> 20020226-3
- Removed fdisk -> fdasd symlink. Is now provided by util-linux.
- Disabled f5 patch for s390x for now. Enable it later for newer kernels again.

* Mon May 27 2002 Phil Knirsch <pknirsch at redhat.com>
- Fixed dasdview to build on kernels > 2.4.18.

* Wed Apr 24 2002 Karsten Hopp <karsten at redhat.de>
- add IBM 5 patch

* Tue Jan 29 2002 Karsten Hopp <karsten at redhat.de>
- add IBM 4 patch
- add profile.d scripts to set correct TERM in 3270 console

* Thu Dec 18 2001 Karsten Hopp <karsten at redhat.de>
- add cpint programs

* Mon Nov 26 2001 Harald Hoyer <harald at redhat.de> 20011012-6
- fix for #56720

* Thu Nov 15 2001 Karsten Hopp <karsten at redhat.de>
- add fdisk - > fdasd symlink

* Thu Nov 12 2001 Karsten Hopp <karsten at redhat.de>
- add IBM patch (11/09/2001) and redo percentage patch

* Thu Nov 08 2001 Karsten Hopp <karsten at redhat.de>
- re-enable DASD if dasdfmt is interrupted with Ctrl-C

* Mon Nov 05 2001 Harald Hoyer <harald at redhat.de> 20011012-4
- added s390-tools-dasdfmt-percentage.patch

* Mon Oct 22 2001 Karsten Hopp <karsten at redhat.de>
- remove postinstall script

* Mon Oct 15 2001 Karsten Hopp <karsten at redhat.de>
- add IBM's s390-utils-2.patch
- add console to securetty

* Mon Oct 01 2001 Karsten Hopp <karsten at redhat.de>
- added oco-setkver and oco-convert

* Fri Aug 31 2001 Karsten Hopp <karsten at redhat.de>
- don't write error message in silent mode

* Thu Aug 23 2001 Harald Hoyer <harald at redhat.de>
- added s390-tools-dasdfmt-status.patch

* Tue Aug 21 2001 Karsten Hopp <karsten at redhat.de>
- update to the version from Aug 20

* Tue Aug 14 2001 Karsten Hopp <karsten at redhat.de>
- fix permissions

* Mon Aug 13 2001 Karsten Hopp <karsten at redhat.de>
- rename package to s390utils. s390-tools is no longer needed.

* Thu Aug 02 2001 Karsten Hopp <karsten at redhat.de>
- initial build



src_vipa-2.0.4-locations.patch:

--- NEW FILE src_vipa-2.0.4-locations.patch ---
>From b2f1bf78400c686bbdbcf4c29fbbb93367abe409 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Dan=20Hor=C3=A1k?= <dan at danny.cz>
Date: Wed, 25 Mar 2009 09:36:08 +0100
Subject: [PATCH] fix location of the library

---
 Makefile |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 669b6c6..d395fa8 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,8 @@ INSTALL=install
 VERSION=2.0.4
 
 # the path to the .so
-SRC_VIPA_PATH=$(INSTROOT)/usr/lib
+LIBDIR=/usr/lib
+SRC_VIPA_PATH=$(INSTROOT)$(LIBDIR)
 # the path to the starter script
 SRC_VIPA_STARTER_PATH=$(INSTROOT)/usr/sbin
 # path to man page
@@ -34,8 +35,7 @@ src_vipa.so: src_vipa.c
 
 src_vipa.sh:
 	echo '#!/bin/bash' > src_vipa.sh
-	echo 'export LD_LIBRARY_PATH=$(SRC_VIPA_PATH):$$LD_LIBRARY_PATH' >> src_vipa.sh
-	echo 'export LD_PRELOAD=$(SRC_VIPA_PATH)/src_vipa.so' >> src_vipa.sh
+	echo 'export LD_PRELOAD=$(LIBDIR)/src_vipa.so' >> src_vipa.sh
 	echo 'exec $$@' >> src_vipa.sh
 	chmod 755 src_vipa.sh
 
@@ -44,7 +44,6 @@ install: src_vipa.so src_vipa.sh
 	$(INSTALL) -m 755 src_vipa.so $(SRC_VIPA_PATH)
 	$(INSTALL) -m 755 src_vipa.sh $(SRC_VIPA_STARTER_PATH)
 	$(INSTALL) -m 644 src_vipa.8 $(SRC_VIPA_MANPAGE_PATH)/man8
-	ldconfig
 
 clean:
 	rm -f src_vipa.{i,s,o,sh,so} core src_vipa-$(VERSION).tar.gz
-- 
1.6.0.6



--- NEW FILE zfcp.udev ---
KERNEL=="zfcp_cfdc", RUN+="/sbin/zfcpconf.sh"


--- NEW FILE zfcpconf.sh ---
#!/bin/bash

# config file syntax:
# deviceno   WWPN   FCPLUN
#
# Example:
# 0.0.4000 0x5005076300C213e9 0x5022000000000000 
# 0.0.4001 0x5005076300c213e9 0x5023000000000000 
#
#
# manual setup:
# modprobe zfcp
# echo WWPN > /sys/bus/ccw/drivers/zfcp/0.0.4000/port_add
# echo LUN  > /sys/bus/ccw/drivers/zfcp/0.0.4000/WWPN/unit_add
# echo 1    > /sys/bus/ccw/drivers/zfcp/0.0.4000/online
# 
# Example:
# modprobe zfcp
# echo 0x5005076300c213e9 > /sys/bus/ccw/drivers/zfcp/0.0.4000/port_add
# echo 0x5022000000000000 > /sys/bus/ccw/drivers/zfcp/0.0.4000/0x5005076300c213e9/unit_add
# echo 1                  > /sys/bus/ccw/drivers/zfcp/0.0.4000/online

CONFIG=/etc/zfcp.conf
PATH=/bin:/usr/bin:/sbin:/usr/sbin

if [ -f "$CONFIG" ]; then

   if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
      modprobe zfcp
   fi
   if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
      return
   fi
   cat $CONFIG | grep -v "^#" | tr "A-Z" "a-z" | while read line; do
      numparams=$(echo $line | wc -w)
      if [ $numparams == 5 ]; then
         read DEVICE SCSIID WWPN SCSILUN FCPLUN < <(echo $line)
         echo "Warning: Deprecated values in /etc/zfcp.conf, ignoring SCSI ID $SCSIID and SCSI LUN $SCSILUN"
      elif [ $numparams == 3 ]; then
         read DEVICE WWPN FCPLUN < <(echo $line)
      fi
      [ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/$WWPN ] && echo $WWPN > /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/port_add
      [ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/$WWPN/$FCPLUN ] && echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/$WWPN/unit_add
      echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE/0x/}/online
   done
fi


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/s390utils/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	27 Mar 2009 20:28:25 -0000	1.1
+++ .cvsignore	7 Apr 2009 08:03:08 -0000	1.2
@@ -0,0 +1,4 @@
+s390-tools-1.8.0.tar.bz2
+cmsfs-1.1.8c.tar.gz
+lib-zfcp-hbaapi-2.0.tar.gz
+src_vipa-2.0.4.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/s390utils/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	27 Mar 2009 20:28:25 -0000	1.1
+++ sources	7 Apr 2009 08:03:09 -0000	1.2
@@ -0,0 +1,4 @@
+5033eee356663d160784e37b193f93fa  s390-tools-1.8.0.tar.bz2
+71a8ee5918f2c44c385fcfe8350cdc98  cmsfs-1.1.8c.tar.gz
+2cbfffca3f07c61420899f45d221d451  lib-zfcp-hbaapi-2.0.tar.gz
+ba42772e5b305b5e147344442cd70826  src_vipa-2.0.4.tar.gz




More information about the scm-commits mailing list