diff options
author | marino <marino@pkgsrc.org> | 2012-05-22 11:02:50 +0000 |
---|---|---|
committer | marino <marino@pkgsrc.org> | 2012-05-22 11:02:50 +0000 |
commit | 8edc744313ab9af09a9e7adb2162e98c403e673a (patch) | |
tree | 489d26c025180f97133f84e8ef39e6dfaf6caa8f /pkgtools | |
parent | d0a0ca59330899b657fd784d1c8c5b0378eb7b83 (diff) | |
download | pkgsrc-8edc744313ab9af09a9e7adb2162e98c403e673a.tar.gz |
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 (limited to 'pkgtools')
-rw-r--r-- | pkgtools/packagekit/INSTALL | 14 | ||||
-rw-r--r-- | pkgtools/packagekit/Makefile | 10 | ||||
-rw-r--r-- | pkgtools/packagekit/distinfo | 3 | ||||
-rw-r--r-- | pkgtools/packagekit/patches/patch-src_Makefile.in | 15 |
4 files changed, 26 insertions, 16 deletions
diff --git a/pkgtools/packagekit/INSTALL b/pkgtools/packagekit/INSTALL deleted file mode 100644 index 252aabdf49d..00000000000 --- a/pkgtools/packagekit/INSTALL +++ /dev/null @@ -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 --git a/pkgtools/packagekit/Makefile b/pkgtools/packagekit/Makefile index 1421c17f715..fc1d338677c 100644 --- a/pkgtools/packagekit/Makefile +++ b/pkgtools/packagekit/Makefile @@ -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 @@ USE_LANGUAGES= c c++ 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 @@ REPLACE_PYTHON= backends/test/helpers/PackageKitDbusTest.py \ 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 --git a/pkgtools/packagekit/distinfo b/pkgtools/packagekit/distinfo index 0af28cb7c3b..d7980326c81 100644 --- a/pkgtools/packagekit/distinfo +++ b/pkgtools/packagekit/distinfo @@ -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-an) = 7030689df2b56a11695cad3134186dfd615f0c03 SHA1 (patch-ao) = d9c9550120d6fd140864d6558668b57a6e5a700a SHA1 (patch-ap) = a7a789bb6e8739e76d8d567132f0b44df0944660 SHA1 (patch-ar) = 5ed542e16b4eb05eef94c8851d874c775fe03957 +SHA1 (patch-src_Makefile.in) = 67c5540ec96ff4a90c4653c60a0c5099ba40dbcd diff --git a/pkgtools/packagekit/patches/patch-src_Makefile.in b/pkgtools/packagekit/patches/patch-src_Makefile.in new file mode 100644 index 00000000000..a32c5325c94 --- /dev/null +++ b/pkgtools/packagekit/patches/patch-src_Makefile.in @@ -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 *~ |