pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/packagekit pkgtools/packagekit: Fix permissio...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b036aa8b1783
branches:  trunk
changeset: 604068:b036aa8b1783
user:      marino <marino%pkgsrc.org@localhost>
date:      Tue May 22 11:02:50 2012 +0000

description:
pkgtools/packagekit: Fix permissions and directory creation

This package would fail when a non-privileged user would try to install it.
That's because it was trying to create /usr/pkg/var/log directory.  Another
directory was getting installed into DESTDIR but no further.

Added patch:
1) Removes attempt of Makefile to install ${VARBASE}/log
2) ..and directory ${VARBASE}/cache/PackageKit/downloads creation
3) ..which fixes non-root installations

The INSTALL file was removed, instead of installing directories in ${VARBASE},
it was installing directories at /.  The functionality was replaced with
OWN_DIRS+= in the Makefile and verified to work as expected.

diffstat:

 pkgtools/packagekit/INSTALL                       |  14 --------------
 pkgtools/packagekit/Makefile                      |  10 +++++++++-
 pkgtools/packagekit/distinfo                      |   3 ++-
 pkgtools/packagekit/patches/patch-src_Makefile.in |  15 +++++++++++++++
 4 files changed, 26 insertions(+), 16 deletions(-)

diffs (82 lines):

diff -r e5040407076f -r b036aa8b1783 pkgtools/packagekit/INSTALL
--- a/pkgtools/packagekit/INSTALL       Tue May 22 09:43:33 2012 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#!@SH@
-#
-# $NetBSD: INSTALL,v 1.1.1.1 2009/01/08 00:21:00 jmcneill Exp $
-
-case "${STAGE}" in
-PRE-INSTALL)
-       mkdir -p ${PKG_SYSCONFDIR}/PackageKit
-       ;;
-POST-INSTALL)
-       mkdir -p ${VARBASE}/cache/PackageKit
-       mkdir -p ${VARBASE}/lib/PackageKit
-       mkdir -p ${VARBASE}/log/PackageKit
-       ;;
-esac
diff -r e5040407076f -r b036aa8b1783 pkgtools/packagekit/Makefile
--- a/pkgtools/packagekit/Makefile      Tue May 22 09:43:33 2012 +0000
+++ b/pkgtools/packagekit/Makefile      Tue May 22 11:02:50 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2012/04/27 12:32:01 obache Exp $
+# $NetBSD: Makefile,v 1.21 2012/05/22 11:02:50 marino Exp $
 #
 
 DISTNAME=      PackageKit-0.4.0
@@ -21,6 +21,10 @@
 BUILD_DEFS+=   VARBASE
 BUILD_DEFS+=   PKG_SYSCONFBASE
 
+PKCACHEDIR=    ${VARBASE}/cache/PackageKit/downloads
+PKLOGDIR=      ${VARBASE}/log/PackageKit
+PKETCDIR=      ${LOCALBASE}/etc/PackageKit
+
 EGDIR=         ${PREFIX}/share/examples/packagekit
 CONF_FILES=    ${EGDIR}/CommandNotFound.conf \
                ${PKG_SYSCONFDIR}/PackageKit/CommandNotFound.conf
@@ -52,6 +56,10 @@
                lib/python/packagekit/filter.py         \
                lib/python/packagekit/misc.py
 
+OWN_DIRS+=     ${PKCACHEDIR}
+OWN_DIRS+=     ${PKLOGDIR}
+OWN_DIRS+=     ${PKETCDIR}
+
 post-extract:
        cp -r ${FILESDIR}/backends-pkgsrc ${WRKSRC}/backends/pkgsrc
 
diff -r e5040407076f -r b036aa8b1783 pkgtools/packagekit/distinfo
--- a/pkgtools/packagekit/distinfo      Tue May 22 09:43:33 2012 +0000
+++ b/pkgtools/packagekit/distinfo      Tue May 22 11:02:50 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2009/03/20 08:50:51 hasso Exp $
+$NetBSD: distinfo,v 1.4 2012/05/22 11:02:50 marino Exp $
 
 SHA1 (PackageKit-0.4.0.tar.gz) = 896a769a929d4813a9ab2b9ebea47c4fb7ed12d7
 RMD160 (PackageKit-0.4.0.tar.gz) = e71a0c16009ac04457ddad895de663d7e4da08b1
@@ -20,3 +20,4 @@
 SHA1 (patch-ao) = d9c9550120d6fd140864d6558668b57a6e5a700a
 SHA1 (patch-ap) = a7a789bb6e8739e76d8d567132f0b44df0944660
 SHA1 (patch-ar) = 5ed542e16b4eb05eef94c8851d874c775fe03957
+SHA1 (patch-src_Makefile.in) = 67c5540ec96ff4a90c4653c60a0c5099ba40dbcd
diff -r e5040407076f -r b036aa8b1783 pkgtools/packagekit/patches/patch-src_Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/packagekit/patches/patch-src_Makefile.in Tue May 22 11:02:50 2012 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Makefile.in,v 1.1 2012/05/22 11:02:50 marino Exp $
+
+--- src/Makefile.in.orig       2008-12-09 08:25:54.000000000 +0000
++++ src/Makefile.in
+@@ -1505,10 +1505,6 @@ org.freedesktop.PackageKit.Transaction.h
+               $(srcdir)/org.freedesktop.PackageKit.Transaction.xml
+ 
+ install-data-hook:
+-      if test -w $(DESTDIR)$(prefix)/; then \
+-              mkdir -p $(DESTDIR)$(localstatedir)/cache/PackageKit/downloads; \
+-              mkdir -p $(PK_LOG_DIR); \
+-      fi
+ 
+ clean-local:
+       rm -f *~



Home | Main Index | Thread Index | Old Index