From 987bb867e858895c518470126a3dc0fd50e0e45f7c8636d9f44c38cb3cedddba Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 7 Aug 2016 12:13:45 +0000 Subject: [PATCH] Accepting request 416972 from home:kstreitova:branches:Base:System - remove 56-idedma.rules and idedma.sh as none of these scripts have any function whatsoever. They rely on the obsolete IDE drivers [bsc#991898] - remove /etc/sysconfig/ide file [bsc#922659] OBS-URL: https://build.opensuse.org/request/show/416972 OBS-URL: https://build.opensuse.org/package/show/Base:System/hdparm?expand=0&rev=82 --- 56-idedma.rules | 2 -- hdparm.changes | 8 ++++++ hdparm.spec | 49 +++--------------------------------- sysconfig.ide | 12 --------- udev.idedma.sh | 66 ------------------------------------------------- 5 files changed, 11 insertions(+), 126 deletions(-) delete mode 100644 56-idedma.rules delete mode 100644 sysconfig.ide delete mode 100644 udev.idedma.sh diff --git a/56-idedma.rules b/56-idedma.rules deleted file mode 100644 index 1f803c5..0000000 --- a/56-idedma.rules +++ /dev/null @@ -1,2 +0,0 @@ -# start idedma script for each added IDE device -ACTION=="add", SUBSYSTEM=="block", KERNEL=="hd*[!0-9]", RUN+="/usr/lib/udev/idedma.sh $env{DEVNAME}" diff --git a/hdparm.changes b/hdparm.changes index 23d1afc..739c822 100644 --- a/hdparm.changes +++ b/hdparm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Aug 4 13:44:34 UTC 2016 - kstreitova@suse.com + +- remove 56-idedma.rules and idedma.sh as none of these scripts + have any function whatsoever. They rely on the obsolete IDE + drivers [bsc#991898] +- remove /etc/sysconfig/ide file [bsc#922659] + ------------------------------------------------------------------- Mon Jun 22 12:17:05 UTC 2015 - kstreitova@suse.com diff --git a/hdparm.spec b/hdparm.spec index 958fa65..995b761 100644 --- a/hdparm.spec +++ b/hdparm.spec @@ -1,7 +1,7 @@ # # spec file for package hdparm # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,6 @@ # -%{!?_udevdir: %global _udevdir %(pkg-config --variable=udevdir udev) } -%{!?_udevrulesdir: %global _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d } Name: hdparm Version: 9.48 Release: 0 @@ -26,16 +24,13 @@ License: SUSE-Permissive Group: Hardware/Other Url: http://sourceforge.net/projects/hdparm/ Source: http://downloads.sf.net/hdparm/%{name}-%{version}.tar.gz -Source1: 56-idedma.rules -Source2: sysconfig.ide -Source3: udev.idedma.sh Patch1: hdparm-nostrip.patch Patch2: hdparm-wiper-warn.patch Patch3: hdparm-leak-fix.patch Patch4: hdparm-9.43-fix-bashisms.patch BuildRequires: pkgconfig BuildRequires: pkgconfig(udev) -Requires(post): %fillup_prereq coreutils +Requires(post): coreutils Provides: base:/sbin/hdparm BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -59,11 +54,6 @@ mkdir -p "%{buildroot}%{_mandir}/man8" install -d "%{buildroot}/%{_sbindir}" %make_install binprefix="%{_prefix}" mv contrib/README contrib/README.contrib -install -d "%{buildroot}/%{_udevrulesdir}" -install -m 644 %{SOURCE1} "%{buildroot}/%{_udevrulesdir}" -install -d "%{buildroot}%{_localstatedir}/adm/fillup-templates" -install -m 644 %{SOURCE2} "%{buildroot}%{_localstatedir}/adm/fillup-templates" -install -m 755 %{SOURCE3} "%{buildroot}/%{_udevdir}/idedma.sh" install -d "%{buildroot}%{_libexecdir}/hdparm" install -m 755 contrib/idectl "%{buildroot}%{_libexecdir}/hdparm" install -m 755 contrib/ultrabayd "%{buildroot}%{_libexecdir}/hdparm" @@ -74,49 +64,16 @@ ln -sf %{_sbindir}/wiper.sh "%{buildroot}/sbin" ln -sf %{_sbindir}/hdparm "%{buildroot}/sbin" #EndUsrMerge -%post -if [ -f etc/sysconfig/hardware ] ; then - mv etc/sysconfig/hardware etc/sysconfig/ide -fi -%{remove_and_set -n ide DEVICES_FORCE_IDE_DMA_ON DEVICES_FORCE_IDE_DMA_OFF} -%{fillup_only -n ide} -# new settings -NEW_DMA="" -# convert old settings -if [ "$DEVICES_FORCE_IDE_DMA_ON" != "" -a "$DEVICES_FORCE_IDE_DMA_ON" != "no" ] ; then - for dev in $DEVICES_FORCE_IDE_DMA_ON; do - NEW_DMA="${NEW_DMA:+$NEW_DMA }/dev/$dev:on" - done -fi -if [ "$DEVICES_FORCE_IDE_DMA_OFF" != "" -a "$DEVICES_FORCE_IDE_DMA_OFF" != "no" ] ; then - for dev in $DEVICES_FORCE_IDE_DMA_OFF; do - NEW_DMA="${NEW_DMA:+$NEW_DMA }/dev/$dev:off" - done -fi -# update sysconfig file -if [ "$NEW_DMA" != "" ] ; then - echo "Updating etc/sysconfig/ide" - # remove old values, update new variable - sed -e "s|^DEVICES_FORCE_IDE_DMA=\"\\(.*\\)\"|DEVICES_FORCE_IDE_DMA=\"$NEW_DMA \\1\"|" \ - etc/sysconfig/ide > etc/sysconfig/ide.new \ - && mv etc/sysconfig/ide.new etc/sysconfig/ide - rm -f etc/sysconfig/ide.new -fi -%{?udev_rules_update:%udev_rules_update} - %files %defattr(-,root,root) %doc Changelog README.acoustic contrib/README.contrib README.wiper -%{_mandir}/man8/hdparm.8.gz +%{_mandir}/man8/hdparm.8%{ext_man} #UsrMerge /sbin/hdparm /sbin/wiper.sh #EndUserMerge %{_sbindir}/hdparm %{_sbindir}/wiper.sh -%{_udevdir}/idedma.sh -%{_udevrulesdir}/56-idedma.rules %{_libexecdir}/hdparm -%{_localstatedir}/adm/fillup-templates/sysconfig.ide %changelog diff --git a/sysconfig.ide b/sysconfig.ide deleted file mode 100644 index 7aa3e67..0000000 --- a/sysconfig.ide +++ /dev/null @@ -1,12 +0,0 @@ -## Path: Hardware/IDE -## Description: IDE device settings -## Type: string -## Default: "" -# -# Force DMA mode for selected device. Use pairs : separated -# by space - dma_mode can be "on" (enable default DMA mode), "off" (disable DMA -# mode) or any mode supported by hdparm (e.g. "mdma2", "udma5", ...) -# Example: "/dev/hdc:off /dev/hdd:udma2" -# -DEVICES_FORCE_IDE_DMA="" - diff --git a/udev.idedma.sh b/udev.idedma.sh deleted file mode 100644 index 7f7a3be..0000000 --- a/udev.idedma.sh +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany -# -# Author: Ladislav Slezak -# -# System script for enabling/disabling IDE DMA mode -# -# The script takes the first command line parameter and sets the configured DMA -# mode up. If the device is not configured in DEVICES_FORCE_IDE_DMA variable DMA -# status is not changed. -# - -HDPARM=/usr/sbin/hdparm -test -x $HDPARM || exit 5 - -# read values from sysconfig -. /etc/sysconfig/ide - -if [ "$DEVICES_FORCE_IDE_DMA" = "" -o $1 = "" ] ; then - exit 0; -fi - - -OLDIFS=$IFS -for dev in $DEVICES_FORCE_IDE_DMA ; do - # Get device and DMA mode - - MODE="" - DEVICE="" - OPTIONS="" - FIRST=0 - - # The setting e.g. "/dev/hda:69:-c1:-m16:-u1:-W1:-A1" should be - # expanded as "hdparm -d 1 -X 69 -c1 -m16 -u1 -W1 -A1 /dev/hda" - - IFS=":" - for d in $dev ; do - case $FIRST in - 0) DEVICE=$d ;; - 1) MODE=$d ;; - *) OPTIONS="$OPTIONS$d:" - esac - FIRST=$((FIRST + 1)) - done - unset d - - if [ "$DEVICE" = "$1" ] ; then - echo "$DEVICE: setting up IDE DMA mode $MODE" - - # Set DMA mode by hdparm utility - if [ -z "$MODE" ] ; then - echo "Missing DMA mode for device $DEVICE" - elif [ $MODE = "off" ] ; then - $HDPARM -d 0 "$DEVICE" - elif [ $MODE = "on" ] ; then - $HDPARM -d 1 "$DEVICE" - else - $HDPARM -d 1 -X "$MODE" ${OPTIONS:+$OPTIONS} "$DEVICE" - fi - fi - - # Reset Internal Field Separator for the outer loop - IFS=$OLDIFS -done -unset dev -