Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-File-chmod
perl-File-chmod.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-File-chmod.spec of Package perl-File-chmod
# # spec file for package perl-File-chmod # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-File-chmod Version: 0.42 Release: 0 %define cpan_name File-chmod Summary: Implements symbolic and ls chmod modes License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/File-chmod/ Source: http://www.cpan.org/authors/id/X/XE/XENO/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(autodie) %{perl_requires} %description File::chmod is a utility that allows you to bypass system calls or bit processing of a file's permissions. It overloads the chmod() function with its own that gets an octal mode, a symbolic mode (see below), or an "ls" mode (see below). If you wish not to overload chmod(), you can export symchmod() and lschmod(), which take, respectively, a symbolic mode and an "ls" mode. An added feature to version 0.30 is the '$UMASK' variable, explained in detail below; if 'symchmod()' is called and this variable is true, then the function uses the (also new) '$MASK' variable (which defaults to 'umask()') as a mask against the new mode. This mode is on by default, and changes the behavior from what you would expect if you are used to UNIX 'chmod'. *This may change in the future.* Symbolic modes are thoroughly described in your chmod(1) man page, but here are a few examples. chmod("+x","file1","file2"); # overloaded chmod(), that is... # turns on the execute bit for all users on those two files chmod("o=,g-w","file1","file2"); # removes 'other' permissions, and the write bit for 'group' chmod("=u","file1","file2"); # sets all bits to those in 'user' "ls" modes are the type produced on the left-hand side of an 'ls -l' on a directory. Examples are: chmod("-rwxr-xr-x","file1","file2"); # the 0755 setting; user has read-write-execute, group and others # have read-execute priveleges chmod("-rwsrws---","file1","file2"); # sets read-write-execute for user and group, none for others # also sets set-uid and set-gid bits The regular chmod() and lschmod() are absolute; that is, they are not appending to or subtracting from the current file mode. They set it, regardless of what it had been before. symchmod() is useful for allowing the modifying of a file's permissions without having to run a system call or determining the file's permissions, and then combining that with whatever bits are appropriate. It also operates separately on each file. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes CONTRIBUTING LICENSE README %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor