]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
libcap-ng: New package.
authorSchantl Stefan <Stevee@ipfire.org>
Sat, 17 Jul 2010 17:01:20 +0000 (19:01 +0200)
committerSchantl Stefan <Stevee@ipfire.org>
Sat, 17 Jul 2010 17:01:20 +0000 (19:01 +0200)
pkgs/core/libcap-ng/libcap-ng.nm [new file with mode: 0644]
pkgs/core/libcap-ng/patches/libcap-ng-0.6.5-device.patch [new file with mode: 0644]

diff --git a/pkgs/core/libcap-ng/libcap-ng.nm b/pkgs/core/libcap-ng/libcap-ng.nm
new file mode 100644 (file)
index 0000000..111ab8b
--- /dev/null
@@ -0,0 +1,53 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt                 #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+PKG_NAME       = libcap-ng
+PKG_VER        = 0.6.4
+PKG_REL        = 0
+
+PKG_MAINTAINER =
+PKG_GROUP      = System/Libraries
+PKG_URL        = http://people.redhat.com/sgrubb/libcap-ng
+PKG_LICENSE    = LGPLv2+
+PKG_SUMMARY    = An alternate posix capabilities library.
+
+PKG_DEPS      += attr kernel-headers python
+
+PKG_PACKAGES  += $(PKG_NAME_REAL)-devel
+
+define PKG_DESCRIPTION
+       Libcap-ng is a library that makes using posix capabilities \
+       easier. 
+endef
+
+PKG_TARBALL    = $(THISAPP).tar.gz
+
+#CONFIGURE_OPTIONS += \
+
+# XXX Testsuite is broken by the package developers
+#define STAGE_TEST
+#      cd $(DIR_APP) && make check
+#endef
diff --git a/pkgs/core/libcap-ng/patches/libcap-ng-0.6.5-device.patch b/pkgs/core/libcap-ng/patches/libcap-ng-0.6.5-device.patch
new file mode 100644 (file)
index 0000000..7effd72
--- /dev/null
@@ -0,0 +1,41 @@
+diff -urp libcap-ng-0.6.5.orig/utils/filecap.c libcap-ng-0.6.5/utils/filecap.c
+--- libcap-ng-0.6.5.orig/utils/filecap.c       2010-06-17 13:19:21.000000000 -0400
++++ libcap-ng-0.6.5/utils/filecap.c    2010-06-17 14:25:07.000000000 -0400
+@@ -41,12 +41,15 @@ static void usage(void)
+       exit(1);
+ }
+-static int check_file(const char *file,
+-              const struct stat *sb_unused __attribute__ ((unused)),
+-              int flag_unused __attribute__ ((unused)),
++static int check_file(const char *fpath,
++              const struct stat *sb,
++              int typeflag_unused __attribute__ ((unused)),
+               struct FTW *s_unused __attribute__ ((unused)))
+ {
+-      int fd = open(file, O_RDONLY);
++      if (S_ISREG(sb->st_mode) == 0)
++              return FTW_CONTINUE;
++
++      int fd = open(fpath, O_RDONLY);
+       if (fd >= 0) {
+               capng_results_t rc;
+@@ -58,7 +61,7 @@ static int check_file(const char *file,
+                               header = 1;
+                               printf("%-20s capabilities\n", "file");
+                       }
+-                      printf("%s     ", file);
++                      printf("%s     ", fpath);
+                       if (rc == CAPNG_FULL)
+                               printf("full");
+                       else
+@@ -68,7 +71,7 @@ static int check_file(const char *file,
+               }
+               close(fd);
+       }
+-      return 0;
++      return FTW_CONTINUE;
+ }