From: Andreas Gruenbacher <agruen@suse.de>
To: linux-xfs@oss.sgi.com, Tim Shimmin <tes@sgi.com>
Subject: attr: Remove eaconv script
Date: Sun, 28 Oct 2007 18:32:23 +0100 [thread overview]
Message-ID: <200710281832.24153.agruen@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
Hello,
while updating our attr package I noticed that we still have eaconv, a script
for converting between an xattr user-space representation which long since
disappeared. Here is patch for removing this now-useless script. Any
objections?
Thanks,
Andreas
[-- Attachment #2: remove-ea-conv.diff --]
[-- Type: text/x-diff, Size: 4220 bytes --]
Index: attr-2.4.39/doc/Makefile
===================================================================
--- attr-2.4.39.orig/doc/Makefile
+++ attr-2.4.39/doc/Makefile
@@ -5,8 +5,6 @@
TOPDIR = ..
include $(TOPDIR)/include/builddefs
-SUBDIRS = ea-conv
-
LSRCFILES = INSTALL PORTING CHANGES COPYING
LDIRT = *.gz
Index: attr-2.4.39/doc/ea-conv/Makefile
===================================================================
--- attr-2.4.39.orig/doc/ea-conv/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-LSRCFILES = README ea-conv
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_DOC_DIR)/ea-conv
- $(INSTALL) -m 644 README $(PKG_DOC_DIR)/ea-conv
- $(INSTALL) -m 755 ea-conv $(PKG_DOC_DIR)/ea-conv
-
-default install-dev install-lib:
Index: attr-2.4.39/doc/ea-conv/README
===================================================================
--- attr-2.4.39.orig/doc/ea-conv/README
+++ /dev/null
@@ -1,13 +0,0 @@
-ea-conv -- convert between aget and getfattr format
-
-This script converts between the extended attribute text formats of
-getfattr and its predecessor, aget. To get all attributes with aget
-and convert the result to getfattr format, use the following command:
-
- aget -Rds -e hex . | ea-conv -
-
-To get all attributes with getfattr and convert the result to aget
-format, use the following command:
-
- getfattr -Rd -m - -e hex . | ea-conv -
-
Index: attr-2.4.39/doc/ea-conv/ea-conv
===================================================================
--- attr-2.4.39.orig/doc/ea-conv/ea-conv
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use FileHandle;
-
-sub convert_acl($)
-{
- my ($value) = @_;
-
- local $_ = $value;
-
- die "ACL value must be hex encoded\n" unless (s/^0x//);
- s/\s//g;
-
- my ($x4, $x8) = ('([0-9A-Fa-f]{4})', '([0-9A-Fa-f]{8})');
-
- if (s/^01000000//) {
- my $new_value = '0x02000000 ';
- while ($_ ne '') {
- if (s/^(0100|0400|1000|2000)$x4//) {
- $new_value .= "$1$2ffffffff ";
- } elsif (s/^(0200|0800)$x4$x8//) {
- $new_value .= "$1$2$3 ";
- } else {
- die "ACL format not recognized\n"
- }
- }
- return $new_value;
- } elsif (s/^02000000//) {
- my $new_value = '0x01000000 ';
- while ($_ ne '') {
- if (s/^(0100|0400|1000|2000)$x4$x8//) {
- $new_value .= "$1$2 ";
- } elsif (s/^(0200|0800)$x4$x8//) {
- $new_value .= "$1$2$3 ";
- } else {
- die "ACL format not recognized\n"
- }
- }
- return $new_value;
- } else {
- die "ACL format not recognized\n"
- }
-}
-
-sub check_name($) {
- my ($name) = @_;
- if ($name =~ m[^[^A-Za-z]]) {
- print STDERR "Renaming attribute `user.$name' to `X$name'.\n";
- return "X$name";
- }
- return $name;
-}
-
-sub convert($) {
- my ($file) = @_;
-
- eval {
- while (<$file>) {
- m[^(#.*)?$] ||
- s[^system\.posix_acl_access=(0x02.*)]
- ['$acl=' . convert_acl($1)]e ||
- s[^system\.posix_acl_default=(0x02.*)]
- ['$defacl=' . convert_acl($1)]e ||
- s[^user\.([^=]*)][check_name($1)]e ||
-
- s[^\$acl=(0x01.*)]
- ['system.posix_acl_access=' .
- convert_acl($1)]e ||
- s[^\$defacl=(0x01.*)]
- ['system.posix_acl_default=' .
- convert_acl($1)]e ||
- s[^([A-Za-z][^=]*)][user.$1] ||
-
- die "Input format error\n";
-
- print;
- }
- };
- if ($@) {
- chomp $@;
- print STDERR "$@ in line $..\n";
- }
- return (not $@);
-}
-
-unless (@ARGV) {
- printf STDERR <<EOF;
-$0 -- convert between aget and getfattr format
-
-This script converts between the extended attribute text formats of
-getfattr and its predecessor, aget. To get all attributes with aget
-and convert the result to getfattr format, use the following command:
-
- aget -Rds -e hex . | $0 -
-
-To get all attributes with getfattr and convert the result to aget
-format, use the following command:
-
- getfattr -Rd -m - -e hex . | $0 -
-
-EOF
- exit 1;
-}
-
-my $good = 1;
-foreach my $arg (@ARGV) {
- my $fh = ($arg eq '-') ? *STDIN : new FileHandle($arg);
-
- unless ($fh) {
- print STDERR "$0: $arg: $!\n";
- next;
- }
-
- $good = 0 unless convert $fh;
-
- $fh->close unless ($arg eq '-');
-}
-exit (not $good);
reply other threads:[~2007-10-28 17:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710281832.24153.agruen@suse.de \
--to=agruen@suse.de \
--cc=linux-xfs@oss.sgi.com \
--cc=tes@sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox