From 1a9d372aa512e01c285dde40c15775fea270afa3 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 24 Mar 2009 17:49:10 +0000 Subject: [PATCH 01/68] Initial import of afpfs-ng --- .cvsignore | 1 + afpfs-ng-0.8.1-overflows.patch | 28 ++++++++ afpfs-ng.spec | 120 +++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 150 insertions(+) create mode 100644 afpfs-ng-0.8.1-overflows.patch create mode 100644 afpfs-ng.spec diff --git a/.cvsignore b/.cvsignore index e69de29..ea8ffb1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +afpfs-ng-0.8.1.tar.bz2 diff --git a/afpfs-ng-0.8.1-overflows.patch b/afpfs-ng-0.8.1-overflows.patch new file mode 100644 index 0000000..94399ed --- /dev/null +++ b/afpfs-ng-0.8.1-overflows.patch @@ -0,0 +1,28 @@ +Fix possible buffer overflows (given we're copying to storage of AFP_MAX_PATH, +while AFP_MAX_PATH is much smaller than PATH_MAX) + +Lubomir Rintel + +--- afpfs-ng-0.8.1/cmdline/cmdline_afp.c.overflows 2008-10-06 19:21:32.000000000 +0200 ++++ afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-10-06 19:13:50.000000000 +0200 +@@ -129,9 +129,9 @@ + { + if (filename[0]!='/') { + if (strlen(curdir)==1) +- snprintf(server_fullname,PATH_MAX,"/%s",filename); ++ snprintf(server_fullname,AFP_MAX_PATH,"/%s",filename); + else +- snprintf(server_fullname,PATH_MAX,"%s/%s",curdir,filename); ++ snprintf(server_fullname,AFP_MAX_PATH,"%s/%s",curdir,filename); + } else { + snprintf(server_fullname,PATH_MAX,"%s",filename); + } +@@ -1217,7 +1217,7 @@ + { + struct passwd * passwd; + +- snprintf(curdir,PATH_MAX,"%s",DEFAULT_DIRECTORY); ++ snprintf(curdir,AFP_MAX_PATH,"%s",DEFAULT_DIRECTORY); + if (init_uams()<0) return -1; + + afp_default_url(&url); diff --git a/afpfs-ng.spec b/afpfs-ng.spec new file mode 100644 index 0000000..ab1e069 --- /dev/null +++ b/afpfs-ng.spec @@ -0,0 +1,120 @@ +# No FUSE on RHEL5 +%if %{?el5:1}0 +%define _without_fuse 1 +%endif + +Name: afpfs-ng +Version: 0.8.1 +Release: 2%{?dist} +Summary: Apple Filing Protocol client + +Group: System Environment/Base +License: GPLv2 +URL: http://alexthepuffin.googlepages.com/home +Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 +Patch0: afpfs-ng-0.8.1-overflows.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%{?!_without_fuse:BuildRequires: fuse-devel} +BuildRequires: libgcrypt-devel gmp-devel readline-devel + +%description +A command line client to access files exported from Mac OS system via +AppleTalk or TCP using Apple Filing Protocol. +%{?!_without_fuse:The FUSE filesystem module for AFP is in fuse-afp package} + + +%if %{?!_without_fuse:1}0 +%package -n fuse-afp +Summary: FUSE driver for AFP filesystem +Group: System Environment/Base + +%description -n fuse-afp +A FUSE file system server to access files exported from Mac OS system +via AppleTalk or TCP using Apple Filing Protocol. +The command line client for AFP is in fuse-afp package +%endif + + +%package devel +Summary: Development files for afpfs-ng +Group: Development/Libraries +Requires: %{name} = %{version} + +%description devel +Library for dynamic linking and header files of afpfs-ng. + + +%prep +%setup -q +%patch0 -p1 -b .overflows + + +%build +# make would rebuild the autoconf infrastructure due to the following: +# Prerequisite `configure.ac' is newer than target `Makefile.in'. +# Prerequisite `aclocal.m4' is newer than target `Makefile.in'. +# Prerequisite `configure.ac' is newer than target `aclocal.m4'. +touch --reference aclocal.m4 configure.ac Makefile.in + +%configure %{?_without_fuse:--disable-fuse} --disable-static +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_includedir}/afpfs-ng +cp -p include/* $RPM_BUILD_ROOT%{_includedir}/afpfs-ng + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%{_bindir}/afpcmd +%{_bindir}/afpgetstatus +%{_mandir}/man1/afpcmd.1* +%{_mandir}/man1/afpgetstatus.1* +%{_libdir}/*.so.* +%exclude %{_libdir}/*.la +%doc COPYING AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt + + +%if %{?!_without_fuse:1}0 +%files -n fuse-afp +%defattr(-,root,root,-) +%{_bindir}/afp_client +%{_bindir}/afpfs +%{_bindir}/afpfsd +%{_bindir}/mount_afp +%{_mandir}/man1/afp_client.1* +%{_mandir}/man1/afpfsd.1* +%{_mandir}/man1/mount_afp.1* +%doc COPYING AUTHORS ChangeLog +%endif + + +%files devel +%defattr(-,root,root,-) +%{_includedir}/afpfs-ng +%{_libdir}/*.so + + +%post -p /sbin/ldconfig + + +%postun -p /sbin/ldconfig + + +%changelog +* Thu Mar 19 2009 Lubomir Rintel - 0.8.1-2 +- Add more include files (Jan F. Chadima) +- Don't needlessly build static library (Stefan Kasal) +- Fix fuse-afp summary (Stefan Kasal) +- Remove redundant license file from -devel (Stefan Kasal) + +* Mon Oct 6 2008 Lubomir Rintel - 0.8.1-1 +- Initial packaging attempt diff --git a/sources b/sources index e69de29..4bd856f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +1bdd9f8a06e6085ea4cc38ce010ef60b afpfs-ng-0.8.1.tar.bz2 From 64607b8691a105b46a9e396e850f9aedf4b5959d Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 14 Jul 2009 16:36:52 +0000 Subject: [PATCH 02/68] - Fix up license tag --- afpfs-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index ab1e069..b18e646 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,11 +5,11 @@ Name: afpfs-ng Version: 0.8.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base -License: GPLv2 +License: GPL+ URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 Patch0: afpfs-ng-0.8.1-overflows.patch @@ -110,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jul 14 2009 Lubomir Rintel - 0.8.1-3 +- Fix up license tag + * Thu Mar 19 2009 Lubomir Rintel - 0.8.1-2 - Add more include files (Jan F. Chadima) - Don't needlessly build static library (Stefan Kasal) From 415a2edd01150dd876a31f6530d17e6b30a99016 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Fri, 17 Jul 2009 16:27:43 +0000 Subject: [PATCH 03/68] - Don't refer to AppleTalk in Summary --- afpfs-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index b18e646..8ceab3a 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -20,7 +20,7 @@ BuildRequires: libgcrypt-devel gmp-devel readline-devel %description A command line client to access files exported from Mac OS system via -AppleTalk or TCP using Apple Filing Protocol. +Apple Filing Protocol. %{?!_without_fuse:The FUSE filesystem module for AFP is in fuse-afp package} @@ -110,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jul 17 2009 Lubomir Rintel - 0.8.1-4 +- Don't refer to AppleTalk in Summary + * Tue Jul 14 2009 Lubomir Rintel - 0.8.1-3 - Fix up license tag From d988137ec1821030042a0c9e96ea946b0ce5afd6 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 24 Jul 2009 16:37:37 +0000 Subject: [PATCH 04/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 8ceab3a..5b7b10e 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -110,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 0.8.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Fri Jul 17 2009 Lubomir Rintel - 0.8.1-4 - Don't refer to AppleTalk in Summary From 90e65a66163764254f54ec9d5107d965a4b9f0df Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 17 Sep 2009 06:01:11 +0000 Subject: [PATCH 05/68] rebuilt with new fuse --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 5b7b10e..82a47dd 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -110,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Sep 17 2009 Peter Lemenkov - 0.8.1-6 +- Rebuild with new fuse + * Fri Jul 24 2009 Fedora Release Engineering - 0.8.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 5287dae76793c854b01ebda78e6a50d28c6afa9c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:38:38 +0000 Subject: [PATCH 06/68] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a383a89..1384a0c 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: afpfs-ng -# $Id$ +# $Id: Makefile,v 1.1 2009/03/24 17:32:16 kevin Exp $ NAME := afpfs-ng SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 2bf066fa1acf6cfd1f87093f4e434162734acf50 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 09:37:29 +0000 Subject: [PATCH 07/68] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1384a0c..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: afpfs-ng -# $Id: Makefile,v 1.1 2009/03/24 17:32:16 kevin Exp $ -NAME := afpfs-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 1ac35f059109f66c8c13f9772f49995c3ceebbf3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 18:33:42 -0600 Subject: [PATCH 08/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 82a47dd..6cee2b2 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -110,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Thu Sep 17 2009 Peter Lemenkov - 0.8.1-6 - Rebuild with new fuse From dae616bd94334010f9f3003d3a1b0fdadff0e05c Mon Sep 17 00:00:00 2001 From: "Jan F. Chadima" Date: Mon, 4 Jul 2011 08:10:55 +0200 Subject: [PATCH 09/68] Repair ponter arithmetic --- afpfs-ng.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 6cee2b2..8a93f6d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -13,6 +13,7 @@ License: GPL+ URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 Patch0: afpfs-ng-0.8.1-overflows.patch +Patch1: afpfs-ng-0.8.1-pointer.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %{?!_without_fuse:BuildRequires: fuse-devel} @@ -48,6 +49,7 @@ Library for dynamic linking and header files of afpfs-ng. %prep %setup -q %patch0 -p1 -b .overflows +%patch1 -p1 -b .pointer %build @@ -110,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jul 4 2011 Jan F. Chadima - 0.8.1-8 +- Repair ponter arithmetic + * Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 89cd34c1e1c9c880cf90d17ef3ef336d28ad7e3c Mon Sep 17 00:00:00 2001 From: "Jan F. Chadima" Date: Mon, 4 Jul 2011 08:11:23 +0200 Subject: [PATCH 10/68] Repair ponter arithmetic --- afpfs-ng-0.8.1-pointer.patch | 280 +++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 afpfs-ng-0.8.1-pointer.patch diff --git a/afpfs-ng-0.8.1-pointer.patch b/afpfs-ng-0.8.1-pointer.patch new file mode 100644 index 0000000..b47b834 --- /dev/null +++ b/afpfs-ng-0.8.1-pointer.patch @@ -0,0 +1,280 @@ +diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c +--- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200 ++++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200 +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include + +diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c +--- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100 ++++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200 +@@ -61,8 +61,9 @@ static int start_afpfsd(void) + snprintf(filename, PATH_MAX, + "/usr/local/bin/%s",AFPFSD_FILENAME); + if (access(filename,X_OK)) { +- snprintf(filename, "/usr/bin/%s", ++ snprintf(filename, sizeof(filename), "/usr/bin/%s", + AFPFSD_FILENAME); ++ filename[sizeof(filename) - 1] = 0; + if (access(filename,X_OK)) { + printf("Could not find server (%s)\n", + filename); +diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c +--- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100 ++++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200 +@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s + ret = ml_open(volume,path,flags,&fp); + + if (ret==0) +- fi->fh=(void *) fp; ++ fi->fh=(unsigned long) fp; + + return ret; + } +diff -up afpfs-ng-0.8.1/include/afp.h.pointer afpfs-ng-0.8.1/include/afp.h +--- afpfs-ng-0.8.1/include/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1/include/afp.h 2011-06-14 17:02:15.000000000 +0200 +@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s + + int afp_opendt(struct afp_volume *volume, unsigned short * refnum); + +-int afp_closedt(struct afp_server * server, unsigned short * refnum); ++int afp_closedt(struct afp_server * server, unsigned short refnum); + + int afp_getcomment(struct afp_volume *volume, unsigned int did, + const char * pathname, struct afp_comment * comment); +diff -up afpfs-ng-0.8.1/include/utils.h.pointer afpfs-ng-0.8.1/include/utils.h +--- afpfs-ng-0.8.1/include/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100 ++++ afpfs-ng-0.8.1/include/utils.h 2011-06-14 17:02:15.000000000 +0200 +@@ -8,8 +8,8 @@ + #define hton64(x) (x) + #define ntoh64(x) (x) + #else /* BYTE_ORDER == BIG_ENDIAN */ +-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ +- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) ++#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \ ++ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32)) + #define ntoh64(x) (hton64(x)) + #endif /* BYTE_ORDER == BIG_ENDIAN */ + +diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c +--- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200 +@@ -33,7 +33,7 @@ static int check_port(char * port) + static int check_uamname(const char * uam) + { + char * p; +- for (p=uam;*p;p++) { ++ for (p=(char *)uam;*p;p++) { + if (*p==' ') continue; + if ((*p<'A') || (*p>'z')) return -1; + } +@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url, + return -1; + + } +- if (p==NULL) p=toparse; ++ if (p==NULL) p=(char *)toparse; + + /* Now split on the first / */ + if (sscanf(p,"%[^/]/%[^$]", +diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c +--- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200 +@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume + + + /* Go to the end of last known entry */ +- p=path+(p-copy); ++ p=(char *)path+(p-copy); + p2=p; + + while ((p=strchr(p+1,'/'))) { +diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c +--- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200 +@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv + } + server->flags=ntohs(reply1->flags); + +- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); ++ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); + p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; + + /* Now work our way through the variable bits */ +@@ -757,7 +757,7 @@ gotenough: + printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); + #endif + ret = read(server->fd, (void *) +- (((unsigned int) server->incoming_buffer)+server->data_read), ++ (((unsigned long) server->incoming_buffer)+server->data_read), + amount_to_read); + if (ret<0) return -1; + if (ret==0) { +diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c +--- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200 +@@ -25,7 +25,7 @@ + static unsigned char exit_program=0; + + static pthread_t ending_thread; +-static pthread_t main_thread = NULL; ++static pthread_t main_thread = (pthread_t)NULL; + + static int loop_started=0; + static pthread_cond_t loop_started_condition; +diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c +--- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200 +@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum + if (volume->server->using_version->av_number>=30) + stbuf->st_mode |= fp.unixprivs.permissions; + else +- set_nonunix_perms(stbuf,&fp); ++ set_nonunix_perms(&stbuf->st_mode,&fp); + + stbuf->st_uid=fp.unixprivs.uid; + stbuf->st_gid=fp.unixprivs.gid; +diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c +--- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200 +@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume, + { + + int ret,err=0; +- int totalwritten = 0; ++ size_t totalwritten = 0; + uint64_t sizetowrite, ignored; + unsigned char flags = 0; + unsigned int max_packet_size=volume->server->tx_quantum; +diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c +--- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200 +@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v + copy_path(server,p,pathname,strlen(pathname)); + unixpath_to_afppath(server,p); + p2=p+sizeof_path_header(server)+strlen(pathname); +- if (((unsigned int ) p2) & 0x1) p2++; ++ if (((unsigned long) p2) & 0x1) p2++; + req2=(void *) p2; + + req2->len=htons(namelen); +diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c +--- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200 +@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv + return 0; + } + +-int afp_closedt(struct afp_server * server, unsigned short * refnum) ++int afp_closedt(struct afp_server * server, unsigned short refnum) + { + struct { + struct dsi_header dsi_header __attribute__((__packed__)); +diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c +--- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200 +@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve + + return 0; + } ++ + int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other) + { + +@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s + char * p = buf + sizeof(*reply); + int i; + char *max=buf+size; +- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL; +- void ** x = other; ++ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other; + + if (reply->dsi_header.return_code.error_code) { + return reply->dsi_header.return_code.error_code; +diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c +--- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200 +@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s + + if (reply->header.return_code.error_code!=kFPNoErr) return -1; + +- copy_from_pascal_two(name,&reply->name,255); ++ copy_from_pascal_two(name,reply->name,255); + + return 0; + } +diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c +--- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200 +@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve + switch (type) { + case kLoginWithTimeAndID: + case kReconnWithTimeAndID: { +- uint32_t *p = (void *) (((unsigned int) request)+ ++ uint32_t *p = (void *) (((unsigned long) request)+ + sizeof(*request)); + + offset=sizeof(timestamp); +@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve + goto error; + } + +- data=(void *) (((unsigned int) request)+sizeof(*request)+offset); ++ data=(void *) (((unsigned long) request)+sizeof(*request)+offset); + request->idlength=htonl(datalen); + request->pad=0; + request->type=htons(type); +@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_ + if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL) + return -1; + +- token_data = request + sizeof(*request); ++ token_data = (char *)request + sizeof(*request); + + request->type=htons(type); + +diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c +--- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200 +@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser + goto cleartxt_fail; + + p += copy_to_pascal(p, username) + 1; +- if ((int)p & 0x1) ++ if ((long)p & 0x1) + len--; + else + p++; +@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se + goto cleartxt_fail; + + p += copy_to_pascal(p, username) + 1; +- if ((int)p & 0x1) ++ if ((long)p & 0x1) + len--; + else + p++; +@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server * + if (ai == NULL) + goto dhx_noctx_fail; + d += copy_to_pascal(ai, username) + 1; +- if (((int)d) % 2) ++ if (((long)d) % 2) + d++; + else + ai_len--; +diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c +--- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200 +@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server * + maxlen=255; + + +- p=filename+1; ++ p=(char *)filename+1; + while ((q=strchr(p,'/'))) { + if (q>p+maxlen) + return 1; From 2456994584863d5277e7efa76dd5f6136b883ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Mon, 26 Sep 2011 14:52:52 +0200 Subject: [PATCH 11/68] rebuild with new gmp --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 8a93f6d..9112bc1 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 8%{?dist} +Release: 8%{?dist}.1 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Sep 26 2011 Peter Schiffer - 0.8.1-8.1 +- rebuild with new gmp + * Mon Jul 4 2011 Jan F. Chadima - 0.8.1-8 - Repair ponter arithmetic From 82600ad9a9044e487ca04294264c5dfd606c9886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Mon, 10 Oct 2011 11:27:13 +0200 Subject: [PATCH 12/68] rebuild with new gmp --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 9112bc1..f4a45cd 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 8%{?dist}.1 +Release: 8%{?dist}.2 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Oct 10 2011 Peter Schiffer - 0.8.1-8.2 +- rebuild with new gmp + * Mon Sep 26 2011 Peter Schiffer - 0.8.1-8.1 - rebuild with new gmp From 3598866764315cc30688978eea16707fff04a1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= Date: Thu, 20 Oct 2011 14:29:26 +0200 Subject: [PATCH 13/68] =?UTF-8?q?*=20Thu=20Oct=2020=202011=20Marcela=20Ma?= =?UTF-8?q?=C5=A1l=C3=A1=C5=88ov=C3=A1=20=20-=200.8.1?= =?UTF-8?q?-8.3=20-=20rebuild=20with=20new=20gmp=20without=20compat=20lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index f4a45cd..6d4ad5c 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 8%{?dist}.2 +Release: 8%{?dist}.3 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 20 2011 Marcela Mašláňová - 0.8.1-8.3 +- rebuild with new gmp without compat lib + * Mon Oct 10 2011 Peter Schiffer - 0.8.1-8.2 - rebuild with new gmp From ce90444776d93068b182d45631b3b5b22dfb386a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 15:04:12 -0600 Subject: [PATCH 14/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 6d4ad5c..5240e8d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 8%{?dist}.3 +Release: 9%{?dist}.3 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 12 2012 Fedora Release Engineering - 0.8.1-9.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Thu Oct 20 2011 Marcela Mašláňová - 0.8.1-8.3 - rebuild with new gmp without compat lib From 25cb83150197e3fe49522f034b73f1b17342b9d6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 18 Jul 2012 10:39:53 -0500 Subject: [PATCH 15/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 5240e8d..a8acbd7 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 9%{?dist}.3 +Release: 10%{?dist}.3 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jul 18 2012 Fedora Release Engineering - 0.8.1-10.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Thu Jan 12 2012 Fedora Release Engineering - 0.8.1-9.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 8c9df659e279be8ee068bb28dc1b3a29d1875154 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 10:21:38 -0600 Subject: [PATCH 16/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index a8acbd7..998528d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 10%{?dist}.3 +Release: 11%{?dist}.3 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 13 2013 Fedora Release Engineering - 0.8.1-11.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Wed Jul 18 2012 Fedora Release Engineering - 0.8.1-10.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 134eb3d0134ff2de92d55a757c8454cb9ee303bd Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 2 Aug 2013 19:23:11 -0500 Subject: [PATCH 17/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 998528d..3bdd838 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 11%{?dist}.3 +Release: 12%{?dist}.3 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 0.8.1-12.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Wed Feb 13 2013 Fedora Release Engineering - 0.8.1-11.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 106289b4b183e8a26c2aaa6a2cfddff8cd71b901 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 24 Oct 2013 11:39:53 +0200 Subject: [PATCH 18/68] Attempt at saner SPEC file formatting I'm doing this semi-automatically across all packages I maintain, since some are several years old and since then several have suffered bit-rot and such. I'm fixing up the following: - Old RPM relics (such as %defattr, BuildRoot or %clean sections) - Whitespace errors (such as trailing spaces) - Consistent use of %{buildroot} - Dropping useless %{name} expansions that harm legibility - Consistent spacing between RPM sections - Bad days in %changelogs --- afpfs-ng.spec | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 3bdd838..c59a17e 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 12%{?dist}.3 +Release: 13%{?dist}.3 Summary: Apple Filing Protocol client Group: System Environment/Base @@ -14,7 +14,6 @@ URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 Patch0: afpfs-ng-0.8.1-overflows.patch Patch1: afpfs-ng-0.8.1-pointer.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %{?!_without_fuse:BuildRequires: fuse-devel} BuildRequires: libgcrypt-devel gmp-devel readline-devel @@ -64,18 +63,12 @@ make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_includedir}/afpfs-ng -cp -p include/* $RPM_BUILD_ROOT%{_includedir}/afpfs-ng - - -%clean -rm -rf $RPM_BUILD_ROOT +make install DESTDIR=%{buildroot} +install -d %{buildroot}%{_includedir}/afpfs-ng +cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %files -%defattr(-,root,root,-) %{_bindir}/afpcmd %{_bindir}/afpgetstatus %{_mandir}/man1/afpcmd.1* @@ -87,7 +80,6 @@ rm -rf $RPM_BUILD_ROOT %if %{?!_without_fuse:1}0 %files -n fuse-afp -%defattr(-,root,root,-) %{_bindir}/afp_client %{_bindir}/afpfs %{_bindir}/afpfsd @@ -100,7 +92,6 @@ rm -rf $RPM_BUILD_ROOT %files devel -%defattr(-,root,root,-) %{_includedir}/afpfs-ng %{_libdir}/*.so @@ -112,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Oct 24 2013 Lubomir Rintel - 0.8.1-13.3 +- Bulk sad and useless attempt at consistent SPEC file formatting + * Sat Aug 03 2013 Fedora Release Engineering - 0.8.1-12.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 766f481683688cd692843de451d4e1e48c7b2917 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 4 Dec 2013 23:43:20 +0100 Subject: [PATCH 19/68] Fix build with -Werror=format-security --- afpfs-ng-0.8.1-formatsec.patch | 160 +++++++++++++++++++++++++++++++++ afpfs-ng.spec | 8 +- 2 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 afpfs-ng-0.8.1-formatsec.patch diff --git a/afpfs-ng-0.8.1-formatsec.patch b/afpfs-ng-0.8.1-formatsec.patch new file mode 100644 index 0000000..9f9d0a2 --- /dev/null +++ b/afpfs-ng-0.8.1-formatsec.patch @@ -0,0 +1,160 @@ +From 2c76660566d026d430305231e72c259372de4380 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 4 Dec 2013 23:17:10 +0100 +Subject: [PATCH] Fix build with -Werror=format-security + +Fedora, starting with version 21, will enable this flag in order to limit +potentially insecure uses of format strings. It is required for format strings +to be constant now. +--- + cmdline/cmdline_afp.c | 4 ++-- + cmdline/cmdline_testafp.c | 12 ++++++------ + fuse/client.c | 5 +---- + fuse/commands.c | 4 ++-- + lib/afp_url.c | 12 ++++++------ + 5 files changed, 17 insertions(+), 20 deletions(-) + +diff --git a/cmdline/cmdline_afp.c b/cmdline/cmdline_afp.c +index 827150b..59f0977 100644 +--- a/cmdline/cmdline_afp.c ++++ b/cmdline/cmdline_afp.c +@@ -828,11 +828,11 @@ int com_status(char * arg) + char text[40960]; + + afp_status_header(text,&len); +- printf(text); ++ puts(text); + + len=40960; + afp_status_server(server,text,&len); +- printf(text); ++ puts(text); + return 0; + } + +diff --git a/cmdline/cmdline_testafp.c b/cmdline/cmdline_testafp.c +index c40f2bd..f887aec 100644 +--- a/cmdline/cmdline_testafp.c ++++ b/cmdline/cmdline_testafp.c +@@ -26,12 +26,12 @@ static int test_one_url(char * url_string, + struct afp_url valid_url; + afp_default_url(&valid_url); + valid_url.protocol=protocol; +- sprintf(valid_url.servername,servername); +- sprintf(valid_url.volumename,volumename); +- sprintf(valid_url.path,path); +- sprintf(valid_url.username,username); +- sprintf(valid_url.password,password); +- sprintf(valid_url.uamname,uamname); ++ strncpy(valid_url.servername,servername,sizeof(valid_url.servername)); ++ strncpy(valid_url.volumename,volumename,sizeof(valid_url.volumename)); ++ strncpy(valid_url.path,path,sizeof(valid_url.path)); ++ strncpy(valid_url.username,username,sizeof(valid_url.username)); ++ strncpy(valid_url.password,password,sizeof(valid_url.password)); ++ strncpy(valid_url.uamname,uamname,sizeof(valid_url.uamname)); + valid_url.port=port; + + if (afp_url_validate(url_string,&valid_url)) +diff --git a/fuse/client.c b/fuse/client.c +index f795ca6..d19e9ef 100644 +--- a/fuse/client.c ++++ b/fuse/client.c +@@ -509,7 +509,6 @@ static int prepare_buffer(int argc, char * argv[]) + int read_answer(int sock) { + int len=0, expected_len=0, packetlen; + char incoming_buffer[MAX_CLIENT_RESPONSE]; +- char toprint[MAX_CLIENT_RESPONSE+200]; + struct timeval tv; + fd_set rds,ords; + int ret; +@@ -546,9 +545,7 @@ int read_answer(int sock) { + } + + done: +- memset(toprint,0,MAX_CLIENT_RESPONSE+200); +- snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer)); +- printf(toprint); ++ printf("%.200s",incoming_buffer+sizeof(*answer)); + return ((struct afp_server_response *) incoming_buffer)->result; + + return 0; +diff --git a/fuse/commands.c b/fuse/commands.c +index aa7444d..bb06928 100644 +--- a/fuse/commands.c ++++ b/fuse/commands.c +@@ -163,7 +163,7 @@ static void fuse_log_for_client(void * priv, + + if (c) { + len = strlen(c->client_string); +- snprintf(c->client_string+len, ++ strncat(c->client_string+len, + MAX_CLIENT_RESPONSE-len, + message); + } else { +@@ -468,7 +468,7 @@ static int process_mount(struct fuse_client * c) + volume->mapping=req->map; + afp_detect_mapping(volume); + +- snprintf(volume->mountpoint,255,req->mountpoint); ++ strncat(volume->mountpoint,255,req->mountpoint); + + /* Create the new thread and block until we get an answer back */ + { +diff --git a/lib/afp_url.c b/lib/afp_url.c +index 42bac1c..f152d7b 100644 +--- a/lib/afp_url.c ++++ b/lib/afp_url.c +@@ -233,7 +233,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + } + } + +- snprintf(url->servername,strlen(p)+1,p); ++ strncat(url->servername,strlen(p)+1,p); + if (check_servername(url->servername)) { + if (verbose) printf("This isn't a valid servername\n"); + return -1; +@@ -263,7 +263,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + if ((q=escape_strrchr(p,':',":"))) { + *q='\0'; + q++; +- snprintf(url->password,strlen(q)+1,q); ++ strncat(url->password,strlen(q)+1,q); + if (check_password(url->password)) { + if (verbose) printf("This isn't a valid passwd\n"); + return -1; +@@ -276,7 +276,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + if ((q=strstr(p,";AUTH="))) { + *q='\0'; + q+=6; +- snprintf(url->uamname,strlen(q)+1,q); ++ strncat(url->uamname,strlen(q)+1,q); + if (check_uamname(url->uamname)) { + if (verbose) printf("This isn't a valid uamname\n"); + return -1; +@@ -284,7 +284,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + } + + if (strlen(p)>0) { +- snprintf(url->username,strlen(p)+1,p); ++ strncat(url->username,strlen(p)+1,p); + if (check_username(url->username)) { + if (verbose) printf("This isn't a valid username\n"); + return -1;; +@@ -304,12 +304,12 @@ parse_secondpart: + *q='\0'; + q++; + } +- snprintf(url->volumename,strlen(p)+1,p); ++ strncat(url->volumename,strlen(p)+1,p); + + + if (q) { + url->path[0]='/'; +- snprintf(url->path+1,strlen(q)+1,q); ++ strncat(url->path+1,strlen(q)+1,q); + } + + done: +-- +1.8.4.2 + diff --git a/afpfs-ng.spec b/afpfs-ng.spec index c59a17e..ba81f6e 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 13%{?dist}.3 +Release: 14%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -14,6 +14,8 @@ URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 Patch0: afpfs-ng-0.8.1-overflows.patch Patch1: afpfs-ng-0.8.1-pointer.patch +# Sent by e-mail to Alex deVries +Patch2: afpfs-ng-0.8.1-formatsec.patch %{?!_without_fuse:BuildRequires: fuse-devel} BuildRequires: libgcrypt-devel gmp-devel readline-devel @@ -49,6 +51,7 @@ Library for dynamic linking and header files of afpfs-ng. %setup -q %patch0 -p1 -b .overflows %patch1 -p1 -b .pointer +%patch2 -p1 -b .formatsec %build @@ -103,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Dec 04 2013 Lubomir Rintel - 0.8.1-14 +- Fix build with -Werror=format-security + * Thu Oct 24 2013 Lubomir Rintel - 0.8.1-13.3 - Bulk sad and useless attempt at consistent SPEC file formatting From b824cbacb1c63e1d802c134bcc6b089e26f8be2d Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Tue, 22 Apr 2014 20:33:39 +0200 Subject: [PATCH 20/68] Rebuild for new libgcrypt --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index ba81f6e..8395282 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Tue Apr 22 2014 Tomáš Mráz - 0.8.1-15 +- Rebuild for new libgcrypt + * Wed Dec 04 2013 Lubomir Rintel - 0.8.1-14 - Fix build with -Werror=format-security From 36bd03e3080d25304e2e236117b28f9bd91a0e54 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 6 Jun 2014 19:15:04 -0500 Subject: [PATCH 21/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 8395282..82a3bcc 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 0.8.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Tue Apr 22 2014 Tomáš Mráz - 0.8.1-15 - Rebuild for new libgcrypt From 6a2c07529c10a7f2fdd44c13cb80c253147dfd42 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 15 Aug 2014 20:06:12 +0000 Subject: [PATCH 22/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 82a3bcc..dc5e37d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Fri Aug 15 2014 Fedora Release Engineering - 0.8.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 0.8.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 4416edf5127deec1456d5288ea7d10b50597b963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AFkel=20Gu=C3=A9mar?= Date: Tue, 25 Nov 2014 23:42:46 +0100 Subject: [PATCH 23/68] Fix mount_afp crash (RHBZ #1165296) --- afpfs-ng-0.8.1-formatsec.patch | 39 +++++++++++++++++----------------- afpfs-ng.spec | 5 ++++- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/afpfs-ng-0.8.1-formatsec.patch b/afpfs-ng-0.8.1-formatsec.patch index 9f9d0a2..22527b3 100644 --- a/afpfs-ng-0.8.1-formatsec.patch +++ b/afpfs-ng-0.8.1-formatsec.patch @@ -23,12 +23,12 @@ index 827150b..59f0977 100644 afp_status_header(text,&len); - printf(text); -+ puts(text); ++ printf("%s", text); len=40960; afp_status_server(server,text,&len); - printf(text); -+ puts(text); ++ printf("%s", text); return 0; } @@ -46,12 +46,12 @@ index c40f2bd..f887aec 100644 - sprintf(valid_url.username,username); - sprintf(valid_url.password,password); - sprintf(valid_url.uamname,uamname); -+ strncpy(valid_url.servername,servername,sizeof(valid_url.servername)); -+ strncpy(valid_url.volumename,volumename,sizeof(valid_url.volumename)); -+ strncpy(valid_url.path,path,sizeof(valid_url.path)); -+ strncpy(valid_url.username,username,sizeof(valid_url.username)); -+ strncpy(valid_url.password,password,sizeof(valid_url.password)); -+ strncpy(valid_url.uamname,uamname,sizeof(valid_url.uamname)); ++ snprintf(valid_url.servername,sizeof(valid_url.servername),"%s",servername); ++ snprintf(valid_url.volumename,sizeof(valid_url.volumename),"%s",volumename); ++ snprintf(valid_url.path,sizeof(valid_url.path),"%s",path); ++ snprintf(valid_url.username,sizeof(valid_url.username),"%s",username); ++ snprintf(valid_url.password,sizeof(valid_url.password),"%s",password); ++ snprintf(valid_url.uamname,(valid_url.uamname),"%s",uamname); valid_url.port=port; if (afp_url_validate(url_string,&valid_url)) @@ -82,21 +82,20 @@ diff --git a/fuse/commands.c b/fuse/commands.c index aa7444d..bb06928 100644 --- a/fuse/commands.c +++ b/fuse/commands.c -@@ -163,7 +163,7 @@ static void fuse_log_for_client(void * priv, - - if (c) { +@@ -163,6 +163,7 @@ static void fuse_log_for_client(void * priv, len = strlen(c->client_string); -- snprintf(c->client_string+len, -+ strncat(c->client_string+len, + snprintf(c->client_string+len, MAX_CLIENT_RESPONSE-len, ++ "%s", message); } else { + @@ -468,7 +468,7 @@ static int process_mount(struct fuse_client * c) volume->mapping=req->map; afp_detect_mapping(volume); - snprintf(volume->mountpoint,255,req->mountpoint); -+ strncat(volume->mountpoint,255,req->mountpoint); ++ snprintf(volume->mountpoint,255,"%s",req->mountpoint); /* Create the new thread and block until we get an answer back */ { @@ -109,7 +108,7 @@ index 42bac1c..f152d7b 100644 } - snprintf(url->servername,strlen(p)+1,p); -+ strncat(url->servername,strlen(p)+1,p); ++ snprintf(url->servername,strlen(p)+1,"%s",p); if (check_servername(url->servername)) { if (verbose) printf("This isn't a valid servername\n"); return -1; @@ -118,7 +117,7 @@ index 42bac1c..f152d7b 100644 *q='\0'; q++; - snprintf(url->password,strlen(q)+1,q); -+ strncat(url->password,strlen(q)+1,q); ++ snprintf(url->password,strlen(q)+1,"%s",q); if (check_password(url->password)) { if (verbose) printf("This isn't a valid passwd\n"); return -1; @@ -127,7 +126,7 @@ index 42bac1c..f152d7b 100644 *q='\0'; q+=6; - snprintf(url->uamname,strlen(q)+1,q); -+ strncat(url->uamname,strlen(q)+1,q); ++ snprintf(url->uamname,strlen(q)+1,"%s",q); if (check_uamname(url->uamname)) { if (verbose) printf("This isn't a valid uamname\n"); return -1; @@ -136,7 +135,7 @@ index 42bac1c..f152d7b 100644 if (strlen(p)>0) { - snprintf(url->username,strlen(p)+1,p); -+ strncat(url->username,strlen(p)+1,p); ++ snprintf(url->username,strlen(p)+1,"%s",p); if (check_username(url->username)) { if (verbose) printf("This isn't a valid username\n"); return -1;; @@ -145,13 +144,13 @@ index 42bac1c..f152d7b 100644 q++; } - snprintf(url->volumename,strlen(p)+1,p); -+ strncat(url->volumename,strlen(p)+1,p); ++ snprintf(url->volumename,strlen(p)+1,"%s",p); if (q) { url->path[0]='/'; - snprintf(url->path+1,strlen(q)+1,q); -+ strncat(url->path+1,strlen(q)+1,q); ++ snprintf(url->path+1,strlen(q)+1,"%s",q); } done: diff --git a/afpfs-ng.spec b/afpfs-ng.spec index dc5e37d..1ec541c 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Tue Nov 25 2014 - 0.8.1-18 +- Fix mount_afp crash (RHBZ #1165296) + * Fri Aug 15 2014 Fedora Release Engineering - 0.8.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From be0dd65f7c17134debcb50c2bc24f0dad10f3ec4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 16 Jun 2015 23:40:39 +0000 Subject: [PATCH 24/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 1ec541c..9fb9cad 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Tue Jun 16 2015 Fedora Release Engineering - 0.8.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Tue Nov 25 2014 - 0.8.1-18 - Fix mount_afp crash (RHBZ #1165296) From 57356d21b1042baed3bd441cb23272970c8d853d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 16:01:40 +0000 Subject: [PATCH 25/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 9fb9cad..60a7077 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 0.8.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Jun 16 2015 Fedora Release Engineering - 0.8.1-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From d684d7eb76a1d9e13ae7244088307c9f00aa806a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 05:48:02 +0000 Subject: [PATCH 26/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 60a7077..e8a16b8 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 0.8.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Feb 03 2016 Fedora Release Engineering - 0.8.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 3e6cea7d0dd7146b49cfeb9f071d1252dba2803c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 02:39:18 +0000 Subject: [PATCH 27/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index e8a16b8..0b5cbc1 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 0.8.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 0.8.1-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 0d0df99283bee9e650980d1d052fe6693b23f5bd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 17:25:53 +0000 Subject: [PATCH 28/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 0b5cbc1..5ea013f 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 22%{?dist} +Release: 23%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 0.8.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 0.8.1-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From da61f36f0da1b3ed0f7e4ae1c82763cc5aa48035 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 01:58:14 +0000 Subject: [PATCH 29/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 5ea013f..8ba2c19 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -106,6 +106,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 0.8.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Aug 02 2017 Fedora Release Engineering - 0.8.1-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 6ed6a3fd278f96d9e70897b9afaa267f3e93f671 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 9 Jul 2018 19:06:42 +0200 Subject: [PATCH 30/68] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- afpfs-ng.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 8ba2c19..da6879e 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -18,6 +18,7 @@ Patch1: afpfs-ng-0.8.1-pointer.patch Patch2: afpfs-ng-0.8.1-formatsec.patch %{?!_without_fuse:BuildRequires: fuse-devel} +BuildRequires: gcc BuildRequires: libgcrypt-devel gmp-devel readline-devel %description From b018a90727e8dc3ce1ff2214c640da36dd90237c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 12 Jul 2018 20:02:55 +0000 Subject: [PATCH 31/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index da6879e..59e030d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Apple Filing Protocol client Group: System Environment/Base @@ -107,6 +107,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Thu Jul 12 2018 Fedora Release Engineering - 0.8.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 0.8.1-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 7774667c779a3732a6694d6e875f1d451ead2f9d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 22 Jan 2019 18:38:29 +0100 Subject: [PATCH 32/68] Remove obsolete ldconfig scriptlets References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets Signed-off-by: Igor Gnatenko --- afpfs-ng.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 59e030d..df3bbcc 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -100,10 +100,7 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so -%post -p /sbin/ldconfig - - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %changelog From 67d210aed104162fbfbf9efbbbf203121f9a6f58 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:38 +0100 Subject: [PATCH 33/68] Remove obsolete Group tag Signed-off-by: Igor Gnatenko --- afpfs-ng.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index df3bbcc..94fb52c 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -8,7 +8,6 @@ Version: 0.8.1 Release: 25%{?dist} Summary: Apple Filing Protocol client -Group: System Environment/Base License: GPL+ URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 @@ -30,7 +29,6 @@ Apple Filing Protocol. %if %{?!_without_fuse:1}0 %package -n fuse-afp Summary: FUSE driver for AFP filesystem -Group: System Environment/Base %description -n fuse-afp A FUSE file system server to access files exported from Mac OS system @@ -41,7 +39,6 @@ The command line client for AFP is in fuse-afp package %package devel Summary: Development files for afpfs-ng -Group: Development/Libraries Requires: %{name} = %{version} %description devel From d62b67dcf5544e3aa2d1d0bf599fb5a040baf24c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 13:03:39 +0000 Subject: [PATCH 34/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 94fb52c..7f99abb 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -101,6 +101,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 0.8.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Jul 12 2018 Fedora Release Engineering - 0.8.1-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 35ae3106f0316f77598bf10c21b9ff21e9a1f5d6 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 17 Feb 2019 09:30:49 +0100 Subject: [PATCH 35/68] Rebuild for readline 8.0 --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 7f99abb..e62cab2 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -101,6 +101,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Sun Feb 17 2019 Igor Gnatenko - 0.8.1-27 +- Rebuild for readline 8.0 + * Thu Jan 31 2019 Fedora Release Engineering - 0.8.1-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 2d9b7ada9c21ab36896107a61a3493be966127e9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 17:38:23 +0000 Subject: [PATCH 36/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index e62cab2..eccfe29 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 27%{?dist} +Release: 28%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -101,6 +101,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 0.8.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 17 2019 Igor Gnatenko - 0.8.1-27 - Rebuild for readline 8.0 From 26bd5687ceac37db0545fc8f9dfedb9942977b54 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 11:17:51 +0000 Subject: [PATCH 37/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index eccfe29..517b27c 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 28%{?dist} +Release: 29%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -101,6 +101,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 0.8.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Wed Jul 24 2019 Fedora Release Engineering - 0.8.1-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 28458b0c66cd08567839cc2d1c983798871b91e1 Mon Sep 17 00:00:00 2001 From: rpmbuild Date: Wed, 22 Apr 2020 21:27:20 +0000 Subject: [PATCH 38/68] fix FTBFS for legacy code use -fcommon --- afpfs-ng.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 517b27c..fff2582 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 29%{?dist} +Release: 30%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -59,6 +59,7 @@ Library for dynamic linking and header files of afpfs-ng. # Prerequisite `configure.ac' is newer than target `aclocal.m4'. touch --reference aclocal.m4 configure.ac Makefile.in +export CFLAGS="${RPM_OPT_FLAGS} -fcommon" %configure %{?_without_fuse:--disable-fuse} --disable-static make %{?_smp_mflags} @@ -101,6 +102,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Apr 22 2020 Michal Ambroz - 0.8.1-30 +- fix FTBFS - multiple definition of - build legacy code with -fcommon + * Tue Jan 28 2020 Fedora Release Engineering - 0.8.1-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 8150ad9fe5445ee3491c6fe4d7debea1cab64b7a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 11:49:00 +0000 Subject: [PATCH 39/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index fff2582..99a46a4 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 30%{?dist} +Release: 31%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -102,6 +102,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 0.8.1-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Apr 22 2020 Michal Ambroz - 0.8.1-30 - fix FTBFS - multiple definition of - build legacy code with -fcommon From dac9ff88182b2d2488c3428cad9e2a76aabcbd24 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jul 2020 23:50:30 +0000 Subject: [PATCH 40/68] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 99a46a4..02fc16d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 31%{?dist} +Release: 32%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -102,6 +102,10 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Fri Jul 31 2020 Fedora Release Engineering - 0.8.1-32 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Jul 27 2020 Fedora Release Engineering - 0.8.1-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 34cacabac0bfd83fd651faebd0f1548d293d5b85 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 15 Dec 2020 01:57:04 +0000 Subject: [PATCH 41/68] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- afpfs-ng.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 02fc16d..caf6853 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -19,6 +19,7 @@ Patch2: afpfs-ng-0.8.1-formatsec.patch %{?!_without_fuse:BuildRequires: fuse-devel} BuildRequires: gcc BuildRequires: libgcrypt-devel gmp-devel readline-devel +BuildRequires: make %description A command line client to access files exported from Mac OS system via From 5c518307966d45f37571859a07d0a8f62d64dc8f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 25 Jan 2021 23:52:40 +0000 Subject: [PATCH 42/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index caf6853..0730ce8 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 32%{?dist} +Release: 33%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -103,6 +103,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Fri Jul 31 2020 Fedora Release Engineering - 0.8.1-32 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From e11a7718b1eb4a72f1262a509d6b00b7fd9e2953 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Fri, 12 Mar 2021 03:43:11 +0000 Subject: [PATCH 43/68] fix #1507944 long options --- afpfs-ng-0.8.1-longoptions.patch | 11 +++++++++++ afpfs-ng.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 afpfs-ng-0.8.1-longoptions.patch diff --git a/afpfs-ng-0.8.1-longoptions.patch b/afpfs-ng-0.8.1-longoptions.patch new file mode 100644 index 0000000..883f095 --- /dev/null +++ b/afpfs-ng-0.8.1-longoptions.patch @@ -0,0 +1,11 @@ +diff -ru afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c afpfs-ng-0.8.1.new/cmdline/cmdline_main.c +--- afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c 2008-02-19 01:54:53.000000000 +0000 ++++ afpfs-ng-0.8.1.new/cmdline/cmdline_main.c 2021-03-12 03:28:59.315715841 +0000 +@@ -387,6 +387,7 @@ + + struct option long_options[] = { + {"recursive",1,0,'r'}, ++ {NULL,0,NULL,0} + }; + char * url = argv[1]; + diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 0730ce8..0aa244f 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -5,7 +5,7 @@ Name: afpfs-ng Version: 0.8.1 -Release: 33%{?dist} +Release: 34%{?dist} Summary: Apple Filing Protocol client License: GPL+ @@ -15,6 +15,7 @@ Patch0: afpfs-ng-0.8.1-overflows.patch Patch1: afpfs-ng-0.8.1-pointer.patch # Sent by e-mail to Alex deVries Patch2: afpfs-ng-0.8.1-formatsec.patch +Patch3: afpfs-ng-0.8.1-longoptions.patch %{?!_without_fuse:BuildRequires: fuse-devel} BuildRequires: gcc @@ -51,6 +52,7 @@ Library for dynamic linking and header files of afpfs-ng. %patch0 -p1 -b .overflows %patch1 -p1 -b .pointer %patch2 -p1 -b .formatsec +%patch3 -p1 -b .longoptions %build @@ -103,6 +105,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Fri Mar 12 2021 Michal Ambroz - 0.8.1-340 +- fix issue 1507944 + * Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From fc26fc345670f0659702f0514659ac4c85773728 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 26 Apr 2021 23:49:39 +0200 Subject: [PATCH 44/68] modernize spec, push the bugfix to supported branches --- afpfs-ng.spec | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 0aa244f..a40426d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,13 +1,13 @@ -# No FUSE on RHEL5 -%if %{?el5:1}0 -%define _without_fuse 1 -%endif - Name: afpfs-ng Version: 0.8.1 -Release: 34%{?dist} +Release: 35%{?dist} Summary: Apple Filing Protocol client +# by default build with the fuse module +# rpmbuild --rebuild afpfs-ng.src.rpm --without fuse +%bcond_without fuse + + License: GPL+ URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 @@ -17,7 +17,7 @@ Patch1: afpfs-ng-0.8.1-pointer.patch Patch2: afpfs-ng-0.8.1-formatsec.patch Patch3: afpfs-ng-0.8.1-longoptions.patch -%{?!_without_fuse:BuildRequires: fuse-devel} +%{?with_fuse:BuildRequires: fuse-devel} BuildRequires: gcc BuildRequires: libgcrypt-devel gmp-devel readline-devel BuildRequires: make @@ -25,10 +25,10 @@ BuildRequires: make %description A command line client to access files exported from Mac OS system via Apple Filing Protocol. -%{?!_without_fuse:The FUSE filesystem module for AFP is in fuse-afp package} +%{?with_fuse:The FUSE filesystem module for AFP is in fuse-afp package} -%if %{?!_without_fuse:1}0 +%if 0%{?with_fuse} %package -n fuse-afp Summary: FUSE driver for AFP filesystem @@ -48,11 +48,7 @@ Library for dynamic linking and header files of afpfs-ng. %prep -%setup -q -%patch0 -p1 -b .overflows -%patch1 -p1 -b .pointer -%patch2 -p1 -b .formatsec -%patch3 -p1 -b .longoptions +%autosetup -p 1 %build @@ -63,7 +59,7 @@ Library for dynamic linking and header files of afpfs-ng. touch --reference aclocal.m4 configure.ac Makefile.in export CFLAGS="${RPM_OPT_FLAGS} -fcommon" -%configure %{?_without_fuse:--disable-fuse} --disable-static +%configure %{?!with_fuse:--disable-fuse} --disable-static make %{?_smp_mflags} @@ -73,18 +69,25 @@ install -d %{buildroot}%{_includedir}/afpfs-ng cp -p include/* %{buildroot}%{_includedir}/afpfs-ng +%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) +%ldconfig_scriptlets +%endif + + %files +%license COPYING %{_bindir}/afpcmd %{_bindir}/afpgetstatus %{_mandir}/man1/afpcmd.1* %{_mandir}/man1/afpgetstatus.1* -%{_libdir}/*.so.* +%{_libdir}/libafpclient.so.* %exclude %{_libdir}/*.la -%doc COPYING AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt +%doc AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt -%if %{?!_without_fuse:1}0 +%if 0%{?with_fuse} %files -n fuse-afp +%license COPYING %{_bindir}/afp_client %{_bindir}/afpfs %{_bindir}/afpfsd @@ -92,7 +95,7 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_mandir}/man1/afp_client.1* %{_mandir}/man1/afpfsd.1* %{_mandir}/man1/mount_afp.1* -%doc COPYING AUTHORS ChangeLog +%doc AUTHORS ChangeLog %endif @@ -101,11 +104,11 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so -%ldconfig_scriptlets - - %changelog -* Fri Mar 12 2021 Michal Ambroz - 0.8.1-340 +* Mon Apr 26 2021 Michal Ambroz - 0.8.1-35 +- modernize spec, push the bugfix to active branches + +* Fri Mar 12 2021 Michal Ambroz - 0.8.1-34 - fix issue 1507944 * Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 From ea8fffd2986ff6ee80f3f727d6481f11c877457a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 12:24:45 +0000 Subject: [PATCH 45/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From 1631f83835fb4e72c3bf8859f95f2e0dff869a0f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 17:20:04 +0000 Subject: [PATCH 46/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index a40426d..fcbb4d5 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 35%{?dist} +Release: 36%{?dist} Summary: Apple Filing Protocol client # by default build with the fuse module @@ -105,6 +105,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 0.8.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Apr 26 2021 Michal Ambroz - 0.8.1-35 - modernize spec, push the bugfix to active branches From f3d7f8100094ad33fb823d7db7e3fbe30c689d20 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 15 Nov 2021 11:37:21 +0000 Subject: [PATCH 47/68] aarch64 - allow standard paths in rpath check --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index fcbb4d5..988ffad 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -3,6 +3,7 @@ Version: 0.8.1 Release: 36%{?dist} Summary: Apple Filing Protocol client + # by default build with the fuse module # rpmbuild --rebuild afpfs-ng.src.rpm --without fuse %bcond_without fuse @@ -46,7 +47,6 @@ Requires: %{name} = %{version} %description devel Library for dynamic linking and header files of afpfs-ng. - %prep %autosetup -p 1 @@ -64,6 +64,9 @@ make %{?_smp_mflags} %install +%ifarch aarch64 + export QA_RPATHS=1 +%endif make install DESTDIR=%{buildroot} install -d %{buildroot}%{_includedir}/afpfs-ng cp -p include/* %{buildroot}%{_includedir}/afpfs-ng From 8c43961472c0dd72ed7b9ba2a9e276219a2a0394 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 15 Nov 2021 12:07:30 +0000 Subject: [PATCH 48/68] adding comment --- afpfs-ng.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 988ffad..ea4d757 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -64,9 +64,12 @@ make %{?_smp_mflags} %install +# setting RPATH for aarch64 ends-up bit different than for other platforms +# https://bugzilla.redhat.com/show_bug.cgi?id=1987362 %ifarch aarch64 export QA_RPATHS=1 %endif + make install DESTDIR=%{buildroot} install -d %{buildroot}%{_includedir}/afpfs-ng cp -p include/* %{buildroot}%{_includedir}/afpfs-ng From 386755bce67fd6f77abb68c572b09cb9d1f04c88 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Thu, 18 Nov 2021 08:50:37 +0000 Subject: [PATCH 49/68] update the embedded libtool --- afpfs-ng.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index ea4d757..0ce122c 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 36%{?dist} +Release: 37%{?dist} Summary: Apple Filing Protocol client @@ -19,9 +19,12 @@ Patch2: afpfs-ng-0.8.1-formatsec.patch Patch3: afpfs-ng-0.8.1-longoptions.patch %{?with_fuse:BuildRequires: fuse-devel} -BuildRequires: gcc +BuildRequires: gcc BuildRequires: libgcrypt-devel gmp-devel readline-devel BuildRequires: make +BuildRequires: libtool +BuildRequires: autoconf + %description A command line client to access files exported from Mac OS system via @@ -49,7 +52,8 @@ Library for dynamic linking and header files of afpfs-ng. %prep %autosetup -p 1 - +libtoolize +autoreconf %build # make would rebuild the autoconf infrastructure due to the following: @@ -64,12 +68,6 @@ make %{?_smp_mflags} %install -# setting RPATH for aarch64 ends-up bit different than for other platforms -# https://bugzilla.redhat.com/show_bug.cgi?id=1987362 -%ifarch aarch64 - export QA_RPATHS=1 -%endif - make install DESTDIR=%{buildroot} install -d %{buildroot}%{_includedir}/afpfs-ng cp -p include/* %{buildroot}%{_includedir}/afpfs-ng @@ -111,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Nov 17 2021 Michal Ambroz - 0.8.1-37 +- update embedded libtool (ltmain.sh) + * Wed Jul 21 2021 Fedora Release Engineering - 0.8.1-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 2acdcb90672bbae12fdbd33a34f696f3772d308b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 21:00:19 +0000 Subject: [PATCH 50/68] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 0ce122c..b5f00be 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 37%{?dist} +Release: 38%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 0.8.1-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Nov 17 2021 Michal Ambroz - 0.8.1-37 - update embedded libtool (ltmain.sh) From 48077e2d65206fc3b778d550faaa12a6bec45f9b Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 31 Jan 2022 08:57:19 -0800 Subject: [PATCH 51/68] epel8-playground decommissioned : https://pagure.io/epel/issue/136 --- .cvsignore | 0 Makefile | 21 --------------------- dead.package | 1 + sources | 0 4 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 .cvsignore delete mode 100644 Makefile create mode 100644 dead.package delete mode 100644 sources diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/Makefile b/Makefile deleted file mode 100644 index a383a89..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: afpfs-ng -# $Id$ -NAME := afpfs-ng -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..a72aec0 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +epel8-playground decommissioned : https://pagure.io/epel/issue/136 diff --git a/sources b/sources deleted file mode 100644 index e69de29..0000000 From d05d8abe32005ad1ce76f74a10f42f10a8f0c0fd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 20:31:21 +0000 Subject: [PATCH 52/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index b5f00be..f8e22c3 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 38%{?dist} +Release: 39%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 0.8.1-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jan 19 2022 Fedora Release Engineering - 0.8.1-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 2014cb6054341e44156241ff94a71820bcc90955 Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Mon, 24 Oct 2022 14:29:32 +0200 Subject: [PATCH 53/68] cosmetics --- afpfs-ng.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index f8e22c3..0726769 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -85,7 +85,7 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_mandir}/man1/afpcmd.1* %{_mandir}/man1/afpgetstatus.1* %{_libdir}/libafpclient.so.* -%exclude %{_libdir}/*.la +# %%exclude %%{_libdir}/*.la %doc AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt From 4396979d2215e37334fa5a6b380187af7b6f43bf Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Tue, 25 Oct 2022 11:30:36 +0200 Subject: [PATCH 54/68] delete explicitly the libtool .la file --- afpfs-ng.spec | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 0726769..6667004 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 39%{?dist} +Release: 40%{?dist} Summary: Apple Filing Protocol client @@ -68,10 +68,11 @@ make %{?_smp_mflags} %install -make install DESTDIR=%{buildroot} +%make_install install -d %{buildroot}%{_includedir}/afpfs-ng cp -p include/* %{buildroot}%{_includedir}/afpfs-ng - +# libtool .la file works different in different versions of libtool, should not be packaged +[ -f %{buildroot}%{_libdir}/libafpclient.la ] && rm -f %{buildroot}%{_libdir}/libafpclient.la %if ( 0%{?rhel} && 0%{?rhel} <= 7 ) %ldconfig_scriptlets @@ -85,7 +86,6 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_mandir}/man1/afpcmd.1* %{_mandir}/man1/afpgetstatus.1* %{_libdir}/libafpclient.so.* -# %%exclude %%{_libdir}/*.la %doc AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt @@ -107,8 +107,10 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_includedir}/afpfs-ng %{_libdir}/*.so - %changelog +* Tue Oct 25 2022 Michal Ambroz - 0.8.1-40 +- remove the libafpclient.la libtool file + * Wed Jul 20 2022 Fedora Release Engineering - 0.8.1-39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From c7c078c518ca6afca30f3ebef65293a3fb86aaaf Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 21 Dec 2022 14:26:40 +0100 Subject: [PATCH 55/68] Port to C99 Related to: --- afpfs-ng-c99.patch | 164 +++++++++++++++++++++++++++++++++++++++++++++ afpfs-ng.spec | 6 +- 2 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 afpfs-ng-c99.patch diff --git a/afpfs-ng-c99.patch b/afpfs-ng-c99.patch new file mode 100644 index 0000000..ea7c282 --- /dev/null +++ b/afpfs-ng-c99.patch @@ -0,0 +1,164 @@ +Add additional #include directives for more function prototypes, +to avoid implicit function declarations. Declare appledouble_write, +cmdline_afp_setup_client in the appropriate header files. + +These changes expose an argument type mismatch in the function +appledouble_truncate, in the calls to remove_opened_fork. This may +or may have not worked before, depending on how the ABI implements +passing this struct by value. + +The use of basename in start_afpfsd is suspect; this should probaby use +dirname instead. + +Submitted upstream: + +diff --git a/cmdline/cmdline_afp.h b/cmdline/cmdline_afp.h +index ebdf357fc952972c..e0ec4570f69b71ec 100644 +--- a/cmdline/cmdline_afp.h ++++ b/cmdline/cmdline_afp.h +@@ -28,5 +28,6 @@ int com_disconnect(char * arg); + void cmdline_afp_exit(void); + + int cmdline_afp_setup(int recursive, char * url_string); ++void cmdline_afp_setup_client(void); + + #endif +diff --git a/cmdline/cmdline_main.c b/cmdline/cmdline_main.c +index ffb39ebacb8f262c..deccf8a4cc342bf0 100644 +--- a/cmdline/cmdline_main.c ++++ b/cmdline/cmdline_main.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include "afp.h" + #include "cmdline_afp.h" + #include "cmdline_testafp.h" + +diff --git a/fuse/client.c b/fuse/client.c +index d19e9efb2dcb60b7..beceaa5594a89b80 100644 +--- a/fuse/client.c ++++ b/fuse/client.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "config.h" + #include +diff --git a/fuse/daemon.c b/fuse/daemon.c +index 8b3b8d9146633518..abf6c02e390142b2 100644 +--- a/fuse/daemon.c ++++ b/fuse/daemon.c +@@ -23,6 +23,8 @@ + #include + #include + ++#include ++ + #include "afp.h" + + #include "dsi.h" +diff --git a/lib/dsi.c b/lib/dsi.c +index 8a469794542ec447..3fd10fb24c770ca8 100644 +--- a/lib/dsi.c ++++ b/lib/dsi.c +@@ -27,6 +27,7 @@ + #include "libafpclient.h" + #include "afp_internal.h" + #include "afp_replies.h" ++#include "codepage.h" + + /* define this in order to get reams of DSI debugging information */ + #undef DEBUG_DSI +diff --git a/lib/lowlevel.c b/lib/lowlevel.c +index f3b632c2ae2da763..1edc9cdce5cc8429 100644 +--- a/lib/lowlevel.c ++++ b/lib/lowlevel.c +@@ -25,6 +25,8 @@ + #include "utils.h" + #include "did.h" + #include "users.h" ++#include "midlevel.h" ++#include "forklist.h" + + static void set_nonunix_perms(unsigned int * mode, struct afp_file_info *fp) + { +diff --git a/lib/proto_files.c b/lib/proto_files.c +index 933956da6a6d2ce6..d2acd562a2671869 100644 +--- a/lib/proto_files.c ++++ b/lib/proto_files.c +@@ -14,6 +14,7 @@ + #include "dsi_protocol.h" + #include "afp_protocol.h" + #include "afp_internal.h" ++#include "afp_replies.h" + + /* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably + similiar. We abstract them to afp-setparms_lowlevel. */ +diff --git a/lib/proto_replyblock.c b/lib/proto_replyblock.c +index f66791614a52ca3d..c59629b24ab83cec 100644 +--- a/lib/proto_replyblock.c ++++ b/lib/proto_replyblock.c +@@ -10,6 +10,7 @@ + #include "afp.h" + #include "utils.h" + #include "afp_internal.h" ++#include "afp_replies.h" + + + /* FIXME: should do bounds checking */ +diff --git a/lib/resource.c b/lib/resource.c +index 6be4a5b1de51fec5..fb39889f0d7702c0 100644 +--- a/lib/resource.c ++++ b/lib/resource.c +@@ -8,6 +8,7 @@ + #include "lowlevel.h" + #include "did.h" + #include "midlevel.h" ++#include "forklist.h" + + #define appledouble ".AppleDouble" + #define finderinfo_string ".finderinfo" +@@ -362,12 +363,12 @@ int appledouble_truncate(struct afp_volume * volume, const char * path, int offs + ret=ll_zero_file(volume,fp.forkid,0); + if (ret<0) { + afp_closefork(volume,fp.forkid); +- remove_opened_fork(volume,fp); ++ remove_opened_fork(volume,&fp); + free(newpath); + return ret; + } + afp_closefork(volume,fp.forkid); +- remove_opened_fork(volume,fp); ++ remove_opened_fork(volume,&fp); + + return 1; + case AFP_META_APPLEDOUBLE: +diff --git a/lib/resource.h b/lib/resource.h +index 6a0d38a6275dd6f5..2efff106c94e6637 100644 +--- a/lib/resource.h ++++ b/lib/resource.h +@@ -31,6 +31,9 @@ int appledouble_read(struct afp_volume * volume, struct afp_file_info *fp, + + int appledouble_close(struct afp_volume * volume, struct afp_file_info * fp); + ++int appledouble_write(struct afp_volume * volume, struct afp_file_info *fp, ++ const char *data, size_t size, off_t offset, size_t *totalwritten); ++ + int appledouble_chmod(struct afp_volume * volume, const char * path, mode_t mode); + + int appledouble_unlink(struct afp_volume * volume, const char *path); +diff --git a/lib/server.c b/lib/server.c +index 977c418efccae88b..93400dd92a4c0af6 100644 +--- a/lib/server.c ++++ b/lib/server.c +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include "afp.h" + #include "dsi.h" diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 6667004..24ff8b5 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 40%{?dist} +Release: 41%{?dist} Summary: Apple Filing Protocol client @@ -17,6 +17,7 @@ Patch1: afpfs-ng-0.8.1-pointer.patch # Sent by e-mail to Alex deVries Patch2: afpfs-ng-0.8.1-formatsec.patch Patch3: afpfs-ng-0.8.1-longoptions.patch +Patch4: afpfs-ng-c99.patch %{?with_fuse:BuildRequires: fuse-devel} BuildRequires: gcc @@ -108,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Wed Dec 21 2022 Florian Weimer - 0.8.1-41 +- Port to C99 + * Tue Oct 25 2022 Michal Ambroz - 0.8.1-40 - remove the libafpclient.la libtool file From 360d6f9e18a87422574d8ef90ebd4e624e76b545 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:28:47 +0000 Subject: [PATCH 56/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 24ff8b5..5203b95 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 41%{?dist} +Release: 42%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 0.8.1-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Wed Dec 21 2022 Florian Weimer - 0.8.1-41 - Port to C99 From ccdbd66e4a2339b1013fb7f76cf63942ec2e6d30 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 12:59:48 +0000 Subject: [PATCH 57/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 5203b95..06ba6cd 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 42%{?dist} +Release: 43%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 0.8.1-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Wed Jan 18 2023 Fedora Release Engineering - 0.8.1-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From fbb2d5ebaeac53e0cd6902b7e85d6b4ff3948417 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 12:22:30 +0000 Subject: [PATCH 58/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 06ba6cd..9d54352 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 43%{?dist} +Release: 44%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 0.8.1-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jul 19 2023 Fedora Release Engineering - 0.8.1-43 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From f1bfbb43a09d206b024f2bb4aadc49da3898494f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 22:45:52 +0000 Subject: [PATCH 59/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 9d54352..00bbd27 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 44%{?dist} +Release: 45%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 0.8.1-45 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 0.8.1-44 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a4c01eaa011a85ac265031a4181bd121c23b8171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 17 Jun 2024 12:23:14 +0200 Subject: [PATCH 60/68] convert GPL+ license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- afpfs-ng.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 00bbd27..776f3ac 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 45%{?dist} +Release: 46%{?dist} Summary: Apple Filing Protocol client @@ -9,7 +9,7 @@ Summary: Apple Filing Protocol client %bcond_without fuse -License: GPL+ +License: GPL-1.0-or-later URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 Patch0: afpfs-ng-0.8.1-overflows.patch @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Mon Jun 17 2024 Miroslav Suchý - 0.8.1-46 +- convert license to SPDX + * Mon Jan 22 2024 Fedora Release Engineering - 0.8.1-45 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a55af4e920e7593d672c6620394cca4fb8d335de Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 16:42:07 +0000 Subject: [PATCH 61/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 776f3ac..03c5e5d 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 46%{?dist} +Release: 47%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 0.8.1-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jun 17 2024 Miroslav Suchý - 0.8.1-46 - convert license to SPDX From 81f984a1ee0fdfac67ccbd0a0b7f5e3b66bd0cf6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 10:41:45 +0000 Subject: [PATCH 62/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- afpfs-ng.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/afpfs-ng.spec b/afpfs-ng.spec index 03c5e5d..b686810 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 47%{?dist} +Release: 48%{?dist} Summary: Apple Filing Protocol client @@ -109,6 +109,9 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.8.1-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Jul 17 2024 Fedora Release Engineering - 0.8.1-47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From efa469c13d2bb0df9cccfd5ed3e1d33aa98caa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 28 Jan 2025 10:53:08 +0100 Subject: [PATCH 63/68] Retired: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/DRIWVJ7BVL3KVVX5TLC36LJPDMAO72HF/ --- .gitignore | 1 - afpfs-ng-0.8.1-formatsec.patch | 159 ------------------ afpfs-ng-0.8.1-longoptions.patch | 11 -- afpfs-ng-0.8.1-overflows.patch | 28 ---- afpfs-ng-0.8.1-pointer.patch | 280 ------------------------------- afpfs-ng-c99.patch | 164 ------------------ afpfs-ng.spec | 267 ----------------------------- dead.package | 1 + sources | 1 - 9 files changed, 1 insertion(+), 911 deletions(-) delete mode 100644 .gitignore delete mode 100644 afpfs-ng-0.8.1-formatsec.patch delete mode 100644 afpfs-ng-0.8.1-longoptions.patch delete mode 100644 afpfs-ng-0.8.1-overflows.patch delete mode 100644 afpfs-ng-0.8.1-pointer.patch delete mode 100644 afpfs-ng-c99.patch delete mode 100644 afpfs-ng.spec create mode 100644 dead.package delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ea8ffb1..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -afpfs-ng-0.8.1.tar.bz2 diff --git a/afpfs-ng-0.8.1-formatsec.patch b/afpfs-ng-0.8.1-formatsec.patch deleted file mode 100644 index 22527b3..0000000 --- a/afpfs-ng-0.8.1-formatsec.patch +++ /dev/null @@ -1,159 +0,0 @@ -From 2c76660566d026d430305231e72c259372de4380 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Wed, 4 Dec 2013 23:17:10 +0100 -Subject: [PATCH] Fix build with -Werror=format-security - -Fedora, starting with version 21, will enable this flag in order to limit -potentially insecure uses of format strings. It is required for format strings -to be constant now. ---- - cmdline/cmdline_afp.c | 4 ++-- - cmdline/cmdline_testafp.c | 12 ++++++------ - fuse/client.c | 5 +---- - fuse/commands.c | 4 ++-- - lib/afp_url.c | 12 ++++++------ - 5 files changed, 17 insertions(+), 20 deletions(-) - -diff --git a/cmdline/cmdline_afp.c b/cmdline/cmdline_afp.c -index 827150b..59f0977 100644 ---- a/cmdline/cmdline_afp.c -+++ b/cmdline/cmdline_afp.c -@@ -828,11 +828,11 @@ int com_status(char * arg) - char text[40960]; - - afp_status_header(text,&len); -- printf(text); -+ printf("%s", text); - - len=40960; - afp_status_server(server,text,&len); -- printf(text); -+ printf("%s", text); - return 0; - } - -diff --git a/cmdline/cmdline_testafp.c b/cmdline/cmdline_testafp.c -index c40f2bd..f887aec 100644 ---- a/cmdline/cmdline_testafp.c -+++ b/cmdline/cmdline_testafp.c -@@ -26,12 +26,12 @@ static int test_one_url(char * url_string, - struct afp_url valid_url; - afp_default_url(&valid_url); - valid_url.protocol=protocol; -- sprintf(valid_url.servername,servername); -- sprintf(valid_url.volumename,volumename); -- sprintf(valid_url.path,path); -- sprintf(valid_url.username,username); -- sprintf(valid_url.password,password); -- sprintf(valid_url.uamname,uamname); -+ snprintf(valid_url.servername,sizeof(valid_url.servername),"%s",servername); -+ snprintf(valid_url.volumename,sizeof(valid_url.volumename),"%s",volumename); -+ snprintf(valid_url.path,sizeof(valid_url.path),"%s",path); -+ snprintf(valid_url.username,sizeof(valid_url.username),"%s",username); -+ snprintf(valid_url.password,sizeof(valid_url.password),"%s",password); -+ snprintf(valid_url.uamname,(valid_url.uamname),"%s",uamname); - valid_url.port=port; - - if (afp_url_validate(url_string,&valid_url)) -diff --git a/fuse/client.c b/fuse/client.c -index f795ca6..d19e9ef 100644 ---- a/fuse/client.c -+++ b/fuse/client.c -@@ -509,7 +509,6 @@ static int prepare_buffer(int argc, char * argv[]) - int read_answer(int sock) { - int len=0, expected_len=0, packetlen; - char incoming_buffer[MAX_CLIENT_RESPONSE]; -- char toprint[MAX_CLIENT_RESPONSE+200]; - struct timeval tv; - fd_set rds,ords; - int ret; -@@ -546,9 +545,7 @@ int read_answer(int sock) { - } - - done: -- memset(toprint,0,MAX_CLIENT_RESPONSE+200); -- snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer)); -- printf(toprint); -+ printf("%.200s",incoming_buffer+sizeof(*answer)); - return ((struct afp_server_response *) incoming_buffer)->result; - - return 0; -diff --git a/fuse/commands.c b/fuse/commands.c -index aa7444d..bb06928 100644 ---- a/fuse/commands.c -+++ b/fuse/commands.c -@@ -163,6 +163,7 @@ static void fuse_log_for_client(void * priv, - len = strlen(c->client_string); - snprintf(c->client_string+len, - MAX_CLIENT_RESPONSE-len, -+ "%s", - message); - } else { - -@@ -468,7 +468,7 @@ static int process_mount(struct fuse_client * c) - volume->mapping=req->map; - afp_detect_mapping(volume); - -- snprintf(volume->mountpoint,255,req->mountpoint); -+ snprintf(volume->mountpoint,255,"%s",req->mountpoint); - - /* Create the new thread and block until we get an answer back */ - { -diff --git a/lib/afp_url.c b/lib/afp_url.c -index 42bac1c..f152d7b 100644 ---- a/lib/afp_url.c -+++ b/lib/afp_url.c -@@ -233,7 +233,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) - } - } - -- snprintf(url->servername,strlen(p)+1,p); -+ snprintf(url->servername,strlen(p)+1,"%s",p); - if (check_servername(url->servername)) { - if (verbose) printf("This isn't a valid servername\n"); - return -1; -@@ -263,7 +263,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) - if ((q=escape_strrchr(p,':',":"))) { - *q='\0'; - q++; -- snprintf(url->password,strlen(q)+1,q); -+ snprintf(url->password,strlen(q)+1,"%s",q); - if (check_password(url->password)) { - if (verbose) printf("This isn't a valid passwd\n"); - return -1; -@@ -276,7 +276,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) - if ((q=strstr(p,";AUTH="))) { - *q='\0'; - q+=6; -- snprintf(url->uamname,strlen(q)+1,q); -+ snprintf(url->uamname,strlen(q)+1,"%s",q); - if (check_uamname(url->uamname)) { - if (verbose) printf("This isn't a valid uamname\n"); - return -1; -@@ -284,7 +284,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) - } - - if (strlen(p)>0) { -- snprintf(url->username,strlen(p)+1,p); -+ snprintf(url->username,strlen(p)+1,"%s",p); - if (check_username(url->username)) { - if (verbose) printf("This isn't a valid username\n"); - return -1;; -@@ -304,12 +304,12 @@ parse_secondpart: - *q='\0'; - q++; - } -- snprintf(url->volumename,strlen(p)+1,p); -+ snprintf(url->volumename,strlen(p)+1,"%s",p); - - - if (q) { - url->path[0]='/'; -- snprintf(url->path+1,strlen(q)+1,q); -+ snprintf(url->path+1,strlen(q)+1,"%s",q); - } - - done: --- -1.8.4.2 - diff --git a/afpfs-ng-0.8.1-longoptions.patch b/afpfs-ng-0.8.1-longoptions.patch deleted file mode 100644 index 883f095..0000000 --- a/afpfs-ng-0.8.1-longoptions.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c afpfs-ng-0.8.1.new/cmdline/cmdline_main.c ---- afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c 2008-02-19 01:54:53.000000000 +0000 -+++ afpfs-ng-0.8.1.new/cmdline/cmdline_main.c 2021-03-12 03:28:59.315715841 +0000 -@@ -387,6 +387,7 @@ - - struct option long_options[] = { - {"recursive",1,0,'r'}, -+ {NULL,0,NULL,0} - }; - char * url = argv[1]; - diff --git a/afpfs-ng-0.8.1-overflows.patch b/afpfs-ng-0.8.1-overflows.patch deleted file mode 100644 index 94399ed..0000000 --- a/afpfs-ng-0.8.1-overflows.patch +++ /dev/null @@ -1,28 +0,0 @@ -Fix possible buffer overflows (given we're copying to storage of AFP_MAX_PATH, -while AFP_MAX_PATH is much smaller than PATH_MAX) - -Lubomir Rintel - ---- afpfs-ng-0.8.1/cmdline/cmdline_afp.c.overflows 2008-10-06 19:21:32.000000000 +0200 -+++ afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-10-06 19:13:50.000000000 +0200 -@@ -129,9 +129,9 @@ - { - if (filename[0]!='/') { - if (strlen(curdir)==1) -- snprintf(server_fullname,PATH_MAX,"/%s",filename); -+ snprintf(server_fullname,AFP_MAX_PATH,"/%s",filename); - else -- snprintf(server_fullname,PATH_MAX,"%s/%s",curdir,filename); -+ snprintf(server_fullname,AFP_MAX_PATH,"%s/%s",curdir,filename); - } else { - snprintf(server_fullname,PATH_MAX,"%s",filename); - } -@@ -1217,7 +1217,7 @@ - { - struct passwd * passwd; - -- snprintf(curdir,PATH_MAX,"%s",DEFAULT_DIRECTORY); -+ snprintf(curdir,AFP_MAX_PATH,"%s",DEFAULT_DIRECTORY); - if (init_uams()<0) return -1; - - afp_default_url(&url); diff --git a/afpfs-ng-0.8.1-pointer.patch b/afpfs-ng-0.8.1-pointer.patch deleted file mode 100644 index b47b834..0000000 --- a/afpfs-ng-0.8.1-pointer.patch +++ /dev/null @@ -1,280 +0,0 @@ -diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c ---- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200 -+++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200 -@@ -1,4 +1,5 @@ - #include -+#include - #include - #include - -diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c ---- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100 -+++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200 -@@ -61,8 +61,9 @@ static int start_afpfsd(void) - snprintf(filename, PATH_MAX, - "/usr/local/bin/%s",AFPFSD_FILENAME); - if (access(filename,X_OK)) { -- snprintf(filename, "/usr/bin/%s", -+ snprintf(filename, sizeof(filename), "/usr/bin/%s", - AFPFSD_FILENAME); -+ filename[sizeof(filename) - 1] = 0; - if (access(filename,X_OK)) { - printf("Could not find server (%s)\n", - filename); -diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c ---- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100 -+++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200 -@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s - ret = ml_open(volume,path,flags,&fp); - - if (ret==0) -- fi->fh=(void *) fp; -+ fi->fh=(unsigned long) fp; - - return ret; - } -diff -up afpfs-ng-0.8.1/include/afp.h.pointer afpfs-ng-0.8.1/include/afp.h ---- afpfs-ng-0.8.1/include/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100 -+++ afpfs-ng-0.8.1/include/afp.h 2011-06-14 17:02:15.000000000 +0200 -@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s - - int afp_opendt(struct afp_volume *volume, unsigned short * refnum); - --int afp_closedt(struct afp_server * server, unsigned short * refnum); -+int afp_closedt(struct afp_server * server, unsigned short refnum); - - int afp_getcomment(struct afp_volume *volume, unsigned int did, - const char * pathname, struct afp_comment * comment); -diff -up afpfs-ng-0.8.1/include/utils.h.pointer afpfs-ng-0.8.1/include/utils.h ---- afpfs-ng-0.8.1/include/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100 -+++ afpfs-ng-0.8.1/include/utils.h 2011-06-14 17:02:15.000000000 +0200 -@@ -8,8 +8,8 @@ - #define hton64(x) (x) - #define ntoh64(x) (x) - #else /* BYTE_ORDER == BIG_ENDIAN */ --#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ -- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) -+#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \ -+ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32)) - #define ntoh64(x) (hton64(x)) - #endif /* BYTE_ORDER == BIG_ENDIAN */ - -diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c ---- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200 -@@ -33,7 +33,7 @@ static int check_port(char * port) - static int check_uamname(const char * uam) - { - char * p; -- for (p=uam;*p;p++) { -+ for (p=(char *)uam;*p;p++) { - if (*p==' ') continue; - if ((*p<'A') || (*p>'z')) return -1; - } -@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url, - return -1; - - } -- if (p==NULL) p=toparse; -+ if (p==NULL) p=(char *)toparse; - - /* Now split on the first / */ - if (sscanf(p,"%[^/]/%[^$]", -diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c ---- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200 -@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume - - - /* Go to the end of last known entry */ -- p=path+(p-copy); -+ p=(char *)path+(p-copy); - p2=p; - - while ((p=strchr(p+1,'/'))) { -diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c ---- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200 -@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv - } - server->flags=ntohs(reply1->flags); - -- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); -+ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); - p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; - - /* Now work our way through the variable bits */ -@@ -757,7 +757,7 @@ gotenough: - printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); - #endif - ret = read(server->fd, (void *) -- (((unsigned int) server->incoming_buffer)+server->data_read), -+ (((unsigned long) server->incoming_buffer)+server->data_read), - amount_to_read); - if (ret<0) return -1; - if (ret==0) { -diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c ---- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200 -@@ -25,7 +25,7 @@ - static unsigned char exit_program=0; - - static pthread_t ending_thread; --static pthread_t main_thread = NULL; -+static pthread_t main_thread = (pthread_t)NULL; - - static int loop_started=0; - static pthread_cond_t loop_started_condition; -diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c ---- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200 -@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum - if (volume->server->using_version->av_number>=30) - stbuf->st_mode |= fp.unixprivs.permissions; - else -- set_nonunix_perms(stbuf,&fp); -+ set_nonunix_perms(&stbuf->st_mode,&fp); - - stbuf->st_uid=fp.unixprivs.uid; - stbuf->st_gid=fp.unixprivs.gid; -diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c ---- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200 -@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume, - { - - int ret,err=0; -- int totalwritten = 0; -+ size_t totalwritten = 0; - uint64_t sizetowrite, ignored; - unsigned char flags = 0; - unsigned int max_packet_size=volume->server->tx_quantum; -diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c ---- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200 -@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v - copy_path(server,p,pathname,strlen(pathname)); - unixpath_to_afppath(server,p); - p2=p+sizeof_path_header(server)+strlen(pathname); -- if (((unsigned int ) p2) & 0x1) p2++; -+ if (((unsigned long) p2) & 0x1) p2++; - req2=(void *) p2; - - req2->len=htons(namelen); -diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c ---- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200 -@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv - return 0; - } - --int afp_closedt(struct afp_server * server, unsigned short * refnum) -+int afp_closedt(struct afp_server * server, unsigned short refnum) - { - struct { - struct dsi_header dsi_header __attribute__((__packed__)); -diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c ---- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200 -@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve - - return 0; - } -+ - int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other) - { - -@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s - char * p = buf + sizeof(*reply); - int i; - char *max=buf+size; -- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL; -- void ** x = other; -+ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other; - - if (reply->dsi_header.return_code.error_code) { - return reply->dsi_header.return_code.error_code; -diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c ---- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200 -@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s - - if (reply->header.return_code.error_code!=kFPNoErr) return -1; - -- copy_from_pascal_two(name,&reply->name,255); -+ copy_from_pascal_two(name,reply->name,255); - - return 0; - } -diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c ---- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200 -@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve - switch (type) { - case kLoginWithTimeAndID: - case kReconnWithTimeAndID: { -- uint32_t *p = (void *) (((unsigned int) request)+ -+ uint32_t *p = (void *) (((unsigned long) request)+ - sizeof(*request)); - - offset=sizeof(timestamp); -@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve - goto error; - } - -- data=(void *) (((unsigned int) request)+sizeof(*request)+offset); -+ data=(void *) (((unsigned long) request)+sizeof(*request)+offset); - request->idlength=htonl(datalen); - request->pad=0; - request->type=htons(type); -@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_ - if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL) - return -1; - -- token_data = request + sizeof(*request); -+ token_data = (char *)request + sizeof(*request); - - request->type=htons(type); - -diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c ---- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200 -@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser - goto cleartxt_fail; - - p += copy_to_pascal(p, username) + 1; -- if ((int)p & 0x1) -+ if ((long)p & 0x1) - len--; - else - p++; -@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se - goto cleartxt_fail; - - p += copy_to_pascal(p, username) + 1; -- if ((int)p & 0x1) -+ if ((long)p & 0x1) - len--; - else - p++; -@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server * - if (ai == NULL) - goto dhx_noctx_fail; - d += copy_to_pascal(ai, username) + 1; -- if (((int)d) % 2) -+ if (((long)d) % 2) - d++; - else - ai_len--; -diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c ---- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100 -+++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200 -@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server * - maxlen=255; - - -- p=filename+1; -+ p=(char *)filename+1; - while ((q=strchr(p,'/'))) { - if (q>p+maxlen) - return 1; diff --git a/afpfs-ng-c99.patch b/afpfs-ng-c99.patch deleted file mode 100644 index ea7c282..0000000 --- a/afpfs-ng-c99.patch +++ /dev/null @@ -1,164 +0,0 @@ -Add additional #include directives for more function prototypes, -to avoid implicit function declarations. Declare appledouble_write, -cmdline_afp_setup_client in the appropriate header files. - -These changes expose an argument type mismatch in the function -appledouble_truncate, in the calls to remove_opened_fork. This may -or may have not worked before, depending on how the ABI implements -passing this struct by value. - -The use of basename in start_afpfsd is suspect; this should probaby use -dirname instead. - -Submitted upstream: - -diff --git a/cmdline/cmdline_afp.h b/cmdline/cmdline_afp.h -index ebdf357fc952972c..e0ec4570f69b71ec 100644 ---- a/cmdline/cmdline_afp.h -+++ b/cmdline/cmdline_afp.h -@@ -28,5 +28,6 @@ int com_disconnect(char * arg); - void cmdline_afp_exit(void); - - int cmdline_afp_setup(int recursive, char * url_string); -+void cmdline_afp_setup_client(void); - - #endif -diff --git a/cmdline/cmdline_main.c b/cmdline/cmdline_main.c -index ffb39ebacb8f262c..deccf8a4cc342bf0 100644 ---- a/cmdline/cmdline_main.c -+++ b/cmdline/cmdline_main.c -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include "afp.h" - #include "cmdline_afp.h" - #include "cmdline_testafp.h" - -diff --git a/fuse/client.c b/fuse/client.c -index d19e9efb2dcb60b7..beceaa5594a89b80 100644 ---- a/fuse/client.c -+++ b/fuse/client.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #include "config.h" - #include -diff --git a/fuse/daemon.c b/fuse/daemon.c -index 8b3b8d9146633518..abf6c02e390142b2 100644 ---- a/fuse/daemon.c -+++ b/fuse/daemon.c -@@ -23,6 +23,8 @@ - #include - #include - -+#include -+ - #include "afp.h" - - #include "dsi.h" -diff --git a/lib/dsi.c b/lib/dsi.c -index 8a469794542ec447..3fd10fb24c770ca8 100644 ---- a/lib/dsi.c -+++ b/lib/dsi.c -@@ -27,6 +27,7 @@ - #include "libafpclient.h" - #include "afp_internal.h" - #include "afp_replies.h" -+#include "codepage.h" - - /* define this in order to get reams of DSI debugging information */ - #undef DEBUG_DSI -diff --git a/lib/lowlevel.c b/lib/lowlevel.c -index f3b632c2ae2da763..1edc9cdce5cc8429 100644 ---- a/lib/lowlevel.c -+++ b/lib/lowlevel.c -@@ -25,6 +25,8 @@ - #include "utils.h" - #include "did.h" - #include "users.h" -+#include "midlevel.h" -+#include "forklist.h" - - static void set_nonunix_perms(unsigned int * mode, struct afp_file_info *fp) - { -diff --git a/lib/proto_files.c b/lib/proto_files.c -index 933956da6a6d2ce6..d2acd562a2671869 100644 ---- a/lib/proto_files.c -+++ b/lib/proto_files.c -@@ -14,6 +14,7 @@ - #include "dsi_protocol.h" - #include "afp_protocol.h" - #include "afp_internal.h" -+#include "afp_replies.h" - - /* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably - similiar. We abstract them to afp-setparms_lowlevel. */ -diff --git a/lib/proto_replyblock.c b/lib/proto_replyblock.c -index f66791614a52ca3d..c59629b24ab83cec 100644 ---- a/lib/proto_replyblock.c -+++ b/lib/proto_replyblock.c -@@ -10,6 +10,7 @@ - #include "afp.h" - #include "utils.h" - #include "afp_internal.h" -+#include "afp_replies.h" - - - /* FIXME: should do bounds checking */ -diff --git a/lib/resource.c b/lib/resource.c -index 6be4a5b1de51fec5..fb39889f0d7702c0 100644 ---- a/lib/resource.c -+++ b/lib/resource.c -@@ -8,6 +8,7 @@ - #include "lowlevel.h" - #include "did.h" - #include "midlevel.h" -+#include "forklist.h" - - #define appledouble ".AppleDouble" - #define finderinfo_string ".finderinfo" -@@ -362,12 +363,12 @@ int appledouble_truncate(struct afp_volume * volume, const char * path, int offs - ret=ll_zero_file(volume,fp.forkid,0); - if (ret<0) { - afp_closefork(volume,fp.forkid); -- remove_opened_fork(volume,fp); -+ remove_opened_fork(volume,&fp); - free(newpath); - return ret; - } - afp_closefork(volume,fp.forkid); -- remove_opened_fork(volume,fp); -+ remove_opened_fork(volume,&fp); - - return 1; - case AFP_META_APPLEDOUBLE: -diff --git a/lib/resource.h b/lib/resource.h -index 6a0d38a6275dd6f5..2efff106c94e6637 100644 ---- a/lib/resource.h -+++ b/lib/resource.h -@@ -31,6 +31,9 @@ int appledouble_read(struct afp_volume * volume, struct afp_file_info *fp, - - int appledouble_close(struct afp_volume * volume, struct afp_file_info * fp); - -+int appledouble_write(struct afp_volume * volume, struct afp_file_info *fp, -+ const char *data, size_t size, off_t offset, size_t *totalwritten); -+ - int appledouble_chmod(struct afp_volume * volume, const char * path, mode_t mode); - - int appledouble_unlink(struct afp_volume * volume, const char *path); -diff --git a/lib/server.c b/lib/server.c -index 977c418efccae88b..93400dd92a4c0af6 100644 ---- a/lib/server.c -+++ b/lib/server.c -@@ -7,6 +7,7 @@ - - #include - #include -+#include - - #include "afp.h" - #include "dsi.h" diff --git a/afpfs-ng.spec b/afpfs-ng.spec deleted file mode 100644 index b686810..0000000 --- a/afpfs-ng.spec +++ /dev/null @@ -1,267 +0,0 @@ -Name: afpfs-ng -Version: 0.8.1 -Release: 48%{?dist} -Summary: Apple Filing Protocol client - - -# by default build with the fuse module -# rpmbuild --rebuild afpfs-ng.src.rpm --without fuse -%bcond_without fuse - - -License: GPL-1.0-or-later -URL: http://alexthepuffin.googlepages.com/home -Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 -Patch0: afpfs-ng-0.8.1-overflows.patch -Patch1: afpfs-ng-0.8.1-pointer.patch -# Sent by e-mail to Alex deVries -Patch2: afpfs-ng-0.8.1-formatsec.patch -Patch3: afpfs-ng-0.8.1-longoptions.patch -Patch4: afpfs-ng-c99.patch - -%{?with_fuse:BuildRequires: fuse-devel} -BuildRequires: gcc -BuildRequires: libgcrypt-devel gmp-devel readline-devel -BuildRequires: make -BuildRequires: libtool -BuildRequires: autoconf - - -%description -A command line client to access files exported from Mac OS system via -Apple Filing Protocol. -%{?with_fuse:The FUSE filesystem module for AFP is in fuse-afp package} - - -%if 0%{?with_fuse} -%package -n fuse-afp -Summary: FUSE driver for AFP filesystem - -%description -n fuse-afp -A FUSE file system server to access files exported from Mac OS system -via AppleTalk or TCP using Apple Filing Protocol. -The command line client for AFP is in fuse-afp package -%endif - - -%package devel -Summary: Development files for afpfs-ng -Requires: %{name} = %{version} - -%description devel -Library for dynamic linking and header files of afpfs-ng. - -%prep -%autosetup -p 1 -libtoolize -autoreconf - -%build -# make would rebuild the autoconf infrastructure due to the following: -# Prerequisite `configure.ac' is newer than target `Makefile.in'. -# Prerequisite `aclocal.m4' is newer than target `Makefile.in'. -# Prerequisite `configure.ac' is newer than target `aclocal.m4'. -touch --reference aclocal.m4 configure.ac Makefile.in - -export CFLAGS="${RPM_OPT_FLAGS} -fcommon" -%configure %{?!with_fuse:--disable-fuse} --disable-static -make %{?_smp_mflags} - - -%install -%make_install -install -d %{buildroot}%{_includedir}/afpfs-ng -cp -p include/* %{buildroot}%{_includedir}/afpfs-ng -# libtool .la file works different in different versions of libtool, should not be packaged -[ -f %{buildroot}%{_libdir}/libafpclient.la ] && rm -f %{buildroot}%{_libdir}/libafpclient.la - -%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) -%ldconfig_scriptlets -%endif - - -%files -%license COPYING -%{_bindir}/afpcmd -%{_bindir}/afpgetstatus -%{_mandir}/man1/afpcmd.1* -%{_mandir}/man1/afpgetstatus.1* -%{_libdir}/libafpclient.so.* -%doc AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt - - -%if 0%{?with_fuse} -%files -n fuse-afp -%license COPYING -%{_bindir}/afp_client -%{_bindir}/afpfs -%{_bindir}/afpfsd -%{_bindir}/mount_afp -%{_mandir}/man1/afp_client.1* -%{_mandir}/man1/afpfsd.1* -%{_mandir}/man1/mount_afp.1* -%doc AUTHORS ChangeLog -%endif - - -%files devel -%{_includedir}/afpfs-ng -%{_libdir}/*.so - -%changelog -* Thu Jan 16 2025 Fedora Release Engineering - 0.8.1-48 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 17 2024 Fedora Release Engineering - 0.8.1-47 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jun 17 2024 Miroslav Suchý - 0.8.1-46 -- convert license to SPDX - -* Mon Jan 22 2024 Fedora Release Engineering - 0.8.1-45 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 0.8.1-44 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 0.8.1-43 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jan 18 2023 Fedora Release Engineering - 0.8.1-42 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Dec 21 2022 Florian Weimer - 0.8.1-41 -- Port to C99 - -* Tue Oct 25 2022 Michal Ambroz - 0.8.1-40 -- remove the libafpclient.la libtool file - -* Wed Jul 20 2022 Fedora Release Engineering - 0.8.1-39 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 0.8.1-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Nov 17 2021 Michal Ambroz - 0.8.1-37 -- update embedded libtool (ltmain.sh) - -* Wed Jul 21 2021 Fedora Release Engineering - 0.8.1-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Apr 26 2021 Michal Ambroz - 0.8.1-35 -- modernize spec, push the bugfix to active branches - -* Fri Mar 12 2021 Michal Ambroz - 0.8.1-34 -- fix issue 1507944 - -* Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jul 31 2020 Fedora Release Engineering - 0.8.1-32 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 0.8.1-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Apr 22 2020 Michal Ambroz - 0.8.1-30 -- fix FTBFS - multiple definition of - build legacy code with -fcommon - -* Tue Jan 28 2020 Fedora Release Engineering - 0.8.1-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Jul 24 2019 Fedora Release Engineering - 0.8.1-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 17 2019 Igor Gnatenko - 0.8.1-27 -- Rebuild for readline 8.0 - -* Thu Jan 31 2019 Fedora Release Engineering - 0.8.1-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jul 12 2018 Fedora Release Engineering - 0.8.1-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 0.8.1-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 02 2017 Fedora Release Engineering - 0.8.1-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.8.1-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 0.8.1-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Feb 03 2016 Fedora Release Engineering - 0.8.1-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jun 16 2015 Fedora Release Engineering - 0.8.1-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue Nov 25 2014 - 0.8.1-18 -- Fix mount_afp crash (RHBZ #1165296) - -* Fri Aug 15 2014 Fedora Release Engineering - 0.8.1-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.8.1-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Apr 22 2014 Tomáš Mráz - 0.8.1-15 -- Rebuild for new libgcrypt - -* Wed Dec 04 2013 Lubomir Rintel - 0.8.1-14 -- Fix build with -Werror=format-security - -* Thu Oct 24 2013 Lubomir Rintel - 0.8.1-13.3 -- Bulk sad and useless attempt at consistent SPEC file formatting - -* Sat Aug 03 2013 Fedora Release Engineering - 0.8.1-12.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Feb 13 2013 Fedora Release Engineering - 0.8.1-11.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jul 18 2012 Fedora Release Engineering - 0.8.1-10.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Jan 12 2012 Fedora Release Engineering - 0.8.1-9.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Oct 20 2011 Marcela Mašláňová - 0.8.1-8.3 -- rebuild with new gmp without compat lib - -* Mon Oct 10 2011 Peter Schiffer - 0.8.1-8.2 -- rebuild with new gmp - -* Mon Sep 26 2011 Peter Schiffer - 0.8.1-8.1 -- rebuild with new gmp - -* Mon Jul 4 2011 Jan F. Chadima - 0.8.1-8 -- Repair ponter arithmetic - -* Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Sep 17 2009 Peter Lemenkov - 0.8.1-6 -- Rebuild with new fuse - -* Fri Jul 24 2009 Fedora Release Engineering - 0.8.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Jul 17 2009 Lubomir Rintel - 0.8.1-4 -- Don't refer to AppleTalk in Summary - -* Tue Jul 14 2009 Lubomir Rintel - 0.8.1-3 -- Fix up license tag - -* Thu Mar 19 2009 Lubomir Rintel - 0.8.1-2 -- Add more include files (Jan F. Chadima) -- Don't needlessly build static library (Stefan Kasal) -- Fix fuse-afp summary (Stefan Kasal) -- Remove redundant license file from -devel (Stefan Kasal) - -* Mon Oct 6 2008 Lubomir Rintel - 0.8.1-1 -- Initial packaging attempt diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..b37fb02 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Retired: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/DRIWVJ7BVL3KVVX5TLC36LJPDMAO72HF/ diff --git a/sources b/sources deleted file mode 100644 index 4bd856f..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -1bdd9f8a06e6085ea4cc38ce010ef60b afpfs-ng-0.8.1.tar.bz2 From 64c7827fc24c8ab488338c8e6df8bc03ad725fc7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 7 Feb 2025 07:42:47 +0000 Subject: [PATCH 64/68] Unretirement Releng Request: https://pagure.io/releng/issue/12566 Signed-off-by: Fedora Release Engineering --- .gitignore | 1 + afpfs-ng-0.8.1-formatsec.patch | 159 ++++++++++++++++++ afpfs-ng-0.8.1-longoptions.patch | 11 ++ afpfs-ng-0.8.1-overflows.patch | 28 ++++ afpfs-ng-0.8.1-pointer.patch | 280 +++++++++++++++++++++++++++++++ afpfs-ng-c99.patch | 164 ++++++++++++++++++ afpfs-ng.spec | 267 +++++++++++++++++++++++++++++ dead.package | 1 - sources | 1 + 9 files changed, 911 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 afpfs-ng-0.8.1-formatsec.patch create mode 100644 afpfs-ng-0.8.1-longoptions.patch create mode 100644 afpfs-ng-0.8.1-overflows.patch create mode 100644 afpfs-ng-0.8.1-pointer.patch create mode 100644 afpfs-ng-c99.patch create mode 100644 afpfs-ng.spec delete mode 100644 dead.package create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8ffb1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +afpfs-ng-0.8.1.tar.bz2 diff --git a/afpfs-ng-0.8.1-formatsec.patch b/afpfs-ng-0.8.1-formatsec.patch new file mode 100644 index 0000000..22527b3 --- /dev/null +++ b/afpfs-ng-0.8.1-formatsec.patch @@ -0,0 +1,159 @@ +From 2c76660566d026d430305231e72c259372de4380 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 4 Dec 2013 23:17:10 +0100 +Subject: [PATCH] Fix build with -Werror=format-security + +Fedora, starting with version 21, will enable this flag in order to limit +potentially insecure uses of format strings. It is required for format strings +to be constant now. +--- + cmdline/cmdline_afp.c | 4 ++-- + cmdline/cmdline_testafp.c | 12 ++++++------ + fuse/client.c | 5 +---- + fuse/commands.c | 4 ++-- + lib/afp_url.c | 12 ++++++------ + 5 files changed, 17 insertions(+), 20 deletions(-) + +diff --git a/cmdline/cmdline_afp.c b/cmdline/cmdline_afp.c +index 827150b..59f0977 100644 +--- a/cmdline/cmdline_afp.c ++++ b/cmdline/cmdline_afp.c +@@ -828,11 +828,11 @@ int com_status(char * arg) + char text[40960]; + + afp_status_header(text,&len); +- printf(text); ++ printf("%s", text); + + len=40960; + afp_status_server(server,text,&len); +- printf(text); ++ printf("%s", text); + return 0; + } + +diff --git a/cmdline/cmdline_testafp.c b/cmdline/cmdline_testafp.c +index c40f2bd..f887aec 100644 +--- a/cmdline/cmdline_testafp.c ++++ b/cmdline/cmdline_testafp.c +@@ -26,12 +26,12 @@ static int test_one_url(char * url_string, + struct afp_url valid_url; + afp_default_url(&valid_url); + valid_url.protocol=protocol; +- sprintf(valid_url.servername,servername); +- sprintf(valid_url.volumename,volumename); +- sprintf(valid_url.path,path); +- sprintf(valid_url.username,username); +- sprintf(valid_url.password,password); +- sprintf(valid_url.uamname,uamname); ++ snprintf(valid_url.servername,sizeof(valid_url.servername),"%s",servername); ++ snprintf(valid_url.volumename,sizeof(valid_url.volumename),"%s",volumename); ++ snprintf(valid_url.path,sizeof(valid_url.path),"%s",path); ++ snprintf(valid_url.username,sizeof(valid_url.username),"%s",username); ++ snprintf(valid_url.password,sizeof(valid_url.password),"%s",password); ++ snprintf(valid_url.uamname,(valid_url.uamname),"%s",uamname); + valid_url.port=port; + + if (afp_url_validate(url_string,&valid_url)) +diff --git a/fuse/client.c b/fuse/client.c +index f795ca6..d19e9ef 100644 +--- a/fuse/client.c ++++ b/fuse/client.c +@@ -509,7 +509,6 @@ static int prepare_buffer(int argc, char * argv[]) + int read_answer(int sock) { + int len=0, expected_len=0, packetlen; + char incoming_buffer[MAX_CLIENT_RESPONSE]; +- char toprint[MAX_CLIENT_RESPONSE+200]; + struct timeval tv; + fd_set rds,ords; + int ret; +@@ -546,9 +545,7 @@ int read_answer(int sock) { + } + + done: +- memset(toprint,0,MAX_CLIENT_RESPONSE+200); +- snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer)); +- printf(toprint); ++ printf("%.200s",incoming_buffer+sizeof(*answer)); + return ((struct afp_server_response *) incoming_buffer)->result; + + return 0; +diff --git a/fuse/commands.c b/fuse/commands.c +index aa7444d..bb06928 100644 +--- a/fuse/commands.c ++++ b/fuse/commands.c +@@ -163,6 +163,7 @@ static void fuse_log_for_client(void * priv, + len = strlen(c->client_string); + snprintf(c->client_string+len, + MAX_CLIENT_RESPONSE-len, ++ "%s", + message); + } else { + +@@ -468,7 +468,7 @@ static int process_mount(struct fuse_client * c) + volume->mapping=req->map; + afp_detect_mapping(volume); + +- snprintf(volume->mountpoint,255,req->mountpoint); ++ snprintf(volume->mountpoint,255,"%s",req->mountpoint); + + /* Create the new thread and block until we get an answer back */ + { +diff --git a/lib/afp_url.c b/lib/afp_url.c +index 42bac1c..f152d7b 100644 +--- a/lib/afp_url.c ++++ b/lib/afp_url.c +@@ -233,7 +233,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + } + } + +- snprintf(url->servername,strlen(p)+1,p); ++ snprintf(url->servername,strlen(p)+1,"%s",p); + if (check_servername(url->servername)) { + if (verbose) printf("This isn't a valid servername\n"); + return -1; +@@ -263,7 +263,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + if ((q=escape_strrchr(p,':',":"))) { + *q='\0'; + q++; +- snprintf(url->password,strlen(q)+1,q); ++ snprintf(url->password,strlen(q)+1,"%s",q); + if (check_password(url->password)) { + if (verbose) printf("This isn't a valid passwd\n"); + return -1; +@@ -276,7 +276,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + if ((q=strstr(p,";AUTH="))) { + *q='\0'; + q+=6; +- snprintf(url->uamname,strlen(q)+1,q); ++ snprintf(url->uamname,strlen(q)+1,"%s",q); + if (check_uamname(url->uamname)) { + if (verbose) printf("This isn't a valid uamname\n"); + return -1; +@@ -284,7 +284,7 @@ int afp_parse_url(struct afp_url * url, const char * toparse, int verbose) + } + + if (strlen(p)>0) { +- snprintf(url->username,strlen(p)+1,p); ++ snprintf(url->username,strlen(p)+1,"%s",p); + if (check_username(url->username)) { + if (verbose) printf("This isn't a valid username\n"); + return -1;; +@@ -304,12 +304,12 @@ parse_secondpart: + *q='\0'; + q++; + } +- snprintf(url->volumename,strlen(p)+1,p); ++ snprintf(url->volumename,strlen(p)+1,"%s",p); + + + if (q) { + url->path[0]='/'; +- snprintf(url->path+1,strlen(q)+1,q); ++ snprintf(url->path+1,strlen(q)+1,"%s",q); + } + + done: +-- +1.8.4.2 + diff --git a/afpfs-ng-0.8.1-longoptions.patch b/afpfs-ng-0.8.1-longoptions.patch new file mode 100644 index 0000000..883f095 --- /dev/null +++ b/afpfs-ng-0.8.1-longoptions.patch @@ -0,0 +1,11 @@ +diff -ru afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c afpfs-ng-0.8.1.new/cmdline/cmdline_main.c +--- afpfs-ng-0.8.1.orig/cmdline/cmdline_main.c 2008-02-19 01:54:53.000000000 +0000 ++++ afpfs-ng-0.8.1.new/cmdline/cmdline_main.c 2021-03-12 03:28:59.315715841 +0000 +@@ -387,6 +387,7 @@ + + struct option long_options[] = { + {"recursive",1,0,'r'}, ++ {NULL,0,NULL,0} + }; + char * url = argv[1]; + diff --git a/afpfs-ng-0.8.1-overflows.patch b/afpfs-ng-0.8.1-overflows.patch new file mode 100644 index 0000000..94399ed --- /dev/null +++ b/afpfs-ng-0.8.1-overflows.patch @@ -0,0 +1,28 @@ +Fix possible buffer overflows (given we're copying to storage of AFP_MAX_PATH, +while AFP_MAX_PATH is much smaller than PATH_MAX) + +Lubomir Rintel + +--- afpfs-ng-0.8.1/cmdline/cmdline_afp.c.overflows 2008-10-06 19:21:32.000000000 +0200 ++++ afpfs-ng-0.8.1/cmdline/cmdline_afp.c 2008-10-06 19:13:50.000000000 +0200 +@@ -129,9 +129,9 @@ + { + if (filename[0]!='/') { + if (strlen(curdir)==1) +- snprintf(server_fullname,PATH_MAX,"/%s",filename); ++ snprintf(server_fullname,AFP_MAX_PATH,"/%s",filename); + else +- snprintf(server_fullname,PATH_MAX,"%s/%s",curdir,filename); ++ snprintf(server_fullname,AFP_MAX_PATH,"%s/%s",curdir,filename); + } else { + snprintf(server_fullname,PATH_MAX,"%s",filename); + } +@@ -1217,7 +1217,7 @@ + { + struct passwd * passwd; + +- snprintf(curdir,PATH_MAX,"%s",DEFAULT_DIRECTORY); ++ snprintf(curdir,AFP_MAX_PATH,"%s",DEFAULT_DIRECTORY); + if (init_uams()<0) return -1; + + afp_default_url(&url); diff --git a/afpfs-ng-0.8.1-pointer.patch b/afpfs-ng-0.8.1-pointer.patch new file mode 100644 index 0000000..b47b834 --- /dev/null +++ b/afpfs-ng-0.8.1-pointer.patch @@ -0,0 +1,280 @@ +diff -up afpfs-ng-0.8.1/cmdline/getstatus.c.pointer afpfs-ng-0.8.1/cmdline/getstatus.c +--- afpfs-ng-0.8.1/cmdline/getstatus.c.pointer 2011-06-14 17:06:35.000000000 +0200 ++++ afpfs-ng-0.8.1/cmdline/getstatus.c 2011-06-14 17:07:25.000000000 +0200 +@@ -1,4 +1,5 @@ + #include ++#include + #include + #include + +diff -up afpfs-ng-0.8.1/fuse/client.c.pointer afpfs-ng-0.8.1/fuse/client.c +--- afpfs-ng-0.8.1/fuse/client.c.pointer 2008-03-08 03:44:16.000000000 +0100 ++++ afpfs-ng-0.8.1/fuse/client.c 2011-06-14 17:02:15.000000000 +0200 +@@ -61,8 +61,9 @@ static int start_afpfsd(void) + snprintf(filename, PATH_MAX, + "/usr/local/bin/%s",AFPFSD_FILENAME); + if (access(filename,X_OK)) { +- snprintf(filename, "/usr/bin/%s", ++ snprintf(filename, sizeof(filename), "/usr/bin/%s", + AFPFSD_FILENAME); ++ filename[sizeof(filename) - 1] = 0; + if (access(filename,X_OK)) { + printf("Could not find server (%s)\n", + filename); +diff -up afpfs-ng-0.8.1/fuse/fuse_int.c.pointer afpfs-ng-0.8.1/fuse/fuse_int.c +--- afpfs-ng-0.8.1/fuse/fuse_int.c.pointer 2008-03-02 06:06:24.000000000 +0100 ++++ afpfs-ng-0.8.1/fuse/fuse_int.c 2011-06-14 17:02:15.000000000 +0200 +@@ -197,7 +197,7 @@ static int fuse_open(const char *path, s + ret = ml_open(volume,path,flags,&fp); + + if (ret==0) +- fi->fh=(void *) fp; ++ fi->fh=(unsigned long) fp; + + return ret; + } +diff -up afpfs-ng-0.8.1/include/afp.h.pointer afpfs-ng-0.8.1/include/afp.h +--- afpfs-ng-0.8.1/include/afp.h.pointer 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1/include/afp.h 2011-06-14 17:02:15.000000000 +0200 +@@ -370,7 +370,7 @@ int afp_unmount_all_volumes(struct afp_s + + int afp_opendt(struct afp_volume *volume, unsigned short * refnum); + +-int afp_closedt(struct afp_server * server, unsigned short * refnum); ++int afp_closedt(struct afp_server * server, unsigned short refnum); + + int afp_getcomment(struct afp_volume *volume, unsigned int did, + const char * pathname, struct afp_comment * comment); +diff -up afpfs-ng-0.8.1/include/utils.h.pointer afpfs-ng-0.8.1/include/utils.h +--- afpfs-ng-0.8.1/include/utils.h.pointer 2008-02-18 04:33:58.000000000 +0100 ++++ afpfs-ng-0.8.1/include/utils.h 2011-06-14 17:02:15.000000000 +0200 +@@ -8,8 +8,8 @@ + #define hton64(x) (x) + #define ntoh64(x) (x) + #else /* BYTE_ORDER == BIG_ENDIAN */ +-#define hton64(x) ((u_int64_t) (htonl(((x) >> 32) & 0xffffffffLL)) | \ +- (u_int64_t) ((htonl(x) & 0xffffffffLL) << 32)) ++#define hton64(x) ((u_int64_t) (htonl((((unsigned long long)(x)) >> 32) & 0xffffffffLL)) | \ ++ (u_int64_t) ((htonl((unsigned long long)(x)) & 0xffffffffLL) << 32)) + #define ntoh64(x) (hton64(x)) + #endif /* BYTE_ORDER == BIG_ENDIAN */ + +diff -up afpfs-ng-0.8.1/lib/afp_url.c.pointer afpfs-ng-0.8.1/lib/afp_url.c +--- afpfs-ng-0.8.1/lib/afp_url.c.pointer 2008-03-04 21:16:49.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/afp_url.c 2011-06-14 17:02:15.000000000 +0200 +@@ -33,7 +33,7 @@ static int check_port(char * port) + static int check_uamname(const char * uam) + { + char * p; +- for (p=uam;*p;p++) { ++ for (p=(char *)uam;*p;p++) { + if (*p==' ') continue; + if ((*p<'A') || (*p>'z')) return -1; + } +@@ -188,7 +188,7 @@ int afp_parse_url(struct afp_url * url, + return -1; + + } +- if (p==NULL) p=toparse; ++ if (p==NULL) p=(char *)toparse; + + /* Now split on the first / */ + if (sscanf(p,"%[^/]/%[^$]", +diff -up afpfs-ng-0.8.1/lib/did.c.pointer afpfs-ng-0.8.1/lib/did.c +--- afpfs-ng-0.8.1/lib/did.c.pointer 2008-02-18 04:39:17.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/did.c 2011-06-14 17:02:15.000000000 +0200 +@@ -226,7 +226,7 @@ int get_dirid(struct afp_volume * volume + + + /* Go to the end of last known entry */ +- p=path+(p-copy); ++ p=(char *)path+(p-copy); + p2=p; + + while ((p=strchr(p+1,'/'))) { +diff -up afpfs-ng-0.8.1/lib/dsi.c.pointer afpfs-ng-0.8.1/lib/dsi.c +--- afpfs-ng-0.8.1/lib/dsi.c.pointer 2008-02-18 04:53:03.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/dsi.c 2011-06-14 17:02:15.000000000 +0200 +@@ -474,7 +474,7 @@ void dsi_getstatus_reply(struct afp_serv + } + server->flags=ntohs(reply1->flags); + +- p=(void *)((unsigned int) server->incoming_buffer + sizeof(*reply1)); ++ p=(void *)((unsigned long) server->incoming_buffer + sizeof(*reply1)); + p+=copy_from_pascal(server->server_name,p,AFP_SERVER_NAME_LEN)+1; + + /* Now work our way through the variable bits */ +@@ -757,7 +757,7 @@ gotenough: + printf("<<< read() of rest of AFP, %d bytes\n",amount_to_read); + #endif + ret = read(server->fd, (void *) +- (((unsigned int) server->incoming_buffer)+server->data_read), ++ (((unsigned long) server->incoming_buffer)+server->data_read), + amount_to_read); + if (ret<0) return -1; + if (ret==0) { +diff -up afpfs-ng-0.8.1/lib/loop.c.pointer afpfs-ng-0.8.1/lib/loop.c +--- afpfs-ng-0.8.1/lib/loop.c.pointer 2008-02-18 04:40:11.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/loop.c 2011-06-14 17:02:15.000000000 +0200 +@@ -25,7 +25,7 @@ + static unsigned char exit_program=0; + + static pthread_t ending_thread; +-static pthread_t main_thread = NULL; ++static pthread_t main_thread = (pthread_t)NULL; + + static int loop_started=0; + static pthread_cond_t loop_started_condition; +diff -up afpfs-ng-0.8.1/lib/lowlevel.c.pointer afpfs-ng-0.8.1/lib/lowlevel.c +--- afpfs-ng-0.8.1/lib/lowlevel.c.pointer 2008-02-20 02:33:17.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/lowlevel.c 2011-06-14 17:02:15.000000000 +0200 +@@ -582,7 +582,7 @@ int ll_getattr(struct afp_volume * volum + if (volume->server->using_version->av_number>=30) + stbuf->st_mode |= fp.unixprivs.permissions; + else +- set_nonunix_perms(stbuf,&fp); ++ set_nonunix_perms(&stbuf->st_mode,&fp); + + stbuf->st_uid=fp.unixprivs.uid; + stbuf->st_gid=fp.unixprivs.gid; +diff -up afpfs-ng-0.8.1/lib/midlevel.c.pointer afpfs-ng-0.8.1/lib/midlevel.c +--- afpfs-ng-0.8.1/lib/midlevel.c.pointer 2008-03-08 17:08:18.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/midlevel.c 2011-06-14 17:02:15.000000000 +0200 +@@ -713,7 +713,7 @@ int ml_write(struct afp_volume * volume, + { + + int ret,err=0; +- int totalwritten = 0; ++ size_t totalwritten = 0; + uint64_t sizetowrite, ignored; + unsigned char flags = 0; + unsigned int max_packet_size=volume->server->tx_quantum; +diff -up afpfs-ng-0.8.1/lib/proto_attr.c.pointer afpfs-ng-0.8.1/lib/proto_attr.c +--- afpfs-ng-0.8.1/lib/proto_attr.c.pointer 2008-01-30 05:37:58.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_attr.c 2011-06-14 17:02:15.000000000 +0200 +@@ -166,7 +166,7 @@ int afp_getextattr(struct afp_volume * v + copy_path(server,p,pathname,strlen(pathname)); + unixpath_to_afppath(server,p); + p2=p+sizeof_path_header(server)+strlen(pathname); +- if (((unsigned int ) p2) & 0x1) p2++; ++ if (((unsigned long) p2) & 0x1) p2++; + req2=(void *) p2; + + req2->len=htons(namelen); +diff -up afpfs-ng-0.8.1/lib/proto_desktop.c.pointer afpfs-ng-0.8.1/lib/proto_desktop.c +--- afpfs-ng-0.8.1/lib/proto_desktop.c.pointer 2008-02-18 04:44:11.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_desktop.c 2011-06-14 17:02:15.000000000 +0200 +@@ -168,7 +168,7 @@ int afp_getcomment_reply(struct afp_serv + return 0; + } + +-int afp_closedt(struct afp_server * server, unsigned short * refnum) ++int afp_closedt(struct afp_server * server, unsigned short refnum) + { + struct { + struct dsi_header dsi_header __attribute__((__packed__)); +diff -up afpfs-ng-0.8.1/lib/proto_directory.c.pointer afpfs-ng-0.8.1/lib/proto_directory.c +--- afpfs-ng-0.8.1/lib/proto_directory.c.pointer 2008-02-19 03:39:29.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_directory.c 2011-06-14 17:02:15.000000000 +0200 +@@ -248,6 +248,7 @@ int afp_enumerate_reply(struct afp_serve + + return 0; + } ++ + int afp_enumerateext2_reply(struct afp_server *server, char * buf, unsigned int size, void * other) + { + +@@ -266,8 +267,7 @@ int afp_enumerateext2_reply(struct afp_s + char * p = buf + sizeof(*reply); + int i; + char *max=buf+size; +- struct afp_file_info * filebase = NULL, *filecur=NULL, *new_file=NULL; +- void ** x = other; ++ struct afp_file_info * filebase = NULL, *filecur = NULL, *new_file = NULL, **x = (struct afp_file_info **) other; + + if (reply->dsi_header.return_code.error_code) { + return reply->dsi_header.return_code.error_code; +diff -up afpfs-ng-0.8.1/lib/proto_map.c.pointer afpfs-ng-0.8.1/lib/proto_map.c +--- afpfs-ng-0.8.1/lib/proto_map.c.pointer 2008-01-30 05:37:59.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_map.c 2011-06-14 17:02:15.000000000 +0200 +@@ -122,7 +122,7 @@ int afp_mapid_reply(struct afp_server *s + + if (reply->header.return_code.error_code!=kFPNoErr) return -1; + +- copy_from_pascal_two(name,&reply->name,255); ++ copy_from_pascal_two(name,reply->name,255); + + return 0; + } +diff -up afpfs-ng-0.8.1/lib/proto_session.c.pointer afpfs-ng-0.8.1/lib/proto_session.c +--- afpfs-ng-0.8.1/lib/proto_session.c.pointer 2008-02-18 04:46:19.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/proto_session.c 2011-06-14 17:02:15.000000000 +0200 +@@ -39,7 +39,7 @@ int afp_getsessiontoken(struct afp_serve + switch (type) { + case kLoginWithTimeAndID: + case kReconnWithTimeAndID: { +- uint32_t *p = (void *) (((unsigned int) request)+ ++ uint32_t *p = (void *) (((unsigned long) request)+ + sizeof(*request)); + + offset=sizeof(timestamp); +@@ -63,7 +63,7 @@ int afp_getsessiontoken(struct afp_serve + goto error; + } + +- data=(void *) (((unsigned int) request)+sizeof(*request)+offset); ++ data=(void *) (((unsigned long) request)+sizeof(*request)+offset); + request->idlength=htonl(datalen); + request->pad=0; + request->type=htons(type); +@@ -127,7 +127,7 @@ int afp_disconnectoldsession(struct afp_ + if ((request=malloc(sizeof(*request) + AFP_TOKEN_MAX_LEN))==NULL) + return -1; + +- token_data = request + sizeof(*request); ++ token_data = (char *)request + sizeof(*request); + + request->type=htons(type); + +diff -up afpfs-ng-0.8.1/lib/uams.c.pointer afpfs-ng-0.8.1/lib/uams.c +--- afpfs-ng-0.8.1/lib/uams.c.pointer 2008-01-04 04:52:44.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/uams.c 2011-06-14 17:02:15.000000000 +0200 +@@ -180,7 +180,7 @@ static int cleartxt_login(struct afp_ser + goto cleartxt_fail; + + p += copy_to_pascal(p, username) + 1; +- if ((int)p & 0x1) ++ if ((long)p & 0x1) + len--; + else + p++; +@@ -230,7 +230,7 @@ static int cleartxt_passwd(struct afp_se + goto cleartxt_fail; + + p += copy_to_pascal(p, username) + 1; +- if ((int)p & 0x1) ++ if ((long)p & 0x1) + len--; + else + p++; +@@ -580,7 +580,7 @@ static int dhx_login(struct afp_server * + if (ai == NULL) + goto dhx_noctx_fail; + d += copy_to_pascal(ai, username) + 1; +- if (((int)d) % 2) ++ if (((long)d) % 2) + d++; + else + ai_len--; +diff -up afpfs-ng-0.8.1/lib/utils.c.pointer afpfs-ng-0.8.1/lib/utils.c +--- afpfs-ng-0.8.1/lib/utils.c.pointer 2008-02-18 04:53:37.000000000 +0100 ++++ afpfs-ng-0.8.1/lib/utils.c 2011-06-14 17:02:15.000000000 +0200 +@@ -196,7 +196,7 @@ int invalid_filename(struct afp_server * + maxlen=255; + + +- p=filename+1; ++ p=(char *)filename+1; + while ((q=strchr(p,'/'))) { + if (q>p+maxlen) + return 1; diff --git a/afpfs-ng-c99.patch b/afpfs-ng-c99.patch new file mode 100644 index 0000000..ea7c282 --- /dev/null +++ b/afpfs-ng-c99.patch @@ -0,0 +1,164 @@ +Add additional #include directives for more function prototypes, +to avoid implicit function declarations. Declare appledouble_write, +cmdline_afp_setup_client in the appropriate header files. + +These changes expose an argument type mismatch in the function +appledouble_truncate, in the calls to remove_opened_fork. This may +or may have not worked before, depending on how the ABI implements +passing this struct by value. + +The use of basename in start_afpfsd is suspect; this should probaby use +dirname instead. + +Submitted upstream: + +diff --git a/cmdline/cmdline_afp.h b/cmdline/cmdline_afp.h +index ebdf357fc952972c..e0ec4570f69b71ec 100644 +--- a/cmdline/cmdline_afp.h ++++ b/cmdline/cmdline_afp.h +@@ -28,5 +28,6 @@ int com_disconnect(char * arg); + void cmdline_afp_exit(void); + + int cmdline_afp_setup(int recursive, char * url_string); ++void cmdline_afp_setup_client(void); + + #endif +diff --git a/cmdline/cmdline_main.c b/cmdline/cmdline_main.c +index ffb39ebacb8f262c..deccf8a4cc342bf0 100644 +--- a/cmdline/cmdline_main.c ++++ b/cmdline/cmdline_main.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include "afp.h" + #include "cmdline_afp.h" + #include "cmdline_testafp.h" + +diff --git a/fuse/client.c b/fuse/client.c +index d19e9efb2dcb60b7..beceaa5594a89b80 100644 +--- a/fuse/client.c ++++ b/fuse/client.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "config.h" + #include +diff --git a/fuse/daemon.c b/fuse/daemon.c +index 8b3b8d9146633518..abf6c02e390142b2 100644 +--- a/fuse/daemon.c ++++ b/fuse/daemon.c +@@ -23,6 +23,8 @@ + #include + #include + ++#include ++ + #include "afp.h" + + #include "dsi.h" +diff --git a/lib/dsi.c b/lib/dsi.c +index 8a469794542ec447..3fd10fb24c770ca8 100644 +--- a/lib/dsi.c ++++ b/lib/dsi.c +@@ -27,6 +27,7 @@ + #include "libafpclient.h" + #include "afp_internal.h" + #include "afp_replies.h" ++#include "codepage.h" + + /* define this in order to get reams of DSI debugging information */ + #undef DEBUG_DSI +diff --git a/lib/lowlevel.c b/lib/lowlevel.c +index f3b632c2ae2da763..1edc9cdce5cc8429 100644 +--- a/lib/lowlevel.c ++++ b/lib/lowlevel.c +@@ -25,6 +25,8 @@ + #include "utils.h" + #include "did.h" + #include "users.h" ++#include "midlevel.h" ++#include "forklist.h" + + static void set_nonunix_perms(unsigned int * mode, struct afp_file_info *fp) + { +diff --git a/lib/proto_files.c b/lib/proto_files.c +index 933956da6a6d2ce6..d2acd562a2671869 100644 +--- a/lib/proto_files.c ++++ b/lib/proto_files.c +@@ -14,6 +14,7 @@ + #include "dsi_protocol.h" + #include "afp_protocol.h" + #include "afp_internal.h" ++#include "afp_replies.h" + + /* afp_setfileparms, afp_setdirparms and afpsetfiledirparms are all remarkably + similiar. We abstract them to afp-setparms_lowlevel. */ +diff --git a/lib/proto_replyblock.c b/lib/proto_replyblock.c +index f66791614a52ca3d..c59629b24ab83cec 100644 +--- a/lib/proto_replyblock.c ++++ b/lib/proto_replyblock.c +@@ -10,6 +10,7 @@ + #include "afp.h" + #include "utils.h" + #include "afp_internal.h" ++#include "afp_replies.h" + + + /* FIXME: should do bounds checking */ +diff --git a/lib/resource.c b/lib/resource.c +index 6be4a5b1de51fec5..fb39889f0d7702c0 100644 +--- a/lib/resource.c ++++ b/lib/resource.c +@@ -8,6 +8,7 @@ + #include "lowlevel.h" + #include "did.h" + #include "midlevel.h" ++#include "forklist.h" + + #define appledouble ".AppleDouble" + #define finderinfo_string ".finderinfo" +@@ -362,12 +363,12 @@ int appledouble_truncate(struct afp_volume * volume, const char * path, int offs + ret=ll_zero_file(volume,fp.forkid,0); + if (ret<0) { + afp_closefork(volume,fp.forkid); +- remove_opened_fork(volume,fp); ++ remove_opened_fork(volume,&fp); + free(newpath); + return ret; + } + afp_closefork(volume,fp.forkid); +- remove_opened_fork(volume,fp); ++ remove_opened_fork(volume,&fp); + + return 1; + case AFP_META_APPLEDOUBLE: +diff --git a/lib/resource.h b/lib/resource.h +index 6a0d38a6275dd6f5..2efff106c94e6637 100644 +--- a/lib/resource.h ++++ b/lib/resource.h +@@ -31,6 +31,9 @@ int appledouble_read(struct afp_volume * volume, struct afp_file_info *fp, + + int appledouble_close(struct afp_volume * volume, struct afp_file_info * fp); + ++int appledouble_write(struct afp_volume * volume, struct afp_file_info *fp, ++ const char *data, size_t size, off_t offset, size_t *totalwritten); ++ + int appledouble_chmod(struct afp_volume * volume, const char * path, mode_t mode); + + int appledouble_unlink(struct afp_volume * volume, const char *path); +diff --git a/lib/server.c b/lib/server.c +index 977c418efccae88b..93400dd92a4c0af6 100644 +--- a/lib/server.c ++++ b/lib/server.c +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include "afp.h" + #include "dsi.h" diff --git a/afpfs-ng.spec b/afpfs-ng.spec new file mode 100644 index 0000000..b686810 --- /dev/null +++ b/afpfs-ng.spec @@ -0,0 +1,267 @@ +Name: afpfs-ng +Version: 0.8.1 +Release: 48%{?dist} +Summary: Apple Filing Protocol client + + +# by default build with the fuse module +# rpmbuild --rebuild afpfs-ng.src.rpm --without fuse +%bcond_without fuse + + +License: GPL-1.0-or-later +URL: http://alexthepuffin.googlepages.com/home +Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 +Patch0: afpfs-ng-0.8.1-overflows.patch +Patch1: afpfs-ng-0.8.1-pointer.patch +# Sent by e-mail to Alex deVries +Patch2: afpfs-ng-0.8.1-formatsec.patch +Patch3: afpfs-ng-0.8.1-longoptions.patch +Patch4: afpfs-ng-c99.patch + +%{?with_fuse:BuildRequires: fuse-devel} +BuildRequires: gcc +BuildRequires: libgcrypt-devel gmp-devel readline-devel +BuildRequires: make +BuildRequires: libtool +BuildRequires: autoconf + + +%description +A command line client to access files exported from Mac OS system via +Apple Filing Protocol. +%{?with_fuse:The FUSE filesystem module for AFP is in fuse-afp package} + + +%if 0%{?with_fuse} +%package -n fuse-afp +Summary: FUSE driver for AFP filesystem + +%description -n fuse-afp +A FUSE file system server to access files exported from Mac OS system +via AppleTalk or TCP using Apple Filing Protocol. +The command line client for AFP is in fuse-afp package +%endif + + +%package devel +Summary: Development files for afpfs-ng +Requires: %{name} = %{version} + +%description devel +Library for dynamic linking and header files of afpfs-ng. + +%prep +%autosetup -p 1 +libtoolize +autoreconf + +%build +# make would rebuild the autoconf infrastructure due to the following: +# Prerequisite `configure.ac' is newer than target `Makefile.in'. +# Prerequisite `aclocal.m4' is newer than target `Makefile.in'. +# Prerequisite `configure.ac' is newer than target `aclocal.m4'. +touch --reference aclocal.m4 configure.ac Makefile.in + +export CFLAGS="${RPM_OPT_FLAGS} -fcommon" +%configure %{?!with_fuse:--disable-fuse} --disable-static +make %{?_smp_mflags} + + +%install +%make_install +install -d %{buildroot}%{_includedir}/afpfs-ng +cp -p include/* %{buildroot}%{_includedir}/afpfs-ng +# libtool .la file works different in different versions of libtool, should not be packaged +[ -f %{buildroot}%{_libdir}/libafpclient.la ] && rm -f %{buildroot}%{_libdir}/libafpclient.la + +%if ( 0%{?rhel} && 0%{?rhel} <= 7 ) +%ldconfig_scriptlets +%endif + + +%files +%license COPYING +%{_bindir}/afpcmd +%{_bindir}/afpgetstatus +%{_mandir}/man1/afpcmd.1* +%{_mandir}/man1/afpgetstatus.1* +%{_libdir}/libafpclient.so.* +%doc AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt + + +%if 0%{?with_fuse} +%files -n fuse-afp +%license COPYING +%{_bindir}/afp_client +%{_bindir}/afpfs +%{_bindir}/afpfsd +%{_bindir}/mount_afp +%{_mandir}/man1/afp_client.1* +%{_mandir}/man1/afpfsd.1* +%{_mandir}/man1/mount_afp.1* +%doc AUTHORS ChangeLog +%endif + + +%files devel +%{_includedir}/afpfs-ng +%{_libdir}/*.so + +%changelog +* Thu Jan 16 2025 Fedora Release Engineering - 0.8.1-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 17 2024 Fedora Release Engineering - 0.8.1-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jun 17 2024 Miroslav Suchý - 0.8.1-46 +- convert license to SPDX + +* Mon Jan 22 2024 Fedora Release Engineering - 0.8.1-45 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 0.8.1-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 0.8.1-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 18 2023 Fedora Release Engineering - 0.8.1-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Dec 21 2022 Florian Weimer - 0.8.1-41 +- Port to C99 + +* Tue Oct 25 2022 Michal Ambroz - 0.8.1-40 +- remove the libafpclient.la libtool file + +* Wed Jul 20 2022 Fedora Release Engineering - 0.8.1-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 0.8.1-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Nov 17 2021 Michal Ambroz - 0.8.1-37 +- update embedded libtool (ltmain.sh) + +* Wed Jul 21 2021 Fedora Release Engineering - 0.8.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Apr 26 2021 Michal Ambroz - 0.8.1-35 +- modernize spec, push the bugfix to active branches + +* Fri Mar 12 2021 Michal Ambroz - 0.8.1-34 +- fix issue 1507944 + +* Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jul 31 2020 Fedora Release Engineering - 0.8.1-32 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 0.8.1-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Apr 22 2020 Michal Ambroz - 0.8.1-30 +- fix FTBFS - multiple definition of - build legacy code with -fcommon + +* Tue Jan 28 2020 Fedora Release Engineering - 0.8.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 0.8.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 17 2019 Igor Gnatenko - 0.8.1-27 +- Rebuild for readline 8.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 0.8.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 0.8.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.8.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 0.8.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.8.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.8.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 0.8.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jun 16 2015 Fedora Release Engineering - 0.8.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Nov 25 2014 - 0.8.1-18 +- Fix mount_afp crash (RHBZ #1165296) + +* Fri Aug 15 2014 Fedora Release Engineering - 0.8.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.8.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Apr 22 2014 Tomáš Mráz - 0.8.1-15 +- Rebuild for new libgcrypt + +* Wed Dec 04 2013 Lubomir Rintel - 0.8.1-14 +- Fix build with -Werror=format-security + +* Thu Oct 24 2013 Lubomir Rintel - 0.8.1-13.3 +- Bulk sad and useless attempt at consistent SPEC file formatting + +* Sat Aug 03 2013 Fedora Release Engineering - 0.8.1-12.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 0.8.1-11.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 0.8.1-10.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 0.8.1-9.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Oct 20 2011 Marcela Mašláňová - 0.8.1-8.3 +- rebuild with new gmp without compat lib + +* Mon Oct 10 2011 Peter Schiffer - 0.8.1-8.2 +- rebuild with new gmp + +* Mon Sep 26 2011 Peter Schiffer - 0.8.1-8.1 +- rebuild with new gmp + +* Mon Jul 4 2011 Jan F. Chadima - 0.8.1-8 +- Repair ponter arithmetic + +* Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Sep 17 2009 Peter Lemenkov - 0.8.1-6 +- Rebuild with new fuse + +* Fri Jul 24 2009 Fedora Release Engineering - 0.8.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jul 17 2009 Lubomir Rintel - 0.8.1-4 +- Don't refer to AppleTalk in Summary + +* Tue Jul 14 2009 Lubomir Rintel - 0.8.1-3 +- Fix up license tag + +* Thu Mar 19 2009 Lubomir Rintel - 0.8.1-2 +- Add more include files (Jan F. Chadima) +- Don't needlessly build static library (Stefan Kasal) +- Fix fuse-afp summary (Stefan Kasal) +- Remove redundant license file from -devel (Stefan Kasal) + +* Mon Oct 6 2008 Lubomir Rintel - 0.8.1-1 +- Initial packaging attempt diff --git a/dead.package b/dead.package deleted file mode 100644 index b37fb02..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Retired: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/DRIWVJ7BVL3KVVX5TLC36LJPDMAO72HF/ diff --git a/sources b/sources new file mode 100644 index 0000000..4bd856f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +1bdd9f8a06e6085ea4cc38ce010ef60b afpfs-ng-0.8.1.tar.bz2 From 02badb24224703ed5e711c95bf86db934932a6fb Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Fri, 7 Feb 2025 12:25:35 +0100 Subject: [PATCH 65/68] adding changelog --- changelog | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..b96c06b --- /dev/null +++ b/changelog @@ -0,0 +1,147 @@ +* Mon Jan 22 2024 Fedora Release Engineering - 0.8.1-45 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 0.8.1-44 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 0.8.1-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 18 2023 Fedora Release Engineering - 0.8.1-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Dec 21 2022 Florian Weimer - 0.8.1-41 +- Port to C99 + +* Tue Oct 25 2022 Michal Ambroz - 0.8.1-40 +- remove the libafpclient.la libtool file + +* Wed Jul 20 2022 Fedora Release Engineering - 0.8.1-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 0.8.1-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Nov 17 2021 Michal Ambroz - 0.8.1-37 +- update embedded libtool (ltmain.sh) + +* Wed Jul 21 2021 Fedora Release Engineering - 0.8.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Apr 26 2021 Michal Ambroz - 0.8.1-35 +- modernize spec, push the bugfix to active branches + +* Fri Mar 12 2021 Michal Ambroz - 0.8.1-34 +- fix issue 1507944 + +* Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Jul 31 2020 Fedora Release Engineering - 0.8.1-32 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 0.8.1-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Apr 22 2020 Michal Ambroz - 0.8.1-30 +- fix FTBFS - multiple definition of - build legacy code with -fcommon + +* Tue Jan 28 2020 Fedora Release Engineering - 0.8.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 0.8.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 17 2019 Igor Gnatenko - 0.8.1-27 +- Rebuild for readline 8.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 0.8.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 0.8.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.8.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 0.8.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.8.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.8.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 0.8.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jun 16 2015 Fedora Release Engineering - 0.8.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Nov 25 2014 - 0.8.1-18 +- Fix mount_afp crash (RHBZ #1165296) + +* Fri Aug 15 2014 Fedora Release Engineering - 0.8.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.8.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Apr 22 2014 Tomáš Mráz - 0.8.1-15 +- Rebuild for new libgcrypt + +* Wed Dec 04 2013 Lubomir Rintel - 0.8.1-14 +- Fix build with -Werror=format-security + +* Thu Oct 24 2013 Lubomir Rintel - 0.8.1-13.3 +- Bulk sad and useless attempt at consistent SPEC file formatting + +* Sat Aug 03 2013 Fedora Release Engineering - 0.8.1-12.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 0.8.1-11.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 0.8.1-10.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 0.8.1-9.3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Oct 20 2011 Marcela Mašláňová - 0.8.1-8.3 +- rebuild with new gmp without compat lib + +* Mon Oct 10 2011 Peter Schiffer - 0.8.1-8.2 +- rebuild with new gmp + +* Mon Sep 26 2011 Peter Schiffer - 0.8.1-8.1 +- rebuild with new gmp + +* Mon Jul 4 2011 Jan F. Chadima - 0.8.1-8 +- Repair ponter arithmetic + +* Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Sep 17 2009 Peter Lemenkov - 0.8.1-6 +- Rebuild with new fuse + +* Fri Jul 24 2009 Fedora Release Engineering - 0.8.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jul 17 2009 Lubomir Rintel - 0.8.1-4 +- Don't refer to AppleTalk in Summary + +* Tue Jul 14 2009 Lubomir Rintel - 0.8.1-3 +- Fix up license tag + +* Thu Mar 19 2009 Lubomir Rintel - 0.8.1-2 +- Add more include files (Jan F. Chadima) +- Don't needlessly build static library (Stefan Kasal) +- Fix fuse-afp summary (Stefan Kasal) +- Remove redundant license file from -devel (Stefan Kasal) + +* Mon Oct 6 2008 Lubomir Rintel - 0.8.1-1 +- Initial packaging attempt From d0216f4017b11addaaa0090677e5a33cab2063be Mon Sep 17 00:00:00 2001 From: Michal Ambroz Date: Fri, 7 Feb 2025 12:27:34 +0100 Subject: [PATCH 66/68] rebuild with gcc15 + fedora hardening --- ...s-ng-c99.patch => afpfs-ng-0.8.1-c99.patch | 0 afpfs-ng-0.8.1-pointer2.patch | 109 ++++++++++++ afpfs-ng-0.8.1-tests.patch | 30 ++++ afpfs-ng.spec | 167 +----------------- 4 files changed, 146 insertions(+), 160 deletions(-) rename afpfs-ng-c99.patch => afpfs-ng-0.8.1-c99.patch (100%) create mode 100644 afpfs-ng-0.8.1-pointer2.patch create mode 100644 afpfs-ng-0.8.1-tests.patch diff --git a/afpfs-ng-c99.patch b/afpfs-ng-0.8.1-c99.patch similarity index 100% rename from afpfs-ng-c99.patch rename to afpfs-ng-0.8.1-c99.patch diff --git a/afpfs-ng-0.8.1-pointer2.patch b/afpfs-ng-0.8.1-pointer2.patch new file mode 100644 index 0000000..854c858 --- /dev/null +++ b/afpfs-ng-0.8.1-pointer2.patch @@ -0,0 +1,109 @@ +diff -ru afpfs-ng-0.8.1.orig/lib/loop.c afpfs-ng-0.8.1.new/lib/loop.c +--- afpfs-ng-0.8.1.orig/lib/loop.c 2025-02-06 15:18:29.028488247 +0100 ++++ afpfs-ng-0.8.1.new/lib/loop.c 2025-02-06 15:02:08.261418298 +0100 +@@ -87,7 +87,7 @@ + static int ending=0; + void * just_end_it_now(void * ignore) + { +- if (ending) return; ++ if (ending) return(NULL); + ending=1; + if (libafpclient->forced_ending_hook) + libafpclient->forced_ending_hook(); +diff -ru afpfs-ng-0.8.1.orig/lib/proto_directory.c afpfs-ng-0.8.1.new/lib/proto_directory.c +--- afpfs-ng-0.8.1.orig/lib/proto_directory.c 2025-02-06 15:18:29.030488258 +0100 ++++ afpfs-ng-0.8.1.new/lib/proto_directory.c 2025-02-06 15:17:58.862309936 +0100 +@@ -16,6 +16,19 @@ + #include "dsi_protocol.h" + #include "afp_replies.h" + ++typedef struct reply_entry { ++ uint8_t size; ++ uint8_t isdir; ++}; ++ ++typedef struct ext2_reply_entry { ++ uint16_t size; ++ uint8_t isdir; ++ uint8_t pad; ++}; ++ ++ ++ + int afp_moveandrename(struct afp_volume *volume, + unsigned int src_did, + unsigned int dst_did, +@@ -200,10 +213,7 @@ + uint16_t reqcount; + } __attribute__((__packed__)) * reply = (void *) buf; + +- struct { +- uint8_t size; +- uint8_t isdir; +- } __attribute__((__packed__)) * entry; ++ struct reply_entry __attribute__((__packed__)) * entry; + char * p = buf + sizeof(*reply); + int i; + char *max=buf+size; +@@ -219,7 +229,7 @@ + } + + for (i=0;ireqcount);i++) { +- entry = (void *) p; ++ entry = ( struct reply_entry *) p; + + if (p>max) { + return -1; +@@ -259,11 +269,7 @@ + uint16_t reqcount; + } __attribute__((__packed__)) * reply = (void *) buf; + +- struct { +- uint16_t size; +- uint8_t isdir; +- uint8_t pad; +- } __attribute__((__packed__)) * entry; ++ struct ext2_reply_entry __attribute__((__packed__)) * entry; + char * p = buf + sizeof(*reply); + int i; + char *max=buf+size; +@@ -293,7 +299,7 @@ + filecur=new_file; + } + +- entry = p; ++ entry = ( struct ext2_reply_entry *) p; + + parse_reply_block(server,p+sizeof(*entry), + ntohs(entry->size),entry->isdir, +diff -ru afpfs-ng-0.8.1.orig/lib/uams.c afpfs-ng-0.8.1.new/lib/uams.c +--- afpfs-ng-0.8.1.orig/lib/uams.c 2025-02-06 15:18:29.030488258 +0100 ++++ afpfs-ng-0.8.1.new/lib/uams.c 2025-02-06 15:00:32.383809018 +0100 +@@ -36,7 +36,7 @@ + static int cleartxt_login(struct afp_server *server, char *username, + char *passwd); + static int cleartxt_passwd(struct afp_server *server, char *username, +- char *passwd); ++ char *passwd, char *newpasswd); + #ifdef HAVE_LIBGCRYPT + static int randnum_login(struct afp_server *server, char *username, + char *passwd); +@@ -49,8 +49,7 @@ + static struct afp_uam uam_noauth = + {UAM_NOUSERAUTHENT,"No User Authent",&noauth_login,NULL,NULL}; + static struct afp_uam uam_cleartxt = +- {UAM_CLEARTXTPASSWRD,"Cleartxt Passwrd",&cleartxt_login, +- &cleartxt_passwd,NULL}; ++ {UAM_CLEARTXTPASSWRD,"Cleartxt Passwrd",&cleartxt_login,&cleartxt_passwd,NULL}; + #ifdef HAVE_LIBGCRYPT + static struct afp_uam uam_randnum = + {UAM_RANDNUMEXCHANGE, "Randnum Exchange", &randnum_login,NULL,NULL}; +@@ -219,7 +218,7 @@ + * +------------------+ + */ + static int cleartxt_passwd(struct afp_server *server, +- char *username, char *passwd) { ++ char *username, char *passwd, char *newpasswd) { + + char *p, *ai = NULL; + int len, ret; diff --git a/afpfs-ng-0.8.1-tests.patch b/afpfs-ng-0.8.1-tests.patch new file mode 100644 index 0000000..7381b8d --- /dev/null +++ b/afpfs-ng-0.8.1-tests.patch @@ -0,0 +1,30 @@ +diff -ru afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.c afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.c +--- afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.c 2025-02-06 15:22:10.187795481 +0100 ++++ afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.c 2025-02-06 15:30:13.226751326 +0100 +@@ -31,7 +31,7 @@ + snprintf(valid_url.path,sizeof(valid_url.path),"%s",path); + snprintf(valid_url.username,sizeof(valid_url.username),"%s",username); + snprintf(valid_url.password,sizeof(valid_url.password),"%s",password); +- snprintf(valid_url.uamname,(valid_url.uamname),"%s",uamname); ++ snprintf(valid_url.uamname,sizeof(valid_url.uamname),"%s",uamname); + valid_url.port=port; + + if (afp_url_validate(url_string,&valid_url)) +@@ -42,7 +42,7 @@ + return 0; + } + +-int test_urls(void) ++int test_urls(char * arg) + { + + printf("Testing URL parsing\n"); +diff -ru afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.h afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.h +--- afpfs-ng-0.8.1.old/cmdline/cmdline_testafp.h 2008-01-05 06:00:57.000000000 +0100 ++++ afpfs-ng-0.8.1.new/cmdline/cmdline_testafp.h 2025-02-06 15:30:51.577987329 +0100 +@@ -1,4 +1,4 @@ + #ifndef __CMDLINE_TESTAFP_H_ +-int test_urls(void); ++int test_urls(char * arg); + #endif + diff --git a/afpfs-ng.spec b/afpfs-ng.spec index b686810..1a47802 100644 --- a/afpfs-ng.spec +++ b/afpfs-ng.spec @@ -1,6 +1,6 @@ Name: afpfs-ng Version: 0.8.1 -Release: 48%{?dist} +Release: %autorelease Summary: Apple Filing Protocol client @@ -9,7 +9,7 @@ Summary: Apple Filing Protocol client %bcond_without fuse -License: GPL-1.0-or-later +License: GPL-2.0-or-later URL: http://alexthepuffin.googlepages.com/home Source0: http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2 Patch0: afpfs-ng-0.8.1-overflows.patch @@ -17,7 +17,9 @@ Patch1: afpfs-ng-0.8.1-pointer.patch # Sent by e-mail to Alex deVries Patch2: afpfs-ng-0.8.1-formatsec.patch Patch3: afpfs-ng-0.8.1-longoptions.patch -Patch4: afpfs-ng-c99.patch +Patch4: afpfs-ng-0.8.1-c99.patch +Patch5: afpfs-ng-0.8.1-pointer2.patch +Patch6: afpfs-ng-0.8.1-tests.patch %{?with_fuse:BuildRequires: fuse-devel} BuildRequires: gcc @@ -63,7 +65,7 @@ autoreconf # Prerequisite `configure.ac' is newer than target `aclocal.m4'. touch --reference aclocal.m4 configure.ac Makefile.in -export CFLAGS="${RPM_OPT_FLAGS} -fcommon" +export CFLAGS="${RPM_OPT_FLAGS} -fcommon -D NeedFunctionPrototypes" %configure %{?!with_fuse:--disable-fuse} --disable-static make %{?_smp_mflags} @@ -109,159 +111,4 @@ cp -p include/* %{buildroot}%{_includedir}/afpfs-ng %{_libdir}/*.so %changelog -* Thu Jan 16 2025 Fedora Release Engineering - 0.8.1-48 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jul 17 2024 Fedora Release Engineering - 0.8.1-47 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jun 17 2024 Miroslav Suchý - 0.8.1-46 -- convert license to SPDX - -* Mon Jan 22 2024 Fedora Release Engineering - 0.8.1-45 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 0.8.1-44 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jul 19 2023 Fedora Release Engineering - 0.8.1-43 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jan 18 2023 Fedora Release Engineering - 0.8.1-42 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Dec 21 2022 Florian Weimer - 0.8.1-41 -- Port to C99 - -* Tue Oct 25 2022 Michal Ambroz - 0.8.1-40 -- remove the libafpclient.la libtool file - -* Wed Jul 20 2022 Fedora Release Engineering - 0.8.1-39 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 19 2022 Fedora Release Engineering - 0.8.1-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Nov 17 2021 Michal Ambroz - 0.8.1-37 -- update embedded libtool (ltmain.sh) - -* Wed Jul 21 2021 Fedora Release Engineering - 0.8.1-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Mon Apr 26 2021 Michal Ambroz - 0.8.1-35 -- modernize spec, push the bugfix to active branches - -* Fri Mar 12 2021 Michal Ambroz - 0.8.1-34 -- fix issue 1507944 - -* Mon Jan 25 2021 Fedora Release Engineering - 0.8.1-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Fri Jul 31 2020 Fedora Release Engineering - 0.8.1-32 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 0.8.1-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Apr 22 2020 Michal Ambroz - 0.8.1-30 -- fix FTBFS - multiple definition of - build legacy code with -fcommon - -* Tue Jan 28 2020 Fedora Release Engineering - 0.8.1-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Jul 24 2019 Fedora Release Engineering - 0.8.1-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 17 2019 Igor Gnatenko - 0.8.1-27 -- Rebuild for readline 8.0 - -* Thu Jan 31 2019 Fedora Release Engineering - 0.8.1-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jul 12 2018 Fedora Release Engineering - 0.8.1-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 0.8.1-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 02 2017 Fedora Release Engineering - 0.8.1-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.8.1-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 0.8.1-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Feb 03 2016 Fedora Release Engineering - 0.8.1-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jun 16 2015 Fedora Release Engineering - 0.8.1-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue Nov 25 2014 - 0.8.1-18 -- Fix mount_afp crash (RHBZ #1165296) - -* Fri Aug 15 2014 Fedora Release Engineering - 0.8.1-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.8.1-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Apr 22 2014 Tomáš Mráz - 0.8.1-15 -- Rebuild for new libgcrypt - -* Wed Dec 04 2013 Lubomir Rintel - 0.8.1-14 -- Fix build with -Werror=format-security - -* Thu Oct 24 2013 Lubomir Rintel - 0.8.1-13.3 -- Bulk sad and useless attempt at consistent SPEC file formatting - -* Sat Aug 03 2013 Fedora Release Engineering - 0.8.1-12.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Feb 13 2013 Fedora Release Engineering - 0.8.1-11.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jul 18 2012 Fedora Release Engineering - 0.8.1-10.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Jan 12 2012 Fedora Release Engineering - 0.8.1-9.3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Oct 20 2011 Marcela Mašláňová - 0.8.1-8.3 -- rebuild with new gmp without compat lib - -* Mon Oct 10 2011 Peter Schiffer - 0.8.1-8.2 -- rebuild with new gmp - -* Mon Sep 26 2011 Peter Schiffer - 0.8.1-8.1 -- rebuild with new gmp - -* Mon Jul 4 2011 Jan F. Chadima - 0.8.1-8 -- Repair ponter arithmetic - -* Mon Feb 07 2011 Fedora Release Engineering - 0.8.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Thu Sep 17 2009 Peter Lemenkov - 0.8.1-6 -- Rebuild with new fuse - -* Fri Jul 24 2009 Fedora Release Engineering - 0.8.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Jul 17 2009 Lubomir Rintel - 0.8.1-4 -- Don't refer to AppleTalk in Summary - -* Tue Jul 14 2009 Lubomir Rintel - 0.8.1-3 -- Fix up license tag - -* Thu Mar 19 2009 Lubomir Rintel - 0.8.1-2 -- Add more include files (Jan F. Chadima) -- Don't needlessly build static library (Stefan Kasal) -- Fix fuse-afp summary (Stefan Kasal) -- Remove redundant license file from -devel (Stefan Kasal) - -* Mon Oct 6 2008 Lubomir Rintel - 0.8.1-1 -- Initial packaging attempt +%autochangelog From 74f08aa2b16becda94a11fd5e4bc324922667cfd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 16:49:06 +0000 Subject: [PATCH 67/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 94d03d8b7ab0744574f5f517c39d12ba38ed5fd5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 16 Jan 2026 03:30:22 +0000 Subject: [PATCH 68/68] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild