pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/rsnapshot Yikes, use lchown!
details: https://anonhg.NetBSD.org/pkgsrc/rev/9c8479154d3a
branches: trunk
changeset: 481721:9c8479154d3a
user: kim <kim%pkgsrc.org@localhost>
date: Mon Oct 11 09:44:12 2004 +0000
description:
Yikes, use lchown!
diffstat:
sysutils/rsnapshot/Makefile | 4 ++-
sysutils/rsnapshot/distinfo | 3 +-
sysutils/rsnapshot/patches/patch-aa | 51 +++++++++++++++++++++++++++++++++++++
3 files changed, 56 insertions(+), 2 deletions(-)
diffs (86 lines):
diff -r 17754409af10 -r 9c8479154d3a sysutils/rsnapshot/Makefile
--- a/sysutils/rsnapshot/Makefile Mon Oct 11 09:43:35 2004 +0000
+++ b/sysutils/rsnapshot/Makefile Mon Oct 11 09:44:12 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2004/10/10 17:28:14 kim Exp $
+# $NetBSD: Makefile,v 1.2 2004/10/11 09:44:12 kim Exp $
#
DISTNAME= rsnapshot-1.1.6
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.rsnapshot.org/downloads/
@@ -10,6 +11,7 @@
COMMENT= Filesystem snapshot utility
DEPENDS+= rsync>=2.3.1:../../net/rsync
+DEPENDS+= p5-Lchown>=0.07:../../sysutils/p5-Lchown
GNU_CONFIGURE= yes
USE_PERL5= yes
diff -r 17754409af10 -r 9c8479154d3a sysutils/rsnapshot/distinfo
--- a/sysutils/rsnapshot/distinfo Mon Oct 11 09:43:35 2004 +0000
+++ b/sysutils/rsnapshot/distinfo Mon Oct 11 09:44:12 2004 +0000
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/10/10 17:28:14 kim Exp $
+$NetBSD: distinfo,v 1.2 2004/10/11 09:44:12 kim Exp $
SHA1 (rsnapshot-1.1.6.tar.gz) = 6813c68df1ff82df79682c0aaa6012f189c7eeb5
Size (rsnapshot-1.1.6.tar.gz) = 88871 bytes
+SHA1 (patch-aa) = 54f91858948e46288fe8d47f825e69db3ef56387
diff -r 17754409af10 -r 9c8479154d3a sysutils/rsnapshot/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/rsnapshot/patches/patch-aa Mon Oct 11 09:44:12 2004 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-aa,v 1.1 2004/10/11 09:44:50 kim Exp $
+
+--- rsnapshot-program.pl.orig 2004-07-05 19:43:18.000000000 -0400
++++ rsnapshot-program.pl 2004-10-11 05:13:15.000000000 -0400
+@@ -32,6 +32,7 @@
+ use File::Path; # mkpath(), rmtree()
+ use File::stat; # stat(), lstat()
+ use POSIX qw(locale_h); # setlocale()
++use Lchown qw(lchown LCHOWN_AVAILABLE);
+
+ ########################################
+ ### DECLARE GLOBAL VARIABLES ###
+@@ -2934,7 +2935,11 @@
+ }
+ }
+
+- $result = chown($st->uid, $st->gid, "$dest");
++ if (Lchown::LCHOWN_AVAILABLE) {
++ $result = lchown($st->uid, $st->gid, "$dest");
++ } else {
++ $result = chown($st->uid, $st->gid, "$dest");
++ }
+ if (! $result) {
+ print_err("Warning! Could not chown(" . $st->uid . ", " . $st->gid . ", \"$dest\");", 2);
+ return(0);
+@@ -3284,7 +3289,11 @@
+
+ # CHOWN DEST (if root)
+ if (0 == $<) {
+- $result = chown($st->uid, $st->gid, "$dest");
++ if (Lchown::LCHOWN_AVAILABLE) {
++ $result = lchown($st->uid, $st->gid, "$dest");
++ } else {
++ $result = chown($st->uid, $st->gid, "$dest");
++ }
+ if (! $result) {
+ print_err("Warning! Could not chown(" . $st->uid . ", " . $st->gid . ", \"$dest\");", 2);
+ return(0);
+@@ -3513,7 +3522,11 @@
+ }
+ }
+
+- $result = chown($st->uid, $st->gid, "$dest");
++ if (Lchown::LCHOWN_AVAILABLE) {
++ $result = lchown($st->uid, $st->gid, "$dest");
++ } else {
++ $result = chown($st->uid, $st->gid, "$dest");
++ }
+
+ if (! $result) {
+ print_err("Warning! Could not chown(" . $st->uid . ", " . $st->gid . ", \"$dest\")", 2);
Home |
Main Index |
Thread Index |
Old Index