added a patch to fix build using binutils gold linker [release 332.14-5mamba;Sat Feb 25 2012]

This commit is contained in:
Silvan Calarco 2024-01-05 23:40:33 +01:00
parent 000fa45dc6
commit d9b1fb737f
5 changed files with 2725 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# hfstools
Tools to initialize and repair HFS and HFS+ filesystems.

2596
diskdev_cmds-332.14.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
diff -Nru diskdev_cmds-332.14.orig/Makefile.lnx diskdev_cmds-332.14/Makefile.lnx
--- diskdev_cmds-332.14.orig/Makefile.lnx 2012-02-25 21:05:44.270333659 +0100
+++ diskdev_cmds-332.14/Makefile.lnx 2012-02-25 21:06:29.687822523 +0100
@@ -1,5 +1,5 @@
CC := gcc
-CFLAGS := -g3 -Wall -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
+CFLAGS := -g3 -Wall -Wl,--as-needed -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
all clean:
diff -Nru diskdev_cmds-332.14.orig/newfs_hfs.tproj/Makefile.lnx diskdev_cmds-332.14/newfs_hfs.tproj/Makefile.lnx
--- diskdev_cmds-332.14.orig/newfs_hfs.tproj/Makefile.lnx 2012-02-25 21:05:44.336332916 +0100
+++ diskdev_cmds-332.14/newfs_hfs.tproj/Makefile.lnx 2012-02-25 21:07:03.048447076 +0100
@@ -4,7 +4,7 @@
all: newfs_hfs
newfs_hfs: $(OFILES)
- ${CC} ${CFLAGS} -o newfs_hfs ${OFILES} -lssl
+ ${CC} ${CFLAGS} -o newfs_hfs ${OFILES} -lssl -lcrypto
clean:
$(RM) newfs_hfs $(OFILES)

View File

@ -0,0 +1,36 @@
diff -Nru diskdev_cmds-332.14.orig//fsck_hfs.tproj/fsck_hfs.c diskdev_cmds-332.14/fsck_hfs.tproj/fsck_hfs.c
--- diskdev_cmds-332.14.orig//fsck_hfs.tproj/fsck_hfs.c 2011-04-07 20:08:14.141449714 +0200
+++ diskdev_cmds-332.14/fsck_hfs.tproj/fsck_hfs.c 2011-04-07 20:14:46.938645360 +0200
@@ -109,7 +109,7 @@
else
progname = *argv;
- while ((ch = getopt(argc, argv, "dfglm:npqruy")) != EOF) {
+ while ((ch = getopt(argc, argv, "dfglm:napqruy")) != EOF) {
switch (ch) {
case 'd':
debug++;
@@ -146,6 +146,7 @@
break;
case 'p':
+ case 'a':
preen++;
break;
@@ -529,13 +530,14 @@
static void
usage()
{
- (void) fprintf(stderr, "usage: %s [-dfl m [mode] npqruy] special-device\n", progname);
+ (void) fprintf(stderr, "usage: %s [-dfl m [mode] npaqruy] special-device\n", progname);
(void) fprintf(stderr, " d = output debugging info\n");
(void) fprintf(stderr, " f = force fsck even if clean (preen only) \n");
(void) fprintf(stderr, " l = live fsck (lock down and test-only)\n");
(void) fprintf(stderr, " m arg = octal mode used when creating lost+found directory \n");
(void) fprintf(stderr, " n = assume a no response \n");
(void) fprintf(stderr, " p = just fix normal inconsistencies \n");
+ (void) fprintf(stderr, " a = like -p for compatibility \n");
(void) fprintf(stderr, " q = quick check returns clean, dirty, or failure \n");
(void) fprintf(stderr, " r = rebuild catalog btree \n");
(void) fprintf(stderr, " u = usage \n");

69
hfstools.spec Normal file
View File

@ -0,0 +1,69 @@
Name: hfstools
Version: 332.14
Release: 5mamba
Summary: Tools to initialize and repair HFS and HFS+ filesystems
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://opensource.apple.com
Source: http://opensource.apple.com/tarballs/diskdev_cmds/diskdev_cmds-%{version}.tar.gz
Patch0: http://www.ecl.udel.edu/%7Emcgee/diskdev_cmds/diskdev_cmds-332.14.patch.bz2
Patch1: %{name}-332.14-fsck_checkfs.patch
Patch2: %{name}-332.14-fix_link_with_gold.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libopenssl-devel
## AUTOBUILDREQ-END
BuildRequires: libopenssl-devel >= 0.9.7h
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Tools to initialize and repair HFS and HFS+ filesystems.
%prep
%setup -q -n diskdev_cmds-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%make -f Makefile.lnx
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -D -m 0755 newfs_hfs.tproj/newfs_hfs %{buildroot}/sbin/mkfs.hfsplus
install -D -m 0644 newfs_hfs.tproj/newfs_hfs.8 %{buildroot}%{_mandir}/man8/mkfs.hfsplus.8
install -D -m 0755 fsck_hfs.tproj/fsck_hfs %{buildroot}/sbin/fsck.hfsplus
install -D -m 0644 fsck_hfs.tproj/fsck_hfs.8 %{buildroot}%{_mandir}/man8/fsck.hfsplus.8
ln -s mkfs.hfsplus %{buildroot}/sbin/mkfs.hfs
ln -s fsck.hfsplus %{buildroot}/sbin/fsck.hfs
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files
%defattr(-,root,root)
/sbin/mkfs.hfsplus
/sbin/fsck.hfsplus
/sbin/mkfs.hfs
/sbin/fsck.hfs
%{_mandir}/man8/mkfs.hfsplus.8.gz
%{_mandir}/man8/fsck.hfsplus.8.gz
%changelog
* Sat Feb 25 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 332.14-5mamba
- added a patch to fix build using binutils gold linker
* Thu Apr 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 332.14-4mamba
- fsck.hfs: added patch to support -a switch for compatibility with linux fsck
* Thu Nov 11 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 332.14-3mamba
- rebuilt with openssl 1.0.0
* Fri Oct 16 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 332.14-2mamba
- rebuilt with openssl 0.9.8
* Wed May 24 2006 Silvan Calarco <silvan.calarco@qilinux.it> 332.14-1qilnx
- package created by autospec