From 32f2009eba6c1686b3317a40b3edc5edbee1f6d405e4cfbc4fe9f28e1e892de4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 20 Dec 2020 12:49:24 +0000 Subject: [PATCH 1/2] =?UTF-8?q?-=20update=20to=209.60:=20=20=20-=20support?= =?UTF-8?q?=20for=20ioSafe=20Solo=20with=20jMicron=20bridge,=20courtesy=20?= =?UTF-8?q?Matthias-Christian=20Ott.=20=20=20-=20decode=20more=20bits=20fr?= =?UTF-8?q?om=20id[69],=20courtesy=20Adri=C3=A1n=20K=C3=A1lazi.=20=20=20-?= =?UTF-8?q?=20allow=20passing=20of=20custom=20LDFLAGS=20from=20the=20envir?= =?UTF-8?q?onment.=20=20=20-=20add=20new=20"static"=20target.=20=20=20-=20?= =?UTF-8?q?fix=20--dco-identify=20max=20sectors,=20courtesy=20of=20Paul=20?= =?UTF-8?q?Sultana.=20=20=20-=20get=20rid=20of=20leftover=20"unknown"=20va?= =?UTF-8?q?riables=20from=20identify.c=20=20=20-=20fixed=20return=20values?= =?UTF-8?q?=20from=20get=5Flog=5Fpage=5Fdata().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/Base:System/hdparm?expand=0&rev=94 --- hdparm-9.58.tar.gz | 3 --- hdparm-9.60.tar.gz | 3 +++ hdparm-leak-fix.patch | 15 ++++++++------- hdparm-nostrip.patch | 22 ++++++++++++++++++---- hdparm-wiper-warn.patch | 8 ++++---- hdparm.changes | 12 ++++++++++++ hdparm.spec | 2 +- 7 files changed, 46 insertions(+), 19 deletions(-) delete mode 100644 hdparm-9.58.tar.gz create mode 100644 hdparm-9.60.tar.gz diff --git a/hdparm-9.58.tar.gz b/hdparm-9.58.tar.gz deleted file mode 100644 index d077206..0000000 --- a/hdparm-9.58.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ae78e883f3ce071d32ee0f1b9a2845a634fc4dd94a434e653fdbef551c5e10f -size 138845 diff --git a/hdparm-9.60.tar.gz b/hdparm-9.60.tar.gz new file mode 100644 index 0000000..48867ee --- /dev/null +++ b/hdparm-9.60.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8397739c73e44d5ab96c4aef28fa9c0147276d53a1b5657ce04c4565cf6635cc +size 155220 diff --git a/hdparm-leak-fix.patch b/hdparm-leak-fix.patch index 41ad717..ca6dd6e 100644 --- a/hdparm-leak-fix.patch +++ b/hdparm-leak-fix.patch @@ -1,16 +1,17 @@ -diff -urEbwB hdparm-9.57/hdparm.c hdparm-9.57.new/hdparm.c ---- hdparm-9.57/hdparm.c 2018-10-16 20:12:53.000000000 +0200 -+++ hdparm-9.57.new/hdparm.c 2018-10-18 10:15:54.448809739 +0200 -@@ -1197,7 +1197,7 @@ - struct stat stat; +Index: hdparm-9.60/hdparm.c +=================================================================== +--- hdparm-9.60.orig/hdparm.c ++++ hdparm-9.60/hdparm.c +@@ -1199,7 +1199,7 @@ static int abort_if_not_full_device (int + struct stat st; __u64 start_lba; int i, err, shortened = 0; - char *fdevname = strdup(devname); + char *fdevname = strdupa(devname); - if (0 == fstat(fd, &stat) && S_ISCHR(stat.st_mode)) + if (0 == fstat(fd, &st) && S_ISCHR(st.st_mode)) return 0; /* skip geometry test for character (non-block) devices; eg. /dev/sg* */ -@@ -1210,7 +1210,7 @@ +@@ -1212,7 +1212,7 @@ static int abort_if_not_full_device (int } if (!shortened) diff --git a/hdparm-nostrip.patch b/hdparm-nostrip.patch index f92d310..b012d55 100644 --- a/hdparm-nostrip.patch +++ b/hdparm-nostrip.patch @@ -1,6 +1,20 @@ ---- ./Makefile -+++ ./Makefile -@@ -14 +13,0 @@ CC ?= gcc +Index: Makefile +=================================================================== +--- Makefile.orig ++++ Makefile +@@ -11,7 +11,6 @@ mandir = $(manprefix)/share/man + oldmandir = $(manprefix)/man + + CC ?= gcc -STRIP ?= strip -@@ -31 +29,0 @@ hdparm: hdparm.h sgio.h $(OBJS) + + CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS) + +@@ -30,7 +29,6 @@ static: + + hdparm: Makefile hdparm.h sgio.h $(OBJS) + $(CC) $(LDFLAGS) -o hdparm $(OBJS) - $(STRIP) hdparm + + hdparm.o: hdparm.h sgio.h + diff --git a/hdparm-wiper-warn.patch b/hdparm-wiper-warn.patch index 77ff05a..d9cdd3f 100644 --- a/hdparm-wiper-warn.patch +++ b/hdparm-wiper-warn.patch @@ -1,8 +1,8 @@ -Index: hdparm-9.28/wiper/wiper.sh +Index: hdparm-9.60/wiper/wiper.sh =================================================================== ---- hdparm-9.28.orig/wiper/wiper.sh -+++ hdparm-9.28/wiper/wiper.sh -@@ -41,6 +41,9 @@ function usage_error(){ +--- hdparm-9.60.orig/wiper/wiper.sh ++++ hdparm-9.60/wiper/wiper.sh +@@ -48,6 +48,9 @@ function usage_error(){ echo echo "${0##*/}: Linux SATA SSD TRIM utility, version $VERSION, by Mark Lord." diff --git a/hdparm.changes b/hdparm.changes index 92a8085..f0c8bcc 100644 --- a/hdparm.changes +++ b/hdparm.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sun Dec 20 12:46:21 UTC 2020 - Dirk Müller + +- update to 9.60: + - support for ioSafe Solo with jMicron bridge, courtesy Matthias-Christian Ott. + - decode more bits from id[69], courtesy Adrián Kálazi. + - allow passing of custom LDFLAGS from the environment. + - add new "static" target. + - fix --dco-identify max sectors, courtesy of Paul Sultana. + - get rid of leftover "unknown" variables from identify.c + - fixed return values from get_log_page_data(). + ------------------------------------------------------------------- Thu Nov 26 09:41:02 UTC 2020 - Ludwig Nussel diff --git a/hdparm.spec b/hdparm.spec index 62f7cfb..603d490 100644 --- a/hdparm.spec +++ b/hdparm.spec @@ -17,7 +17,7 @@ Name: hdparm -Version: 9.58 +Version: 9.60 Release: 0 Summary: A Program to get and set hard disk parameters License: SUSE-Permissive From 84c171ebd414414b2a10848a5a9e8b2536e496b713bee1d7766a8e09355dafae Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 21 Dec 2020 20:11:58 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Base:System/hdparm?expand=0&rev=95 --- hdparm.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hdparm.spec b/hdparm.spec index 603d490..17bfe82 100644 --- a/hdparm.spec +++ b/hdparm.spec @@ -22,8 +22,8 @@ Release: 0 Summary: A Program to get and set hard disk parameters License: SUSE-Permissive Group: Hardware/Other -URL: http://sourceforge.net/projects/hdparm/ -Source: http://downloads.sf.net/hdparm/%{name}-%{version}.tar.gz +URL: https://sourceforge.net/projects/hdparm/ +Source: https://downloads.sourceforge.net/project/hdparm/hdparm/hdparm-%{version}.tar.gz Patch1: hdparm-nostrip.patch Patch2: hdparm-wiper-warn.patch Patch3: hdparm-leak-fix.patch @@ -45,7 +45,7 @@ driver and IDE drives. %patch4 -p1 %build -make %{?_smp_mflags} CFLAGS="%{optflags} -Wall -Wstrict-prototypes" LDFLAGS= CC="gcc" +%make_build CFLAGS="%{optflags} -Wall -Wstrict-prototypes" LDFLAGS= CC="gcc" cp -p wiper/README.txt README.wiper %install