Result:
found more than 693 distributions - search limited to the first 2001 files matching your query ( run in 1.311 )


App-zipdetails

 view release on metacpan or  search on metacpan

bin/zipdetails  view on Meta::CPAN

                    extraFieldIdentifier($extraID) . ": truncated reading 'GID Size'",
                    expectedMessage($uidSize, $available);
        return ;
    }

    my $gidSize = out_C "  GID Size";
    $available -= 1 ;
    if ($gidSize)
    {
        if ($available < $gidSize)
        {
            outSomeData($available, "  Bad Extra Data");
            error $FH->tell() - $available,
                        extraFieldIdentifier($extraID) . ": truncated reading 'GID'",
                        expectedMessage($gidSize, $available);
            return;
        }

        myRead(my $data, $gidSize);
        if (canDecodeLittleEndian($gidSize))
        {
            out2 $data, "GID", decodeLittleEndian($data);
        }
        else
        {
            out2 $data, "GID", "Invalid GID Value: " .hexDump($data);
            info $FH->tell() - $gidSize, extraFieldIdentifier($extraID) . ":  GID value is not a valid value"
        }
        $available -= $gidSize ;
    }
    else
    {
        info $FH->tell() - 1, extraFieldIdentifier($extraID) . ": 'GID Size' should not be zero"
    }

 view all matches for this distribution


AproJo

 view release on metacpan or  search on metacpan

share/files/public/skins/default/bootstrap/css/bootstrap.min.css  view on Meta::CPAN

 * Copyright 2012 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world @twitter by @mdo and @fat.
 */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-si...

 view all matches for this distribution


Arabic

 view release on metacpan or  search on metacpan

lib/Earabic.pm  view on Meta::CPAN

  leave out the chomp, in which case $shell would have a newline on the end of it.

  open(PASSWD, "/etc/passwd");
  while (<PASSWD>) {
      chomp; # remove trailing newline.
      ($login, $passwd, $uid, $gid, $gcos, $home, $shell) =
          Earabic::split(/:/);
      ...
  }

  Here's how process each word of each line of each file of input to create a

 view all matches for this distribution


Archive-Any

 view release on metacpan or  search on metacpan

anonymize-archives  view on Meta::CPAN

        my $iter   = Archive::Tar->iter($file);
        my $member = $iter->();
        my @opts   = (
            '--uid'   => $member->uid,
            '--uname' => $member->uname,
            '--gid'   => $member->gid,
            '--gname' => $member->gname,
          ( '-s', ':^:/:', '--absolute-paths' )x!! $archive->is_naughty,
        );

        # repack the file

 view all matches for this distribution


Archive-Ar-Libarchive

 view release on metacpan or  search on metacpan

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN

}


sub chown
{
  my($self, $filename, $uid, $gid) = @_;
  $self->_chown($filename, $uid, $gid);
}


sub remove
{

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN

    close $fh;

    $self->add_data(File::Basename::basename($filename), $data, {
      date => $props[9],
      uid  => $props[4],
      gid  => $props[5],
      mode => $props[2],
      size => length $data,
    });
    $count++;
  }

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN


sub add_data
{
  my($self, $filename, $data, $filedata) = @_;
  $filedata ||= {};
  $self->_add_data($filename, $data, $filedata->{uid} || 0, $filedata->{gid} || 0, $filedata->{date} || time, $filedata->{mode} || oct(100644));
  use bytes;
  length $data;
}


lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN


 use Archive::Ar::Libarchive;
 
 my $ar = Archive::Ar->new('libfoo.a');
 
 $ar->add_data('newfile.txt', 'some contents', { uid => 101, gid => 102 });
 
 $ar->add_files('./bar.tar.gz', 'bat.pl');
 
 $ar->remove('file1', 'file2');
 

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN


Change the permission mode of the member to C<$mode>.

=head2 chown

 $ar->chown($filename, $uid, $gid);
 $ar->chown($filename, $uid);

Change the ownership of the member to user id C<$udi> and (optionally)
group id C<$gid>.  Negative id values are ignored.

=head2 remove

 my $count = $ar->remove(@pathnames);
 my $count = $ar->remove(\@pathnames);

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN

information is stripped off. Filenames longer than 16 characters are
truncated when written to disk in the format, so keep that in mind
when adding files.

Due to the nature of the ar archive format,
L<Archive::Ar::Libarchive#add_files> will store the uid, gid, mode,
size, and creation date of the file as returned by
L<stat|perlfunc#stat>.

returns the number of files successfully added, or C<undef> on failure.

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN

L<Archive::Ar::Libarchive#add_data> is a virtual add, and does not
require data on disk to be present. The data is a hash that looks like:

 $filedata = {
   uid  => $uid,   #defaults to zero
   gid  => $gid,   #defaults to zero
   date => $date,  #date in epoch seconds. Defaults to now.
   mode => $mode,  #defaults to 0100644;
 };

You cannot add_data over another file however.  This returns the file

lib/Archive/Ar/Libarchive.pm  view on Meta::CPAN


=item uid

The uid of the file

=item gid

The gid of the file

=item mode

The mode permissions

 view all matches for this distribution


Archive-Ar-Ng

 view release on metacpan or  search on metacpan

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

      $name = $fn . '/';
    } else {
      $name = $fn;
    }
    if ( length( $name ) <= 16 || $type eq COMMON ) {
      push @body, pack( 'A16A12A6A6A8A10A2', $name, @$meta{qw/date uid gid/}, $mode, $size, ARFMAG );
    } elsif ( $type eq GNU ) {
      push @body, pack( 'A1A15A12A6A6A8A10A2', '/', $gnuindex{$fn}, @$meta{qw/date uid gid/}, $mode, $size, ARFMAG );
    } elsif ( $type eq BSD ) {
      $size += length( $name );
      push @body, pack( 'A3A13A12A6A6A8A10A2', AR_EFMT1, length( $name ), @$meta{qw/date uid gid/}, $mode, $size, ARFMAG ), $name;
    } else {
      return $self->_error( "$type: unexpected ar type" );
    }
    print $tmpfn @body;
    if ( defined $meta->{original_fname} ) {

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

  }
  undef $rbuf;
##--
  close $fh or return $self->_error( "$filename: $!" );
  if ( CAN_CHOWN && $self->{opts}->{chown} ) {
    chown $meta->{fuid}, $meta->{fgid}, $filename or return $self->_error( "$filename: $!" );
  }
  if ( $self->{opts}->{chmod} ) {
    my $mode = $meta->{mode};
    unless ( $self->{opts}->{same_perms} ) {
      $mode &= ~( oct( 7000 ) | ( umask | 0 ) );

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

  unless ( $self->myread( $fpos, SARMAG ) eq ARMAG ) {
    return $self->_error( "Bad magic number - not an ar archive" );
  }
  $fpos += SARMAG;
  while ( $fpos < $flen ) {
    my ( $name, $date, $uid, $gid, $mode, $size, $magic ) = unpack( 'A16A12A6A6A8A10a2', $self->myread( $fpos, 60 ) );
    $fpos += 60;
    unless ( $magic eq "`\n" ) {
      return $self->_error( "Bad file header" );
    }
    if ( $name =~ m|^/| ) {

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

        $type ||= GNU;    # only gnu has trailing slashes
        chop $name;
      }
    }
    $uid  = int( $uid );
    $gid  = int( $gid );
    $mode = oct( $mode );
    $self->_add_data( $name, $fpos, $date, $uid, $gid, $mode, $size, undef, undef );
    $fpos += $size + ( $size % 2 );
  }
  $self->{type} = $type || COMMON;
  return scalar @{$self->{names}};
}

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

  my $self     = shift;
  my $filename = shift;
  my $fpos     = shift;
  my $date     = shift;
  my $fuid     = shift;
  my $fgid     = shift;
  my $mode     = shift;
  my $size     = shift;
  my $ofn      = shift;
  my $content  = shift;
  if ( exists( $self->{files}->{$filename} ) ) {

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

  }
  $self->{files}->{$filename} = {
                                 name           => $filename,
                                 date           => $date,
                                 fuid           => defined $fuid ? $fuid : 0,
                                 fgid           => defined $fgid ? $fgid : 0,
                                 mode           => defined $mode ? $mode : 0100644,
                                 size           => defined $size ? $size : 0,
                                 fpos           => $fpos,
                                 original_fname => $ofn,
                                 data           => $content,

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

      my $content = <$fd>;
      close $fd;
      my $filename  = ( File::Spec->splitpath( $path ) )[2];
      my @analitycs = stat $filename;
      my $uid       = int( @st[4] );
      my $gid       = int( @st[5] );
      my $date      = @st[9];
      my $mode      = @st[2];
      my $size      = @st[7];
      $self->_add_data( $filename, $fpos, $date, $uid, $gid, $mode, $size, $path, undef );
    } else {
      $self->_error( "$path: $!" );
    }
  }
  return scalar @{$self->{names}};

lib/Archive/Ar/Ng.pm  view on Meta::CPAN

        $name = $fn . '/';
      } else {
        $name = $fn;
      }
      if ( length( $name ) <= 16 || $type eq COMMON ) {
        push @body, pack( 'A16A12A6A6A8A10A2', $name, @$meta{qw/date uid gid/}, $mode, $size, ARFMAG );
      } elsif ( $type eq GNU ) {
        push @body, pack( 'A1A15A12A6A6A8A10A2', '/', $gnuindex{$fn}, @$meta{qw/date uid gid/}, $mode, $size, ARFMAG );
      } elsif ( $type eq BSD ) {
        $size += length( $name );
        push @body, pack( 'A3A13A12A6A6A8A10A2', AR_EFMT1, length( $name ), @$meta{qw/date uid gid/}, $mode, $size, ARFMAG ), $name;
      } else {
        return $self->_error( "$type: unexpected ar type" );
      }
      print $tmpfn @body;
      if ( defined $meta->{original_fname} ) {

 view all matches for this distribution


Archive-Ar

 view release on metacpan or  search on metacpan

lib/Archive/Ar.pm  view on Meta::CPAN

    open my $fh, '>', $target or return $self->_error("$target: $!");
    binmode $fh;
    syswrite $fh, $meta->{data} or return $self->_error("$filename: $!");
    close $fh or return $self->_error("$filename: $!");
    if (CAN_CHOWN && $self->{opts}->{chown}) {
        chown $meta->{uid}, $meta->{gid}, $filename or
					return $self->_error("$filename: $!");
    }
    if ($self->{opts}->{chmod}) {
        my $mode = $meta->{mode};
        unless ($self->{opts}->{same_perms}) {

lib/Archive/Ar.pm  view on Meta::CPAN


sub chown {
    my $self = shift;
    my $filename = shift;
    my $uid = shift;
    my $gid = shift;

    return unless $self->{files}->{$filename};
    $self->{files}->{$filename}->{uid} = $uid if $uid >= 0;
    $self->{files}->{$filename}->{gid} = $gid if defined $gid && $gid >= 0;
    return 1;
}

sub remove {
    my $self = shift;

lib/Archive/Ar.pm  view on Meta::CPAN

    my $filename = (File::Spec->splitpath($path))[2];

    $self->_add_data($filename, $content,
                     $params->{date} || timelocal(localtime()),
                     $params->{uid} || 0,
                     $params->{gid} || 0,
                     $params->{mode} || 0100644) or return;

    return $self->{files}->{$filename}->{size};
}

lib/Archive/Ar.pm  view on Meta::CPAN

        else {
            $name = $fn;
        }
        if (length($name) <= 16 || $type eq COMMON) {
            push @body, pack('A16A12A6A6A8A10A2', $name,
                              @$meta{qw/date uid gid/}, $mode, $size, ARFMAG);
        }
        elsif ($type eq GNU) {
            push @body, pack('A1A15A12A6A6A8A10A2', '/', $gnuindex{$fn},
                              @$meta{qw/date uid gid/}, $mode, $size, ARFMAG);
        }
        elsif ($type eq BSD) {
            $size += length($name);
            push @body, pack('A3A13A12A6A6A8A10A2', AR_EFMT1, length($name),
                              @$meta{qw/date uid gid/}, $mode, $size, ARFMAG),
                        $name;
        }
        else {
            return $self->_error("$type: unexpected ar type");
        }

lib/Archive/Ar.pm  view on Meta::CPAN

        return $self->_error("Bad magic number - not an ar archive");
    }
    my $type;
    my $names;
    while ($data =~ /\S/) {
        my ($name, $date, $uid, $gid, $mode, $size, $magic) =
                    unpack('A16A12A6A6A8A10a2', substr($data, 0, 60, ''));
        unless ($magic eq "`\n") {
            return $self->_error("Bad file header");
        }
        if ($name =~ m|^/|) {

lib/Archive/Ar.pm  view on Meta::CPAN

                $type ||= GNU;	# only gnu has trailing slashes
                chop $name;
            }
        }
        $uid = int($uid);
        $gid = int($gid);
        $mode = oct($mode);
        my $content = substr($data, 0, $size, '');
        substr($data, 0, $size % 2, '');

        $self->_add_data($name, $content, $date, $uid, $gid, $mode, $size);
    }
    $self->{type} = $type || COMMON;
    return scalar @{$self->{names}};
}

