diff --git a/.cvsignore b/.cvsignore index a302429..535e497 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -s390-tools-1.8.0.tar.bz2 +s390-tools-1.8.1.tar.bz2 cmsfs-1.1.8c.tar.gz lib-zfcp-hbaapi-2.0.tar.gz src_vipa-2.0.4.tar.gz diff --git a/0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch b/0001-s390-tools-1.8.1-common-mak.patch similarity index 100% rename from 0007-s390-tools-1.5.3-zipl-zfcpdump-2.patch rename to 0001-s390-tools-1.8.1-common-mak.patch diff --git a/0003-s390-tools-1.5.0-fmtpercentage.patch b/0003-s390-tools-1.5.0-fmtpercentage.patch deleted file mode 100644 index 437150f..0000000 --- a/0003-s390-tools-1.5.0-fmtpercentage.patch +++ /dev/null @@ -1,116 +0,0 @@ -From 6e939e7804c33e54577a6801e266bab9a8c6a24c Mon Sep 17 00:00:00 2001 -From: Dan Horak -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 - diff --git a/0004-s390-tools-1.8.0-automenu.patch b/0004-s390-tools-1.8.1-zipl-automenu.patch similarity index 78% rename from 0004-s390-tools-1.8.0-automenu.patch rename to 0004-s390-tools-1.8.1-zipl-automenu.patch index 572e672..f0a6412 100644 --- a/0004-s390-tools-1.8.0-automenu.patch +++ b/0004-s390-tools-1.8.1-zipl-automenu.patch @@ -1,14 +1,14 @@ -From 91275200e3d22d56d8722ec308617c6b3ba9911b Mon Sep 17 00:00:00 2001 +From 1648e0dab246190c170e82244c790ef8e9144e40 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Dan=20Hor=C3=A1k?= -Date: Fri, 13 Mar 2009 10:33:22 +0100 -Subject: [PATCH] s390-tools-1.8.0-automenu.patch +Date: Thu, 23 Apr 2009 11:45:36 +0200 +Subject: [PATCH] s390-tools-1.8.1-zipl-automenu --- - zipl/man/zipl.8 | 7 +++ - zipl/src/job.c | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- + zipl/man/zipl.8 | 7 ++ + zipl/src/job.c | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- zipl/src/scan.c | 4 +- zipl/src/zipl.c | 1 + - 4 files changed, 168 insertions(+), 6 deletions(-) + 4 files changed, 197 insertions(+), 9 deletions(-) diff --git a/zipl/man/zipl.8 b/zipl/man/zipl.8 index 8a83c01..6ebf240 100644 @@ -29,7 +29,7 @@ index 8a83c01..6ebf240 100644 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 +index 2f69104..1b7bcb2 100644 --- a/zipl/src/job.c +++ b/zipl/src/job.c @@ -43,6 +43,7 @@ static struct option options[] = { @@ -156,18 +156,17 @@ index 2f69104..388e63a 100644 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) +@@ -214,6 +243,9 @@ 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) +@@ -832,7 +864,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 */ @@ -183,7 +182,7 @@ index 2f69104..388e63a 100644 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) +@@ -1102,6 +1141,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)); @@ -192,7 +191,62 @@ index 2f69104..388e63a 100644 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, +@@ -1150,6 +1191,7 @@ get_default_section(struct scan_token* scan, char** section, int* is_menu) + i = scan_find_section(scan, DEFAULTBOOT_SECTION, + scan_id_section_heading, 0); + if (i<0) { ++ *section = NULL; + error_reason("No '" DEFAULTBOOT_SECTION "' section found and " + "no section specified on command line"); + return -1; +@@ -1169,6 +1211,7 @@ get_default_section(struct scan_token* scan, char** section, int* is_menu) + } + } + /* Should not happen */ ++ *section = NULL; + error_reason("No default section specified"); + return -1; + } +@@ -1184,19 +1227,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, §ion, &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"); +@@ -1268,10 +1327,118 @@ get_section_job(struct scan_token* scan, char* section, struct job_data* job, } @@ -204,6 +258,7 @@ index 2f69104..388e63a 100644 + int i, j, pos, numsec, size, defaultpos; + char *name; + char *target; ++ char *timeout; + char *seclist[1024]; + char *defaultsection; + char buf[1024]; @@ -213,6 +268,7 @@ index 2f69104..388e63a 100644 + 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; @@ -229,6 +285,10 @@ index 2f69104..388e63a 100644 + 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); + @@ -252,7 +312,7 @@ index 2f69104..388e63a 100644 + } + + memset(tmp, 0, size * sizeof(struct scan_token)); -+ memcpy(tmp, scan, i * sizeof(struct scan_token)); ++ memcpy(tmp, scan, i * sizeof(struct scan_token)); + free(scan); + scan = tmp; + @@ -282,7 +342,10 @@ index 2f69104..388e63a 100644 + 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; isection, job, cmdline->data[(int) scan_keyword_parameters]); diff --git a/zipl/src/scan.c b/zipl/src/scan.c -index 9948092..7227a33 100644 +index 9948092..caca3cf 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] = { @@ -336,7 +399,7 @@ index 9948092..7227a33 100644 */ /* 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}, ++ {opt, inv, inv, inv, inv, inv, inv, inv, req, inv, opt, 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}, @@ -344,7 +407,7 @@ index 9948092..7227a33 100644 {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 +index f99177d..2a11404 100644 --- a/zipl/src/zipl.c +++ b/zipl/src/zipl.c @@ -71,6 +71,7 @@ static const char* usage_text[] = { diff --git a/0005-s390-tools-1.5.3-lvm.patch b/0005-s390-tools-1.5.3-lvm.patch deleted file mode 100644 index 79597a4..0000000 --- a/0005-s390-tools-1.5.3-lvm.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1e1e66f65675343567b47406ceb4d4ff50a25dce Mon Sep 17 00:00:00 2001 -From: Dan Horak -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 - diff --git a/0001-s390-tools-1.5.0-su.patch b/0005-s390-tools-1.8.1-fdasd-su.patch similarity index 69% rename from 0001-s390-tools-1.5.0-su.patch rename to 0005-s390-tools-1.8.1-fdasd-su.patch index a40fcc5..0efa435 100644 --- a/0001-s390-tools-1.5.0-su.patch +++ b/0005-s390-tools-1.8.1-fdasd-su.patch @@ -1,17 +1,17 @@ -From 118f2f03b639dd2ccfb518ceb82e89fcb1eaf024 Mon Sep 17 00:00:00 2001 -From: Dan Horak -Date: Sat, 19 Jul 2008 16:30:04 +0200 -Subject: [PATCH] s390-tools-1.5.0-su +From 0ac6c456898d8c09908a35add45d018eb8f76613 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Thu, 23 Apr 2009 11:46:01 +0200 +Subject: [PATCH] s390-tools-1.8.1-fdasd-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 +index ef01c9b..b6802f9 100644 --- a/fdasd/fdasd.c +++ b/fdasd/fdasd.c -@@ -1851,10 +1851,12 @@ fdasd_get_geometry (fdasd_anchor_t *anc) +@@ -2005,10 +2005,12 @@ fdasd_get_geometry (fdasd_anchor_t *anc) if (anc->verbose) printf("disk type check : ok\n"); if (dasd_info.FBA_layout != 0) { @@ -20,7 +20,7 @@ index 5bec7cc..dce9ed3 100644 - "disk layout!", options.device); - fdasd_error(anc, wrong_disk_format, err_str); + if(!anc->silent) { -+ snprintf(err_str, ERROR_STRING_SIZE, ++ 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); diff --git a/0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch b/0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch deleted file mode 100644 index 5b8bf01..0000000 --- a/0006-s390-tools-1.5.3-dumpconf-vmlinuz.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 52473d7292d58ec0343123ee10b1005d9ff62d37 Mon Sep 17 00:00:00 2001 -From: Dan Horak -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 - diff --git a/0002-s390-tools-1.5.0-fdasd-raid.patch b/0006-s390-tools-1.8.1-fdasd-raid-lvm.patch similarity index 72% rename from 0002-s390-tools-1.5.0-fdasd-raid.patch rename to 0006-s390-tools-1.8.1-fdasd-raid-lvm.patch index 83f1bd1..eff92a1 100644 --- a/0002-s390-tools-1.5.0-fdasd-raid.patch +++ b/0006-s390-tools-1.8.1-fdasd-raid-lvm.patch @@ -1,17 +1,17 @@ -From b492189d95a523e9176c1dac4de0fb1216a3af14 Mon Sep 17 00:00:00 2001 -From: Dan Horak -Date: Sat, 19 Jul 2008 16:32:00 +0200 -Subject: [PATCH] s390-tools-1.5.0-fdasd-raid +From 9c34968b40aa5fee679abf0056255510333ae9c3 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Thu, 23 Apr 2009 11:46:16 +0200 +Subject: [PATCH] s390-tools-1.8.1-fdasd-raid-lvm --- - fdasd/fdasd.c | 55 +++++++++++++++++++++++++++++++++++++++++++++---------- - 1 files changed, 45 insertions(+), 10 deletions(-) + fdasd/fdasd.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++---------- + 1 files changed, 53 insertions(+), 12 deletions(-) diff --git a/fdasd/fdasd.c b/fdasd/fdasd.c -index dce9ed3..d011b69 100644 +index b6802f9..286b0bb 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) +@@ -258,10 +258,10 @@ fdasd_error(fdasd_anchor_t *anc, enum fdasd_failure why, char *str) static int read_line(void) { @@ -23,24 +23,27 @@ index dce9ed3..d011b69 100644 while (*line_ptr && !isgraph(*line_ptr)) line_ptr++; return *line_ptr; -@@ -278,6 +278,8 @@ fdasd_partition_type (char *str) +@@ -310,6 +310,10 @@ 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 if (strncmp("LVM ", str, 6) == 0) ++ strcpy(str, "Linux LVM"); else strcpy(str, "unknown"); -@@ -1062,6 +1064,7 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc) +@@ -1117,14 +1121,24 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc) strncpy(c1, s2, 31); } else { + char str[20]; char *tmp = strstr(ch, "SWAP"); ++ char *tmp1 = strstr(ch, "RAID"); /* create a new data set name */ -@@ -1069,7 +1072,15 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc) + while (getpos(anc, k) > -1) k++; setpos(anc, k, i-1); @@ -57,13 +60,20 @@ index dce9ed3..d011b69 100644 strncpy(ch, "LINUX.V " " ", 44); -@@ -1087,8 +1098,16 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc) +@@ -1140,10 +1154,21 @@ fdasd_write_vtoc_labels (fdasd_anchor_t *anc) + strncpy(c1, dsno, 4); + c1 += 4; - if (tmp) - strncpy(c1, ".SWAP", 5); +- if (tmp) +- strncpy(c1, ".SWAP", 5); - else - strncpy(c1, ".NATIVE", 7); -+ 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); + } @@ -75,8 +85,8 @@ index dce9ed3..d011b69 100644 + } vtoc_ebcdic_enc(ch, ch, 44); - if (anc->verbose) printf("f1 "); -@@ -1325,9 +1344,10 @@ fdasd_change_part_type (fdasd_anchor_t *anc) + if (anc->verbose) printf("%2x ", part_info->f1->DS1FMTID); +@@ -1429,9 +1454,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" \ @@ -89,7 +99,7 @@ index dce9ed3..d011b69 100644 while (!isdigit(part_type = read_char("new partition type: "))); part_type -= 48; -@@ -1340,6 +1360,9 @@ fdasd_change_part_type (fdasd_anchor_t *anc) +@@ -1444,6 +1470,9 @@ fdasd_change_part_type (fdasd_anchor_t *anc) case 2: strncpy(str, "SWAP ", 6); break; @@ -99,7 +109,7 @@ index dce9ed3..d011b69 100644 default: printf("'%d' is not supported!\n", part_type); } -@@ -1503,7 +1526,7 @@ fdasd_process_invalid_vtoc(fdasd_anchor_t *anc) +@@ -1621,7 +1650,7 @@ fdasd_process_invalid_vtoc(fdasd_anchor_t *anc) static void fdasd_process_valid_vtoc(fdasd_anchor_t *anc, unsigned long blk) { @@ -108,7 +118,7 @@ index dce9ed3..d011b69 100644 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) +@@ -1673,14 +1702,26 @@ fdasd_process_valid_vtoc(fdasd_anchor_t *anc, unsigned long blk) vtoc_ebcdic_enc(part_info->f1->DS1DSNAM, part_info->f1->DS1DSNAM, 44); diff --git a/0008-s390-tools-1.8.0-zipl-timeout.patch b/0008-s390-tools-1.8.0-zipl-timeout.patch deleted file mode 100644 index 339d2ac..0000000 --- a/0008-s390-tools-1.8.0-zipl-timeout.patch +++ /dev/null @@ -1,69 +0,0 @@ -From a43e6e889fe44cae8a4da73ac3d81c1389fee905 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Dan=20Hor=C3=A1k?= -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 +Date: Thu, 23 Apr 2009 11:47:13 +0200 +Subject: [PATCH] s390-tools-1.8.1-ziorep-fixes + +--- + ziomon/stats.h | 9 ++++--- + ziomon/ziomon | 13 +++++++---- + ziomon/ziorep_config | 23 +++++++++++---------- + ziomon/ziorep_traffic.cpp | 31 +++++++++++++++++------------ + ziomon/ziorep_utilization.cpp | 4 +- + ziomon/ziorep_utils.cpp | 43 +++++++++++++++++++++++++++++++++++----- + 6 files changed, 82 insertions(+), 41 deletions(-) + +diff --git a/ziomon/stats.h b/ziomon/stats.h +index 1003f91..a28d436 100644 +--- a/ziomon/stats.h ++++ b/ziomon/stats.h +@@ -108,7 +108,7 @@ static inline int histlog2_index(__u64 val, struct histlog2 *h) + { + int i; + +- for (i = 0; i < (h->num - 1) && val > histlog2_upper_limit(i, h); i++); ++ for (i = 0; i < h->num && val > histlog2_upper_limit(i, h); i++); + return i; + } + +@@ -123,15 +123,16 @@ static inline void histlog2_merge(struct histlog2 *h, __u32 *dst, const __u32 *s + { + int i; + +- for (i = 0; i < h->num - 1; i++) ++ for (i = 0; i < h->num; i++) { + dst[i] += src[i]; ++ } + } + + static inline void histlog2_swap(__u32 a[], struct histlog2 *h) + { + int i; + +- for (i = 0; i < h->num - 1; i++) ++ for (i = 0; i < h->num; i++) + swap_32(a[i]); + } + +@@ -141,7 +142,7 @@ static inline void histlog2_print(const char *s, const __u32 a[], + int i; + + printf("%s:\n", s); +- for (i = 0; i < h->num - 1; i++) { ++ for (i = 0; i < h->num; i++) { + printf(" %10ld:%6d", + (unsigned long)(histlog2_upper_limit(i, h)), a[i]); + if (!((i + 1) % 4)) +diff --git a/ziomon/ziomon b/ziomon/ziomon +index 30c8adf..aa1cf78 100755 +--- a/ziomon/ziomon ++++ b/ziomon/ziomon +@@ -411,14 +411,14 @@ function check_for_multipath_devices() { + devices_basenames[$j]=""; + clean_devices; + (( i+=3 )); +- while [ "${mp_arr[$i]:0:1}" == "_" ]; do ++ while [[ ! "${mp_arr[$i]:0:1}" =~ "[0-9a-zA-Z]" ]] && [ $i -lt ${#mp_arr[@]} ]; do + checked_devs[${#checked_devs[@]}]=`echo ${mp_arr[$i]} | awk '{print "/dev/"$3}'`; + ddebug " add ${checked_devs[${#checked_devs[@]}-1]}"; +- line=${mp_arr[$i]#_*}; ++ line=${mp_arr[$i]#* }; + line=${line%%:*}; + line=`echo $line | sed 's/ //g'`; + WRP_HOST_ADAPTERS[${#WRP_HOST_ADAPTERS[@]}]="host$line"; +- WRP_LUNS[${#WRP_LUNS[@]}]=`echo ${mp_arr[$i]#_*} | awk '{print $1}'`; ++ WRP_LUNS[${#WRP_LUNS[@]}]=`echo ${mp_arr[$i]#* } | awk '{print $1}'`; + (( i++ )); + done; + (( --i )); +@@ -599,6 +599,7 @@ function check_size_requirements() { + local estimated_size; + local free_space; + local logpath=`dirname $WRP_LOGFILE`; ++ local num_uniq_devs; + + set `ziomon_mgr -e`; + util_base_sz=$1; +@@ -610,10 +611,12 @@ function check_size_requirements() { + + # NOTE: Since blktrace and ziomon_zfcpdd write messages only when there is + # traffic, the estimate is an upper boundary only ++ num_uniq_devs=`echo ${WRP_LUNS[@]} | sed 's/ /\n/g' | cut -d : -f 4 | sort | uniq | wc -l`; ++ debug "number of unique devices: $num_uniq_devs"; + debug "disk space requirements:"; + (( size_per_record = $util_base_sz + ${#WRP_HOST_ADAPTERS[@]} * $util_variable_sz + $ioerr_base_sz +- + ${#WRP_DEVICES[@]} * ( $ioerr_variable_sz + $blkiotrace_sz + $zfcpiotrace_sz ) +- + ( 2 + ${#WRP_DEVICES[@]}) * 8 )); ++ + $num_uniq_devs * ( $ioerr_variable_sz + $blkiotrace_sz + $zfcpiotrace_sz ) ++ + ( 2 + $num_uniq_devs) * 8 )); + debug " size per interval: $size_per_record Bytes"; + (( total_num_records = $WRP_DURATION / $WRP_INTERVAL )); + debug " total number of intervals: $total_num_records"; +diff --git a/ziomon/ziorep_config b/ziomon/ziorep_config +index 21094bf..de60379 100755 +--- a/ziomon/ziorep_config ++++ b/ziomon/ziorep_config +@@ -84,9 +84,10 @@ sub get_sub_ch_data + $c_src = catdir($base_dir, S_DIR2, $sub_ch, $adapter); + $sub_ch{$adapter}{lic} = get_line("lic_version"); + $sub_ch{$adapter}{gen} = get_line("card_version"); ++ $sub_ch{$adapter}{state} = get_line("online") == 1 ? "Online" : ++ "Offline"; + $c_src = catdir($base_dir, S_DIR2, $sub_ch); + $sub_ch{$adapter}{chpid} = substr(get_line("chpids"), 0, 2); +- $sub_ch{$adapter}{state} = get_line("port_state"); + } + } + +@@ -220,7 +221,7 @@ sub adapter_report + my @adapters = @_; + + foreach my $a (sort keys %sub_ch) { +- next if (@adapters && "@adapters" !~ /$a/); ++ next if (@adapters && "@adapters" !~ /\b$a\b/); + my @out_str; + push @out_str, "Host: $sub_ch{$a}{host}\n"; + push @out_str, "CHPID: $sub_ch{$a}{chpid}\n"; +@@ -252,11 +253,11 @@ sub device_report + "===============================================\n"; + } + foreach my $hctl (sort keys %devices) { +- next if (@$adapters && "@$adapters" !~ /$devices{$hctl}{hba_id}/); +- next if (@$ports && "@$ports" !~ /$devices{$hctl}{wwpn}/); +- next if (@$luns && "@$luns" !~ /$devices{$hctl}{lun}/); +- next if (@$s_devs && "@$s_devs" !~ /$devices{$hctl}{dev}/); +- next if (@$hosts && "@$hosts" !~ /$sub_ch{$devices{$hctl}{hba_id}}{host}/); ++ next if (@$adapters && "@$adapters" !~ /\b$devices{$hctl}{hba_id}\b/); ++ next if (@$ports && "@$ports" !~ /\b$devices{$hctl}{wwpn}\b/); ++ next if (@$luns && "@$luns" !~ /\b$devices{$hctl}{lun}\b/); ++ next if (@$s_devs && "@$s_devs" !~ /\b$devices{$hctl}{dev}\b/); ++ next if (@$hosts && "@$hosts" !~ /\b$sub_ch{$devices{$hctl}{hba_id}}{host}\b/); + my @out_str; + push @out_str, $devices{$hctl}{hba_id}; + push @out_str, $devices{$hctl}{wwpn}; +@@ -293,10 +294,10 @@ sub mapper_report + } + foreach my $hctl (sort keys %devices) { + next if (! $devices{$hctl}{mp_dev_mm}); +- next if (@$adapters && "@$adapters" !~ /$devices{$hctl}{hba_id}/); +- next if (@$ports && "@$ports" !~ /$devices{$hctl}{wwpn}/); +- next if (@$s_devs && "@$s_devs" !~ /$devices{$hctl}{dev}/); +- next if (@$m_devs && "@$m_devs" !~ /$mapper_dev{$devices{$hctl}{mp_dev_mm}}/); ++ next if (@$adapters && "@$adapters" !~ /\b$devices{$hctl}{hba_id}\b/); ++ next if (@$ports && "@$ports" !~ /\b$devices{$hctl}{wwpn}\b/); ++ next if (@$s_devs && "@$s_devs" !~ /\b$devices{$hctl}{dev}\b/); ++ next if (@$m_devs && "@$m_devs" !~ /\b$mapper_dev{$devices{$hctl}{mp_dev_mm}}\b/); + my @line_str; + push @line_str, $devices{$hctl}{hba_id}; + push @line_str, $devices{$hctl}{wwpn}; +diff --git a/ziomon/ziorep_traffic.cpp b/ziomon/ziorep_traffic.cpp +index 40cbf47..1461e55 100644 +--- a/ziomon/ziorep_traffic.cpp ++++ b/ziomon/ziorep_traffic.cpp +@@ -121,6 +121,7 @@ static int parse_params(int argc, char **argv, struct options *opts) + __u32 tmp32; + long long unsigned int tmp64; + long tmpl; ++ char mychar; + static struct option long_options[] = { + { "version", no_argument, NULL, 'v'}, + { "help", no_argument, NULL, 'h'}, +@@ -188,18 +189,22 @@ static int parse_params(int argc, char **argv, struct options *opts) + opts->print_summary = true; + break; + case 'c': +- rc = sscanf(optarg, "%x", &tmp32); +- if (rc != 1) { +- fprintf(stdout, "%s: Could" ++ rc = sscanf(optarg, "%x%c", &tmp32, &mychar); ++ if (rc < 1) { ++ fprintf(stderr, "%s: Could" + " not read chpid %s\n", toolname, optarg); + return -1; + } ++ if (rc > 1) { ++ fprintf(stderr, "%s: %s is not a valid chpid\n", toolname, optarg); ++ return -1; ++ } + opts->chpids.push_back(tmp32); + break; + case 'p': + rc = sscanf(optarg, "0x%Lx", &tmp64); + if (rc != 1) { +- fprintf(stdout, "%s: Could" ++ fprintf(stderr, "%s: Could" + " not read port number %s\n", toolname, optarg); + return -1; + } +@@ -208,7 +213,7 @@ static int parse_params(int argc, char **argv, struct options *opts) + case 'l': + rc = sscanf(optarg, "0x%Lx", &tmp64); + if (rc != 1) { +- fprintf(stdout, "%s: Could" ++ fprintf(stderr, "%s: Could" + " not read lun %s\n", toolname, optarg); + return -1; + } +@@ -217,11 +222,11 @@ static int parse_params(int argc, char **argv, struct options *opts) + case 'u': + rc = sscanf(optarg, "0.0.%x", &tmp32); + if (rc != 1) { +- fprintf(stdout, "%s: Could not read bus-ID" ++ fprintf(stderr, "%s: Could not read bus-ID" + " %s\n", toolname, optarg); + return -1; + } +- opts->wwpns.push_back(tmp32); ++ opts->devnos.push_back(tmp32); + break; + case 'd': + opts->devices.push_back(optarg); +@@ -313,7 +318,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list<__u32>::const_iterator i = opts->chpids.begin(); + i != opts->chpids.end(); ++i) { + if (!(*cfg)->verify_chpid(*i)) { +- fprintf(stdout, "Error: Could not find chpid 0.0.%04x in" ++ fprintf(stderr, "Error: Could not find chpid %x in" + " configuration.\n", *i); + rc = -2; + } +@@ -321,7 +326,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list<__u32>::const_iterator i = opts->devnos.begin(); + i != opts->devnos.end(); ++i) { + if (!(*cfg)->verify_devno(*i)) { +- fprintf(stdout, "Error: Could not find bus-ID 0.0.%04x in" ++ fprintf(stderr, "Error: Could not find bus-ID 0.0.%04x in" + " configuration.\n", *i); + rc = -3; + } +@@ -329,7 +334,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list<__u64>::const_iterator i = opts->wwpns.begin(); + i != opts->wwpns.end(); ++i) { + if (!(*cfg)->verify_wwpn(*i)) { +- fprintf(stdout, "Error: Could not find WWPN %016Lx in" ++ fprintf(stderr, "Error: Could not find WWPN %016Lx in" + " configuration.\n", (long long unsigned int)*i); + rc = -4; + } +@@ -337,7 +342,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list<__u64>::const_iterator i = opts->luns.begin(); + i != opts->luns.end(); ++i) { + if (!(*cfg)->verify_lun(*i)) { +- fprintf(stdout, "Error: Could not find LUN %016Lx in" ++ fprintf(stderr, "Error: Could not find LUN %016Lx in" + " configuration.\n", (long long unsigned int)*i); + rc = -5; + } +@@ -345,7 +350,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list::iterator i = opts->devices.begin(); + i != opts->devices.end(); ++i) { + if (!(*cfg)->verify_device(*i)) { +- fprintf(stdout, "Error: Could not find device %s in" ++ fprintf(stderr, "Error: Could not find device %s in" + " configuration.\n", *i); + rc = -6; + } +@@ -353,7 +358,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list::iterator i = opts->mp_devices.begin(); + i != opts->mp_devices.end(); ++i) { + if (!(*cfg)->verify_mp_device(*i)) { +- fprintf(stdout, "Error: Could not find multipath" ++ fprintf(stderr, "Error: Could not find multipath" + " device %s in configuration.\n", *i); + rc = -7; + } +diff --git a/ziomon/ziorep_utilization.cpp b/ziomon/ziorep_utilization.cpp +index a036a03..3f57a47 100644 +--- a/ziomon/ziorep_utilization.cpp ++++ b/ziomon/ziorep_utilization.cpp +@@ -167,7 +167,7 @@ static int parse_params(int argc, char **argv, struct options *opts) + case 'c': + rc = sscanf(optarg, "%x", &tmp); + if (rc != 1) { +- fprintf(stdout, "Error: Could not read chpid" ++ fprintf(stderr, "Error: Could not read chpid" + " %s\n", optarg); + return -1; + } +@@ -237,7 +237,7 @@ static int check_opts(struct options *opts, ConfigReader **cfg) + for (list<__u32>::const_iterator i = opts->chpids.begin(); + i != opts->chpids.end(); ++i) { + if (!(*cfg)->verify_chpid(*i)) { +- fprintf(stdout, "Error: Could not find chpid %x in" ++ fprintf(stderr, "Error: Could not find chpid %x in" + " configuration.\n", *i); + rc = -2; + } +diff --git a/ziomon/ziorep_utils.cpp b/ziomon/ziorep_utils.cpp +index 75a9578..715115e 100644 +--- a/ziomon/ziorep_utils.cpp ++++ b/ziomon/ziorep_utils.cpp +@@ -303,8 +303,17 @@ int adjust_timeframe(const char *filename, __u64 *begin, __u64 *end, + verbose_msg("using original interval length: %lus\n", + (long unsigned int)*interval); + } +- // now check if the interval is correct +- if (*interval != UINT32_MAX && *interval % f_hdr.interval_length) { ++ /* the exact frame boundaries don't include the length of the very ++ first interval, so we have to add one more to our calculations */ ++ if (*interval && (*end - *begin + f_hdr.interval_length) % *interval != 0) { ++ // cut off rest in case of user-set interval ++ *end -= (*end - *begin) % *interval + f_hdr.interval_length; ++ t = *end; ++ verbose_msg(" cut off at : %s", ctime(&t)); ++ } ++ ++ // check if the interval is correct ++ if (*interval % f_hdr.interval_length) { + fprintf(stderr, "%s: Data aggregation interval %lu" + " is incompatible with source data. Please use" + " a multiple of %lu and try again.\n", toolname, +@@ -392,7 +401,7 @@ int print_summary_report(FILE *fp, char *filename, ConfigReader &cfg) + rc += fprintf(fp, "Aggregated range: "); + if (a_hdr) { + rc += fprintf(fp, "%s to ", +- print_time_formatted(a_hdr->begin_time)); ++ print_time_formatted(a_hdr->begin_time - f_hdr.interval_length)); + rc += fprintf(fp, "%s\n", + print_time_formatted(a_hdr->end_time)); + } +@@ -404,7 +413,7 @@ int print_summary_report(FILE *fp, char *filename, ConfigReader &cfg) + a_hdr = NULL; + + rc += fprintf(fp, "Detailed range: %s to ", +- print_time_formatted(f_hdr.begin_time)); ++ print_time_formatted(f_hdr.begin_time - f_hdr.interval_length)); + rc += fprintf(fp, "%s\n", print_time_formatted(f_hdr.end_time)); + rc += fprintf(fp, "Interval length: %d seconds\n", + f_hdr.interval_length); +@@ -446,16 +455,32 @@ int print_summary_report(FILE *fp, char *filename, ConfigReader &cfg) + return rc; + } + ++/* Calculates seconds since 1970 _without_ caring for daylight ++ savings time (comtrary to mktime() et al). ++ It does not care for leap years and the like, which is OK, ++ since we use it in a very narrow scenario: To calculate any ++ daylight savings time related shifts. ++ Hence: Dont't use if you're not sure what you are doing... */ ++static __u64 secs_since_1970(const struct tm *t) { ++ __u64 res = 0; ++ res += t->tm_sec; ++ res += 60 * t->tm_min; ++ res += 3600 * t->tm_hour; ++ res += 86400 * t->tm_yday; ++ res += 86400 * 365 * t->tm_year; ++ ++ return res; ++} ++ + + int get_datetime_val(const char *str, __u64 *tgt) + { +- struct tm t; ++ struct tm t, t_old; + char *ret; + + // strptime only sets + memset(&t, 0, sizeof(struct tm)); + ret = strptime(str, "%Y-%m-%d %H:%M", &t); +- + if (ret == NULL || *ret != '\0') { + ret = strptime(str, "%Y-%m-%d %H:%M:%S", &t); + if (ret == NULL || *ret != '\0') { +@@ -465,7 +490,13 @@ int get_datetime_val(const char *str, __u64 *tgt) + return -1; + } + } ++ t_old = t; + *tgt = mktime(&t); ++ // if daylight savings time applies, 't' has been adjusted, ++ // so we have to correct ++ if (t_old.tm_hour != t.tm_hour) ++ *tgt -= secs_since_1970(&t) - secs_since_1970(&t_old); ++ verbose_msg("datetime value from user after translation: %s", ctime((const time_t *)tgt)); + + return 0; + } +-- +1.6.0.6 + diff --git a/0009-s390-tools-1.8.0-zipl-target.patch b/0009-s390-tools-1.8.0-zipl-target.patch deleted file mode 100644 index 93df97e..0000000 --- a/0009-s390-tools-1.8.0-zipl-target.patch +++ /dev/null @@ -1,63 +0,0 @@ -From a4d2366cc716f8ce3f159fd8e8b585b04b7a5924 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Dan=20Hor=C3=A1k?= -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, §ion, &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 - diff --git a/0013-s390-tools-1.8.0-cflags.patch b/0009-s390-tools-1.8.1-cflags.patch similarity index 54% rename from 0013-s390-tools-1.8.0-cflags.patch rename to 0009-s390-tools-1.8.1-cflags.patch index d8151be..9433539 100644 --- a/0013-s390-tools-1.8.0-cflags.patch +++ b/0009-s390-tools-1.8.1-cflags.patch @@ -1,22 +1,24 @@ -From a6ca2114c948a71c0bb5c9a5e7d0392315f1cefd Mon Sep 17 00:00:00 2001 +From d2f00bb021508f8104a1d8164432e8f4d239d872 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Dan=20Hor=C3=A1k?= -Date: Wed, 25 Mar 2009 08:56:38 +0100 -Subject: [PATCH] allow override of default optimization level +Date: Thu, 23 Apr 2009 11:47:29 +0200 +Subject: [PATCH] s390-tools-1.8.1-cflags --- - common.mak | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + common.mak | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.mak b/common.mak -index 3acb534..0aff3ba 100644 +index d57b854..f0252da 100644 --- a/common.mak +++ b/common.mak -@@ -22,7 +22,7 @@ STRIP = $(CROSS_COMPILE)strip +@@ -25,8 +25,8 @@ 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) +-CXXFLAGS = $(OPT_FLAGS) -Wall -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) +CFLAGS = -Wall -O3 -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) $(OPT_FLAGS) ++CXXFLAGS = -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 diff --git a/0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch b/0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch deleted file mode 100644 index f8a23c0..0000000 --- a/0010-s390-tools-1.5.3-zipl-zfcpdump-man.patch +++ /dev/null @@ -1,27 +0,0 @@ -From eedf33ef46224a67e09c38ee58c57f3dd8d9acf8 Mon Sep 17 00:00:00 2001 -From: Dan Horak -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 " " or " "--menu=" - Install the multi-boot configuration defined in menu section of the --- -1.6.0.6 - diff --git a/0010-s390-tools-1.8.1-defaultmenu.patch b/0010-s390-tools-1.8.1-defaultmenu.patch new file mode 100644 index 0000000..9b70d83 --- /dev/null +++ b/0010-s390-tools-1.8.1-defaultmenu.patch @@ -0,0 +1,59 @@ +From 486526858271c8ea890e8728a1cf1cceeceb9b1a Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Thu, 23 Apr 2009 15:28:06 +0200 +Subject: [PATCH] don't create automenu when default menu exists + +--- + zipl/src/job.c | 25 +++++++++++++++---------- + 1 files changed, 15 insertions(+), 10 deletions(-) + +diff --git a/zipl/src/job.c b/zipl/src/job.c +index 1b7bcb2..9fc6c2d 100644 +--- a/zipl/src/job.c ++++ b/zipl/src/job.c +@@ -1441,6 +1441,8 @@ get_job_from_config_file(struct command_line* cmdline, struct job_data* job) + struct scan_token* scan, *nscan; + char* filename; + char* source; ++ char* default_section; ++ int is_menu; + int rc; + + /* Read configuration file */ +@@ -1470,20 +1472,23 @@ 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; +- } ++ ++ /* disable automenu iff default menu exists */ ++ rc = get_default_section(scan, &default_section, &is_menu); ++ if (!rc && is_menu) ++ cmdline->automenu = 0; + + /* Get job from config file data */ + if (cmdline->menu != NULL || cmdline->automenu) { +- if (cmdline->automenu) ++ if (cmdline->automenu) { ++ nscan = create_fake_menu(scan); ++ if (nscan == NULL) { ++ scan_free(scan); ++ return -1; ++ } ++ scan = nscan; + cmdline->menu = misc_strdup("rh-automatic-menu"); ++ } + rc = get_menu_job(scan, cmdline->menu, job); + } + else { +-- +1.6.0.6 + diff --git a/0011-s390-tools-1.5.3-fdasd-raid.patch b/0011-s390-tools-1.5.3-fdasd-raid.patch deleted file mode 100644 index 0aea3c5..0000000 --- a/0011-s390-tools-1.5.3-fdasd-raid.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1fc8467cdb52feb751a711c304ef0fc88ec82155 Mon Sep 17 00:00:00 2001 -From: Dan Horak -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 - diff --git a/0011-s390-tools-1.8.1-execstack.patch b/0011-s390-tools-1.8.1-execstack.patch new file mode 100644 index 0000000..e4370bf --- /dev/null +++ b/0011-s390-tools-1.8.1-execstack.patch @@ -0,0 +1,25 @@ +From 77f053260b9d2b4d683edfbed50a528d74620d4b Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 24 Apr 2009 14:05:29 +0200 +Subject: [PATCH] remove the executable stack flag + +--- + zipl/src/Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/zipl/src/Makefile b/zipl/src/Makefile +index 16d5276..07b3b74 100644 +--- a/zipl/src/Makefile ++++ b/zipl/src/Makefile +@@ -12,7 +12,7 @@ includes = $(wildcard ../include/*.h) + all: zipl + + zipl: $(objects) +- $(CC) $(objects) ../boot/data.o -o zipl ++ $(CC) -Wl,-z,noexecstack $(objects) ../boot/data.o -o zipl + + %.o: %.c $(includes) Makefile + $(CC) $(CFLAGS) -c -o $@ $< +-- +1.6.0.6 + diff --git a/0012-s390-tools-1.8.0-initscript-fix.patch b/0012-s390-tools-1.8.0-initscript-fix.patch deleted file mode 100644 index 64026d1..0000000 --- a/0012-s390-tools-1.8.0-initscript-fix.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 6235108700462cc4b425ae7a697915f8147f46c3 Mon Sep 17 00:00:00 2001 -From: =?utf-8?q?Dan=20Hor=C3=A1k?= -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 - diff --git a/0012-s390-tools-1.8.1-ziomon-fixes.patch b/0012-s390-tools-1.8.1-ziomon-fixes.patch new file mode 100644 index 0000000..2acd6dc --- /dev/null +++ b/0012-s390-tools-1.8.1-ziomon-fixes.patch @@ -0,0 +1,197 @@ +From 1833f9dae371a48e3f52891262ad2d5fd75fc205 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 5 Jun 2009 14:12:52 +0200 +Subject: [PATCH] s390-tools-1.8.1-ziomon-fixes + +--- + ziomon/stats.h | 2 +- + ziomon/ziomon | 84 ++++++++++++++++++++++++++++++++++++++++++++----- + ziomon/ziomon_util.c | 2 +- + 3 files changed, 77 insertions(+), 11 deletions(-) + +diff --git a/ziomon/stats.h b/ziomon/stats.h +index a28d436..0920b27 100644 +--- a/ziomon/stats.h ++++ b/ziomon/stats.h +@@ -142,7 +142,7 @@ static inline void histlog2_print(const char *s, const __u32 a[], + int i; + + printf("%s:\n", s); +- for (i = 0; i < h->num; i++) { ++ for (i = 0; i < h->num - 1; i++) { + printf(" %10ld:%6d", + (unsigned long)(histlog2_upper_limit(i, h)), a[i]); + if (!((i + 1) % 4)) +diff --git a/ziomon/ziomon b/ziomon/ziomon +index aa1cf78..fe4d8ec 100755 +--- a/ziomon/ziomon ++++ b/ziomon/ziomon +@@ -32,7 +32,7 @@ WRP_DEVICES=(); + WRP_LUNS=(); + WRP_LOGFILE=""; + # limit of actual data in percent that need space on disk +-WRP_SIZE_THRESHOLD="25"; ++WRP_SIZE_THRESHOLD="10"; + WRP_FORCE=0; + + function debug() { +@@ -234,6 +234,7 @@ function start_trace() { + local hosts_param; + local luns_param; + local i; ++ local len; + + if [ $WRP_DEBUG -ne 0 ]; then + verbose="-V"; +@@ -276,7 +277,7 @@ function start_trace() { + blkiomon_command="blkiomon --interval=$WRP_INTERVAL -Q $WRP_MSG_Q_PATH -q $WRP_MSG_Q_ID -m $WRP_MSG_Q_BLKIOMON_ID $verbose_blk -d -"; + zfcpdd_command="ziomon_zfcpdd -Q $WRP_MSG_Q_PATH -q $WRP_MSG_Q_ID -m $WRP_MSG_Q_ZIOMON_ZFCPDD_ID -i $WRP_INTERVAL"; + debug "starting blktrace: $blktrace_command | $blkiomon_command | $zfcpdd_command"; +- $blktrace_command | $blkiomon_command | $zfcpdd_command > $WRP_MSG_Q_PATH/blktrace.log & ++ $blktrace_command 2>$WRP_MSG_Q_PATH/blktrace.err | $blkiomon_command | $zfcpdd_command > $WRP_MSG_Q_PATH/blktrace.log & + i=0; + # might take a moment to start all processes in the pipe if system under load + while [ $i -lt 60 ]; do +@@ -303,7 +304,17 @@ function start_trace() { + echo "done"; + echo -n "Collecting data..."; + +- sleep $WRP_DURATION; ++ # pay extra attention to blktrace ++ for (( i=0; i<$WRP_DURATION; ++i )); do ++ len=`cat $WRP_MSG_Q_PATH/blktrace.err | wc -l`; ++ if [ $len -ne 0 ]; then ++ cat $WRP_MSG_Q_PATH/blktrace.err; ++ echo "Error: blktrace has errors, aborting"; ++ return; ++ fi ++ sleep 1; ++ done ++ + echo "done"; + } + +@@ -358,6 +369,58 @@ function emergency_shutdown() { + } + + ++function check_cpuplugd { ++ # check if cpuplugd is running ++ # If so, the whole per-cpu mechanism of blktrace gets corrupted, which ++ # results in the infamous 'bad trace magic' message ++ if [ -e /var/run/cpuplugd.pid ]; then ++ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; ++ echo "ziomon: Warning: cpuplugd is running which can corrupt the traces."; ++ echo " It is recommended to stop cpuplugd for the duration of the"; ++ echo " trace using 'service cpuplugd stop'."; ++ echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"; ++ fi ++} ++ ++ ++# we need 2MB per device and CPU ++function check_vmalloc_space() { ++ local total; ++ local used; ++ local free; ++ local num_cpus; ++ local required; ++ local result; ++ ++ num_cpus=`cat /proc/cpuinfo | grep processors | awk '{print $4}'`; ++ total=`cat /proc/meminfo | grep VmallocTotal | awk '{print $2}'`; ++ used=`cat /proc/meminfo | grep VmallocUsed | awk '{print $2}'`; ++ ++ (( free=$total-$used )); ++ (( required=$num_cpus*${#WRP_DEVICES[@]}*2048 )); ++ (( result=$free-$required )); ++ debug "Required Vmalloc space: $required KBytes"; ++ if [ $result -lt 0 ]; then ++ echo "$WRP_TOOLNAME: Not enough free Vmalloc space:"; ++ echo " Required: $required KBytes"; ++ echo " Free: $free KBytes"; ++ exit 1; ++ fi ++ ++ return 0; ++} ++ ++ ++function check_blkiomon() { ++ # check blkiomon version ++ ver=`blkiomon -V | awk '{print $3}'`; ++ if [ "$ver" != "0.2" ]; then ++ echo "$WRP_TOOLNAME: Unsupported blkiomon version $ver detected, aborting"; ++ exit 1; ++ fi ++} ++ ++ + function setup() { + while [ -e $WRP_MSG_Q_PATH ]; do + WRP_MSG_Q_PATH="$WRP_MSG_Q_PATH$RANDOM"; +@@ -476,7 +539,7 @@ function determine_host_adapters() { + local num_s_devs; + local s_dev_ratio; + +- echo -n "check devices..."; ++ echo -n "Check devices..."; + + # Estimate fraction of /dev/s* devices - if >50%, start with check for regular devices + num_s_devs=`echo ${WRP_DEVICES[@]} | sed "s/ /\n/g" | grep /dev/s | wc -l`; +@@ -599,7 +662,6 @@ function check_size_requirements() { + local estimated_size; + local free_space; + local logpath=`dirname $WRP_LOGFILE`; +- local num_uniq_devs; + + set `ziomon_mgr -e`; + util_base_sz=$1; +@@ -611,12 +673,10 @@ function check_size_requirements() { + + # NOTE: Since blktrace and ziomon_zfcpdd write messages only when there is + # traffic, the estimate is an upper boundary only +- num_uniq_devs=`echo ${WRP_LUNS[@]} | sed 's/ /\n/g' | cut -d : -f 4 | sort | uniq | wc -l`; +- debug "number of unique devices: $num_uniq_devs"; + debug "disk space requirements:"; + (( size_per_record = $util_base_sz + ${#WRP_HOST_ADAPTERS[@]} * $util_variable_sz + $ioerr_base_sz +- + $num_uniq_devs * ( $ioerr_variable_sz + $blkiotrace_sz + $zfcpiotrace_sz ) +- + ( 2 + $num_uniq_devs) * 8 )); ++ + ${#WRP_DEVICES[@]} * ( $ioerr_variable_sz + $blkiotrace_sz + $zfcpiotrace_sz ) ++ + ( 2 + ${#WRP_DEVICES[@]}) * 8 )); + debug " size per interval: $size_per_record Bytes"; + (( total_num_records = $WRP_DURATION / $WRP_INTERVAL )); + debug " total number of intervals: $total_num_records"; +@@ -653,10 +713,16 @@ setup; + + parse_params $@; + ++check_cpuplugd; ++ ++check_blkiomon; ++ + check_for_existing_output; + + determine_host_adapters; + ++check_vmalloc_space; ++ + check_size_requirements; + + [ $? -eq 0 ] && start_trace; +diff --git a/ziomon/ziomon_util.c b/ziomon/ziomon_util.c +index e3e0762..043d3d1 100644 +--- a/ziomon/ziomon_util.c ++++ b/ziomon/ziomon_util.c +@@ -597,7 +597,7 @@ static int poll_ioerr_cnt(int init, struct ioerr_data *data, + for (i=0; inum_luns; ++i) { + /* read ioerr_cnt attribute */ + if (read_attribute(opts->luns[i], line, NULL)) { +- fprintf(stderr, "%s: Warning: Could read %s\n", ++ fprintf(stderr, "%s: Warning: Could not read %s\n", + toolname, opts->luns[i]); + grc++; + continue; +-- +1.6.0.6 + diff --git a/0013-s390-tools-1.8.1-zipl-fix-unsupported-device.patch b/0013-s390-tools-1.8.1-zipl-fix-unsupported-device.patch new file mode 100644 index 0000000..2d50dc9 --- /dev/null +++ b/0013-s390-tools-1.8.1-zipl-fix-unsupported-device.patch @@ -0,0 +1,54 @@ +From 38dfbc2642350aba44df80b41c91ab78891ba818 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Tue, 16 Jun 2009 11:10:47 +0200 +Subject: [PATCH] s390-tools-1.8.1-zipl-fix-unsupported-device + +Description: zipl: zipl does not exit for an unsupported device driver. +Symptom: zipl does not exit with an error when it is run against a + target device which is provided by an unsupported device driver + (e.g. device-mapper). The resulting IPL records might be + incorrect and filesystem corruption may occur. +Problem: The device driver name check does not cause an error when the + device driver name is unknown and the device is not a + partition. +Solution: Change the device driver name check to write an error message + and to exit when it finds an unknown device driver name. +Problem-ID: 53660 +--- + zipl/src/disk.c | 20 ++------------------ + 1 files changed, 2 insertions(+), 18 deletions(-) + +diff --git a/zipl/src/disk.c b/zipl/src/disk.c +index 3a48e44..f1b98a7 100644 +--- a/zipl/src/disk.c ++++ b/zipl/src/disk.c +@@ -190,24 +190,8 @@ disk_get_info(const char* device, struct disk_info** info) + data->device = stats.st_rdev & ~SCSI_PARTN_MASK; + } else { + /* Driver name is unknown */ +- if (data->devno == -1) { +- if (data->geo.start) { +- /* Writing to the parent device of this +- * partition may not be safe so stop here. */ +- error_reason("Unsupported device driver '%s'", +- data->drv_name); +- goto out_close; +- } +- /* Assume that the first block can be overwritten +- * even if we don't now the exact device type. */ +- data->type = disk_type_scsi; +- data->partnum = 0; +- data->device = stats.st_rdev; +- } else { +- error_reason("Unsupported device driver '%s' " +- "for disk type DASD", data->drv_name); +- goto out_close; +- } ++ error_reason("Unsupported device driver '%s'", data->drv_name); ++ goto out_close; + } + + /* Convert device size to size in physical blocks */ +-- +1.6.0.6 + diff --git a/0014-s390-tools-1.8.1-zipl-kdump-man.patch b/0014-s390-tools-1.8.1-zipl-kdump-man.patch new file mode 100644 index 0000000..4945d46 --- /dev/null +++ b/0014-s390-tools-1.8.1-zipl-kdump-man.patch @@ -0,0 +1,31 @@ +From 815064b5e73bdeb11e85e04fb691745b15d00e99 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 19 Jun 2009 10:01:30 +0200 +Subject: [PATCH] s390-tools-1.8.1-zipl-kdump-man + +Description: Add kdump kernel installation instruction to zipl man page. +Symptom: User wants to prepare SCSI disk for dump, but has not installed + the kdump kernel rpm. +Problem: The installation of the kdump kernel rpm is prereq for preparing + a SCSI dump disk for dump. +Solution: Document that in the zipl man page. +--- + zipl/man/zipl.8 | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/zipl/man/zipl.8 b/zipl/man/zipl.8 +index 8d2b42c..66b23eb 100644 +--- a/zipl/man/zipl.8 ++++ b/zipl/man/zipl.8 +@@ -176,6 +176,8 @@ will be incomplete. + 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. + ++.B Note that before using this option the "kernel-kdump" rpm has to be ++.B installed. + .TP + .BR "\-M " " or " "--mvdump=" + Install a multi-volume dump record on each device associated with one of the +-- +1.6.0.6 + diff --git a/0015-s390-tools-1.8.1-iucvterm-getlogin-to-getpwuid.patch b/0015-s390-tools-1.8.1-iucvterm-getlogin-to-getpwuid.patch new file mode 100644 index 0000000..a8b258d --- /dev/null +++ b/0015-s390-tools-1.8.1-iucvterm-getlogin-to-getpwuid.patch @@ -0,0 +1,70 @@ +From b76deacff693b951c2e5a01ed17e058379b9e00a Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Mon, 22 Jun 2009 12:47:02 +0200 +Subject: [PATCH] s390-tools-1.8.1-iucvterm-getlogin-to-getpwuid + +Description: iucvconn: Replace getlogin() with getpwuid(geteuid()) +Symptom: The user name is not always logged to syslog. +Problem: The getlogin() function returns the name of the user that + is logged in. This user name is used to write syslog records. + getlogin() retrieves the user information from the utmp + database. However, the user information might not always be + available, for example, the screen program can remove utmp + records (logoff function). +Solution: The getpwuid() function is used to get the user name from the + passwd file (or any other NSS source, i.e. LDAP etc.). +Problem-ID: 54225 +--- + iucvterm/src/iucvconn.c | 11 +++++++++-- + 1 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/iucvterm/src/iucvconn.c b/iucvterm/src/iucvconn.c +index 61f536e..da7d08a 100644 +--- a/iucvterm/src/iucvconn.c ++++ b/iucvterm/src/iucvconn.c +@@ -7,6 +7,7 @@ + * Author(s): Hendrik Brueckner + */ + #include ++#include + #include + #include + #include +@@ -237,6 +238,7 @@ int main(int argc, char *argv[]) + struct sockaddr_iucv addr; + struct termios ios; + struct sigaction sigact; ++ struct passwd *passwd; + struct iucvtty_cfg conf; + + +@@ -266,6 +268,9 @@ int main(int argc, char *argv[]) + /* syslog */ + openlog(SYSLOG_IDENT, LOG_PID, LOG_AUTHPRIV); + ++ /* get user information for syslog */ ++ passwd = getpwuid(geteuid()); ++ + if (connect(server, (struct sockaddr *) &addr, sizeof(addr)) == -1) { + switch (errno) { + case EAGAIN: +@@ -286,12 +291,14 @@ int main(int argc, char *argv[]) + break; + } + AUDIT("Connection to %s/%s failed for user %s (uid=%i)", +- conf.host, conf.service, getlogin(), geteuid()); ++ conf.host, conf.service, ++ (passwd != NULL) ? passwd->pw_name : "n/a", geteuid()); + rc = 2; + goto return_on_error; + } + AUDIT("Established connection to %s/%s for user %s (uid=%i)", +- conf.host, conf.service, getlogin(), geteuid()); ++ conf.host, conf.service, ++ (passwd != NULL) ? passwd->pw_name : "n/a", geteuid()); + + /* send client params */ + iucvtty_tx_termenv(server, DEFAULT_TERM); +-- +1.6.0.6 + diff --git a/0016-s390-tools-1.8.1-dumpconf-improve-error-checking.patch b/0016-s390-tools-1.8.1-dumpconf-improve-error-checking.patch new file mode 100644 index 0000000..3f2ce4a --- /dev/null +++ b/0016-s390-tools-1.8.1-dumpconf-improve-error-checking.patch @@ -0,0 +1,184 @@ +From 263c0e5646ea3c81e570ec7e53c214cac8cb4412 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Mon, 22 Jun 2009 12:50:08 +0200 +Subject: [PATCH] s390-tools-1.8.1-dumpconf-improve-error-checking + +Description: dumpconf: Improve parameter checking and error messages. +Symptom: Ugly and confusing error messages on systems which do not support + the dump_reipl shutdown action. +Problem: Error handling is incomplete. +Solution: The dumpconf init script now validates the syntax of the device + specified in the config file. +--- + etc/init.d/dumpconf | 98 +++++++++++++++++++++++++++++++++++---------------- + 1 files changed, 67 insertions(+), 31 deletions(-) + +diff --git a/etc/init.d/dumpconf b/etc/init.d/dumpconf +index e97f76c..42a2242 100755 +--- a/etc/init.d/dumpconf ++++ b/etc/init.d/dumpconf +@@ -119,18 +119,60 @@ verify_ccw_dump_device() + fi + } + +-setup_ccw_device() +-{ +- echo $DEVICE > $1/ccw/device || RETVAL=1 ++#------------------------------------------------------------------------------ ++# Helper function to check a device string. ++#------------------------------------------------------------------------------ ++function CheckDeviceString() { ++ local X ++ ++ X=$( ++ echo "$1" | ++ awk --posix -F. ' ++ function PrintBusID(css, grp, devno) { ++ while(length(devno) < 4) ++ devno = "0" devno ++ print css "." grp "." devno ++ } ++ NF == 1 && $1 ~ /^[0-9a-fA-F]{1,4}$/ { ++ PrintBusID("0","0", $1) ++ next ++ } ++ NF != 3 || $1 !~ /^[0-9a-fA-F]{1,2}$/ { ++ next ++ } ++ $2 !~ /^[0-9a-fA-F]{1,2}$/ { ++ next ++ } ++ $3 !~ /^[0-9a-fA-F]{1,4}$/ { ++ next ++ } ++ { ++ PrintBusID($1, $2, $3) ++ } ++ ' ++ ) ++ ++ if [ "$X" != "" ]; then ++ echo $X ++ return 0 ++ fi + } + +-setup_fcp_device() ++setup_device() + { +- echo $DEVICE > $1/fcp/device || RETVAL=1 +- echo $WWPN > $1/fcp/wwpn || RETVAL=1 +- echo $LUN > $1/fcp/lun || RETVAL=1 +- echo $BOOTPROG > $1/fcp/bootprog || RETVAL=1 +- echo $BR_LBA > $1/fcp/br_lba || RETVAL=1 ++ DEV="$(CheckDeviceString $DEVICE)" ++ if [ "$DEV" != "" ]; then ++ echo $DEV > $1/$DUMP_TYPE/device || RETVAL=1 ++ else ++ RETVAL=1 ++ echo "ERROR: Invalid device '$DEVICE'" >&2 ++ fi ++ if [ $DUMP_TYPE == "fcp" ] && [ $RETVAL -eq 0 ]; then ++ echo $WWPN > $1/fcp/wwpn || RETVAL=1 ++ echo $LUN > $1/fcp/lun || RETVAL=1 ++ echo $BOOTPROG > $1/fcp/bootprog || RETVAL=1 ++ echo $BR_LBA > $1/fcp/br_lba || RETVAL=1 ++ fi + } + + setup_nss_device() +@@ -145,10 +187,8 @@ setup_reipl() + return + fi + +- if [ "$REIPL_TYPE" == "ccw" ]; then +- setup_ccw_device $REIPL_CONFIG_DIR +- elif [ "$REIPL_TYPE" == "fcp" ]; then +- setup_fcp_device $REIPL_CONFIG_DIR ++ if [ "$REIPL_TYPE" == "ccw" ] || [ "$REIPL_TYPE" == "fcp" ]; then ++ setup_device $REIPL_CONFIG_DIR + elif [ "$REIPL_TYPE" == "nss" ]; then + setup_nss_device $REIPL_CONFIG_DIR + else +@@ -169,28 +209,23 @@ setup_reipl() + + setup_dump() + { +- if [ "$DUMP_TYPE" == "ccw" ]; then +- setup_ccw_device $DUMP_CONFIG_DIR +- elif [ "$DUMP_TYPE" == "fcp" ]; then +- setup_fcp_device $DUMP_CONFIG_DIR ++ if [ "$DUMP_TYPE" == "ccw" ] || [ "$DUMP_TYPE" == "fcp" ]; then ++ setup_device $DUMP_CONFIG_DIR + elif [ "$DUMP_TYPE" != "none" ]; then + echo "ERROR: Unknown dump type '$DUMP_TYPE'" >&2 + RETVAL=1 + fi + +- echo $DUMP_TYPE > $DUMP_CONFIG_DIR/dump_type || RETVAL=1 ++ if [ $RETVAL -eq 0 ]; then ++ echo $DUMP_TYPE > $DUMP_CONFIG_DIR/dump_type || RETVAL=1 ++ fi + + if [ $RETVAL -eq 1 ]; then +- echo "ERROR: Setup of $DUMP_TYPE dump device failed." >&2 + echo none > $DUMP_CONFIG_DIR/dump_type + return $RETVAL + fi + +- if [ "$CONF_DUMP_TYPE" == "none" ]; then +- echo "No dump device configured. " +- else +- echo "$ON_PANIC on panic configured: Using $DUMP_TYPE dump device." +- fi ++ echo "Configuring $ON_PANIC on panic: Using $DUMP_TYPE dump device." + } + + setup_on_panic_vmcmd() +@@ -260,7 +295,7 @@ status_dump() + echo "type....: fcp" + print_fcp_device $DUMP_CONFIG_DIR + else +- echo "ERROR: Unknown dump device type '$TYPE'!" >&2 ++ echo "ERROR: Unknown dump device type '$CONF_DUMP_TYPE'!" >&2 + echo " Please check if you have the latest dumpconf package!" >&2 + fi + } +@@ -316,27 +351,28 @@ start() + + if [ "$ON_PANIC" == "reipl" ]; then + setup_reipl +- elif [ "$ON_PANIC" == "dump" ]; then ++ elif [ "$ON_PANIC" == "dump" ] || [ "$ON_PANIC" == "dump_reipl" ]; then + setup_dump + elif [ "$ON_PANIC" == "vmcmd" ]; then + setup_on_panic_vmcmd +- elif [ "$ON_PANIC" == "dump_reipl" ]; then +- setup_dump + elif [ "$ON_PANIC" == "stop" ]; then + echo "stop on panic configured." + else + echo "ERROR: Unknown 'on panic' type '$ON_PANIC'" >&2 + RETVAL=1 + fi ++ if [ $RETVAL -eq 1 ]; then ++ echo "ERROR: Setup of $DUMP_TYPE dump device failed." >&2 ++ return $RETVAL ++ fi + +- echo $ON_PANIC > $ON_PANIC_CONFIG_FILE || RETVAL=1 ++ echo $ON_PANIC > $ON_PANIC_CONFIG_FILE 2> /dev/null || RETVAL=1 + + # check for errors + + if [ $RETVAL -eq 1 ]; then +- ERRMSG="\"on panic action\" configuration failed!" + echo stop > $ON_PANIC_CONFIG_FILE +- echo "ERROR: $ERRMSG Check $DUMP_CONFIG_FILE!" >&2 ++ echo "ERROR: $ON_PANIC not supported by hardware!" >&2 + return $RETVAL + fi + +-- +1.6.0.6 + diff --git a/0017-s390-tools-1.8.1-cpuplugd-memplug.patch b/0017-s390-tools-1.8.1-cpuplugd-memplug.patch new file mode 100644 index 0000000..97d36c6 --- /dev/null +++ b/0017-s390-tools-1.8.1-cpuplugd-memplug.patch @@ -0,0 +1,57 @@ +From 277fbeaa8cdd27e586d1d3d0f58242a0a40b3a48 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Mon, 22 Jun 2009 12:51:44 +0200 +Subject: [PATCH] s390-tools-1.8.1-cpuplugd-memplug + +Description: cpuplugd: Daemon does not work in an memplug only environment. +Symptom: When the cpuplugd daemon is executed with only the memory + configuration in cpuplugd.conf it does not start properly. +Problem: A bug in the configuration file parser prevents this valid + user specified setup. +Solution: Adjust the configuration file parser, to accept this type of + system configuration. +--- + cpuplugd/config.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cpuplugd/config.c b/cpuplugd/config.c +index 7f02c6c..93b31e5 100644 +--- a/cpuplugd/config.c ++++ b/cpuplugd/config.c +@@ -66,6 +66,7 @@ void parse_configline(struct config *cfg, char *line) + + rc = -1; + cmm_min = -1; ++ rvalue = NULL; + /* parse line by line */ + for (token = strtok_r(line, "\n", &save); + token != NULL; +@@ -318,8 +319,7 @@ void check_config(struct config *cfg) + int lpar_status, error_counter; + + lpar_status = check_lpar(); +- +- if (cfg->cpu_max <= cfg->cpu_min && cfg->cpu_max != 0) { ++ if (cfg->cpu_max <= cfg->cpu_min && cfg->cpu_max != 0 && cpu != 0) { + if (foreground == 1) + fprintf(stderr, "cpu_max below or equal cpu_min," + " aborting.\n"); +@@ -328,7 +328,6 @@ void check_config(struct config *cfg) + "aborting\n"); + clean_up(); + } +- + if (cfg->cpu_max < 0 || cfg->cpu_min < 0 || cfg->update < 0 + || cfg->hotplug == NULL || cfg->hotunplug == NULL) { + if (foreground == 1) +@@ -337,6 +336,7 @@ void check_config(struct config *cfg) + if (foreground == 0) + syslog(LOG_INFO, "No valid CPU hotplug " + "configuration detected\n"); ++ cpu = 0; + } else { + cpu = 1; + if (debug) { +-- +1.6.0.6 + diff --git a/0018-s390-tools-1.8.1-ziomon-new-blkiomon.patch b/0018-s390-tools-1.8.1-ziomon-new-blkiomon.patch new file mode 100644 index 0000000..458e049 --- /dev/null +++ b/0018-s390-tools-1.8.1-ziomon-new-blkiomon.patch @@ -0,0 +1,118 @@ +From 65f317c463de53abf7a8bba3285a077dbaf42486 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Mon, 22 Jun 2009 12:53:22 +0200 +Subject: [PATCH] s390-tools-1.8.1-ziomon-new-blkiomon + +ziomon: Adjust to use blkiomon V0.3 + +Update the blkiomon header to the version packaged in RHEL 5.4, update +the version check appropriately and use the version number for .log files +to match what the proper, forthcoming version will use. +--- + ziomon/blkiomon.h | 4 ++-- + ziomon/ziomon | 2 +- + ziomon/ziomon_dacc.c | 12 ++++++------ + ziomon/ziomon_dacc.h | 2 +- + 4 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/ziomon/blkiomon.h b/ziomon/blkiomon.h +index da27d00..42b6b46 100644 +--- a/ziomon/blkiomon.h ++++ b/ziomon/blkiomon.h +@@ -25,6 +25,7 @@ struct blkiomon_stat { + /* Histogram of dispatch to completion request times in u-secs. + Step-size is 8, starting at 0. */ + __u32 d2c_hist[BLKIOMON_D2C_BUCKETS]; ++ __u32 device; /* device identifier */ + struct minmax size_r; /* stats of read request sizes in Bytes */ + struct minmax size_w; /* stats of write request sizes in Bytes */ + struct minmax d2c_r; /* stats of read request durations in u-secs */ +@@ -33,8 +34,7 @@ struct blkiomon_stat { + struct minmax thrput_w; /* stats of write throughput in Kbytes per micro-sec */ + __u64 bidir; /* number of bi-directional requests, is set exclusive + (ie. not implicitly adding 1 to rd and wrt as well) */ +- __u32 device; /* device identifier */ +-} __attribute__ ((packed)); ++}; + + static struct histlog2 size_hist = {0, 1024, BLKIOMON_SIZE_BUCKETS}; + +diff --git a/ziomon/ziomon b/ziomon/ziomon +index fe4d8ec..297651c 100755 +--- a/ziomon/ziomon ++++ b/ziomon/ziomon +@@ -414,7 +414,7 @@ function check_vmalloc_space() { + function check_blkiomon() { + # check blkiomon version + ver=`blkiomon -V | awk '{print $3}'`; +- if [ "$ver" != "0.2" ]; then ++ if [ "$ver" != "0.3" ]; then + echo "$WRP_TOOLNAME: Unsupported blkiomon version $ver detected, aborting"; + exit 1; + fi +diff --git a/ziomon/ziomon_dacc.c b/ziomon/ziomon_dacc.c +index f2c34ac..0a17d9e 100644 +--- a/ziomon/ziomon_dacc.c ++++ b/ziomon/ziomon_dacc.c +@@ -426,7 +426,7 @@ int add_msg(FILE *fp, struct message *msg, struct file_header *f_hdr, + int init_file(FILE *fp, struct file_header *f_hdr) + { + f_hdr->magic = DATA_MGR_MAGIC; +- f_hdr->version = DATA_MGR_V2; ++ f_hdr->version = DATA_MGR_V3; + f_hdr->first_msg_offset = 0; + f_hdr->end_time = 0; + f_hdr->begin_time = 0; +@@ -452,11 +452,11 @@ static int get_header(FILE *fp, struct file_header *hdr) + toolname); + return -2; + } +- if (hdr->version != DATA_MGR_V2) { ++ if (hdr->version != DATA_MGR_V3) { + fprintf(stderr, "%s: Wrong version: .log data is in version %u" + " format, while this tool only supports version %u." + " Get the matching tool version and try again.\n", +- toolname, hdr->version, DATA_MGR_V2); ++ toolname, hdr->version, DATA_MGR_V3); + return -2; + } + hdr->begin_time = 0; +@@ -557,11 +557,11 @@ static int read_aggr_file(FILE *fp, struct aggr_data *data) + toolname); + return -1; + } +- if (data->version != DATA_MGR_V2) { ++ if (data->version != DATA_MGR_V3) { + fprintf(stderr, "%s: Wrong version: .agg data is in version %u" + " format, while this tool only supports version %u." + " Get the matching tool version and try again.\n", +- toolname, data->version, DATA_MGR_V2); ++ toolname, data->version, DATA_MGR_V3); + return -1; + } + +@@ -805,7 +805,7 @@ int write_aggr_file(FILE *fp, struct aggr_data *data) + void init_aggr_data_struct(struct aggr_data *data) + { + data->magic = DATA_MGR_MAGIC_AGGR; +- data->version = DATA_MGR_V2; ++ data->version = DATA_MGR_V3; + data->num_zfcpdd = 0; + data->num_blkiomon = 0; + data->end_time = 0; +diff --git a/ziomon/ziomon_dacc.h b/ziomon/ziomon_dacc.h +index f280c9b..8f301f4 100644 +--- a/ziomon/ziomon_dacc.h ++++ b/ziomon/ziomon_dacc.h +@@ -17,7 +17,7 @@ + + #define DATA_MGR_MAGIC 0x64616d67 + #define DATA_MGR_MAGIC_AGGR 0x61676772 +-#define DATA_MGR_V2 2u ++#define DATA_MGR_V3 3u + + + /** +-- +1.6.0.6 + diff --git a/s390.csh b/s390.csh index 02c30d7..b98b7a5 100644 --- a/s390.csh +++ b/s390.csh @@ -1,5 +1,5 @@ # /etc/profile.d/s390.csh - set TERM variable -if ( `/sbin/consoletype` == "serial" ) then +if ( `/sbin/consoletype stdout` == "serial" ) then setenv TERM dumb endif diff --git a/s390.sh b/s390.sh index 7c742e7..6e2707a 100644 --- a/s390.sh +++ b/s390.sh @@ -1,6 +1,6 @@ # /etc/profile.d/s390.sh - set TERM variable -contype=`/sbin/consoletype` +contype=`/sbin/consoletype stdout` if [ "$contype" == "serial" ]; then export TERM=dumb fi diff --git a/s390utils.spec b/s390utils.spec index 4516613..2290b7f 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -7,8 +7,8 @@ Name: s390utils Summary: Utilities and daemons for IBM System/z Group: System Environment/Base -Version: 1.8.0 -Release: 5%{?dist} +Version: 1.8.1 +Release: 1%{?dist} Epoch: 2 License: GPLv2 and GPLv2+ and CPL Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -26,22 +26,28 @@ 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 + +Patch1: 0001-s390-tools-1.8.1-common-mak.patch +Patch4: 0004-s390-tools-1.8.1-zipl-automenu.patch +Patch5: 0005-s390-tools-1.8.1-fdasd-su.patch +Patch6: 0006-s390-tools-1.8.1-fdasd-raid-lvm.patch +Patch8: 0008-s390-tools-1.8.1-ziorep-fixes.patch +Patch9: 0009-s390-tools-1.8.1-cflags.patch +Patch10: 0010-s390-tools-1.8.1-defaultmenu.patch +Patch11: 0011-s390-tools-1.8.1-execstack.patch +Patch12: 0012-s390-tools-1.8.1-ziomon-fixes.patch +Patch13: 0013-s390-tools-1.8.1-zipl-fix-unsupported-device.patch +Patch14: 0014-s390-tools-1.8.1-zipl-kdump-man.patch +Patch15: 0015-s390-tools-1.8.1-iucvterm-getlogin-to-getpwuid.patch +Patch16: 0016-s390-tools-1.8.1-dumpconf-improve-error-checking.patch +Patch17: 0017-s390-tools-1.8.1-cpuplugd-memplug.patch +Patch18: 0018-s390-tools-1.8.1-ziomon-new-blkiomon.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} @@ -63,44 +69,46 @@ 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 +# Use rpm PATH variables for installation and set correct zfcpdump path +%patch1 -p1 -b .common-mak # Patch to maintain backwards compatibility with older zipl multiboot feature -%patch4 -p1 -b .automenu +%patch4 -p1 -b .zipl-automenu -# Patch to fix installer LVM partitions that show up as "unknown" in fdasd (#250176) -%patch5 -p1 -b .lvm +# Fix to honor the silent flag for wrongly formated disks +%patch5 -p1 -b .fdasd-su -# Added zfcpdump kernel symlink to dumpconf init script (#430550) -%patch6 -p1 -b .dumpconf-vmlinuz +# Enhancement to add raid partiton support to dasds +%patch6 -p1 -b .fdasd-raid-lvm -# Updates for cleanup SCSI dumper code for upstream integration - tool (#253118) -%patch7 -p1 -b .zipl-zfcpdump-2 +# Post 1.8.1 fixes for ziorep +%patch8 -p1 -b .ziorep -# Add support for timeout parameter in /etc/zipl.conf (#323651) -%patch8 -p1 -b .zipl-timeout +# Allow override of optimization level in CFLAGS +%patch9 -p1 -b .cflags -# Fix for zipl fail when section is specified and target is not repeated for all sections (#381201) -%patch9 -p1 -b .zipl-target +# Don't build automenu iff default menu exists (#486444) +%patch10 -p1 -b .defaultmenu -# Update documentation for zfcpdump (#437477) -%patch10 -p1 -b .zipl-zfcpdump-man +# Remove the execuatble stack flag from zipl +%patch11 -p1 -b .execstack -# fix the Linux Raid partition type is not retained when changed through fdasd (#445271) -%patch11 -p1 -b .fdasd-raid +# Post 1.8.1 fixes for ziomon +%patch12 -p1 -b .ziomon -# fix init scripts of cpuplugd, dumpconf and mon_statd -%patch12 -p1 -b .initscripts-fix +# Post 1.8.1 fix for zipl +%patch13 -p1 -b .zipl-device -# allow override of optimization level in CFLAGS -%patch13 -p1 -b .cflags +# Update zipl man page +%patch14 -p1 -b .zipl-kdump-man + +# Last-minute fixes from IBM +%patch15 -p1 -b iucvterm-getlogin-to-getpwuid +%patch16 -p1 -b dumpconf-improve-error-checking +%patch17 -p1 -b cpuplugd-memplug + +# Adapt ziomon to the new layout of the blkiomon_stat structure (#506966) +%patch18 -p1 -b ziomon-new-blkiomon # # cmsfs @@ -146,7 +154,7 @@ popd %build -make OPT_FLAGS="$RPM_OPT_FLAGS" +make OPT_FLAGS="$RPM_OPT_FLAGS" DISTRELEASE=%{release} pushd cmsfs-%{cmsfsver} ./configure @@ -170,7 +178,8 @@ mkdir -p $RPM_BUILD_ROOT{%{_lib},%{_libdir},/sbin,/bin,/boot,%{_mandir}/man1,%{_ make install \ INSTROOT=$RPM_BUILD_ROOT \ MANDIR=$RPM_BUILD_ROOT%{_mandir} \ - LIBDIR=${RPM_BUILD_ROOT}/%{_lib} + LIBDIR=${RPM_BUILD_ROOT}/%{_lib} \ + DISTRELEASE=%{release} %{__mkdir} -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %{__mkdir} -p ${RPM_BUILD_ROOT}%{_initddir} @@ -195,11 +204,12 @@ 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} +# cmsfs tools must be available in /sbin +install -p -m 755 cmsfs-%{cmsfsver}/cmsfscat $RPM_BUILD_ROOT/sbin +install -p -m 755 cmsfs-%{cmsfsver}/cmsfslst $RPM_BUILD_ROOT/sbin +install -p -m 755 cmsfs-%{cmsfsver}/cmsfsvol $RPM_BUILD_ROOT/sbin +install -p -m 755 cmsfs-%{cmsfsver}/cmsfscp $RPM_BUILD_ROOT/sbin +install -p -m 755 cmsfs-%{cmsfsver}/cmsfsck $RPM_BUILD_ROOT/sbin 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 @@ -208,7 +218,7 @@ 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 +make install LIBDIR=%{_libdir} SBINDIR=%{_bindir} INSTROOT=$RPM_BUILD_ROOT popd pushd lib-zfcp-hbaapi-%{hbaapiver} @@ -221,6 +231,7 @@ popd %clean rm -rf ${RPM_BUILD_ROOT} + %files %defattr(-,root,root,-) %doc README @@ -394,8 +405,6 @@ fi /sbin/scsi_logging_level /sbin/zfcpdbf /sbin/qetharp -/sbin/qetharp-2.4 -/sbin/qetharp-2.6 /sbin/qethconf /sbin/tape390_display /sbin/tape390_crypt @@ -456,7 +465,7 @@ fi /sbin/zfcpconf.sh # src_vipa -%{_sbindir}/src_vipa.sh +%{_bindir}/src_vipa.sh %{_libdir}/src_vipa.so %{_mandir}/man8/src_vipa.8.gz @@ -477,8 +486,6 @@ 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* @@ -567,7 +574,7 @@ fi License: GPLv2 Summary: S390 ziomon tools Group: Applications/System -Requires: perl lsscsi coreutils blktrace >= 1.0 +Requires: perl lsscsi coreutils blktrace >= 1.0.1 %description ziomon Tool set to collect data for zfcp performance analysis. @@ -579,11 +586,68 @@ Tool set to collect data for zfcp performance analysis. /sbin/ziomon_mgr /sbin/ziomon_util /sbin/ziomon_zfcpdd +/sbin/ziorep_config +/sbin/ziorep_traffic +/sbin/ziorep_utilization %{_mandir}/man8/ziomon.8* %{_mandir}/man8/ziomon_fcpconf.8* %{_mandir}/man8/ziomon_mgr.8* %{_mandir}/man8/ziomon_util.8* %{_mandir}/man8/ziomon_zfcpdd.8* +%{_mandir}/man8/ziorep_config.8* +%{_mandir}/man8/ziorep_traffic.8* +%{_mandir}/man8/ziorep_utilization.8* + +# +# *********************** s390-tools iucvterm package ************************* +# +%package iucvterm +License: GPLv2 +Summary: z/VM IUCV terminal applications +Group: Applications/System +BuildRequires: gettext + +%description iucvterm +z/VM IUCV terminal applications. + +%pre iucvterm +# check for ts-shell group and create it +getent group ts-shell > /dev/null || groupadd -r ts-shell + +%post iucvterm +# /etc/shells is provided by "setup" +grep -q '^/usr/bin/ts-shell$' /etc/shells \ + || echo "/usr/bin/ts-shell" >> /etc/shells + +%postun iucvterm +if [ $1 = 0 ] +then + # remove ts-shell from /etc/shells on uninstall + grep -v '^/usr/bin/ts-shell$' /etc/shells > /etc/shells.ts-new + mv /etc/shells.ts-new /etc/shells + chmod 0644 /etc/shells +fi + +%files iucvterm +%defattr(-,root,root,-) +%dir %{_sysconfdir}/iucvterm +%config(noreplace) %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/ts-audit-systems.conf +%config(noreplace) %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/ts-authorization.conf +%config(noreplace) %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/ts-shell.conf +%config(noreplace) %attr(0640,root,ts-shell) %{_sysconfdir}/iucvterm/unrestricted.conf +%{_bindir}/iucvconn +%{_bindir}/iucvtty +%{_bindir}/ts-shell +%{_sbindir}/chiucvallow +%{_sbindir}/lsiucvallow +%dir %attr(2770,root,ts-shell) /var/log/ts-shell +%doc iucvterm/doc/ts-shell +%{_mandir}/man1/iucvconn.1* +%{_mandir}/man1/iucvtty.1* +%{_mandir}/man1/ts-shell.1* +%{_mandir}/man7/af_iucv.7* +%{_mandir}/man8/chiucvallow.8* +%{_mandir}/man9/hvc_iucv.9* # # *********************** libzfcphbaapi package *********************** @@ -657,11 +721,11 @@ This package contains the CMS file system tools. %files cmsfs %defattr(-,root,root,-) -%{_sbindir}/cmsfscat -%{_sbindir}/cmsfsck -%{_sbindir}/cmsfscp -%{_sbindir}/cmsfslst -%{_sbindir}/cmsfsvol +/sbin/cmsfscat +/sbin/cmsfsck +/sbin/cmsfscp +/sbin/cmsfslst +/sbin/cmsfsvol %{_mandir}/man8/cmsfscat.8* %{_mandir}/man8/cmsfsck.8* %{_mandir}/man8/cmsfscp.8* @@ -670,6 +734,17 @@ This package contains the CMS file system tools. %changelog +* Mon Jun 29 2009 Dan Horák 2:1.8.1-1 +- update to 1.8.1 +- drop upstreamed patches +- create iucvterm subpackage +- update src_vipa locations patch +- install cmsfs tools into /sbin +- add post 1.8.1 fixes from IBM + +* Fri Apr 17 2009 Dan Horák 2:1.8.0-6 +- fix build with newer kernels + * Wed Mar 25 2009 Dan Horák 2:1.8.0-5 - reword the summaries a bit - add downloadable URLs for Sources diff --git a/sources b/sources index 00f5991..1a818c5 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -5033eee356663d160784e37b193f93fa s390-tools-1.8.0.tar.bz2 +6a94c4655204a4ec7a2c64f42c9afed3 s390-tools-1.8.1.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 diff --git a/src_vipa-2.0.4-locations.patch b/src_vipa-2.0.4-locations.patch index 97fbb92..799b0f4 100644 --- a/src_vipa-2.0.4-locations.patch +++ b/src_vipa-2.0.4-locations.patch @@ -42,3 +42,33 @@ index 669b6c6..d395fa8 100644 -- 1.6.0.6 +From 5c21f29f4d9e82942a997775c111280b85d01bb8 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Dan=20Hor=C3=A1k?= +Date: Wed, 22 Apr 2009 12:53:55 +0200 +Subject: [PATCH] make the man page path and script path configurable + +--- + Makefile | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index d395fa8..365472b 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,9 +23,11 @@ VERSION=2.0.4 + LIBDIR=/usr/lib + SRC_VIPA_PATH=$(INSTROOT)$(LIBDIR) + # the path to the starter script +-SRC_VIPA_STARTER_PATH=$(INSTROOT)/usr/sbin ++SBINDIR=/usr/sbin ++SRC_VIPA_STARTER_PATH=$(INSTROOT)$(SBINDIR) + # path to man page +-SRC_VIPA_MANPAGE_PATH=$(INSTROOT)/usr/share/man ++MANDIR=/usr/share/man ++SRC_VIPA_MANPAGE_PATH=$(INSTROOT)$(MANDIR) + + all: src_vipa.so src_vipa.sh + +-- +1.6.0.6 +