summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Bunkus2018-08-11 10:57:41 +0200
committerMoritz Bunkus2018-08-11 10:57:41 +0200
commit060c25e1dcdc67409f218019b8864d30704e9c7d (patch)
tree5e055da7677f5fa0c5c72eff73aa480476a2c856
parent6ed143d8d61bf59528fb0a3d8889ec8c762eec04 (diff)
downloadaur-060c25e1dcdc67409f218019b8864d30704e9c7d.tar.gz
add patches for building against attr-2.4.48
-rw-r--r--.SRCINFO8
-rw-r--r--0001-Port-Linux-to-sys-xattr.h.patch73
-rw-r--r--0002-Remove-dependency-on-attr-library-on-Linux.patch92
-rw-r--r--PKGBUILD16
4 files changed, 185 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 89284ef45c9a..a70494b3f0fd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,20 @@
+# Generated by mksrcinfo v8
+# Sat Aug 11 08:55:53 UTC 2018
pkgbase = perl-file-extattr
pkgdesc = Perl extension for accessing extended attributes of files
pkgver = 1.09
- pkgrel = 1
+ pkgrel = 2
url = http://search.cpan.org/dist/File-ExtAttr
arch = any
license = GPL
license = PerlArtistic
options = !emptydirs
source = http://search.cpan.org/CPAN/authors/id/R/RI/RICHDAWE/File-ExtAttr-1.09.tar.gz
+ source = 0001-Port-Linux-to-sys-xattr.h.patch
+ source = 0002-Remove-dependency-on-attr-library-on-Linux.patch
sha512sums = eca00420bef313ac711bf1d64323e051acc8eb77ab8e267067f586e78dc42d43f685fe571c7856186c998e939dd2761d24650c61297c24486bc005dddf6b4bb3
+ sha512sums = 5025f2bbfa5f7e543a693aab87774ed2b514de12192886c366aebdf58f3a12fbc7047dc97b61a5577557497bc66ebb25c6c7f52b79f8efbe565943e9c01c57d6
+ sha512sums = 2ba18bf66f11d85acc0002b94a48e5f3943ac994d43825f49fd16b41d5728285786913df1bca0fb648e08545ae8a34b301c61c93c7661ecd0722587343247ede
pkgname = perl-file-extattr
diff --git a/0001-Port-Linux-to-sys-xattr.h.patch b/0001-Port-Linux-to-sys-xattr.h.patch
new file mode 100644
index 000000000000..591864bd72e0
--- /dev/null
+++ b/0001-Port-Linux-to-sys-xattr.h.patch
@@ -0,0 +1,73 @@
+From fedfb42a5dac5b86894daad5c9372fa4d7ce4d01 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Tue, 10 Jul 2018 11:49:35 +0200
+Subject: [PATCH 1/2] Port Linux to <sys/xattr.h>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+attr-2.4.48 removed <attr/xattr.h> because glibc had been provided
+<sys/xattr.h> with the same declarations for ages.
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ Makefile.PL | 4 ++--
+ README | 4 ++--
+ extattr_linux.h | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index ee3ba17..1694780 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -6,7 +6,7 @@ use File::Temp qw/tempdir/;
+ use IO::File;
+ use strict;
+
+-# Check whether we have <attr/attributes.h> and <attr/xattr.h> on Linux.
++# Check whether we have <attr/attributes.h> and <sys/xattr.h> on Linux.
+ # Suggest what the user needs to install, to get these files.
+
+ if ($^O eq 'linux') {
+@@ -20,7 +20,7 @@ if ($^O eq 'linux')
+ {
+ my %headers = (
+ 'attr/attributes.h' => 0,
+- 'attr/xattr.h' => 0,
++ 'sys/xattr.h' => 0,
+ );
+ my $incdir;
+ my $missing = 0;
+diff --git a/README b/README
+index e45c31e..4d40f1d 100644
+--- a/README
++++ b/README
+@@ -42,10 +42,10 @@ use a different file system, e.g.:
+ DEPENDENCIES
+
+ On Linux, you will need to install the package that provides
+-the header files <attr/attributes.h> and <attr/xattr.h>. On Fedora
++the header files <attr/attributes.h> and <sys/xattr.h>. On Fedora
+ you can install these as follows:
+
+- yum -y install libattr-devel
++ dnf -y install glibc-headers libattr-devel
+
+ This module requires these other modules:
+
+diff --git a/extattr_linux.h b/extattr_linux.h
+index d61deed..3c5900e 100644
+--- a/extattr_linux.h
++++ b/extattr_linux.h
+@@ -3,7 +3,7 @@
+
+ #include <sys/types.h>
+ #include <attr/attributes.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+
+ struct hv;
+
+--
+2.14.4
+
diff --git a/0002-Remove-dependency-on-attr-library-on-Linux.patch b/0002-Remove-dependency-on-attr-library-on-Linux.patch
new file mode 100644
index 000000000000..1a1dd5582e14
--- /dev/null
+++ b/0002-Remove-dependency-on-attr-library-on-Linux.patch
@@ -0,0 +1,92 @@
+From c0e14f90a2a6e30a10dddaab6a2d49a3a3d8726d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Tue, 10 Jul 2018 12:07:54 +0200
+Subject: [PATCH 2/2] Remove dependency on attr library on Linux
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ Makefile.PL | 12 ++----------
+ README | 6 +++---
+ extattr_linux.h | 4 +++-
+ 3 files changed, 8 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 1694780..d0f8963 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -1,25 +1,17 @@
+ use lib qw(inc);
+ use ExtUtils::MakeMaker;
+-use Devel::CheckLib;
+ use Cwd;
+ use File::Temp qw/tempdir/;
+ use IO::File;
+ use strict;
+
+-# Check whether we have <attr/attributes.h> and <sys/xattr.h> on Linux.
++# Check whether we have <sys/xattr.h> on Linux.
+ # Suggest what the user needs to install, to get these files.
+
+-if ($^O eq 'linux') {
+- check_lib_or_exit(
+- lib => [qw(attr)]
+- );
+-}
+-
+ my @DIRS = qw(. /usr/include);
+ if ($^O eq 'linux')
+ {
+ my %headers = (
+- 'attr/attributes.h' => 0,
+ 'sys/xattr.h' => 0,
+ );
+ my $incdir;
+@@ -36,7 +28,7 @@ if ($^O eq 'linux')
+ foreach (keys %headers)
+ {
+ if ($headers{$_} == 0) {
+- warn "<$_> not found; perhaps you need to install libattr-devel";
++ warn "<$_> not found; perhaps you need to install glibc-headers";
+ $missing++;
+ }
+ }
+diff --git a/README b/README
+index 4d40f1d..9c628ae 100644
+--- a/README
++++ b/README
+@@ -42,10 +42,10 @@ use a different file system, e.g.:
+ DEPENDENCIES
+
+ On Linux, you will need to install the package that provides
+-the header files <attr/attributes.h> and <sys/xattr.h>. On Fedora
+-you can install these as follows:
++the <sys/xattr.h> header file. On Fedora you can install
++these as follows:
+
+- dnf -y install glibc-headers libattr-devel
++ dnf -y install glibc-headers
+
+ This module requires these other modules:
+
+diff --git a/extattr_linux.h b/extattr_linux.h
+index 3c5900e..3b099f4 100644
+--- a/extattr_linux.h
++++ b/extattr_linux.h
+@@ -2,8 +2,10 @@
+ #define EXTATTR_LINUX_H
+
+ #include <sys/types.h>
+-#include <attr/attributes.h>
+ #include <sys/xattr.h>
++#ifndef ENOATTR
++# define ENOATTR ENODATA
++#endif
+
+ struct hv;
+
+--
+2.14.4
+
diff --git a/PKGBUILD b/PKGBUILD
index 563f0f92b11a..8a644b56d246 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,18 @@
pkgname=perl-file-extattr
pkgver='1.09'
-pkgrel='1'
+pkgrel='2'
pkgdesc="Perl extension for accessing extended attributes of files"
arch=('any')
url="http://search.cpan.org/dist/File-ExtAttr"
license=('GPL' 'PerlArtistic')
options=('!emptydirs')
-source=("http://search.cpan.org/CPAN/authors/id/R/RI/RICHDAWE/File-ExtAttr-${pkgver}.tar.gz")
-sha512sums=('eca00420bef313ac711bf1d64323e051acc8eb77ab8e267067f586e78dc42d43f685fe571c7856186c998e939dd2761d24650c61297c24486bc005dddf6b4bb3')
+source=("http://search.cpan.org/CPAN/authors/id/R/RI/RICHDAWE/File-ExtAttr-${pkgver}.tar.gz"
+ "0001-Port-Linux-to-sys-xattr.h.patch"
+ "0002-Remove-dependency-on-attr-library-on-Linux.patch")
+sha512sums=('eca00420bef313ac711bf1d64323e051acc8eb77ab8e267067f586e78dc42d43f685fe571c7856186c998e939dd2761d24650c61297c24486bc005dddf6b4bb3'
+ '5025f2bbfa5f7e543a693aab87774ed2b514de12192886c366aebdf58f3a12fbc7047dc97b61a5577557497bc66ebb25c6c7f52b79f8efbe565943e9c01c57d6'
+ '2ba18bf66f11d85acc0002b94a48e5f3943ac994d43825f49fd16b41d5728285786913df1bca0fb648e08545ae8a34b301c61c93c7661ecd0722587343247ede')
prepare_environment() {
export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
@@ -22,6 +26,12 @@ prepare_environment() {
build() {
prepare_environment
+
+ # Patches taken from upstream bug report at
+ # https://rt.cpan.org/Public/Bug/Display.html?id=125804
+ patch -p1 < "${srcdir}/0001-Port-Linux-to-sys-xattr.h.patch"
+ patch -p1 < "${srcdir}/0002-Remove-dependency-on-attr-library-on-Linux.patch"
+
/usr/bin/perl Makefile.PL
make
}