lib/Archive/Ar.pm  view on Meta::CPAN

    my $self = shift;
    my $filename = shift;
    my $content = shift || '';
    my $date = shift;
    my $uid = shift;
    my $gid = shift;
    my $mode = shift;
    my $size = shift;

    if (exists($self->{files}->{$filename})) {
        return $self->_error("$filename: entry already exists");
    }
    $self->{files}->{$filename} = {
        name => $filename,
        date => defined $date ? $date : timelocal(localtime()),
        uid => defined $uid ? $uid : 0,
        gid => defined $gid ? $gid : 0,
        mode => defined $mode ? $mode : 0100644,
        size => defined $size ? $size : length($content),
        data => $content,
    };
    push @{$self->{names}}, $filename;

lib/Archive/Ar.pm  view on Meta::CPAN


    $ar->add_files('./bar.tar.gz', 'bat.pl')
    $ar->add_data('newfile.txt','Some contents');

    $ar->chmod('file1', 0644);
    $ar->chown('file1', $uid, $gid);

    $ar->remove('file1', 'file2');

    my $filehash = $ar->get_content('bar.tar.gz');
    my $data = $ar->get_data('bar.tar.gz');

lib/Archive/Ar.pm  view on Meta::CPAN


Change the mode of the member to C<$mode>.

=head2 chown

  $ar->chown($filename, $uid, $gid);
  $ar->chown($filename, $uid);

Change the ownership of the member to user id C<$uid> and (optionally)
group id C<$gid>.  Negative id values are ignored.

=head2 remove

  $ar->remove(@filenames)
  $ar->remove($arrayref)

lib/Archive/Ar.pm  view on Meta::CPAN


  $ar->add_files(@filenames)
  $ar->add_files($arrayref)

Adds files to the archive.  The arguments can be paths, but only the
filenames are stored in the archive.  Stores the uid, gid, mode, size,
and modification timestamp of the file as returned by C<stat()>.

Returns the number of files successfully added, or undef if failure.

=head2 add_data

lib/Archive/Ar.pm  view on Meta::CPAN

$data.  File properties can be set with $optional_hashref:

  $options = {
      'data' => $data,
      'uid' => $uid,    #defaults to zero
      'gid' => $gid,    #defaults to zero
      'date' => $date,  #date in epoch seconds. Defaults to now.
      'mode' => $mode,  #defaults to 0100644;
  }

You cannot add_data over another file however.  This returns the file length in 

lib/Archive/Ar.pm  view on Meta::CPAN


    $content = {
        'name' => $filename,
        'date' => $mtime,
        'uid' => $uid,
        'gid' => $gid,
        'mode' => $mode,
        'size' => $size,
        'data' => $file_contents,
    }

 view all matches for this distribution


Archive-BagIt

 view release on metacpan or  search on metacpan

lib/Archive/BagIt/Role/Algorithm.pm  view on Meta::CPAN

);


sub get_optimal_bufsize {
    my ($self, $fh) = @_;
    my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
        $atime,$mtime,$ctime,$blksize,$blocks)
        = stat $fh;
    # Windows systems return "" for $blksize
    if ((defined $blksize ) && ($blksize ne "") && ($blksize >= 512)) {
        return $blksize;

 view all matches for this distribution


Archive-Cpio

 view release on metacpan or  search on metacpan

lib/Archive/Cpio/NewAscii.pm  view on Meta::CPAN

my @HEADER = (
    magic => 6,
    inode => 8,
    mode => 8,
    uid => 8,
    gid => 8,
    nlink => 8,
    mtime => 8,
    datasize => 8,
    devMajor => 8,
    devMinor => 8,

 view all matches for this distribution


Archive-Har

 view release on metacpan or  search on metacpan

t/chrome.t  view on Meta::CPAN

          ],
          "cookies": [],
          "content": {
            "size": 213057,
            "mimeType": "text/html",
            "text": "<!doctype html><html itemscope=\"\" itemtype=\"http://schema.org/WebPage\" lang=\"en-AU\"><head><meta content=\"/images/branding/googleg/1x/googleg_standard_color_128dp.png\" itemprop=\"image\"><link href=\"/images/branding/produ...
          },
          "redirectURL": "",
          "headersSize": -1,
          "bodySize": -1,
          "_transferSize": 68060

t/chrome.t  view on Meta::CPAN

          ],
          "cookies": [],
          "content": {
            "size": 136732,
            "mimeType": "text/javascript",
            "text": "/* _GlobalPrefix_ */\nthis.gbar_=this.gbar_||{};(function(_){var window=this;\n/* _Module_:syp */\ntry{\nvar On=function(){};_.y(On,Error);_.Pn=function(){this.b=\"pending\";this.B=[];this.w=this.C=void 0};_.ae(_.Pn);var Qn=funct...
          },
          "redirectURL": "",
          "headersSize": -1,
          "bodySize": 0,
          "_transferSize": 0

 view all matches for this distribution


Archive-Lha

 view release on metacpan or  search on metacpan

lib/Archive/Lha/Header/Utils.pm  view on Meta::CPAN

  }
  elsif ( $type == 0x50 ) {
    $hash{unix_perm} = unpack 'v', substr($buf, $from + 1, 2);
  }
  elsif ( $type == 0x51 ) {
    $hash{unix_gid} = unpack 'v', substr($buf, $from + 1, 2);
    $hash{unix_uid} = unpack 'v', substr($buf, $from + 3, 2);
  }
  elsif ( $type == 0x52 ) {
    $hash{unix_group} = substr($buf, $from + 1, $len - 3);
  }

 view all matches for this distribution


Archive-Libarchive-Any

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/common_read_disk.t
t/common_read_open_error.t
t/common_signature.t
t/common_sparse.t
t/common_stat.t
t/common_uid_gid_lookup.t
t/common_unicode.t
t/common_universal_decompressor.t
t/common_user_group_lookup.t
t/foo.tar
t/foo.tar.Z

 view all matches for this distribution


Archive-Libarchive-FFI

 view release on metacpan or  search on metacpan

lib/Archive/Libarchive/FFI.pm  view on Meta::CPAN

_attach 'archive_write_set_filter_option',               [ _ptr, _str, _str, _str ], _int;
_attach 'archive_write_set_format_option',               [ _ptr, _str, _str, _str ], _int;
_attach 'archive_write_set_option',                      [ _ptr, _str, _str, _str ], _int;
_attach 'archive_write_set_options',                     [ _ptr, _str ], _int;
_attach 'archive_write_set_skip_file',                   [ _ptr, _int64, _int64 ], _int;
_attach 'archive_write_disk_gid',                        [ _ptr, _str, _int64 ], _int64;
_attach 'archive_write_disk_set_skip_file',              [ _ptr, _int64, _int64 ], _int;
_attach 'archive_write_disk_uid',                        [ _ptr, _str, _int64 ], _int64;
_attach 'archive_write_fail',                            [ _ptr ], _int;
_attach 'archive_write_get_bytes_in_last_block',         [ _ptr ], _int;
_attach 'archive_write_get_bytes_per_block',             [ _ptr ], _int;

lib/Archive/Libarchive/FFI.pm  view on Meta::CPAN

_attach 'archive_entry_dev_is_set',                      [ _ptr ], _int;
_attach 'archive_entry_dev',                             [ _ptr ], _dev_t;
_attach 'archive_entry_devmajor',                        [ _ptr ], _dev_t;
_attach 'archive_entry_devminor',                        [ _ptr ], _dev_t;
_attach 'archive_entry_fflags_text',                     [ _ptr ], _str;
_attach 'archive_entry_gid',                             [ _ptr ], _int64;
_attach 'archive_entry_rdev',                            [ _ptr ], _int64;
_attach 'archive_entry_rdevmajor',                       [ _ptr ], _int64;
_attach 'archive_entry_rdevminor',                       [ _ptr ], _int64;
_attach 'archive_entry_set_rdev',                        [ _ptr, _int64 ], _void;
_attach 'archive_entry_set_rdevmajor',                   [ _ptr, _int64 ], _void;

lib/Archive/Libarchive/FFI.pm  view on Meta::CPAN

_attach 'archive_entry_perm',                            [ _ptr ], _int;
_attach 'archive_entry_set_dev',                         [ _ptr, _dev_t ], _void;
_attach 'archive_entry_set_devmajor',                    [ _ptr, _dev_t ], _void;
_attach 'archive_entry_set_devminor',                    [ _ptr, _dev_t ], _void;
_attach 'archive_entry_set_fflags',                      [ _ptr, _ulong, _ulong ], _void;
_attach 'archive_entry_set_gid',                         [ _ptr, _int64 ], _void;
_attach 'archive_entry_set_ino',                         [ _ptr, _int64 ], _void;
_attach 'archive_entry_set_link',                        [ _ptr, _str ], _void;
_attach 'archive_entry_set_mode',                        [ _ptr, _int ], _void;
_attach 'archive_entry_set_nlink',                       [ _ptr, _int ], _void;
_attach 'archive_entry_set_uid',                         [ _ptr, _int64 ], _void;

lib/Archive/Libarchive/FFI.pm  view on Meta::CPAN

_attach 'archive_match_free',                            [ _ptr ], _int;
_attach 'archive_match_excluded',                        [ _ptr, _ptr ], _int;
_attach 'archive_match_path_excluded',                   [ _ptr, _ptr ], _int;
_attach 'archive_match_time_excluded',                   [ _ptr, _ptr ], _int;
_attach 'archive_match_owner_excluded',                  [ _ptr, _ptr ], _int;
_attach 'archive_match_include_gid',                     [ _ptr, _int64 ], _int;
_attach 'archive_match_include_uid',                     [ _ptr, _int64 ], _int;
_attach 'archive_match_include_gname',                   [ _ptr, _str ], _int;
_attach 'archive_match_include_uname',                   [ _ptr, _str ], _int;
_attach 'archive_match_exclude_entry',                   [ _ptr, _int, _ptr ], _int;
_attach 'archive_match_exclude_pattern',                 [ _ptr, _str ], _int;

 view all matches for this distribution


Archive-Libarchive-XS

 view release on metacpan or  search on metacpan

lib/Archive/Libarchive/XS/Callback.pm  view on Meta::CPAN

Called by archive_write_disk_uid to determine appropriate UID.

=head2 group id lookup

 my $status = archive_write_disk_set_group_lookup($archive, $data, sub {
   my($data, $name, $gid) = @_;
   ... # should return the GID for $name or $gid if it can't be found
 }, undef);

Called by archive_write_disk_gid to determine appropriate GID.

=head2 user name lookup

 my $status = archive_read_disk_set_uname_lookup($archive, $data, sub
   my($data, $uid) = @_;

lib/Archive/Libarchive/XS/Callback.pm  view on Meta::CPAN

Called by archive_read_disk_uname to determine appropriate user name.

=head2 group name lookup

 my $status = archive_read_disk_set_gname_lookup($archive, $data, sub
   my($data, $gid) = @_;
   ... # should return the name for $gid, or undef
 }, undef);

Called by archive_read_disk_gname to determine appropriate group name.

=head2 lookup cleanup

 view all matches for this distribution


Archive-Libarchive

 view release on metacpan or  search on metacpan

lib/Archive/Libarchive/API.pm  view on Meta::CPAN


=item Parent class: L<Archive::Libarchive::ArchiveWrite>

=back

=head2 disk_gid

 # archive_write_disk_gid
 my $sint64_1 = $dw->disk_gid($string, $sint64_2);

=head2 disk_set_options

 # archive_write_disk_set_options
 my $int1 = $dw->disk_set_options($int2);

lib/Archive/Libarchive/API.pm  view on Meta::CPAN

=head2 filetype_is_set

 # archive_entry_filetype_is_set (optional)
 my $int = $e->filetype_is_set;

=head2 gid

 # archive_entry_gid
 my $sint64 = $e->gid;

=head2 gid_is_set

 # archive_entry_gid_is_set (optional)
 my $int = $e->gid_is_set;

=head2 gname

 # archive_entry_gname
 my $string = $e->gname;

lib/Archive/Libarchive/API.pm  view on Meta::CPAN

This sets the type of the file for the entry.  This will accept either a string value
which is one of C<mt>, C<reg>, C<lnx>, C<sock>, C<chr>, C<blk>, C<dir> or C<ifo>,
or an integer constant value with the C<AE_IF> prefix.  See
L<Archive::Libarchive::API/CONSTANTS> for the full list.

=head2 set_gid

 # archive_entry_set_gid
 $e->set_gid($sint64);

=head2 set_gname

 # archive_entry_set_gname
 $e->set_gname($string);

lib/Archive/Libarchive/API.pm  view on Meta::CPAN

=head2 include_file_time_w

 # archive_match_include_file_time_w
 my $int1 = $m->include_file_time_w($int2, $wstring);

=head2 include_gid

 # archive_match_include_gid
 my $int = $m->include_gid($sint64);

=head2 include_gname

 # archive_match_include_gname
 my $int = $m->include_gname($string);

 view all matches for this distribution


Archive-Raw

 view release on metacpan or  search on metacpan

lib/Archive/Raw/Entry.pm  view on Meta::CPAN


=head2 mode( [$mode] )

=head2 strmode( )

=head2 gid( [$gid] )

=head2 uid( [$uid] )

=head2 symlink( [$sylink] )

 view all matches for this distribution


Archive-Tar-Builder

 view release on metacpan or  search on metacpan

lib/Archive/Tar/Builder/UserCache.pm  view on Meta::CPAN

        'groups' => {}
    }, $class;
}

sub lookup {
    my ( $self, $uid, $gid ) = @_;

    unless ( exists $self->{'users'}->{$uid} ) {
        if ( my @pwent = getpwuid($uid) ) {
            $self->{'users'}->{$uid} = $pwent[0];
        }
        else {
            $self->{'users'}->{$uid} = undef;
        }
    }

    unless ( exists $self->{'groups'}->{$gid} ) {
        if ( my @grent = getgrgid($gid) ) {
            $self->{'groups'}->{$gid} = $grent[0];
        }
        else {
            $self->{'groups'}->{$gid} = undef;
        }
    }

    return ( $self->{'users'}->{$uid}, $self->{'groups'}->{$gid} );
}

1;

 view all matches for this distribution


Archive-Tar-Stream

 view release on metacpan or  search on metacpan

lib/Archive/Tar/Stream.pm  view on Meta::CPAN


  my %header = (
    name => $items[0],
    mode => oct($items[1]),
    uid => oct($items[2]),
    gid => oct($items[3]),
    size => oct($items[4]),
    mtime => oct($items[5]),
    # checksum
    typeflag => $items[7],
    linkname => $items[8],

lib/Archive/Tar/Stream.pm  view on Meta::CPAN

  my $Self = shift;
  my %hash = (
    name => '',
    mode => 0777,
    uid => 0,
    gid => 0,
    size => 0,
    mtime => time(),
    typeflag => '0', # this is actually the STANDARD plain file format, phooey.  Not 'f' like Tar writes
    linkname => '',
    uname => '',

lib/Archive/Tar/Stream.pm  view on Meta::CPAN


  my $block = pack("a100a8a8a8a12a12a8a1a100a8a32a32a8a8a155",
    $header->{name},
    sprintf("%07o", $header->{mode}),
    sprintf("%07o", $header->{uid}),
    sprintf("%07o", $header->{gid}),
    sprintf("%011o", $header->{size}),
    sprintf("%011o", $header->{mtime}),
    "        ",                  # chksum
    $header->{typeflag},
    $header->{linkname},

lib/Archive/Tar/Stream.pm  view on Meta::CPAN


  my %hash = (
    name => '',
    mode => 0777,
    uid => 0,
    gid => 0,
    size => 0,
    mtime => time(),
    typeflag => '0', # this is actually the STANDARD plain file format, phooey.  Not 'f' like Tar writes
    linkname => '',
    uname => '',

 view all matches for this distribution


Archive-Tar-Wrapper-IPC-Cmd

 view release on metacpan or  search on metacpan

lib/Archive/Tar/Wrapper/IPC/Cmd.pm  view on Meta::CPAN

        }
    }

    my $perm    = $opts->{perm} if defined $opts->{perm};
    my $uid     = $opts->{uid} if defined $opts->{uid};
    my $gid     = $opts->{gid} if defined $opts->{gid};
    my $binmode = $opts->{binmode} if defined $opts->{binmode};

    my $target = File::Spec->catfile($self->{tardir}, $rel_path);
    my $target_dir = dirname($target);

lib/Archive/Tar/Wrapper/IPC/Cmd.pm  view on Meta::CPAN

    if(defined $uid) {
        chown $uid, -1, $target or
            LOGDIE "Can't chown $target uid to $uid ($!)";
    }

    if(defined $gid) {
        chown -1, $gid, $target or
            LOGDIE "Can't chown $target gid to $gid ($!)";
    }

    if(defined $perm) {
        chmod $perm, $target or 
                LOGDIE "Can't chmod $target to $perm ($!)";
    }

    if(!defined $uid and 
       !defined $gid and 
       !defined $perm and
       !ref($path_or_stringref)) {
        perm_cp($path_or_stringref, $target) or
            LOGDIE "Can't perm_cp $path_or_stringref to $target ($!)";
    }

 view all matches for this distribution


Archive-Tar-Wrapper

 view release on metacpan or  search on metacpan

lib/Archive/Tar/Wrapper.pm  view on Meta::CPAN

        unless ( ( ref($opts) ) and ( ref($opts) eq 'HASH' ) ) {
            LOGDIE "Option parameter given to add() not a hashref.";
        }
    }

    my ( $perm, $uid, $gid, $binmode );
    $perm    = $opts->{perm}    if defined $opts->{perm};
    $uid     = $opts->{uid}     if defined $opts->{uid};
    $gid     = $opts->{gid}     if defined $opts->{gid};
    $binmode = $opts->{binmode} if defined $opts->{binmode};

    my $target     = File::Spec->catfile( $self->{tardir}, $rel_path );
    my $target_dir = dirname($target);

lib/Archive/Tar/Wrapper.pm  view on Meta::CPAN

    if ( defined $uid ) {
        chown $uid, -1, $target
          or LOGDIE "Can't chown $target uid to $uid ($!)";
    }

    if ( defined $gid ) {
        chown -1, $gid, $target
          or LOGDIE "Can't chown $target gid to $gid ($!)";
    }

    if ( defined $perm ) {
        chmod $perm, $target
          or LOGDIE "Can't chmod $target to $perm ($!)";
    }

    if (    not defined $uid
        and not defined $gid
        and not defined $perm
        and not ref($path_or_stringref) )
    {
        perm_cp( $path_or_stringref, $target )
          or LOGDIE "Can't perm_cp $path_or_stringref to $target ($!)";

lib/Archive/Tar/Wrapper.pm  view on Meta::CPAN

If no additional parameters are given, permissions and user/group
id settings of a file to be added are copied. If you want different
settings, specify them in the options hash:

    $arch->add($logic_path, $stringref,
               { perm => 0755, uid => 123, gid => 10 });

If $file_or_stringref is a reference to a Unicode string, the C<binmode>
option has to be set to make sure the string gets written as proper UTF-8
into the tar file:

lib/Archive/Tar/Wrapper.pm  view on Meta::CPAN


=back

Returns 1 if everything goes fine.

Ignore errors here, as we can't change uid/gid unless we're the superuser (see LIMITATIONS section).

=head2 remove

    $arch->remove($logic_path);

lib/Archive/Tar/Wrapper.pm  view on Meta::CPAN

into a temporary directory and then calls the system tar to wrap up that
directory into a tarball.

This approach has limitations when it comes to file permissions: If the file to
be added belongs to a different user/group, B<Archive::Tar::Wrapper> will adjust
the uid/gid/permissions of the target file in the temporary directory to
reflect the original file's settings, to make sure the system tar will add it
like that to the tarball, just like a regular tar run on the original file
would. But this will fail of course if the original file's uid is different
from the current user's, unless the script is running with superuser rights.
The tar program by itself (without B<Archive::Tar::Wrapper>) works differently:
It'll just make a note of a file's uid/gid/permissions in the tarball (which it
can do without superuser rights) and upon extraction, it'll adjust the
permissions of newly generated files if the -p option is given (default for
superuser).

=back

 view all matches for this distribution


Archive-Tar

 view release on metacpan or  search on metacpan

lib/Archive/Tar.pm  view on Meta::CPAN

                    = File::Spec->splitpath( $cwd );
        my @cwd     = File::Spec->splitdir( $cwd_dir );
        push @cwd, $cwd_file if length $cwd_file;

        ### We need to pass '' as the last element to catpath. Craig Berry
        ### explains why (msgid <p0624083dc311ae541393@[172.16.52.1]>):
        ### The root problem is that splitpath on UNIX always returns the
        ### final path element as a file even if it is a directory, and of
        ### course there is no way it can know the difference without checking
        ### against the filesystem, which it is documented as not doing.  When
        ### you turn around and call catpath, on VMS you have to know which bits

lib/Archive/Tar.pm  view on Meta::CPAN

        ### not to the owner of the directory itself, which may or may not
        ### be another entry in the archive
        ### Answer: no, gnu tar doesn't do it either, it'd be the wrong
        ### way to go.
        #if( $CHOWN && CAN_CHOWN ) {
        #    chown $entry->uid, $entry->gid, $dir or
        #        $self->_error( qq[Could not set uid/gid on '$dir'] );
        #}
    }

    ### we're done if we just needed to create a dir ###
    return 1 if $entry->is_dir;

lib/Archive/Tar.pm  view on Meta::CPAN

        utime time, $entry->mtime - TIME_OFFSET, $full or
            $self->_error( qq[Could not update timestamp] );
    }

    if( $CHOWN && CAN_CHOWN->() and not -l $full and not ( $entry->is_hardlink and ON_UNIX and $EXTRACT_HARDLINK ) ) {
        CORE::chown( $entry->uid, $entry->gid, $full ) or
            $self->_error( qq[Could not set uid/gid on '$full'] );
    }

    ### only chmod if we're allowed to, but never chmod symlinks, since they'll
    ### change the perms on the file they're linking too...
    if( $CHMOD and not -l $full and not ( $entry->is_hardlink and ON_UNIX and $EXTRACT_HARDLINK ) ) {

lib/Archive/Tar.pm  view on Meta::CPAN

Returns a list of the names of all the files in the archive.

If C<list_files()> is passed an array reference as its first argument
it returns a list of hash references containing the requested
properties of each file.  The following list of properties is
supported: name, size, mtime (last modified date), mode, uid, gid,
linkname, uname, gname, devmajor, devminor, prefix.

Passing an array reference containing only one element, 'name', is
special cased to return a list of names rather than a list of hash
references, making it equivalent to calling C<list_files> without

lib/Archive/Tar.pm  view on Meta::CPAN

    ### this might be optimizable with a 'changed' flag in the file objects ###
    my $tar = pack (
                PACK,
                $file,

                (map { sprintf( $f1, $entry->$_() ) } qw[mode uid gid]),
                (map { sprintf( $f2, $entry->$_() ) } qw[size mtime]),

                "",  # checksum field - space padded a bit down

                (map { $entry->$_() }                 qw[type linkname magic]),

lib/Archive/Tar.pm  view on Meta::CPAN

a hash with specific options.

Will add a file to the in-memory archive, with name C<$filename> and
content C<$data>. Specific properties can be set using C<$opthashref>.
The following list of properties is supported: name, size, mtime
(last modified date), mode, uid, gid, linkname, uname, gname,
devmajor, devminor, prefix, type.  (On MacOS, the file's path and
modification times are converted to Unix equivalents.)

Valid values for the file type are the following constants defined by
Archive::Tar::Constant:

lib/Archive/Tar.pm  view on Meta::CPAN


If C<list_archive()> is passed an array reference as its third
argument it returns a list of hash references containing the requested
properties of each file.  The following list of properties is
supported: full_path, name, size, mtime (last modified date), mode,
uid, gid, linkname, uname, gname, devmajor, devminor, prefix, type.

See C<Archive::Tar::File> for details about supported properties.

Passing an array reference containing only one element, 'name', is
special cased to return a list of names rather than a list of hash

 view all matches for this distribution


Archive-TarGzip

 view release on metacpan or  search on metacpan

lib/Archive/TarGzip.pm  view on Meta::CPAN

     my $size = length($file_contents);
     my $tar_contents = pack("a100a8a8a8a12a12a8a1a100",
        $file_name,
        sprintf("%6o ",($file_contents ? 0666 : 0777) & (0777-umask)), # mode
        sprintf("%6o ",0),  # uid
        sprintf("%6o ",0),  # gid
        sprintf("%11o ",$size),
        sprintf("%11o ",time()), # mtime
        "        ",  # chksum
        0,           # typeflag
        '');        # linkname

lib/Archive/TarGzip.pm  view on Meta::CPAN

     return { end_of_tar => 1 } if $header eq "\0" x 512; # End of tar file
        
     my ($name,		# string
	 $mode,		# octal number
	 $uid,		# octal number
	 $gid,		# octal number
	 $size,		# octal number
	 $mtime,		# octal number
	 $chksum,		# octal number
	 $typeflag,		# character
	 $linkname,		# string

lib/Archive/TarGzip.pm  view on Meta::CPAN

	 $devminor,		# octal number
	 $prefix) = unpack($tar_unpack_header, $header);
	
     $mode = oct $mode;
     $uid = oct $uid;
     $gid = oct $gid;
     $size = oct $size;
     $mtime = oct $mtime;
     $chksum = oct $chksum;
     $devmajor = oct $devmajor;
     $devminor = oct $devminor;

lib/Archive/TarGzip.pm  view on Meta::CPAN


     return {
         name => $name,
	 mode => $mode,
	 uid => $uid,
	 gid => $gid,
	 size => $size,
	 mtime => $mtime,
	 chksum => $chksum,
	 typeflag => $typeflag,
	 linkname => $linkname,

lib/Archive/TarGzip.pm  view on Meta::CPAN

The $tar_header keys are as follows:

 name
 mode
 uid
 gid
 size
 mtime
 chksum
 typeflag
 linkname

 view all matches for this distribution


Archive-Unzip-Burst

 view release on metacpan or  search on metacpan

unzip-6.0/History.600  view on Meta::CPAN

    specific compiler used).  [Steven M. Schweda]
 - unzip.c: replaced tab characters in output messages by appropiate number of
    spaces (assuming standard tab spacing of 8 chars), to prevent mis-formatted
    output on terminals with non-standard tabstop settings.  [S. M. Schweda]
 - unix/unix.c
    * set_symlnk_attribs(): fixed uid/gid size check before calling lchown();
    * set_direc_attribs(): repared wrongly inserted patch and fixed uid/gid
      size check before calling chown().  [Chr. Spieler]
 - vms/vms.c: fixed user-query code for existing files on VMS when extracting
    in "-V" mode (retaining version numbers); fixed some problems with exotic
    extended ODS5 file names, and files named ".".  [Steven M. Schweda]
 - vms/cmdline.c, vms/unz_cli.cld: extended CLI to support the new extended

 view all matches for this distribution


Archive-Zip-SimpleZip

 view release on metacpan or  search on metacpan

lib/Archive/Zip/SimpleZip.pm  view on Meta::CPAN

        {
            $got->setValue(name => IO::Compress::Zip::canonicalName($got->getValue("name"), $isDir && ! $isLink));
        }
    }

    my ($mode, $uid, $gid, $size, $atime, $mtime, $ctime) ;

    if ( $got->parsed('storelinks') )
    {
        ($mode, $uid, $gid, $size, $atime, $mtime, $ctime)
                = (lstat($filename))[2, 4, 5, 7, 8, 9, 10] ;
    }
    else
    {
        ($mode, $uid, $gid, $size, $atime, $mtime, $ctime)
                = (stat($filename))[2, 4, 5,7, 8, 9, 10] ;
    }

    $got->setValue(time => $mtime);

lib/Archive/Zip/SimpleZip.pm  view on Meta::CPAN


        use Perl::OSType;
        my $type = Perl::OSType::os_type();
        if ( $type eq 'Unix' )
        {
            $got->setValue(exunixn => [$uid, $gid]) ;
        }
        # TODO add Windows
    }

    $self->_newStream($filename, $got);

 view all matches for this distribution


Arcus-Client

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
get_debug_opts|5.008001||Viu
get_deprecated_property_msg|5.031011||cVniu
getegid|5.005000||Viu
getenv|5.005000||Viu
getenv_len|5.006000||Viu
GETENV_LOCK|5.033005||Viu
GETENV_PRESERVES_OTHER_THREAD|5.033005|5.033005|Vn
GETENV_UNLOCK|5.033005||Viu
geteuid|5.005000||Viu
getgid|5.005000||Viu
getgrent|5.009000||Viu
GETGRENT_R_HAS_BUFFER|5.008000||Viu
GETGRENT_R_HAS_FPTR|5.008000||Viu
GETGRENT_R_HAS_PTR|5.008000||Viu
GETGRENT_R_PROTO|5.008000|5.008000|Vn
getgrgid|5.009000||Viu
GETGRGID_R_HAS_BUFFER|5.008000||Viu
GETGRGID_R_HAS_PTR|5.008000||Viu
GETGRGID_R_PROTO|5.008000|5.008000|Vn
getgrnam|5.009000||Viu
GETGRNAM_R_HAS_BUFFER|5.008000||Viu

ppport.h  view on Meta::CPAN

KEY_format|5.003007||Viu
KEY_formline|5.003007||Viu
KEY_ge|5.003007||Viu
KEY_getc|5.003007||Viu
KEY_getgrent|5.003007||Viu
KEY_getgrgid|5.003007||Viu
KEY_getgrnam|5.003007||Viu
KEY_gethostbyaddr|5.003007||Viu
KEY_gethostbyname|5.003007||Viu
KEY_gethostent|5.003007||Viu
KEY_getlogin|5.003007||Viu

