From 9b1e751e830fb738eca5bec01274b8789cb140d3 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 18 Apr 2019 18:28:46 -0600 Subject: [PATCH 1/1] LU-12202 misc: remove obsolete contrib files nn-final-symbol-list.txt: originally used for Solaris port mptlinux.spec.patch: for ancient SCSI drivers 01-dont-include-openib-initscript-rhel5.ed: old RHEL5 patch rdac_spec: old driver file I only wish there was a "really_trivial" keyword... Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: If66db22caf604736949e18289af74cc4f0fa6613 Reviewed-on: https://review.whamcloud.com/34719 Reviewed-by: Arshad Hussain Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- contrib/nn-final-symbol-list.txt | 333 --------------------------- contrib/patches/mptlinux.spec.patch | 441 ------------------------------------ contrib/rdac_spec | 130 ----------- 3 files changed, 904 deletions(-) delete mode 100644 contrib/nn-final-symbol-list.txt delete mode 100644 contrib/patches/mptlinux.spec.patch delete mode 100644 contrib/rdac_spec diff --git a/contrib/nn-final-symbol-list.txt b/contrib/nn-final-symbol-list.txt deleted file mode 100644 index 88fde1f..0000000 --- a/contrib/nn-final-symbol-list.txt +++ /dev/null @@ -1,333 +0,0 @@ -\blist_head\b -\bspin_unlock\b -\bspin_lock\b -\blist_empty\b -\batomic_read\b -\blist_entry\b -\blist_add_tail\b -\blist_del_init\b -\batomic_inc\b -\blist_for_each\b -\bspinlock_t\b -\blist_add\b -\bspin_unlock_irqrestore\b -\batomic_t\b -\bup[\s]*\( -\bspin_lock_irqsave\b -\bspin_lock_init\b -\blist_for_each_entry\b -\bwrite_unlock_irqrestore\b -\batomic_set\b -\bdown[\s]*\( -\bhlist_node\b -\bHZ\b -\batomic_dec\b -\bcompletion\b -\blist_for_each_safe\b -\bin_interrupt\b -\blist_for_each_entry_safe\b -\bmutex_up\b -\bwrite_lock_irqsave\b -\bcopy_from_user\b -\bcopy_to_user\b -\batomic_dec_and_test\b -\bmutex_down\b -\bspin_unlock_bh\b -\bsemaphore\b -\bread_unlock\b -\btest_bit\b -\bup_write\b -\bsize_round\b -\bread_lock\b -\bread_unlock_irqrestore\b -\bset_current_state\b -\bhlist_head\b -\bspin_lock_bh\b -\bdo_gettimeofday\b -\bgroup_info\b -\bset_bit\b -\bdown_write\b -\bup_read\b -\bread_lock_irqsave\b -\bwrite_unlock\b -\bwrite_lock\b -\brwlock_t\b -\bhlist_entry\b -\bmutex_unlock\b -\bdown_read\b -\bnum_physpages\b -\bmutex\b -\bsema_init\b -\bmutex_lock\b -\bclear_bit\b -\bmb\b -\bATOMIC_INIT\b -\btime_after_eq\b -\blist_splice_init\b -\bcomplete\b -\bkstatfs\b -\bwait_for_completion\b -\bnum_online_cpus\b -\bhlist_unhashed\b -\bLIST_HEAD\b -\blist_for_each_entry_reverse\b -\bSPIN_LOCK_UNLOCKED\b -\binit_completion\b -\bmight_sleep\b -\brwlock_init\b -\bkernel_thread\b -\bhlist_add_head\b -\blist_move\b -\bunlock_kernel\b -\bschedule_timeout\b -\brw_semaphore\b -\bmodule\b -\bhlist_del_init\b -\batomic_inc_return\b -\btime_after\b -\bmodule_put\b -\binit_mutex\b -\bget_random_bytes\b -\bin_group_p\b -\btime_before\b -\bumode_t\b -\binit_rwsem\b -\bhlist_for_each_entry_safe\b -\bmutex_init\b -\block_kernel\b -\btry_module_get\b -\bCURRENT_TIME\b -\brequest_module\b -\block_class_key\b -\bhlist_empty\b -\bhlist_for_each_entry\b -\bnum_possible_cpus\b -\blist_splice\b -\bour_cond_resched\b -\bshrinker\b -\bspin_unlock_irq\b -\btest_and_set_bit\b -\bDECLARE_MUTEX\b -\bINIT_HLIST_NODE\b -\bdown_write_nested\b -\bspin_lock_irq\b -\bsize_round4\b -\bwait_event\b -\bINIT_HLIST_HEAD\b -\bMAX_SCHEDULE_TIMEOUT\b -\bSLAB_HWCACHE_ALIGN\b -\bcdebug_show\b -\bcycles_t\b -\bgroups_free\b -\bDEFAULT_SEEKS\b -\bGET_TIMEOUT\b -\bremove_shrinker\b -\bset_shrinker\b -\batomic_sub\b -\bgroups_alloc\b -\bhlist_for_each\b -\bhlist_for_each_safe\b -\bNR_IRQS\b -\bhlist_del\b -\batomic_add_return\b -\binit_MUTEX_LOCKED\b -\binit_mutex_locked\b -\blist_for_each_prev\b -\bcpu_online\b -\binit_MUTEX\b -\bFREE_BITMAP\b -\bL1_CACHE_ALIGN\b -\batomic_dec_and_lock\b -\bfind_first_zero_bit\b -\bmutex_trylock\b -\bHLIST_HEAD\b -\batomic_dec_return\b -\bcond_resched\b -\bhash_long\b -\bmutex_is_locked\b -\bdown_read_nested\b -\bmutex_lock_nested\b -\bwait_event_interruptible_exclusive\b -\bwait_event_interruptible\b -\batomic_add\b -\bCHECK_STACK\b -\bfor_each_possible_cpu\b -\bALLOCATE_BITMAP\b -\bDEFINE_MUTEX\b -\blist_empty_careful\b -\bwrite_lock_bh\b -\bwrite_unlock_bh\b -\bTHREAD_SIZE\b -\blist_for_each_entry_safe_from\b -\bshrinker_t\b -\bwait_for_completion_interruptible\b -\bmutex_destroy\b -\bdown_read_trylock\b -\bdown_write_trylock\b -\bfind_next_zero_bit\b -\bspin_lock_nested\b -\bspin_trylock\b -\bbitmap_t\b -\bsmp_processor_id\b -\btracefile\b -\btracefile_sem\b -\bKERN_ERR\b -\bDECLARE_COMPLETION\b -\bhlist_add_after\b -\bhlist_add_before\b -\bhlist_for_each_entry_continue\b -\bhlist_for_each_entry_from\b -\bINIT_COMPLETION\b -\bround_strlen\b -\bRW_LOCK_UNLOCKED\b -\bsize_round0\b -\bsize_round16\b -\bsize_round32\b -\blist_t\b -\bmutex_t\b -\bCOMPLETION_INITIALIZER\b -\bHLIST_HEAD_INIT\b -\btime_before_eq\b -\bspin_is_locked\b -\btrace_daemon_command_usrstr\b -\btrace_debug_print\b -\btrace_dump_debug_buffer_usrstr\b -\btrace_refill_stock\b -\btrace_set_debug_mb_usrstr\b -\bfind_first_bit\b -\b__list_splice\b -\btrace_assertion_failed\b -\btracefile_exit\b -\btracefile_init\b -\btrace_flush_pages\b -\btrace_start_thread\b -\b__list_add\b -\btcd_owns_tage\b -\bKERN_ALERT\b -\bmutex_down_trylock\b -\bspin_lock_bh_init\b -\btrace_get_debug_mb\b -\btage_allocated\b -\btrace_daemon_command\b -\btrace_set_debug_mb\b -\bfind_next_bit\b -\btrace_stop_thread\b -\btracefile_init_arch\b -\btrace_get_tcd\b -\btrace_lock_tcd\b -\btrace_unlock_tcd\b -\btrace_copyout_string\b -\btracefile_dump_all_pages\b -\b__list_del\b -\bKERN_EMERG\b -\btracefile_fini_arch\b -\btrace_get_console_buffer\b -\btrace_max_debug_mb\b -\btrace_put_console_buffer\b -\btrace_copyin_string\b -\btracefile_read_lock\b -\btracefile_read_unlock\b -\btrace_allocate_string_buffer\b -\btrace_free_string_buffer\b -\bdebug_file_path_arr\b -\btrace_thread_sem\b -\btracefile_write_lock\b -\btracefile_write_unlock\b -\btracefile_size\b -\bprint_to_console\b -\btrace_put_tcd\b -\bdebug_file_path\b -\bfini_rwsem\b -\bKERN_WARNING\b -\bcpumask_t\b -\bcpus_empty\b -\bfor_each_cpu_mask\b -\bcpu_set\b -\bcpus_weight\b -\bset_cpus_allowed\b -\bnodemask_t\b -\blist_del\b -\blist_move_tail\b -\b__hlist_del\b -\brwlock_fini\b -\batomic_sub_return\b -\batomic_inc_and_test\b -\batomic_sub_and_test\b -\bcall_wait_handler\b -\binit_completion_module\b -\bSLAB_KERNEL\b -\bSLAB_NOFS\b -\bTASK_INTERRUPTIBLE\b -\bTASK_RUNNING\b -\bTRACEFILE_SIZE\b -\btrace_cleanup\b -\btrace_page\b -\btrace_get_tage\b -\btrace_cpu_data\b -\btrace_get_tage_try\b -\btrace_data\b -\btage_from_list\b -\btage_alloc\b -\btage_free\b -\btage_to_tail\b -\btcd_shrink\b -\btcd_for_each\b -\btcd_for_each_type_lock\b -\bschedule_timeout_interruptible\b -\bINIT_LIST_HEAD\b -\b__fls\b -\bfls\b -\b__flz\b -\bflz\b -\b__ffs\b -\bffs\b -\b__ffz\b -\bffz\b -\bDEBUG_FILE_PATH_DEFAULT\b -\btrace_data_union\b -\bKERN_CRIT\b -\bKERN_NOTICE\b -\bKERN_INFO\b -\bKERN_DEBUG\b -\bput_group_info\b -\bget_group_info\b -\bcleanup_group_info\b -\bset_current_groups\b -\btest_and_clear_bit\b -\btrace_console_buffers\b -\bset_ptldebug_header\b -\btrace_buf_idx_get\b -\btrace_buf_type_t\b -\bTCD_TYPE_PROC\b -\bTCD_TYPE_SOFTIRQ\b -\bTCD_TYPE_IRQ\b -\bTCD_TYPE_MAX\b -\bTCD_TYPE_PASSIVE\b -\bTCD_TYPE_DISPATCH\b -\brcu_head\b -\blockdep_on\b -\blockdep_off\b -\blockdep_set_class\b -\b__module_get\b -\bmodule_refcount\b -\bNR_CPUS\b -\bTRACE_CONSOLE_BUFFER_SIZE\b -\bcomplete_and_wait\b -\batomic_add_unless\b -\batomic_inc_not_zero\b -\bschedule\b -\bcomplete_and_exit\b -\binit_waitqueue_head\b -\binit_waitqueue_entry\b -\badd_wait_queue\b -\badd_wait_queue_exclusive\b -\bremove_wait_queue\b -\bwaitqueue_active\b -\bwake_up\b -\bwake_up_nr\b -\bwake_up_all\b -\bwait_queue_head_t\b -\bwait_queue_t\b -\bDECLARE_RWSEM\b -\bCFS_DECL_RWSEM\b -\blist_for_each_entry_continue\b diff --git a/contrib/patches/mptlinux.spec.patch b/contrib/patches/mptlinux.spec.patch deleted file mode 100644 index 56bf6fb..0000000 --- a/contrib/patches/mptlinux.spec.patch +++ /dev/null @@ -1,441 +0,0 @@ ---- mptlinux.spec.dist 2008-11-07 02:16:26.000000000 -0500 -+++ mptlinux.spec 2009-12-01 14:17:11.000000000 -0500 -@@ -1,13 +1,15 @@ -+%{!?kernel_obj: %define kernel_obj ""} -+ - %define name mptlinux - %define version 4.18.20.04 --%define release 1 --Summary: MPT Fusion drivers for 53C1030, FC9XX, and SAS Adapters -+%define release 1sun1 -+Summary: Common files for the MPT Fusion drivers for 53C1030, FC9XX, and SAS Adapters - Name: %{name} - Version: %{version} - Release: %{release} - Vendor: LSI Logic - License: GPL --Group: System Environment/Kernel -+Group: Utilities/System - Source0: %{name}-%{version}.tar.gz - Source1: fusion.mptctl - URL: http://www.lsilogic.com -@@ -22,238 +24,274 @@ - Fibre Channel FC909, FC919, FC929, FC919X, FC929X, and FC949X adapters - SAS SAS1064, SAS1068, and SAS1078 adapters. - -+This package contains the common file(s). -+ -+%package modules -+Summary: Kernel modules for the MPT Fusion drivers for 53C1030, FC9XX, and SAS Adapters -+Group: System Environment/Kernel -+Requires: mptlinux -+ -+%description modules -+Drivers for (suse i686, x86_64, ia64 and updates) for the -+LSI Logic Fusion-MPT Architecture parts. -+These include the Ultra320 53C1030 and 53C1020 adapters. -+Fibre Channel FC909, FC919, FC929, FC919X, FC929X, and FC949X adapters -+SAS SAS1064, SAS1068, and SAS1078 adapters. -+ -+This package contains the drivers. -+ - # prep ######################################################################### - %prep -+#exit 0 - echo prep %{version} --%setup -c -b 0 -+%setup -c - - # build ######################################################################## - %build -+#exit 0 - echo build %{version} -+if [ "%{kernel_obj}" != "" ]; then -+ # dig the version out of the tree -+ LINUXRELEASEHEADER=%{kernel_obj}/include/linux/version.h -+ if [ -s %{kernel_obj}/include/linux/utsrelease.h ]; then -+ LINUXRELEASEHEADER=%{kernel_obj}/include/linux/utsrelease.h -+ fi -+ LINUXRELEASE=$(sed -ne 's/#define UTS_RELEASE "\(.*\)"$/\1/p' $LINUXRELEASEHEADER) -+ -+ make build LINUX=%{kernel_obj} KERNEL=$LINUXRELEASE -+else - for i in /lib/modules/2.6.*; do -- kernel=`basename ${i}`; -+ kernel=`basename ${i}` - if [ -f /lib/modules/${kernel}/source/drivers/message/fusion/Kconfig ]; then -- make build KERNEL=$kernel; -- fi; --done; -+ make build KERNEL=$kernel -+ fi -+done -+fi - - # install ###################################################################### - %install - echo install %{version} - echo "%defattr(-,root,root)" > $RPM_BUILD_DIR/file.list.%{name} -+echo "%defattr(-,root,root)" > $RPM_BUILD_DIR/file.list.%{name}-modules - echo "/etc/init.d/fusion.mptctl" >> $RPM_BUILD_DIR/file.list.%{name} - mkdir -p $RPM_BUILD_ROOT/etc/init.d --cp -rf $RPM_SOURCE_DIR/fusion.mptctl $RPM_BUILD_ROOT/etc/init.d -+cp -f $RPM_SOURCE_DIR/fusion.mptctl $RPM_BUILD_ROOT/etc/init.d -+if [ "%{kernel_obj}" != "" ]; then -+ # dig the version out of the tree -+ LINUXRELEASEHEADER=%{kernel_obj}/include/linux/version.h -+ if [ -s %{kernel_obj}/include/linux/utsrelease.h ]; then -+ LINUXRELEASEHEADER=%{kernel_obj}/include/linux/utsrelease.h -+ fi -+ kernel="$(sed -ne 's/#define UTS_RELEASE "\(.*\)"$/\1/p' $LINUXRELEASEHEADER)" -+ -+ #if [ ! -e /lib/modules/${kernel}/source/drivers/message/fusion/Kconfig ]; then -+ # continue -+ #fi -+ MPTLINUX_IPATH=/lib/modules/${kernel}/updates/drivers/message/fusion -+ mkdir -p $RPM_BUILD_ROOT/lib/modules/${kernel}/{kernel,updates}/drivers/message/fusion -+ -+ # create the file list used in %files to indicate which files are in package -+ for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -+ echo "$MPTLINUX_IPATH/${driver_name}" >> $RPM_BUILD_DIR/file.list.%{name}-modules -+ done -+ -+ make install PREFIX=$RPM_BUILD_ROOT LINUX=%{kernel_obj} KERNEL=$kernel -+ # the Makefile hardcodes the destination path to -+ # $(PREFIX)/lib/modules/$(KERNEL)/kernel/drivers/message/fusion -+ # so lets move these to where they really go -+ # ideally, the Makefile should take this location as an (optional if you -+ # wish) argument -+ mv -f $RPM_BUILD_ROOT/lib/modules/${kernel}/kernel/drivers/message/fusion/* \ -+ $RPM_BUILD_ROOT/$MPTLINUX_IPATH/ -+else - for i in /lib/modules/2.6.*; do - kernel=`basename ${i}` - if [ ! -e /lib/modules/${kernel}/source/drivers/message/fusion/Kconfig ]; then -- continue; -- fi; -- MPTLINUX_IPATH=/lib/modules/${kernel}/kernel/drivers/message/fusion -- mkdir -p $RPM_BUILD_ROOT/lib/modules/${kernel}/kernel/drivers/message/fusion -+ continue -+ fi -+ MPTLINUX_IPATH=/lib/modules/${kernel}/updates/drivers/message/fusion -+ mkdir -p $RPM_BUILD_ROOT/lib/modules/${kernel}/{kernel,updates}/drivers/message/fusion - - # create the file list used in %files to indicate which files are in package - for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -- echo "$MPTLINUX_IPATH/${driver_name}.new" >> $RPM_BUILD_DIR/file.list.%{name} -- done; -+ echo "$MPTLINUX_IPATH/${driver_name}" >> $RPM_BUILD_DIR/file.list.%{name}-modules -+ done - - make install PREFIX=$RPM_BUILD_ROOT KERNEL=$kernel -- -- for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -- mv -f $RPM_BUILD_ROOT/$MPTLINUX_IPATH/${driver_name} \ -- $RPM_BUILD_ROOT/$MPTLINUX_IPATH/${driver_name}.new -- done; --done; -- --# pre ######################################################################### --%pre --echo pre %{version} --system_arch=`uname -m` --if [ -f /etc/SuSE-release ] && [ ${system_arch} == i686 ]; then -- system_arch=i586; --fi; --if [ %{_target_cpu} != ${system_arch} ]; then -- echo "ERROR: Failed installing this rpm!!!!" -- echo "This rpm is intended for %{_target_cpu} platform. It seems your system is ${system_arch}."; -- exit 1; --fi; -+ # the Makefile hardcodes the destination path to -+ # $(PREFIX)/lib/modules/$(KERNEL)/kernel/drivers/message/fusion -+ # so lets move these to where they really go -+ # ideally, the Makefile should take this location as an (optional if you -+ # wish) argument -+ mv -f $RPM_BUILD_ROOT/lib/modules/${kernel}/kernel/drivers/message/fusion/* \ -+ $RPM_BUILD_ROOT/$MPTLINUX_IPATH/ -+done -+fi - - # post ######################################################################### --%post -+%post modules - echo post %{version} - chkconfig fusion.mptctl --add >/dev/null 2>&1 - if [ -f /etc/redhat-release ]; then - # RHEL 4 -- if [ -f /etc/modprobe.conf ] ; then -- cp /etc/modprobe.conf /etc/modprobe.conf.orig.%{version}; -- sed -e '/mptbase/d' /etc/modprobe.conf > modprobe.edit; -- sed -e '/mptscsih/d' modprobe.edit > modprobe.edit.1; -- sed -e '/mptspi/d' modprobe.edit.1 > modprobe.edit.2; -- sed -e '/mptfc/d' modprobe.edit.2 > modprobe.edit.3; -- sed -e '/mptsas/d' modprobe.edit.3 > modprobe.edit; -- echo "alias scsi_hostadapter mptspi" >> modprobe.edit; -- echo "alias scsi_hostadapter1 mptfc" >> modprobe.edit; -- echo "alias scsi_hostadapter2 mptsas" >> modprobe.edit; -- mv -f modprobe.edit /etc/modprobe.conf; -- rm -fr modprobe.edit.*; -- fi; -+ # per the comments below, i can't see any modprobe.conf editing here that's -+ # valid -+ #if [ -f /etc/modprobe.conf ] ; then -+ # cp /etc/modprobe.conf /etc/modprobe.conf.orig.mptlinux-%{version} -+ # i don't think this is kosher. what sort of entries are -+ # being deleted here? -+ #sed -e '/mptbase/d' -e '/mptscsih/d' -e '/mptspi/d' \ -+ # -e '/mptfc/d' -e '/mptsas/d' /etc/modprobe.conf > /etc/modprobe.edit -+ # this really isn't kosher. you can't assume that the -+ # administrator has not already defined the scsi_hostadapter -+ # aliases for some other HBA that's already in the system -+ #echo "alias scsi_hostadapter mptspi" >> /etc/modprobe.edit -+ #echo "alias scsi_hostadapter1 mptfc" >> /etc/modprobe.edit -+ #echo "alias scsi_hostadapter2 mptsas" >> /etc/modprobe.edit -+ #mv -f /etc/modprobe.edit /etc/modprobe.conf -+ #fi -+ : - elif [ -f /etc/SuSE-release ]; then - # SLES 9 - if [ -f /etc/sysconfig/kernel ] ; then -- cp /etc/sysconfig/kernel /etc/sysconfig/kernel.orig.%{version}; -- sed -e 's/mptscsih//g' /etc/sysconfig/kernel > kernel.edit; -- sed -e 's/mptsas//g' kernel.edit > kernel.edit.1; -- sed -e 's/mptfc//g' kernel.edit.1 > kernel.edit.2; -- sed -e 's/mptspi//g' kernel.edit.2 > kernel.edit.3; -- sed -e 's/INITRD_MODULES="/INITRD_MODULES="mptsas /g' kernel.edit.3 > kernel.edit.4; -- sed -e 's/INITRD_MODULES="/INITRD_MODULES="mptfc /g' kernel.edit.4 > kernel.edit.5; -- sed -e 's/INITRD_MODULES="/INITRD_MODULES="mptspi /g' kernel.edit.5 > kernel.edit; -- mv -f kernel.edit /etc/sysconfig/kernel; -- rm -fr kernel.edit.*; -- fi; -+ cp /etc/sysconfig/kernel /etc/sysconfig/kernel.orig.mptlinux-%{version} -+ sed -e 's/mptscsih//g' -e 's/mptsas//g' -e 's/mptfc//g' \ -+ -e 's/mptspi//g' \ -+ -e 's/INITRD_MODULES="/INITRD_MODULES="mptsas /g' \ -+ -e 's/INITRD_MODULES="/INITRD_MODULES="mptfc /g' \ -+ -e 's/INITRD_MODULES="/INITRD_MODULES="mptspi /g' \ -+ /etc/sysconfig/kernel > /etc/sysconfig/kernel.edit -+ mv -f /etc/sysconfig/kernel.edit /etc/sysconfig/kernel -+ fi - fi - - # adding device nodes - if [ ! -e /dev/mptctl ]; then -- echo "Creating /dev/mptctl ioctl node file"; -- mknod /dev/mptctl c 10 220; --fi; -+ echo "Creating /dev/mptctl ioctl node file" -+ mknod /dev/mptctl c 10 220 -+fi - -+# i think this is wrong. we should not muck around with kernels we did not -+# install new drivers into. but how to determine which kernels those are? -+# maybe look for the new driver in the /lib/modules/*/updates tree? - for i in /lib/modules/2.6.*; do -- kernel=`basename ${i}`; -- MPTLINUX_IPATH=/lib/modules/${kernel}/kernel/drivers/message/fusion -- if [ ! -e $MPTLINUX_IPATH/mptbase.ko ] || \ -- [ ! -e $MPTLINUX_IPATH/mptbase.ko.new ]; then -- continue; -- fi; -+ kernel=`basename ${i}` - - if [ -f /etc/SuSE-release ] && - [ ! -e /boot/initrd-${kernel} ]; then -- continue; -- fi; -+ continue -+ fi - -- echo "The mpt driver for kernel ${kernel} is now version 4.18.20.04"; -- #backup original fusion drivers here if not already done -- for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -- if [ ! -e $MPTLINUX_IPATH/${driver_name}.orig ]; then -- cp $MPTLINUX_IPATH/${driver_name} \ -- $MPTLINUX_IPATH/${driver_name}.orig -- fi; -- cp -f $MPTLINUX_IPATH/${driver_name}.new $MPTLINUX_IPATH/${driver_name} -- done; -+ echo "The mpt driver for kernel ${kernel} is now version 4.18.20.04" - # Remake the initrd image for the user, depending on their OS - if [ -f /etc/redhat-release ]; then -- -- # taking care of dud migration, by moving all the ko's to ko.orig -- for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -- MPTLINUX_IPATH=/lib/modules/${kernel}/updates -- if [ -e $MPTLINUX_IPATH/${driver_name} ]; then -- mv $MPTLINUX_IPATH/${driver_name} \ -- $MPTLINUX_IPATH/${driver_name}.orig -- fi; -- # to handle kmods partially need to handle week updates -- MPTLINUX_KPATH=/lib/modules/${kernel}/extra/mptbase -- if [ -e $MPTLINUX_KPATH/${driver_name} ]; then -- mv $MPTLINUX_KPATH/${driver_name} \ -- $MPTLINUX_KPATH/${driver_name}.orig -- fi; -- done; -- - # RHEL 4 - if [ -d /boot/efi/efi/redhat ]; then -- bootpart=/boot/efi/efi/redhat; -+ bootpart=/boot/efi/efi/redhat - elif [ -d /boot/efi ]; then -- bootpart=/boot/efi; -+ bootpart=/boot/efi - else -- bootpart=/boot; -+ bootpart=/boot - fi - if [ ! -e ${bootpart}/initrd-${kernel}.img.orig ]; then - echo Saving initrd-${kernel}.img in ${bootpart} directory. - cp ${bootpart}/initrd-${kernel}.img \ -- ${bootpart}/initrd-${kernel}.img.orig -- fi; -+ ${bootpart}/initrd-${kernel}.img.orig.mptlinux-%{version} -+ fi - # Calling depmod -- depmod -v ${kernel} > /dev/null 2>&1; -+ depmod -v ${kernel} > /dev/null 2>&1 - mkinitrd -f ${bootpart}/initrd-${kernel}.img ${kernel} - elif [ -f /etc/SuSE-release ]; then - # SLES 9 - if [ ! -e /boot/initrd-${kernel}.orig ]; then - echo Saving initrd-${kernel} in /boot directory. -- cp /boot/initrd-${kernel} /boot/initrd-${kernel}.orig -- fi; -+ cp /boot/initrd-${kernel} /boot/initrd-${kernel}.orig.mptlinux-%{version} -+ fi - # Calling depmod -- depmod -v ${kernel} > /dev/null 2>&1; -+ depmod -v ${kernel} > /dev/null 2>&1 - mk_initrd -k vmlinuz-${kernel} -i /boot/initrd-${kernel} -- fi; --done; -+ fi -+done - echo -e "post Install Done." - - # postun ####################################################################### --%postun -+%postun modules - echo postun %{version} - for i in /lib/modules/2.6.*; do -- kernel=`basename ${i}`; -- MPTLINUX_IPATH=/lib/modules/${kernel}/kernel/drivers/message/fusion -- if [ ! -e $MPTLINUX_IPATH/mptbase.ko ] || \ -- [ -e $MPTLINUX_IPATH/mptbase.ko.new ]; then -- continue; -- fi; -+ kernel=`basename ${i}` -+ MPTLINUX_IPATH=/lib/modules/${kernel}/updates/drivers/message/fusion -+ if [ ! -e $MPTLINUX_IPATH/mptbase.ko ]; then -+ continue -+ fi - if [ ! -e /etc/init.d/fusion.mptctl ]; then -+ # why are we only doing this if the fustion.mptctl file -+ # *doesn't* exist? running chkconfig on a file that doesn't -+ # exist is surely an error -+ #chkconfig fusion.mptctl --del >/dev/null 2>&1 -+ : -+ else - chkconfig fusion.mptctl --del >/dev/null 2>&1 -- fi; -- if [ -f /etc/modprobe.conf.orig ]; then -+ fi -+ -+ if [ -f /etc/modprobe.conf.orig.mptlinux-%{version} ]; then - # RHEL 4 -- mv -f /etc/modprobe.conf.orig /etc/modprobe.conf; -- elif [ -f /etc/sysconfig/kernel.orig ]; then -+ mv -f /etc/modprobe.conf.orig.mptlinux-%{version} /etc/modprobe.conf -+ elif [ -f /etc/sysconfig/kernel.orig.mptlinux-%{version} ]; then - # SLES 9 -- mv -f /etc/sysconfig/kernel.orig /etc/sysconfig/kernel; -- fi; -- for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -- if [ -f $MPTLINUX_IPATH/${driver_name}.orig ]; then -- mv -f $MPTLINUX_IPATH/${driver_name}.orig $MPTLINUX_IPATH/${driver_name} -- fi; -- done; -+ mv -f /etc/sysconfig/kernel.orig.mptlinux-%{version} /etc/sysconfig/kernel -+ fi - # restore original initrd images -+ # i don't think this is a good idea. lots of stuff may have happened -+ # to the system between the time this backup was made and now that -+ # renders the original initrd images useless now -+ # probably should just generate new ones - if [ -f /etc/redhat-release ]; then - -- # restoring the state of dud migration -- for driver_name in mptbase.ko mptscsih.ko mptctl.ko mptlan.ko mptspi.ko mptfc.ko mptsas.ko; do -- MPTLINUX_IPATH=/lib/modules/${kernel}/udpates -- if [ -f $MPTLINUX_IPATH/${driver_name}.orig ]; then -- mv -f $MPTLINUX_IPATH/${driver_name}.orig $MPTLINUX_IPATH/${driver_name} -- fi; -- MPTLINUX_KPATH=/lib/modules/${kernel}/extra/mptbase -- if [ -e $MPTLINUX_KPATH/${driver_name}.orig ]; then -- mv -f $MPTLINUX_KPATH/${driver_name}.orig $MPTLINUX_KPATH/${driver_name} -- fi; -- done; -- - # RHEL 4 - if [ -d /boot/efi/efi/redhat ]; then -- bootpart=/boot/efi/efi/redhat; -+ bootpart=/boot/efi/efi/redhat - elif [ -d /boot/efi ]; then -- bootpart=/boot/efi; -+ bootpart=/boot/efi - else -- bootpart=/boot; -+ bootpart=/boot - fi -- if [ -f ${bootpart}/initrd-${kernel}.img.orig ]; then -- mv -f ${bootpart}/initrd-${kernel}.img.orig ${bootpart}/initrd-${kernel}.img; -- fi; -+ #if [ -f ${bootpart}/initrd-${kernel}.img.orig.mptlinux-%{version} ]; then -+ # mv -f ${bootpart}/initrd-${kernel}.img.orig.mptlinux-%{version} ${bootpart}/initrd-${kernel}.img -+ #fi -+ # Calling depmod -+ depmod -v ${kernel} > /dev/null 2>&1 -+ mkinitrd -f ${bootpart}/initrd-${kernel}.img ${kernel} - elif [ -f /etc/SuSE-release ]; then - # SLES 9 -- if [ -f /boot/initrd-${kernel}.orig ]; then -- mv -f /boot/initrd-${kernel}.orig /boot/initrd-${kernel}; -- fi; -- fi; -- depmod -v ${kernel} > /dev/null 2>&1; --done; -+ #if [ -f /boot/initrd-${kernel}.orig.mptlinux-%{version} ]; then -+ # mv -f /boot/initrd-${kernel}.orig.mptlinux-%{version} /boot/initrd-${kernel} -+ #fi -+ # Calling depmod -+ depmod -v ${kernel} > /dev/null 2>&1 -+ mk_initrd -k vmlinuz-${kernel} -i /boot/initrd-${kernel} -+ fi -+done - echo -e "Uninstall Done." - - # files ######################################################################## - %files -f ../file.list.%{name} -+%files modules -f ../file.list.%{name}-modules - - # changelog ################################################################### - %changelog -+* Fri Jun 11 2010 Brian J. Murrell -+ - update to 4.18.20.04 -+* Wed Oct 28 2009 Brian J. Murrell -+ - split into modules and non-modules packages so that multiple -+ modules packages can be installed, for several kernels -+ - don't fiddle with files once RPM has installed them -+ - put modules into the updates tree under the modules dir, where -+ they belong -+ - don't use the "orig" initrd, but generate a new one on removal -+ + the orig initrd could very well no longer be suitable -+ - don't edit the modprobe.conf file as that's a job for the admin -+ + we really can't assume which other scsi_host_adapters are in -+ the machine and what position we are to take relative to them - * Tue Apr 24 2007 Eric Moore - - Fix RHEL5 DUD to RPM migration - * Tue Apr 17 2007 Eric Moore diff --git a/contrib/rdac_spec b/contrib/rdac_spec deleted file mode 100644 index eabf002..0000000 --- a/contrib/rdac_spec +++ /dev/null @@ -1,130 +0,0 @@ -%{!?kernel_obj: %define kernel_obj /lib/modules/$(uname -r)/build} -# legal values are REDHAT and SUSE. default to REDHAT -%{!?dist: %define dist REDHAT} - -%define version 09.03.0C02.0013 - -Name: rdac -License: GPL -Group: System/Kernel -Summary: Multipathing tools -Version: %{version} -Release: 1 -Source: http://codeman.central.sun.com/LSI/USR-SDLC/RDAC-Linux/rdac-LINUX-%{version}-source.tar.gz -#?? BuildRequires: kernel-source kernel-syms -BuildRoot: %{_tmppath}/rdac-%{version}-root - -%description -This package provides the mppUtil (multipathing command line utilities). - -%package modules -Summary: Multipathing driver for disk subsystems. -Group: System/Kernel - -%description modules -This package provides the multipathing kernel modules. - -%prep -if true; then -#exit 0 -%setup -n linuxrdac-%{version} -else -cd linuxrdac-%{version} -fi -find_linux_release() { - local SRCDIR="$1" - - local LINUXRELEASEHEADER=$SRCDIR/include/linux/version.h - if [ -s $SRCDIR/include/linux/utsrelease.h ]; then - LINUXRELEASEHEADER=$SRCDIR/include/linux/utsrelease.h - fi - - sed -ne 's/#define UTS_RELEASE "\(.*\)"$/\1/p' $LINUXRELEASEHEADER - -} - -# need to fix up silly Makefile madness -chmod u+w Makefile -ed Makefile << EOF -/^GCC_CHK_FLAG :=/c -GCC_CHK_FLAG := 1 -. -/^DIST :=/c -DIST := %{dist} -. -/^%{dist}_KERNEL_CHECK :=/c -%{dist}_KERNEL_CHECK := 1 -. -/^OS_VER :=/c -OS_VER := $(find_linux_release %{kernel_obj}) -. -g/install -o root -g root -m [0-9]\{4,4\}/s//install/ -wq -EOF - -# and other silliness -#ed genfileattributes << "EOF" -#EOF -sed -i -e 's/\/bin\/\(basename\)/\1/g' -e 's/\/bin\/\(awk\)/\1/g' genfileattributes - -#sed -i -e 's/install -o root -g root/install/g Makefile - -%build -#exit 0 -export KERNEL_OBJ=%{kernel_obj} -make all - -%install -rm -rf $RPM_BUILD_ROOT -export KERNEL_OBJ=%{kernel_obj} -DIST=%{dist} -make DEST_DIR=$RPM_BUILD_ROOT copyfiles copyrpmfiles -install -m 0755 -D mpp_rcscript.$DIST $RPM_BUILD_ROOT/etc/init.d/mpp -gzip $RPM_BUILD_ROOT/usr/share/man/man9/RDAC.9 -gzip $RPM_BUILD_ROOT/usr/share/man/man1/mppBusRescan.1 -ln -s mppBusRescan $RPM_BUILD_ROOT/usr/sbin/hot_add -ln -s mppBusRescan.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/hot_add.1.gz -gzip $RPM_BUILD_ROOT/usr/share/man/man1/mppUpdate.1 -gzip $RPM_BUILD_ROOT/usr/share/man/man1/mppUtil.1 -install -m 0444 -D mpp.conf $RPM_BUILD_ROOT/etc/mpp.conf -touch devicemapping -install -m 0755 -d $RPM_BUILD_ROOT/var/mpp -install -m 0644 -D devicemapping $RPM_BUILD_ROOT/var/mpp/devicemapping -rm devicemapping -rm -rf $RPM_BUILD_ROOT/opt/mpp/.mppLnx_rpm_helpers - -%post modules -depmod -a - -%files -%defattr (-,root,root) -/usr/sbin/hot_add -/usr/share/man/man1/hot_add.1.gz -%attr (755,root,root) /etc/init.d/mpp -%attr (444,root,root) %config(noreplace) /etc/mpp.conf -%attr (755,root,root) %dir /var/mpp -%attr (644,root,root) %config(noreplace) /var/mpp/devicemapping -%attr (755,root,root) %dir /opt/mpp -%defattr (0500,root,root) -/opt/mpp/genuniqueid -/opt/mpp/mppSupport -/opt/mpp/lsvdev -/opt/mpp/mppiscsi_umountall -/usr/sbin/mppBusRescan -/opt/mpp/mppMkInitrdHelper -/usr/sbin/mppUpdate -/usr/sbin/mppUtil -%defattr (0644,root,root) -/usr/share/man/man1/mppBusRescan.1.gz -/usr/share/man/man1/mppUpdate.1.gz -/usr/share/man/man1/mppUtil.1.gz -/usr/share/man/man9/RDAC.9.gz - -%files modules -%defattr (0644,root,root) -/lib/modules - - -%changelog -* Fri Oct 23 2009 - brian@sun.com 09.03.0C02.0013-1 - - initial packaging -- 1.8.3.1