5 Commits

Author SHA1 Message Date
15b34b4824 Update 2024-03-23 12:11:54 +00:00
6a976f08f4 clog 2024-03-17 14:35:55 -04:00
9f7ee5728e brp python 2024-03-15 11:49:39 -04:00
3206f03abb 2.6.0-19 2024-03-12 21:05:46 -04:00
7950f95e84 Provides 2024-03-12 17:11:16 -04:00
2 changed files with 35 additions and 10 deletions

View File

@@ -28,7 +28,13 @@ sub process;
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(
@@ -151,6 +157,7 @@ my @ignoredirs = ('', qw(
);
my $startdirectory = undef;
my $brppython = 0;
while (my $arg = shift)
{
if ($arg eq "--ignoredir")
@@ -177,6 +184,10 @@ while (my $arg = shift)
if exists $::fileperms{$file};
$::fileperms{$file} = '%' . $spec;
}
elsif ($arg eq "-p")
{
$brppython = 1;
}
else
{
$startdirectory = $arg;
@@ -184,7 +195,7 @@ while (my $arg = shift)
}
defined $startdirectory
or die "Must give directory arg";
or die usage();
# Change to the build root directory
chdir $startdirectory
@@ -231,10 +242,13 @@ sub process
return if $path =~ m{\.orig$};
my (@paths) = ($path);
# Add compiled python files
push @paths, "${path}c" if $path =~ m{\.py$};
push @paths, "${path}o" if $path =~ m{\.py$};
# add compiled python path (ie by brp bytecompile), if desired, and if outside of /etc/e-smith/templates
if ( ($brppython) and ( not $path =~ m{^/etc/e-smith/templates} ))
{
# Add compiled python files
push @paths, "${path}c" if $path =~ m{\.py$};
push @paths, "${path}o" if $path =~ m{\.py$};
}
foreach $path (@paths) {
# Some files get special permissions and ownership

View File

@@ -3,14 +3,15 @@
Summary: smeserver tools for building RPMs
%define name smeserver-devtools
Name: %{name}
%define version 2.6.0
%define release 17
%define version 11.0.0
%define release 1
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: Networking/Daemons
Source: %{name}-%{version}.tar.xz
Provides: e-smith-devtools
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
Requires: perl, perl(Test::Inline) >= 0.12, perl(XML::Parser)
@@ -18,6 +19,17 @@ Requires: perl(Pod::Tests)
AutoReqProv: no
%changelog
* Sat Mar 23 2024 Brian Read <brianr@koozali.org>11.0.0-1.sme
- Update Release and Version to base version and 1st release for SME11 [SME: 12518]
* Fri Mar 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> 2.6.0-20.sme
- do not add python compiled files by default, option to add them [SME: 11380]
ignore .py files in /etc/e-smith/templates
also added better usage output
* Tue Mar 12 2024 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-19.sme
- add Provides: e-smith-devtools
* Mon Mar 11 2024 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-17.sme
- fix missing deps for perl(Pod::Tests) [SME: 12501]
@@ -256,7 +268,7 @@ AutoReqProv: no
- Added validate-lexicon which exits non-zero if the lexicon
doesn't parse properly [gordonr 3155]
* Sat Apr 05 2002 Gordon Rowell <gordonr@e-smith.com>
* Fri Apr 05 2002 Gordon Rowell <gordonr@e-smith.com>
- [1.7.1-01]
- New development stream. Added /sbin/e-smith/quicktest [gordonr]
@@ -440,7 +452,6 @@ AutoReqProv: no
* Thu Aug 24 2000 Charlie Brady <charlieb@e-smith.net>
- initial release
Provides: e-smith-devtools
%description
Tools for use in building RPMs for the smeserver serverand gateway.