ppport.h  view on Meta::CPAN

Perl_pp_ftfile|5.013009||Viu
Perl_pp_ftmtime|5.013009||Viu
Perl_pp_ftpipe|5.013009||Viu
Perl_pp_ftrexec|5.013009||Viu
Perl_pp_ftrwrite|5.013009||Viu
Perl_pp_ftsgid|5.013009||Viu
Perl_pp_ftsize|5.013009||Viu
Perl_pp_ftsock|5.013009||Viu
Perl_pp_ftsuid|5.013009||Viu
Perl_pp_ftsvtx|5.013009||Viu
Perl_pp_ftzero|5.013009||Viu
Perl_pp_getpeername|5.013009||Viu
Perl_pp_getsockname|5.013009||Viu
Perl_pp_ggrgid|5.013009||Viu
Perl_pp_ggrnam|5.013009||Viu
Perl_pp_ghbyaddr|5.013009||Viu
Perl_pp_ghbyname|5.013009||Viu
Perl_pp_gnbyaddr|5.013009||Viu
Perl_pp_gnbyname|5.013009||Viu

ppport.h  view on Meta::CPAN

PerlProc_execv|5.005000||Viu
PerlProc_execvp|5.005000||Viu
PerlProc__exit|5.005000||Viu
PerlProc_exit|5.005000||Viu
PerlProc_fork|5.006000||Viu
PerlProc_getegid|5.005000||Viu
PerlProc_geteuid|5.005000||Viu
PerlProc_getgid|5.005000||Viu
PerlProc_getlogin|5.005000||Viu
PerlProc_GetOSError|5.006000||Viu
PerlProc_getpid|5.006000||Viu
PerlProc_gettimeofday|5.008000||Viu
PerlProc_getuid|5.005000||Viu

ppport.h  view on Meta::CPAN

PerlProc_pclose|5.005000||Viu
PerlProc_pipe|5.005000||Viu
PerlProc_pipe_cloexec|5.027008||Viu
PerlProc_popen|5.005000||Viu
PerlProc_popen_list|5.007001||Viu
PerlProc_setgid|5.005000||Viu
PerlProc_setjmp|5.005000||Viu
PerlProc_setuid|5.005000||Viu
PerlProc_signal|5.005000||Viu
PerlProc_sleep|5.005000||Viu
PerlProc_spawnvp|5.008000||Viu

ppport.h  view on Meta::CPAN

PL_defgv|5.004005|5.003007|p
PL_def_layerlist|5.007003||Viu
PL_defoutgv|5.005000||Viu
PL_defstash|5.005000||Viu
PL_delaymagic|5.005000||Viu
PL_delaymagic_egid|5.015008||Viu
PL_delaymagic_euid|5.015008||Viu
PL_delaymagic_gid|5.015008||Viu
PL_delaymagic_uid|5.015008||Viu
PL_destroyhook|5.010000||Viu
PL_diehook|5.005000|5.003007|poVnu
PL_Dir|5.006000||Viu
PL_dirty|5.005000|5.003007|poVnu

ppport.h  view on Meta::CPAN

setfd_cloexec|5.027008||Vniu
setfd_cloexec_for_nonsysfd|5.027008||Viu
setfd_cloexec_or_inhexec_by_sysfdness|5.027008||Viu
setfd_inhexec|5.027008||Vniu
setfd_inhexec_for_sysfd|5.027008||Viu
setgid|5.005000||Viu
setgrent|5.009000||Viu
SETGRENT_R_HAS_FPTR|5.008000||Viu
SETGRENT_R_PROTO|5.008000|5.008000|Vn
sethostent|5.005000||Viu
SETHOSTENT_R_PROTO|5.008000|5.008000|Vn

ppport.h  view on Meta::CPAN

SETPROTOENT_R_PROTO|5.008000|5.008000|Vn
setpwent|5.009000||Viu
SETPWENT_R_HAS_FPTR|5.008000||Viu
SETPWENT_R_PROTO|5.008000|5.008000|Vn
set_regex_pv|5.029004||Viu
setregid|5.003007||Viu
setreuid|5.003007||Viu
SETs|5.003007||Viu
setservent|5.005000||Viu
SETSERVENT_R_PROTO|5.008000|5.008000|Vn
setsockopt|5.005000||Viu

ppport.h  view on Meta::CPAN

SvSCREAM|5.003007||Viu
SvSCREAM_off|5.003007||Viu
SvSCREAM_on|5.003007||Viu
sv_setbool|5.035004|5.035004|
sv_setbool_mg|5.035004|5.035004|
sv_setgid|5.019001||Viu
sv_sethek|5.015004||cViu
sv_setiv|5.003007|5.003007|
sv_setiv_mg|5.004005|5.003007|p
SvSETMAGIC|5.003007|5.003007|
SvSetMagicSV|5.004000|5.004000|

 view all matches for this distribution


Arepa

 view release on metacpan or  search on metacpan

install_arepa.pl  view on Meta::CPAN

my $uid = getgrnam($arepa_user);
if (!defined $uid) {
    print STDERR "ERROR: User '$arepa_user' doesn't exist\n";
    exit 1;
}
my $gid = getgrnam($arepa_group);
if (!defined $gid) {
    print STDERR "ERROR: Group '$arepa_group' doesn't exist\n";
    exit 1;
}
my $web_uid = getgrnam($web_user);
if (!defined $web_uid) {
    print STDERR "ERROR: User '$web_user' doesn't exist\n";
    exit 1;
}
my $web_gid = getgrnam($web_group);
if (!defined $web_gid) {
    print STDERR "ERROR: Group '$web_group' doesn't exist\n";
    exit 1;
}

my $package_db_path = $config->get_key("package_db");

install_arepa.pl  view on Meta::CPAN

                                      "conf"),
                  $config->get_key("upload_queue:path"),
                  $config->get_key("dir:build_logs")) {
    print "Creating directory $path\n";
    mkpath($path);
    chown($uid, $gid, $path);
    symchmod("g+w", $path);
}

my $builder_dir = "/etc/arepa/builders";
print "Creating builder configuration directory $builder_dir\n";
mkpath($builder_dir);
chown($uid, $gid, $builder_dir);
symchmod("g+w", $builder_dir);

print "Creating package DB in $package_db_path\n";
my $package_db = Arepa::PackageDb->new($package_db_path);
chown($uid, $gid, $package_db_path);
symchmod("g+w", $package_db_path);

my $db_dir = dirname($package_db_path);
print "Fixing permissions for database directory $db_dir\n";
chown($uid, $gid, $db_dir);
symchmod("g+w", $db_dir);

my $session_db_path = $config->get_key("web_ui:session_db");
if (! -r $session_db_path) {
    print "Creating web UI session DB in $session_db_path\n";

install_arepa.pl  view on Meta::CPAN

    my $sqlite_cmd = <<EOC;
echo "CREATE TABLE session (sid VARCHAR(40) PRIMARY KEY, data TEXT, expires INTEGER UNSIGNED NOT NULL, UNIQUE(sid));" | sqlite3 '$session_db_path'
EOC
    print "Creating session DB schema with:\n$sqlite_cmd";
    system($sqlite_cmd);
    chown($web_uid, $web_gid, $session_db_path);
    symchmod("g+w", $session_db_path);
}

my $repo_dists_conf = File::Spec->catfile($config->get_key("repository:path"),
                                          "conf",
                                          "distributions");
print "Creating repo configuration file in $repo_dists_conf\n";
open F, ">>$repo_dists_conf";
close F;
chown($uid, $gid, $repo_dists_conf);
symchmod("g+w", $repo_dists_conf);

my $gpg_dir = $config->get_key("web_ui:gpg_homedir");
print "Creating GPG directory in $gpg_dir\n";
mkpath($gpg_dir);
chown($web_uid, $web_gid, $gpg_dir);
chmod(0700, $gpg_dir);

my $gpg_options = File::Spec->catfile($config->get_key("web_ui:gpg_homedir"),
                                      "options");
if (! -f $gpg_options) {
    print "Creating options file $gpg_options\n";
    my $keyrings_dir =
        File::Spec->catfile(dirname($config->get_key("web_ui:gpg_homedir")),
                            "keyrings");
    mkpath($keyrings_dir);
    chown($uid, $gid, $keyrings_dir);
    symchmod("g+w", $keyrings_dir);

    open F, ">$gpg_options";
    print F "keyring $keyrings_dir/uploaders.gpg\n";
    close F;
    chown($uid, $gid, $gpg_options);
    symchmod("g+w", $gpg_options);
}

 view all matches for this distribution


Argon

 view release on metacpan or  search on metacpan

lib/Argon/Manager.pm  view on Meta::CPAN

  $self->del_worker($worker);
  delete $self->tracker->{$worker};

  $self->update_queue_capacity;

  my @msgids = grep { $self->assigned->{$_} eq $worker }
    keys %{$self->assigned};

  if (@msgids) {
    my $msg = 'The worker assigned to this task disconnected before completion.';
    $self->send(Argon::Message->error($msg, id => $_))
      foreach @msgids;
  }

  log_info 'Worker %s disconnected; capacity is down to %d',
    $worker,
    $self->capacity;

 view all matches for this distribution



( run in 1.311 second using v1.01-cache-2.11-cpan-ceb78f64989 )