brp python
This commit is contained in:
parent
3206f03abb
commit
9f7ee5728e
@ -28,7 +28,13 @@ sub process;
|
|||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
{
|
{
|
||||||
die "t [--ignoredir dir] [--dir dir spec] [--file file spec] root\n";
|
die "usage: genfilelist [-p] [--ignoredir dir] [--dir dir spec] [--file file spec] root\n"
|
||||||
|
." -p : add python compiled binaries at brp bytecompile\n"
|
||||||
|
." --ignoredir dir : ignore dir as already owned by another rpm\n"
|
||||||
|
." --dir dir spec : add dir with spec, e.g. /var/log/yum 'attr(2750,root,root)'\n"
|
||||||
|
." --file file spec: add file with spec, e.g. '/sbin/e-smith/yum' 'attr(0755,root,root)'\n"
|
||||||
|
." root : is usually \$RPM_BUILD_ROOT\n"
|
||||||
|
." known paths will have usual attributes applied (e.g. /etc/e-smith/events/actions/*)\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
my @ignoredirs = ('', qw(
|
my @ignoredirs = ('', qw(
|
||||||
@ -151,6 +157,7 @@ my @ignoredirs = ('', qw(
|
|||||||
);
|
);
|
||||||
|
|
||||||
my $startdirectory = undef;
|
my $startdirectory = undef;
|
||||||
|
my $brppython = 0;
|
||||||
while (my $arg = shift)
|
while (my $arg = shift)
|
||||||
{
|
{
|
||||||
if ($arg eq "--ignoredir")
|
if ($arg eq "--ignoredir")
|
||||||
@ -177,6 +184,10 @@ while (my $arg = shift)
|
|||||||
if exists $::fileperms{$file};
|
if exists $::fileperms{$file};
|
||||||
$::fileperms{$file} = '%' . $spec;
|
$::fileperms{$file} = '%' . $spec;
|
||||||
}
|
}
|
||||||
|
elsif ($arg eq "-p")
|
||||||
|
{
|
||||||
|
$brppython = 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$startdirectory = $arg;
|
$startdirectory = $arg;
|
||||||
@ -184,7 +195,7 @@ while (my $arg = shift)
|
|||||||
}
|
}
|
||||||
|
|
||||||
defined $startdirectory
|
defined $startdirectory
|
||||||
or die "Must give directory arg";
|
or die usage();
|
||||||
|
|
||||||
# Change to the build root directory
|
# Change to the build root directory
|
||||||
chdir $startdirectory
|
chdir $startdirectory
|
||||||
@ -231,10 +242,13 @@ sub process
|
|||||||
return if $path =~ m{\.orig$};
|
return if $path =~ m{\.orig$};
|
||||||
|
|
||||||
my (@paths) = ($path);
|
my (@paths) = ($path);
|
||||||
|
# add compiled python path (ie by brp bytecompile), if desired, and if outside of /etc/e-smith/templates
|
||||||
# Add compiled python files
|
if ( ($brppython) and ( not $path =~ m{^/etc/e-smith/templates} ))
|
||||||
push @paths, "${path}c" if $path =~ m{\.py$};
|
{
|
||||||
push @paths, "${path}o" if $path =~ m{\.py$};
|
# Add compiled python files
|
||||||
|
push @paths, "${path}c" if $path =~ m{\.py$};
|
||||||
|
push @paths, "${path}o" if $path =~ m{\.py$};
|
||||||
|
}
|
||||||
|
|
||||||
foreach $path (@paths) {
|
foreach $path (@paths) {
|
||||||
# Some files get special permissions and ownership
|
# Some files get special permissions and ownership
|
||||||
|
@ -4,7 +4,7 @@ Summary: smeserver tools for building RPMs
|
|||||||
%define name smeserver-devtools
|
%define name smeserver-devtools
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 2.6.0
|
%define version 2.6.0
|
||||||
%define release 19
|
%define release 20
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -19,6 +19,9 @@ Requires: perl(Pod::Tests)
|
|||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> 2.6.0-20.sme
|
||||||
|
- fix [SME: ]
|
||||||
|
|
||||||
* Tue Mar 12 2024 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-19.sme
|
* Tue Mar 12 2024 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-19.sme
|
||||||
- add Provides: e-smith-devtools
|
- add Provides: e-smith-devtools
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user