diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e594810 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.rpm +*.log +*spec-20* +*.tar.xz diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5f7b05a --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: e-smith-devtools +# $Id: Makefile,v 1.1 2016/02/04 22:54:13 vip-ire Exp $ +NAME := e-smith-devtools +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 7e8e62a..bc94a36 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ -# e-smith-devtools +# e-smith-devtools -SMEServer Koozali developed git repo for e-smith-devtools smeserver \ No newline at end of file +SMEServer Koozali developed git repo for e-smith-devtools smeserver + +## Wiki +
https://wiki.koozali.org/ + +## Bugzilla +Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-devtools&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED) + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
+ +e-smith-devtools is an open source software package that makes it easy to develop web applications and websites. It includes components like a web server, database, programming language, and framework that can be used to develop web applications. With e-smith-devtools, developers can quickly create dynamic web applications and websites with minimal coding. The software also includes many tools such as a source code editor, a debugger, a code profiler, and a web framework. With these tools, developers can quickly develop interactive web applications with complex functionality. e-smith-devtools is easy to use and simplifies the task of web application development. diff --git a/additional/.vimrc b/additional/.vimrc new file mode 100644 index 0000000..9d93a01 --- /dev/null +++ b/additional/.vimrc @@ -0,0 +1,133 @@ +" Standard e-smith .vimrc file. +" $Id: .vimrc,v 1.1 2003/04/10 17:11:29 msoulier Exp $ +" version number for Vim +version 6.0 + +" Standard Vi options +" auto indentation for coding, I prefer to turn it on myself +set autoindent +" display changes after each editor command +set autoprint +" write the file before critical commands +set autowrite +" do not ignore all control characters during input +set nobeautify +" directory to store buffer files +set directory=/tmp +" don't remember the flags used with the most recent sub +" command to use in the next one +set noedcompatible +" turn off the bloody bells +set noerrorbells +" don't allow execution of local .exrc files, use :so instead +set noexrc +" do not ignore case in searches +set noignorecase +" turn off indents of lisp format +set nolisp +" don't print special chars for tabs and EOLs, just +" call this up whenever you need it +set nolist +" allow wildcard chars in regexps - magic good +set magic +" don't permit system messages to display while editing +set nomesg +" don't show line numbers by default +set nonumber +" don't remove carriage returns when printing multiple lines, +set nooptimize +" displays the ex prompt when vi's Q command is given +set prompt +" redraw the screen whenever edits are made +set redraw +" allow nested map sequences +set remap +" displays a message on the status line whenever you use a +" command that edits at least the lines specified - use 0 +" so this is always on +set report=0 +" location of command interpreter for :sh command +set shell=/bin/sh +" amount of shift for autoindent and >> << commands +set shiftwidth=4 +" whenever ) or } is entered, jump briefly to matching ( or {, +" beep if none found - handy for coding +set showmatch +" show what mode we're in +set showmode +" size of the tabstops +set tabstop=4 +" number of characters that are significant for tags - 0 means all +set taglength=0 +" defines pathname of files containing tags (ie. ctags) +set tags=./tags,tags +" I like long error messages +set noterse +" allow keyboard maps to time out after 1 second +set timeout +" displays the warning message of "no write since last change" +set warn +" searches wrap around either end of file +set nowrapscan +" defines right margin - > 0 automatically inserts carriage returns +" to break lines - use for text mode, not for coding +set wrapmargin=0 +" don't allow saving to any file +set nowriteany + +" VIM OPTIONS + +" Turn on filetype support. +filetype on +" Turn on filetype indenting by default. +filetype indent on +" Turn on syntax shading. +syn on +" Default directory setup for the swapfile. +set directory=.,~/tmp,/var/tmp,/tmp +" Default dictionary. +set dictionary=/usr/dict/words +" 'cause backups are for wimps ;-) +set nobackup +" laststatus: show status line? Yes, always! +" laststatus: Even for only one buffer. +set laststatus=2 +" allow the last line to be a modeline +set modeline +" scan the first 5 lines of the file for modelines +set modelines=5 +" Again, bells bad... +set visualbell +" I hate hlsearch most of the time. +set nohlsearch +" set the make program - use gmake if make is not GNU +set makeprg=make +" set the textwidth by default +set textwidth=78 +" expand tabs +set expandtab +" 'cause I hate always having to save before switching buffers +set hidden +" so the >> and << commands do not shift just to tab boundaries +set noshiftround +" I like to see all possible completions for files +set wildmode=longest,list +set wildmenu +" we're on a fast terminal +set ttyfast +" toggle the paste option +set pastetoggle= +" I like incremental searching. +set incsearch + +" Inform Vim that I use a dark background. +set bg=dark + +" extra search paths for the SME server +" :h find for more information +set path+=/usr/lib/perl5/site_perl/esmith +set path+=/usr/lib/perl5/site_perl/esmith/DB +set path+=/usr/lib/perl5/site_perl/esmith/FormMagick/Panel +set path+=/home/e-smith +set path+=/etc/e-smith/events/actions +set path+=/etc/e-smith/web/functions diff --git a/additional/Backup.pm b/additional/Backup.pm new file mode 100644 index 0000000..09bef99 --- /dev/null +++ b/additional/Backup.pm @@ -0,0 +1,116 @@ +#---------------------------------------------------------------------- +# copyright (C) 2013-2022 Koozali Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +#---------------------------------------------------------------------- +package esmith::Build::Backup; + +use strict; +use warnings; +use Exporter; +use File::Basename; +use File::Path; + +our @ISA = qw(Exporter); +our @EXPORT = qw(); +our @EXPORT_OK = qw( + backup_excludes + backup_includes + ); +our %EXPORT_TAGS = ( + all => [ qw!backup_excludes backup_includes! ] + ); + +our $VERSION = sprintf '%d.%03d', q$Revision: 1.3 $ =~ /: (\d+).(\d+)/; + +=head1 NAME + +esmith::Build::Backup - A library for creating backup include and exclude during rpm construction. + +=head1 SYNOPSIS + + use esmith::Build::Backup qw(:all); + + backup_includes("smeserver-ContribName", qw(/list/of/path /you/need/to /include/to /backup)); + +=head1 DESCRIPTION + +=cut + +=head2 backup_includes + +This function populates both /etc/backup-data.d/ for core console backup and template for +/etc/dar/DailyBackup.dcf which is dar workstation backup file, if the directories do +not exist, it will create them. + + ie. backup_includes("smeserver-ContribName", qw(/list/of/path /you/need/to /include/to /backup)) + +=cut +sub backup_includes +{ + my ($name, @paths) = @_; + my $core = "root/etc/backup-data.d"; + my $corefilename = "$core/${name}.include"; + + unless (-d $core) + { + mkpath $core or die "Could not create dir $core: $!"; + } + + open(CFH, '>', $corefilename) or die $!; + foreach my $str (@paths) + { + $str =~ s|/$||; + print CFH "$str\n"; + } + close(CFH); + # add template expand to smeserver-ContribName-update + use esmith::Build::CreateLinks qw(templates2events); + templates2events("/etc/dar/DailyBackup.dcf","${name}-update"); +} + +=head2 backup_excludes + +This function populates both /etc/backup-data.d/ for core console backup and template for +/etc/dar/DailyBackup.dcf which is dar workstation backup file, if the directories do +not exist, it will create them. + + ie. backup_excludes("smeserver-ContribName", qw(/list/of/path /you/need/to /exclude/from /backup)) + +=cut +sub backup_excludes +{ + my ($name, @paths) = @_; + my $core = "root/etc/backup-data.d"; + my $corefilename = "$core/${name}.exclude"; + + unless (-d $core) + { + mkpath $core or die "Could not create dir $core: $!"; + } + + open(CFH, '>', $corefilename) or die $!; + foreach my $str (@paths) + { + $str =~ s|/$||; + print CFH "$str\n"; + } + close(CFH); + # add template expand to smeserver-ContribName-update + use esmith::Build::CreateLinks qw(templates2events); + templates2events("/etc/dar/DailyBackup.dcf","${name}-update"); +} + diff --git a/additional/COPYING b/additional/COPYING new file mode 100644 index 0000000..eeb586b --- /dev/null +++ b/additional/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/additional/CreateLinks.pm b/additional/CreateLinks.pm new file mode 100644 index 0000000..b2d2f97 --- /dev/null +++ b/additional/CreateLinks.pm @@ -0,0 +1,269 @@ +#---------------------------------------------------------------------- +# copyright (C) 1999-2005 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from Mitel Networks +# Please visit our web site www.mitel.com/sme/ for details. +#---------------------------------------------------------------------- +package esmith::Build::CreateLinks; + +use strict; +use warnings; +use Exporter; +use File::Basename; +use File::Path; + +our @ISA = qw(Exporter); +our @EXPORT = qw(); +our @EXPORT_OK = qw( + safe_symlink panel_link admin_common_link + event_link service_link_enhanced + safe_touch templates2events + event_templates event_actions event_services + ); +our %EXPORT_TAGS = ( + all => [ qw!safe_symlink panel_link admin_common_link + event_link service_link_enhanced + safe_touch templates2events + event_templates event_actions event_services! ] + ); + +our $VERSION = sprintf '%d.%03d', q$Revision: 1.1 $ =~ /: (\d+).(\d+)/; + +=head1 NAME + +esmith::Build::CreateLinks - A library for creating symlinks during rpm construction. + +=head1 SYNOPSIS + + use esmith::Build::CreateLinks qw(:all); + + safe_symlink("../../../functions/$function", "$cgibin/$function") + +=head1 DESCRIPTION + +=cut + +=head2 safe_symlink + +This function works like symlink(), but if the directory being linked to does +not exist, it will create it. + + ie. safe_symlink("../../../functions/$function", "$cgibin/$function") + +=cut + +sub safe_symlink($$) { + my ($from, $to) = @_; + mkpath(dirname($to)); + unlink($to) if -f $to; + symlink($from, $to) + or die "Can't create symlink from $from to $to: $!"; +} + +=head2 panel_link + +This function creates a link to a web panel. + + ie. + my $panel = "manager"; + panel_link("tug", $panel); + +=cut + +sub panel_link($$) +{ + my ($function, $panel) = @_; + my $cgibin = "root/etc/e-smith/web/panels/$panel/cgi-bin"; + + safe_symlink("../../../functions/wrapper", + "$cgibin/$function") +} + +=head2 admin_common_link + +This function creates a symlink from the common manager directory to a file in +the functions directory. + +=cut + +sub admin_common_link($) +{ + my ($function) = @_; + safe_symlink("../../../functions/$function", + "root/etc/e-smith/web/panels/manager/common/$function"); +} + +=head2 event_link + +This function creates a symlink from an action's ordered location in an +event directory to its action script. + + ie. + my $event = "tug-update"; + event_link("tug-conf", $event, "10"); + event_link("conf-masq", $event, "20"); + event_link("adjust-masq", $event, "30"); + event_link("tug-restart", $event, "40"); + +=cut + +sub event_link($$$) +{ + my ($action, $event, $level) = @_; + + safe_symlink("../actions/${action}", + "root/etc/e-smith/events/${event}/S${level}${action}"); +} + +=head2 service_link_enhanced + +This function creates a symlink from a SysV init start or kill link in a +runlevel to e-smith-service, a wrapper that is config db aware. + + ie. + safe_symlink("daemontools", "root/etc/rc.d/init.d/tug"); + service_link_enhanced("tug", "S85", "7"); + service_link_enhanced("tug", "K25", "6"); + service_link_enhanced("tug", "K25", "0"); + +=cut + +sub service_link_enhanced($$$) +{ + my ($service, $level, $rc) = @_; + + $rc = 7 unless defined $rc; + $level =~ /[^\d]/ or $level = "S${level}"; + safe_symlink("/etc/rc.d/init.d/e-smith-service", + "root/etc/rc.d/rc${rc}.d/${level}${service}"); +} + +=head2 safe_touch + +This function creates an empty file, but first creates any enclosing directories. +For example: + + safe_touch("a/b/c/d"); + +will create any of the directories "a", "a/b", "a/b/c" which don't exist, then create +an empty file "a/b/c/d". + +=cut + +sub safe_touch +{ + my ($path) = @_; + my ($file, $dir) = fileparse $path; + unless (-d $dir) + { + mkpath $dir or die "Could not create dir $dir: $!"; + } + open(F, ">$path") or die "Could not open/create file $path: $!"; + close(F) or die "Could not close file $path: $!"; +} + +=head2 templates2events +This function creates a file tree (of empty files) which is used by the +generic_template_expand action to determine which templates need to +be expanded for a particular event. Takes one file argument and a +list of event names, e.g. + + templates2events("/etc/some/file", "event1", "event2", ...); + +=cut +sub templates2events +{ + my ($path, @events) = @_; + + foreach (@events) + { + safe_touch "root/etc/e-smith/events/$_/templates2expand/$path"; + } +} + +=head2 event_templates + +This function creates a file tree (of empty files) which is used by the +generic_template_expand action to determine which templates need to +be expanded for a particular event. Takes one event argument and a +list of file names, e.g. + + event_templates("$event", "/etc/some/file", "/etc/some/file2", "/etc/some/file3", ...); + +=cut + +sub event_templates +{ + my ($event, @paths) = @_; + + foreach (@paths) + { + safe_touch "root/etc/e-smith/events/$event/templates2expand/$_"; + } +} + +=head2 event_actions($event, %actions) + +Create links to actions for the given event. %actions is a list of pairs Action => Priority. E.g + + event_actions('myevent', 'action1' => '10', 'action2' => '20', ..); + +See also event_link(). + +=cut + +sub event_actions +{ + my ($event, %actions) = @_; + + foreach my $action (keys %actions) + { + my $level = $actions{$action}; + safe_symlink("../actions/${action}", + "root/etc/e-smith/events/${event}/S${level}${action}"); + } +} + +=head2 event_services($event, %services) + +Create links for the given $event in services2adjust/ +subdirectory. %services is a list of pairs Service => +LinkDestination + event_services('myevent', 'sshd' => 'restart', 'samba' => 'reload') +See also safe_symlink(). + +=cut + +sub event_services +{ + my ($event, %services) = @_; + + foreach my $service (keys %services) + { + my $action = $services{$service}; + safe_symlink($action, 'root/etc/e-smith/events/' . $event . '/services2adjust/' . $service); + } +} + + +=head1 AUTHOR + +SME Server Developers + +=cut + +1; diff --git a/additional/buildtests b/additional/buildtests new file mode 100755 index 0000000..e48654a --- /dev/null +++ b/additional/buildtests @@ -0,0 +1,81 @@ +#!/usr/bin/perl -w + +use strict; +use File::Find; +use File::Path; +use File::Basename; + +=head1 NAME + +buildtests -- generate test scripts from inline tests in Perl scripts + +=head1 SYNOPSIS + + buildtests output-test-dir + +=head1 DESCRIPTION + +This script goes through the files to be installed by an e-smith RPM, +seeking out Perl scripts which contain embedded tests (using +Test::Inline). If it finds them, it generates tests under +F + +The filenames of the output test files are usually in the form +F -- the leading directories will be stripped off, +and the suffix will be stripped off if it's either of F<.pm> or F<.pl>. +However, there's a possibility that this will result in a name clash, so +if a name clash looks likely to occur, the script will keep prefixing +leading directories to the output filename until it finds something +that's not taken. So if you already had, for example, a test script +called F and you wanted to generate a test from +esmith::config, it would end up being called +F. In short: the filenames given to the +output files may vary from time to time, but the files will not overwrite +existing files. + +=cut + +my $outputdir = $ARGV[0] || usage(); + +print "Building test suite from embedded tests...\n"; + +die "You must start buildtests in the directory which contains the root/ tree\n" + unless -d "root"; + +$outputdir = "root/etc/e-smith/tests/$outputdir"; +unless (-d $outputdir) { + print " creating directory $outputdir...\n"; + mkpath $outputdir or die "Can't make output directory $outputdir: $!"; +} + +find({ wanted => \&buildtests, no_chdir => 1 }, "root/"); + +sub buildtests { + return unless -T; + return if /CVS/; + return if /\.t$/; + return if /\.orig$/; + my $origfile = $_; + my ($testname, $dir) = fileparse($origfile, ".pm", ".pl"); + my @dirs = split "/", $dir; + + while (-f "$outputdir/embedded-$testname.t") { + $testname = pop(@dirs) . "-$testname"; + } + + my $testfile = "$outputdir/embedded-$testname.t"; + + #print "ORIG: $origfile\nTEST: $testfile\n"; + system("pod2test", $origfile, $testfile); +} + + +sub usage { + die qq( +Usage: + buildtests output-test-dir + +You must provide an output directory name, which will be created under +/etc/e-smith/tests. +); +} diff --git a/additional/debugfiles.list b/additional/debugfiles.list new file mode 100644 index 0000000..e69de29 diff --git a/additional/debuglinks.list b/additional/debuglinks.list new file mode 100644 index 0000000..e69de29 diff --git a/additional/debugsources.list b/additional/debugsources.list new file mode 100644 index 0000000..e69de29 diff --git a/additional/e-smith-devtools.repo b/additional/e-smith-devtools.repo new file mode 100644 index 0000000..0cfe76f --- /dev/null +++ b/additional/e-smith-devtools.repo @@ -0,0 +1,40 @@ +[e-smith-devtools] +enabled=1 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smeos-10 +name=SME Server - os e-smith-devtools +gpgcheck=1 +enablegroups=1 +includepkgs=e-smith-devtools + +[e-smith-devtools-updates] +enabled=1 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smeupdates-10 +name=SME Server - updates e-smith-devtools +gpgcheck=1 +enablegroups=1 +includepkgs=e-smith-devtools + +[e-smith-devtools-test] +enabled=0 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smetest-10 +name=SME Server - test e-smith-devtools +gpgcheck=1 +enablegroups=0 +includepkgs=e-smith-devtools + +[e-smith-devtools-dev] +enabled=0 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smedev-10 +name=SME Server - dev e-smith-devtools +gpgcheck=1 +enablegroups=0 +includepkgs=e-smith-devtools + +[e-smith-devtools-updates-testing] +enabled=0 +mirrorlist=http://mirrorlist.contribs.org/mirrorlist/smeupdates-testing-10 +name=SME Server - updates-testing e-smith-devtools +gpgcheck=1 +enablegroups=0 +includepkgs=e-smith-devtools + diff --git a/additional/e-smith-devtools.spec b/additional/e-smith-devtools.spec new file mode 100644 index 0000000..2f05e8c --- /dev/null +++ b/additional/e-smith-devtools.spec @@ -0,0 +1,420 @@ +# $Id: e-smith-devtools.spec,v 1.1 2013/01/24 19:31:34 slords Exp $ + +Summary: e-smith tools for building RPMs +%define name e-smith-devtools +Name: %{name} +%define version 2.4.0 +%define release 1 +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: Networking/Daemons +Source: %{name}-%{version}.tar.xz +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArchitectures: noarch +Requires: perl, perl(Test::Inline) >= 0.12, perl(XML::Parser) +AutoReqProv: no + +%changelog +* Thu Jan 24 2013 Shad L. Lords 2.4.0-1.sme +- Change site_perl to vendor_perl + +* Tue Aug 17 2010 Shad L. Lords 2.2.0-4.sme +- Ignore .orig files create is prep stage [SME: 6173] + +* Mon Oct 26 2009 Shad L. Lords 2.2.0-3.sme +- Fix previous patch [SME: 5538] + +* Mon Oct 26 2009 Shad L. Lords 2.2.0-2.sme +- Add compiled python files to the packaged files list [SME: 5538] + +* Tue Oct 7 2008 Shad L. Lords 2.2.0-1.sme +- Roll new stream to separate sme7/sme8 trees [SME: 4633] + +* Sun Apr 29 2007 Shad L. Lords +- Clean up spec so package can be built by koji/plague + +* Thu Dec 07 2006 Shad L. Lords +- Update to new release naming. No functional changes. +- Make Packager generic + +* Thu Mar 16 2006 Gordon Rowell 1.14.0-01 +- Roll stable stream version. [SME: 1016] + +* Tue Jan 24 2006 Gordon Rowell 1.13.1-08 +- Remove % from changelog items - sigh it's a comment! + +* Tue Jan 24 2006 Charlie Brady 1.13.1-07 +- Remove /root/.vimrc [SME: 562] + +* Wed Nov 30 2005 Gordon Rowell 1.13.1-06 +- Bump release number only + +* Mon Jun 27 2005 Charlie Brady +- [1.13.1-05] +- Fix file permissions (properly) inside /etc/cron.d. [SF: 1226700] + +* Fri Jun 24 2005 Charlie Brady +- [1.13.1-04] +- Fix file permissions inside /etc/cron.d. [SF: 1226700] + +* Thu Jan 20 2005 Charlie Brady +- [1.13.1-03] +- Add safe_touch() and templates2events() functions to support use + of the generic_template_expand action. [MN00064130] + +* Tue Sep 28 2004 Michael Soulier +- [1.13.1-02] +- Updated requires with new perl dependencies. [msoulier MN00040240] + +* Thu Feb 5 2004 Michael Soulier +- [1.13.1-01] +- Rolling as-source. [msoulier] + +* Thu Feb 5 2004 Michael Soulier +- [1.13.0-03] +- Added esmith::Build::CreateLinks to this package. [msoulier 10992] + +* Mon Dec 22 2003 Michael Soulier +- [1.13.0-02] +- Updating .vimrc settings. [msoulier 5740] + +* Mon Dec 22 2003 Michael Soulier +- [1.13.0-01] +- rolling to dev - 1.13.0 + +* Mon Nov 17 2003 Michael Soulier +- [1.12.0-02] +- Updated file list to handle /etc/rc.d/init.d/supervise and it's files. + [msoulier 10648] + +* Thu Jun 26 2003 Charlie Brady +- [1.12.0-01] +- Changing version to stable stream number - 1.12.0 + +* Wed Jun 11 2003 Charlie Brady +- [1.11.0-12] +- Enhance genfilelist to take command line options to extend its internal + databases. Add /usr/lib/perl5/site_perl (and its components) to list + of ignored directories. Reformat ignoredirs list to make it easier to extend. + Strip trailing spaces from spec for dirs and files, and add it to the output + print statements (so that we don't need a trailing space for every extra spec. + [charlieb 7719] + +* Mon May 26 2003 Gordon Rowell +- [1.11.0-11] +- Add missing cd .. after processing a .po directory [gordonr 8828] + +* Thu Apr 10 2003 Michael Soulier +- [1.11.0-10] +- Updated the files list to pick up the .vimrc file. [msoulier 8044] + +* Thu Apr 10 2003 Michael Soulier +- [1.11.0-09] +- Added a standard .vimrc file for the root user. [msoulier 8044] + +* Wed Apr 2 2003 Michael Soulier +- [1.11.0-08] +- Added support for /sbin/e-smith/console-screens. [msoulier 7968] + +* Tue Apr 1 2003 Gordon Rowell +- [1.11.0-07] +- Added support for /home/e-smith/files/samba/netlogon [gordonr 5241] + +* Tue Mar 25 2003 Tony Clayton +- [1.11.0-06] +- small fix to update-po usage() function [tonyc 7794] + +* Tue Mar 25 2003 Tony Clayton +- [1.11.0-05] +- Add update-po to install/files sections [tonyc 7794] + +* Tue Mar 25 2003 Tony Clayton +- [1.11.0-04] +- Add update-po script [tonyc 7794] + +* Thu Mar 6 2003 Gordon Rowell +- [1.11.0-03] +- And add generate-lexicons to install and files [gordonr 7578] + +* Thu Mar 6 2003 Gordon Rowell +- [1.11.0-02] +- Added initial generate-lexicons [gordonr 7578] + +* Wed Nov 6 2002 Michael Soulier +- [1.11.0-01] +- need new dev version to 1.11.0 + +* Wed Nov 6 2002 Michael Soulier +- [1.10.1-02] +- Added /usr/lib/perl5/site_perl/esmith/FormMagick/Panel/ to the fileperms + hash to set the panel libs to 0644 permissions. [msoulier 5516] + +* Tue Oct 15 2002 Charlie Brady +- [1.10.1-01] +- Roll new version to fix tagging problem + +* Fri Oct 11 2002 Charlie Brady +- [1.10.0-01] +- Roll to maintained version number to 1.10.0 + +* Fri Oct 11 2002 Charlie Brady +- [1.10.0-01] +- Roll to maintained version number to 1.10.0 + +* Wed Jun 5 2002 Charlie Brady +- [1.9.0-01] +- Changing version to maintained stream number to 1.9.0 + +* Fri May 31 2002 Charlie Brady +- [1.8.0-01] +- Changing version to maintained stream number to 1.8.0 + +* Thu May 23 2002 Gordon Rowell +- [1.7.6-01] +- RPM rebuild forced by cvsroot2rpm + +* Fri May 3 2002 Gordon Rowell +- [1.7.5-01] +- Sigh. Hash-bang line brokenness. [gordonr 3155] + +* Fri May 3 2002 Gordon Rowell +- [1.7.4-01] +- Forced attributes on scripts so we don't rely on the repository + [gordonr 3155] + +* Fri May 3 2002 Gordon Rowell +- [1.7.3-01] +- Actually copy validate-lexicon to the correct place [gordonr 3155] + +* Fri May 3 2002 Gordon Rowell +- [1.7.2-01] +- Added validate-lexicon which exits non-zero if the lexicon + doesn't parse properly [gordonr 3155] + +* Sat Apr 05 2002 Gordon Rowell +- [1.7.1-01] +- New development stream. Added /sbin/e-smith/quicktest [gordonr] + +* Wed Apr 03 2002 Gordon Rowell +- [1.6.10-01] +- /var/run/named -> /home/dns/var/run/named for chroot() [gordonr #3019] + +* Wed Apr 03 2002 Gordon Rowell +- [1.6.9-01] +- Added /var/run/named [gordonr #3019] + +* Wed Feb 27 2002 Michael G Schwern +- [1.6.8-01] +- Botched the spec file. :( + +* Wed Feb 27 2002 Michael G Schwern +- [1.6.7-01] +- Adding smoketest's permissions from e-smith-test. + +* Fri Feb 22 2002 Charlie Brady +- [1.6.6-01] +- Fix permissions on /var/spool/fax/faxrunqd directory (sticky, not setgid). + +* Fri Feb 22 2002 Charlie Brady +- [1.6.5-01] +- Add specifications for directories and run scripts for mgetty's faxrunqd. + +* Thu Feb 21 2002 Kirrily Robert +- [1.6.4-01] +- Added buildtests to filelist so it actually installs. Bah. + +* Thu Feb 21 2002 Kirrily Robert +- [1.6.3-01] +- Added buildtests script for building a package's test suite + +* Mon Feb 18 2002 Kirrily Robert +- [1.6.2-01] +- Imported to CVS; testing that it worked. + +* Mon Feb 18 2002 Kirrily Robert +- [1.6.1-01] +- rollRPM: Rolled version number to 1.6.1-01. Includes patches up to 1.6.0-02. + +* Wed Jan 02 2002 Charlie Brady +- [1.6.0-02] +- Add execute permissions to files under /etc/cron.daily and /etc/cron.weekly. + +* Tue Dec 11 2001 Adrian Chung +- [1.6.0-01] +- rollRPM: Rolled version number to 1.6.0-01. Includes patches up to 1.5.0-07. + +* Thu Dec 06 2001 Charlie Brady +- [1.5.0-07] +- Add missing trailing / to /etc/diald/scripts, to make scripts there + executable. + +* Tue Dec 04 2001 Charlie Brady +- [1.5.0-06] +- Add specs for /var/lock/fetchmail and /etc/diald/scripts/*. +- Add execute permission for /etc/cron.d/* fragments +- Add spec for /home/e-smith/files/netlogon/netlogon.bat, for when we + need it. + +* Fri Nov 30 2001 Gordon Rowell +- [1.5.0-05] +- Made /home/e-smith/files/samba/profiles 02750,admin,shared to allow + users to search that directory when accessing their profile subdirectory + +* Tue Nov 20 2001 Gordon Rowell +- [1.5.0-04] +- Make /etc/e-smith/events/actions/create-machine-account 06554,root,root + to allow "admin" to create machine accounts through Samba + +* Mon Nov 19 2001 Gordon Rowell +- [1.5.0-03] +- Explicitly list printer driver and profiles directories +- Returned /home/e-smith/files/samba to default ownership by root + +* Mon Nov 19 2001 Gordon Rowell +- [1.5.0-02] +- Made /home/e-smith/files/samba 02755,admin,admin to allow admin write + access to the printer drivers share + +* Mon Nov 19 2001 Gordon Rowell +- [1.5.0-01] +- Rolled version number to 1.5.0-01. Includes patches up to 1.4.0-02. + +* Mon Sep 3 2001 Charlie Brady +- [1.4.0-02] +- Include /var/named, plus lots of other directories which are from the + filesystem RPM. + +* Thu Aug 23 2001 Gordon Rowell +- [1.4.0-01] +- Rolled version number to 1.4.0-01. Includes patches upto 1.3.0-02. + +* Thu Aug 16 2001 Charlie Brady +- [1.3.0-02] +- Configure a list of directories to omit from RPMs - e.g., RedHat supplied + directories.A +- Fix permissions/ownership of ~admin and ~admin/home +- Add space between %attr() and directory name + +* Thu Aug 16 2001 Charlie Brady +- [1.3.0-01] +- Rolled version number to 1.3.0-01. Includes patches upto 1.2.0-05. + +* Fri Jul 27 2001 Charlie Brady +- [1.2.0-05] +- Fix up misplaced defattr, so that files are root owned, unless stated + otherwise (rather than by the developer building the package). + +* Fri Jul 6 2001 Peter Samuel +- [1.2.0-04] +- Changed license to GPL + +* Sat May 05 2001 Paul Nesbit +- [1.2.0-03] +- Corrected permission in genfilelist. + +* Mon Jan 29 2001 Charlie Brady +- [1.2.0-02] +- Mark netlogon.bat as a noreplace config file. +- Add some horde config files rules, and rule for /root/.ssh + directory +- Add e-smith Maildir rules +- Give admin ownership of admin home directory + +* Fri Jan 26 2001 Peter Samuel +- [1.2.0-01] +- Rolled version number to 1.2.0-01. Includes patches upto 1.1.0-3. + +* Sat Jan 06 2001 Charlie Brady +- [1.1.0-3] +- Remove "other" execute permission for console and action scripts +- Add execute permission rule for /sbin/e-smith/dynamic-dns/*. +- Add permission rules for /etc/cron.d/* and /etc/profile.d/* files + +* Mon Dec 18 2000 Charlie Brady +- [1.1.0-2] +- Include ownership and permission for netlogon share + +* Wed Dec 13 2000 Gordon Rowell +- [1.1.0-1] +- Rolled version and tarball including patches to 0.1-11 + +* Mon Oct 30 2000 Charlie Brady +- Added settings for /home/dns/var/run and /home/dns/var/named + +* Mon Oct 30 2000 Charlie Brady +- Added default permissions setting for directories + +* Tue Sep 12 2000 Adrian Chung +- Changed /sbin/e-smith/web to /etc/e-smith/web. + +* Mon Sep 11 2000 Adrian Chung +- Changed permissions on functions dir to 4750. + +* Thu Aug 31 2000 Adrian Chung +- Added executable permissions to index.cgi. + +* Thu Aug 31 2000 Adrian Chung +- Modified all panel directories to root,admin. + +* Wed Aug 30 2000 Adrian Chung +- Modified web directories to (root,admin) permissions. + +* Wed Aug 30 2000 Adrian Chung +- Moved %defattr below to under files section. +- Changed genfilelist for new web permissions. +- Changed genfilelist for new permissions on some other + files. + +* Tue Aug 29 2000 Charlie Brady +- Fix another stupid ordering problem - can't get ordered searching of + hash. We only need to key by file and containing directory anyway. + +* Fri Aug 25 2000 Charlie Brady +- Fix ordering problem with using hash before defined. + +* Thu Aug 24 2000 Charlie Brady +- initial release + +%description +Tools for use in building RPMs for the e-smith serverand gateway. + +Use "genfilelist" to create a filelist file with correct ownerships and +permissions. + +%prep +%setup + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/sbin/e-smith +mkdir -p $RPM_BUILD_ROOT/root +mkdir -p $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl/esmith/Build +cp genfilelist $RPM_BUILD_ROOT/sbin/e-smith +cp buildtests $RPM_BUILD_ROOT/sbin/e-smith +cp validate-lexicon $RPM_BUILD_ROOT/sbin/e-smith +cp generate-lexicons $RPM_BUILD_ROOT/sbin/e-smith +cp update-po $RPM_BUILD_ROOT/sbin/e-smith +cp CreateLinks.pm $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl/esmith/Build + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +%preun +%post +%postun + +%files +%defattr(-,root,root) +%attr(0755,root,root) /sbin/e-smith/genfilelist +%attr(0755,root,root) /sbin/e-smith/buildtests +%attr(0755,root,root) /sbin/e-smith/validate-lexicon +%attr(0755,root,root) /sbin/e-smith/generate-lexicons +%attr(0755,root,root) /sbin/e-smith/update-po +%attr(-,root,root) %dir /sbin +%attr(-,root,root) %dir /sbin/e-smith +%attr(0644,root,root) /usr/lib/perl5/vendor_perl/esmith/Build/CreateLinks.pm +%doc COPYING diff --git a/additional/generate-lexicons b/additional/generate-lexicons new file mode 100644 index 0000000..6f38620 --- /dev/null +++ b/additional/generate-lexicons @@ -0,0 +1,43 @@ +#!/bin/sh +#---------------------------------------------------------------------- +# copyright (C) 1999-2003 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from Mitel Networks +# Please visit our web site www.mitel.com/sme/ for details. +#---------------------------------------------------------------------- + +if [ ! -d po ] +then + echo "No po directory" + exit 0 +fi + +cd po +for language in [a-z][a-z]* +do + echo "Processing $language" + + cd $language + output_dir=../../root/usr/share/locale/$language/LC_MESSAGES + mkdir -p $output_dir + for file in *.po + do + output=$output_dir/$(basename $file .po).mo + msgfmt -f -v -o $output $file + done + cd .. +done diff --git a/additional/genfilelist b/additional/genfilelist new file mode 100755 index 0000000..4f63404 --- /dev/null +++ b/additional/genfilelist @@ -0,0 +1,260 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 1999-2003 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from Mitel Networks +# Please visit our web site www.mitel.com/sme/ for details. +#---------------------------------------------------------------------- +use strict; +use Errno; +use File::Find; +use File::Basename; +sub process; + +sub usage +{ + die "t [--ignoredir dir] [--dir dir spec] [--file file spec] root\n"; +} + +my @ignoredirs = ('', qw( +/etc +/etc/rc.d +/etc/cron.d +/etc/cron.daily +/etc/cron.weekly +/etc/rc6.d +/etc/rc.d/init.d +/etc/logrotate.d +/usr +/usr/local +/usr/local/lib +/usr/local/bin +/usr/local/sbin +/usr/share +/usr/share/doc +/usr/share/man +/usr/share/man/man1 +/usr/share/man/man2 +/usr/share/man/man3 +/usr/share/man/man4 +/usr/share/man/man5 +/usr/share/man/man6 +/usr/share/man/man7 +/usr/share/man/man8 +/usr/share/man/man9 +/usr/share/man/mann +/usr/bin +/usr/sbin +/boot +/boot/grub2 +/boot/grub2/themes +/bin +/sbin +/home +/root +/var +/var/spool +/var/tmp +/var/lock +/var/cache +/var/named +/var/qmail +/usr/lib +/usr/lib/perl5 +/usr/share/perl5/vendor_perl +/var/log +)); + +%::ignoredirs = map { $_ => 1 } @ignoredirs; + +%::dirperms = ( +'/home/e-smith/files/primary' => "%attr(0755,root,root)", +'/home/e-smith/files/primary/cgi-bin' => "%attr(02750,admin,shared)", +'/home/e-smith/files/primary/files' => "%attr(02750,admin,shared)", +'/home/e-smith/files/primary/html' => "%attr(02750,admin,shared)", +'/home/e-smith/files/samba/netlogon' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/printers' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/printers/W32ALPHA' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/printers/W32MIPS' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/printers/W32PPC' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/printers/W32X86' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/printers/WIN40' => "%attr(02775,admin,admin)", +'/home/e-smith/files/samba/profiles' => "%attr(02750,admin,shared)", +'/home/e-smith/files/users/admin/home' => "%attr(0700,admin,admin)", +'/home/e-smith/files/users/admin' => "%attr(0500,admin,admin)", +'/etc/e-smith/web/panels' => "%attr(0550,root,admin)", +'/etc/e-smith/web/functions' => "%attr(0550,root,admin)", +'/etc/e-smith/web/common' => "%attr(0550,www,admin)", +'/home/e-smith' => "%attr(0755,admin,admin)", +'/home/e-smith/files' => "%attr(0755,root,root)", +'/home/e-smith/files/users' => "%attr(0755,root,root)", +'/home/e-smith/files/users/admin' => "%attr(0755,admin,admin)", +'/home/e-smith/Maildir' => "%attr(0700,admin,admin)", +'/home/e-smith/Maildir/tmp' => "%attr(0700,admin,admin)", +'/home/e-smith/Maildir/new' => "%attr(0700,admin,admin)", +'/home/e-smith/Maildir/cur' => "%attr(0700,admin,admin)", +'/home/httpd/html/horde/config' => "%attr(0750,root,www)", +'/home/netlogon' => "%attr(0755,admin,admin)", +'/home/dns/var/named' => "%attr(0755,dns,dns)", +'/home/dns/var/run' => "%attr(0755,dns,dns)", +'/home/dns/var/run/named' => "%attr(0755,dns,dns)", +'/root/.ssh' => "%attr(0700,root,root)", +'/var/local/fetchmail' => "%attr(0755,qmailr,qmail)", +'/var/log/faxrunqd' => "%attr(01755,qmaill,nofiles)", +'/etc/rc.d/init.d/supervise' => "%attr(0755,root,root)", +); + +%::fileperms = ( +'/etc/rc.d/init.d/' => "%attr(0755,root,root)", +'/etc/rc.d/init.d/supervise/' => "%attr(0755,root,root)", +'/etc/profile.d/' => "%attr(0755,root,root)", +'/etc/cron.d/' => "%attr(0644,root,root)", +'/etc/cron.daily/' => "%attr(0744,root,root)", +'/etc/cron.weekly/' => "%attr(0744,root,root)", +'/etc/diald/scripts/' => "%attr(0744,root,root)", +'/etc/e-smith/web/functions/' => "%attr(0500,root,root)", +'/etc/e-smith/web/panels/password/cgi-bin/' => "%attr(06550,root,admin)", +'/etc/e-smith/web/panels/' => "%attr(06550,root,admin)", +'/home/e-smith/files/manager/html/index.cgi' => "%attr(0755,root,root)", +'/sbin/e-smith/console' => "%attr(06550,root,root)", +'/sbin/e-smith/console.pl' => "%attr(0550,root,root)", +'/sbin/e-smith/dynamic-dns/' => "%attr(0554,root,root)", +'/sbin/e-smith/quicktest' => "%attr(0555,root,root)", +'/sbin/e-smith/smoketest' => "%attr(0555,root,root)", +'/sbin/e-smith/' => "%attr(0554,root,root)", +'/home/httpd/html/horde/config/' => "%attr(0664,root,www)", +'/home/httpd/horde-phplib/local.inc' => "%attr(0640,root,www)", +'/home/netlogon/netlogon.bat' => "%config(noreplace) %attr(0755,admin,admin)", +'/home/e-smith/files/samba/netlogon/netlogon.bat' => + "%config(noreplace) %attr(0755,admin,admin)", +'/etc/e-smith/events/actions/create-machine-account' => "%attr(0554,root,root)", +'/etc/e-smith/events/actions/' => "%attr(0554,root,root)", +'/var/spool/fax/faxrunqd/run' => "%attr(0755,root,root)", +'/var/spool/fax/faxrunqd/log/run' => "%attr(0755,root,root)", +'/usr/lib/perl5/vendor_perl/esmith/FormMagick/Panel/' => "%attr(0644,root,root)", +'/sbin/e-smith/console-screens/' => "%attr(0750,root,root)", +); + +my $startdirectory = undef; +while (my $arg = shift) +{ + if ($arg eq "--ignoredir") + { + my $arg = shift; + usage() unless (defined $arg); + $::ignoredirs{$arg} = 1; + } + elsif ($arg eq "--dir") + { + my $dir = shift; + my $spec = shift; + usage() unless (defined $dir && defined $spec); + die "Can't override permissions already specified\n" + if exists $::dirperms{$dir}; + $::dirperms{$dir} = '%' . $spec; + } + elsif ($arg eq "--file") + { + my $file = shift; + my $spec = shift; + usage() unless (defined $file && defined $spec); + die "Can't override permissions already specified\n" + if exists $::fileperms{$file}; + $::fileperms{$file} = '%' . $spec; + } + else + { + $startdirectory = $arg; + } +} + +defined $startdirectory + or die "Must give directory arg"; + +# Change to the build root directory +chdir $startdirectory + or die "Could not chdir to $startdirectory: $!\n"; + +# Now go and process all the files... +find(\&::process, '.'); + +exit (0); + +sub process +{ + my $path = $File::Find::name; + + # Remove leading . + $path =~ s/^.//; + + if (-l) + { + # Don't add attributes for symlinks + warn ("Invalid directory permissions for symlink: $path\n") + if (-d and defined $::dirperms{$path}); + warn ("Invalid file permissions for symlink: $path\n") + if (-f and defined $::fileperms{$path}); + print "\"$path\"\n"; + } + elsif (-d) + { + return if (defined $::ignoredirs{$path}); + + # Directories get marked as such + print "%dir "; + + # .. and some of them get special permissions and ownership + print defined $::dirperms{$path} ? + "$::dirperms{$path} " : + # and others just get the default + "%attr(0755,root,root) "; + print "$path\n"; + } + elsif (-f) + { + # Ignore .orig files created in prep section + 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$}; + + foreach $path (@paths) { + # Some files get special permissions and ownership + my $dir = (dirname $path) . '/'; + + # Special permissions per file + if (defined $::fileperms{$path}) + { + print "$::fileperms{$path} "; + } + # Special permissions or per containing directory + elsif (defined $::fileperms{$dir}) + { + print "$::fileperms{$dir} "; + } + print "\"$path\"\n"; + } + } + else + { + print "\"$path\"\n"; + } +} diff --git a/additional/update-po b/additional/update-po new file mode 100755 index 0000000..fee618f --- /dev/null +++ b/additional/update-po @@ -0,0 +1,65 @@ +#!/bin/sh + +usage() +{ + if [ -n "$1" ]; then + echo -e $* + fi + echo + echo "Usage: " + echo " update-po \$domain \$src_dir \$src_file \$src_file ..." + echo + echo "For example, to generate po/\$lang/blades-client.po files for all " + echo "existing language directories, you would call it like this:" + echo + echo " update_po blades-client \\" + echo " \$PWD/root/usr/share/perl5/vendor_perl/esmith/Blades \\" + echo " Blade.pm Connection.pm Error.pm Package.pm Session.pm" + echo + echo "This assumes that all source files are in that same directory, " + echo "and that no other options are needed. This script is a first pass" + echo "so we may need to augment it as we go." + + exit 1 +} + +DOMAIN=$1 +SRC_DIR=$2 +shift 2 +SRC_FILES=$* + +# Sanity checks + +if [ -z "$DOMAIN" ]; then + usage "ERROR: Missing \$domain parameter" +fi +if [ ! -d "$SRC_DIR" ]; then + usage "ERROR: Invalid or missing \$src_dir parameter" +fi +if [ -z "$SRC_FILES" ]; then + usage "ERROR: You must specify at least one \$src_file parameter" +fi +for file in $SRC_FILES; do + if [ ! -f "$SRC_DIR/$file" ]; then + usage "ERROR: \$src_file not found: $file" + fi +done + +# Do it + +PO_REF="${DOMAIN}.po" +# Send stderr to /dev/null because xgettext complains about irrelevant +# things due to the fact that it thinks it is reading C++ code. +xgettext -C -d ${DOMAIN} -k'gettext' -D $SRC_DIR $SRC_FILES 2>/dev/null +if [ $? -ne 0 ]; then + usage "Uh-oh, xgettext failed!\n" \ + "Try running it manually and checking the errors:\n" \ + "\txgettext -C -d ${DOMAIN} -k'gettext' -D $SRC_DIR $SRC_FILES" +fi + +for lang in $(ls --color=never po -I CVS); do + echo -n "updating .po file for $DOMAIN ($lang)" + PO="$PWD/po/$lang/${DOMAIN}.po" + msgmerge $PO $PO_REF -o $PO +done +rm $PO_REF diff --git a/additional/validate-lexicon b/additional/validate-lexicon new file mode 100644 index 0000000..7244cb7 --- /dev/null +++ b/additional/validate-lexicon @@ -0,0 +1,82 @@ +#!/usr/bin/perl -w + +#---------------------------------------------------------------------- +# copyright (C) 2002 Mitel Networks Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Technical support for this program is available from Mitel Networks +# Please visit our web site www.mitel.com/sme/ for details. +#---------------------------------------------------------------------- +use strict; + +=head1 NAME + +validate-lexicon - Check the provided files for syntactical correctness. + +=head1 SYNOPSIS + + validate-lexicon file [file...] + +=head1 DESCRIPTION + +Parses the given lexicon files to check for syntactical correctness. +Files can be either straight lexicons, or lexicons in the __DATA__ +section of a Perl script. Returns non-zero exit status if one or more +lexicons fails. + +=head1 AUTHOR + +Mitel Networks Corporation + +=cut + +use XML::Parser; + +my $status = 0; + +foreach my $filename ( @ARGV ) +{ + my $contents; + + open(XML, $filename) || die "Couldn't open $filename\n"; + + while ( ) + { + $contents .= $_; + $contents = '' if ( /^__DATA__/ ); + } + + my $p = new XML::Parser (Style => 'Tree', + ProtocolEncoding => 'ISO-8859-1' ); + + my $xml; + + my $result = eval { $xml = $p->parse( $contents ); }; + + undef $p; + + if ($result) + { + warn "XML parse of $filename succeeded\n"; + } + else + { + warn "XML parse of $filename FAILED\n$@\n"; + $status = 1; + } +} + +exit $status; diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/e-smith-devtools.spec b/e-smith-devtools.spec new file mode 100644 index 0000000..d30e7ff --- /dev/null +++ b/e-smith-devtools.spec @@ -0,0 +1,484 @@ +# $Id: e-smith-devtools.spec,v 1.15 2022/07/30 04:30:09 jpp Exp $ + +Summary: e-smith tools for building RPMs +%define name e-smith-devtools +Name: %{name} +%define version 2.6.0 +%define release 15 +Version: %{version} +Release: %{release}%{?dist} +License: GPL +Group: Networking/Daemons +Source: %{name}-%{version}.tar.xz + +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot +BuildArchitectures: noarch +Requires: perl, perl(Test::Inline) >= 0.12, perl(XML::Parser) +AutoReqProv: no + +%changelog +* Wed Jul 12 2023 cvs2git.sh aka Brian Read 2.6.0-15.sme +- Roll up patches and move to git repo [SME: 12338] + +* Wed Jul 12 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + Sat Apr 05 2002 --> Sat Mar 30 2002 or Fri Apr 05 2002 or Sat Apr 06 2002 or .... + +* Fri Jul 29 2022 Jean-Philippe Pialasse 2.6.0-14.sme +- remove duplication with Dar backup [SME: 11993] + +* Tue Jun 14 2022 Jean-Philippe Pialasse 2.6.0-12.sme +- ease backup include and exclude of contribs [SME: 11993] + +* Tue Apr 20 2021 Jean-Philippe Pialasse 2.6.0-10.sme +- netlogon.bat +x [SME: 11566] + +* Wed Jan 06 2021 Jean-Philipe Pialasse 2.6.0-9.sme +- add update event [SME: 11126] + +* Sat Mar 17 2018 Jean-Philipe Pialasse 2.6.0-7.sme +- ease update of e-smith-devtools on non SME builders [SME: 10536] + +* Thu May 25 2017 Jean-Philipe Pialasse 2.6.0-6.sme +- added grub2 directories to ignore list [SME: 10325] + +* Tue Aug 23 2016 Daniel Berteaud 2.6.0-5.sme +- Quote filenames in genfilelist so filenames containing spaces are correctly + handled [SME: 9750] + +* Wed May 11 2016 Daniel Berteaud 2.6.0-4.sme +- Panel links points on the manager's C wrapper, and original cgi are not + suid anymore. [SME: 9393] +- console is now also called through a C wrapper to replace perl-suid [SME: 9393] + +* Fri Mar 18 2016 Daniel Berteaud 2.6.0-3.sme +- Ignore more system directories [SME: 9347] + +* Sun Feb 7 2016 Daniel Berteaud 2.6.0-2.sme +- Don't add %dir and %attr in genfilelist for symlinks, code from + Charlie Brady [SME: 9232] + +* Thu Feb 4 2016 Daniel Berteaud 2.6.0-1.sme +- Roll new stream for sme10 + +* Mon Jun 22 2015 stephane de labrusse 2.4.0-4.sme +- Added new createlinks function [SME: 8951] +- event_templates event_actions event_services + +* Tue Sep 9 2014 Daniel Berteaud 2.4.0-3.sme +- Don't claim to own /sbin and /sbin/e-smith [SME: 8550] + +* Thu Jan 31 2013 Shad L. Lords 2.4.0-2.sme +- Put vendor_perl in share not lib, so works on both 32 and 64 bit + build systems. [SME: 7268] + +* Thu Jan 24 2013 Shad L. Lords 2.4.0-1.sme +- Change site_perl to vendor_perl + +* Tue Aug 17 2010 Shad L. Lords 2.2.0-4.sme +- Ignore .orig files create is prep stage [SME: 6173] + +* Mon Oct 26 2009 Shad L. Lords 2.2.0-3.sme +- Fix previous patch [SME: 5538] + +* Mon Oct 26 2009 Shad L. Lords 2.2.0-2.sme +- Add compiled python files to the packaged files list [SME: 5538] + +* Tue Oct 7 2008 Shad L. Lords 2.2.0-1.sme +- Roll new stream to separate sme7/sme8 trees [SME: 4633] + +* Sun Apr 29 2007 Shad L. Lords +- Clean up spec so package can be built by koji/plague + +* Thu Dec 07 2006 Shad L. Lords +- Update to new release naming. No functional changes. +- Make Packager generic + +* Thu Mar 16 2006 Gordon Rowell 1.14.0-01 +- Roll stable stream version. [SME: 1016] + +* Tue Jan 24 2006 Gordon Rowell 1.13.1-08 +- Remove % from changelog items - sigh it's a comment! + +* Tue Jan 24 2006 Charlie Brady 1.13.1-07 +- Remove /root/.vimrc [SME: 562] + +* Wed Nov 30 2005 Gordon Rowell 1.13.1-06 +- Bump release number only + +* Mon Jun 27 2005 Charlie Brady +- [1.13.1-05] +- Fix file permissions (properly) inside /etc/cron.d. [SF: 1226700] + +* Fri Jun 24 2005 Charlie Brady +- [1.13.1-04] +- Fix file permissions inside /etc/cron.d. [SF: 1226700] + +* Thu Jan 20 2005 Charlie Brady +- [1.13.1-03] +- Add safe_touch() and templates2events() functions to support use + of the generic_template_expand action. [MN00064130] + +* Tue Sep 28 2004 Michael Soulier +- [1.13.1-02] +- Updated requires with new perl dependencies. [msoulier MN00040240] + +* Thu Feb 5 2004 Michael Soulier +- [1.13.1-01] +- Rolling as-source. [msoulier] + +* Thu Feb 5 2004 Michael Soulier +- [1.13.0-03] +- Added esmith::Build::CreateLinks to this package. [msoulier 10992] + +* Mon Dec 22 2003 Michael Soulier +- [1.13.0-02] +- Updating .vimrc settings. [msoulier 5740] + +* Mon Dec 22 2003 Michael Soulier +- [1.13.0-01] +- rolling to dev - 1.13.0 + +* Mon Nov 17 2003 Michael Soulier +- [1.12.0-02] +- Updated file list to handle /etc/rc.d/init.d/supervise and it's files. + [msoulier 10648] + +* Thu Jun 26 2003 Charlie Brady +- [1.12.0-01] +- Changing version to stable stream number - 1.12.0 + +* Wed Jun 11 2003 Charlie Brady +- [1.11.0-12] +- Enhance genfilelist to take command line options to extend its internal + databases. Add /usr/lib/perl5/site_perl (and its components) to list + of ignored directories. Reformat ignoredirs list to make it easier to extend. + Strip trailing spaces from spec for dirs and files, and add it to the output + print statements (so that we don't need a trailing space for every extra spec. + [charlieb 7719] + +* Mon May 26 2003 Gordon Rowell +- [1.11.0-11] +- Add missing cd .. after processing a .po directory [gordonr 8828] + +* Thu Apr 10 2003 Michael Soulier +- [1.11.0-10] +- Updated the files list to pick up the .vimrc file. [msoulier 8044] + +* Thu Apr 10 2003 Michael Soulier +- [1.11.0-09] +- Added a standard .vimrc file for the root user. [msoulier 8044] + +* Wed Apr 2 2003 Michael Soulier +- [1.11.0-08] +- Added support for /sbin/e-smith/console-screens. [msoulier 7968] + +* Tue Apr 1 2003 Gordon Rowell +- [1.11.0-07] +- Added support for /home/e-smith/files/samba/netlogon [gordonr 5241] + +* Tue Mar 25 2003 Tony Clayton +- [1.11.0-06] +- small fix to update-po usage() function [tonyc 7794] + +* Tue Mar 25 2003 Tony Clayton +- [1.11.0-05] +- Add update-po to install/files sections [tonyc 7794] + +* Tue Mar 25 2003 Tony Clayton +- [1.11.0-04] +- Add update-po script [tonyc 7794] + +* Thu Mar 6 2003 Gordon Rowell +- [1.11.0-03] +- And add generate-lexicons to install and files [gordonr 7578] + +* Thu Mar 6 2003 Gordon Rowell +- [1.11.0-02] +- Added initial generate-lexicons [gordonr 7578] + +* Wed Nov 6 2002 Michael Soulier +- [1.11.0-01] +- need new dev version to 1.11.0 + +* Wed Nov 6 2002 Michael Soulier +- [1.10.1-02] +- Added /usr/lib/perl5/site_perl/esmith/FormMagick/Panel/ to the fileperms + hash to set the panel libs to 0644 permissions. [msoulier 5516] + +* Tue Oct 15 2002 Charlie Brady +- [1.10.1-01] +- Roll new version to fix tagging problem + +* Fri Oct 11 2002 Charlie Brady +- [1.10.0-01] +- Roll to maintained version number to 1.10.0 + +* Fri Oct 11 2002 Charlie Brady +- [1.10.0-01] +- Roll to maintained version number to 1.10.0 + +* Wed Jun 5 2002 Charlie Brady +- [1.9.0-01] +- Changing version to maintained stream number to 1.9.0 + +* Fri May 31 2002 Charlie Brady +- [1.8.0-01] +- Changing version to maintained stream number to 1.8.0 + +* Thu May 23 2002 Gordon Rowell +- [1.7.6-01] +- RPM rebuild forced by cvsroot2rpm + +* Fri May 3 2002 Gordon Rowell +- [1.7.5-01] +- Sigh. Hash-bang line brokenness. [gordonr 3155] + +* Fri May 3 2002 Gordon Rowell +- [1.7.4-01] +- Forced attributes on scripts so we don't rely on the repository + [gordonr 3155] + +* Fri May 3 2002 Gordon Rowell +- [1.7.3-01] +- Actually copy validate-lexicon to the correct place [gordonr 3155] + +* Fri May 3 2002 Gordon Rowell +- [1.7.2-01] +- Added validate-lexicon which exits non-zero if the lexicon + doesn't parse properly [gordonr 3155] + +* Sat Apr 05 2002 Gordon Rowell +- [1.7.1-01] +- New development stream. Added /sbin/e-smith/quicktest [gordonr] + +* Wed Apr 03 2002 Gordon Rowell +- [1.6.10-01] +- /var/run/named -> /home/dns/var/run/named for chroot() [gordonr #3019] + +* Wed Apr 03 2002 Gordon Rowell +- [1.6.9-01] +- Added /var/run/named [gordonr #3019] + +* Wed Feb 27 2002 Michael G Schwern +- [1.6.8-01] +- Botched the spec file. :( + +* Wed Feb 27 2002 Michael G Schwern +- [1.6.7-01] +- Adding smoketest's permissions from e-smith-test. + +* Fri Feb 22 2002 Charlie Brady +- [1.6.6-01] +- Fix permissions on /var/spool/fax/faxrunqd directory (sticky, not setgid). + +* Fri Feb 22 2002 Charlie Brady +- [1.6.5-01] +- Add specifications for directories and run scripts for mgetty's faxrunqd. + +* Thu Feb 21 2002 Kirrily Robert +- [1.6.4-01] +- Added buildtests to filelist so it actually installs. Bah. + +* Thu Feb 21 2002 Kirrily Robert +- [1.6.3-01] +- Added buildtests script for building a package's test suite + +* Mon Feb 18 2002 Kirrily Robert +- [1.6.2-01] +- Imported to CVS; testing that it worked. + +* Mon Feb 18 2002 Kirrily Robert +- [1.6.1-01] +- rollRPM: Rolled version number to 1.6.1-01. Includes patches up to 1.6.0-02. + +* Wed Jan 02 2002 Charlie Brady +- [1.6.0-02] +- Add execute permissions to files under /etc/cron.daily and /etc/cron.weekly. + +* Tue Dec 11 2001 Adrian Chung +- [1.6.0-01] +- rollRPM: Rolled version number to 1.6.0-01. Includes patches up to 1.5.0-07. + +* Thu Dec 06 2001 Charlie Brady +- [1.5.0-07] +- Add missing trailing / to /etc/diald/scripts, to make scripts there + executable. + +* Tue Dec 04 2001 Charlie Brady +- [1.5.0-06] +- Add specs for /var/lock/fetchmail and /etc/diald/scripts/*. +- Add execute permission for /etc/cron.d/* fragments +- Add spec for /home/e-smith/files/netlogon/netlogon.bat, for when we + need it. + +* Fri Nov 30 2001 Gordon Rowell +- [1.5.0-05] +- Made /home/e-smith/files/samba/profiles 02750,admin,shared to allow + users to search that directory when accessing their profile subdirectory + +* Tue Nov 20 2001 Gordon Rowell +- [1.5.0-04] +- Make /etc/e-smith/events/actions/create-machine-account 06554,root,root + to allow "admin" to create machine accounts through Samba + +* Mon Nov 19 2001 Gordon Rowell +- [1.5.0-03] +- Explicitly list printer driver and profiles directories +- Returned /home/e-smith/files/samba to default ownership by root + +* Mon Nov 19 2001 Gordon Rowell +- [1.5.0-02] +- Made /home/e-smith/files/samba 02755,admin,admin to allow admin write + access to the printer drivers share + +* Mon Nov 19 2001 Gordon Rowell +- [1.5.0-01] +- Rolled version number to 1.5.0-01. Includes patches up to 1.4.0-02. + +* Mon Sep 3 2001 Charlie Brady +- [1.4.0-02] +- Include /var/named, plus lots of other directories which are from the + filesystem RPM. + +* Thu Aug 23 2001 Gordon Rowell +- [1.4.0-01] +- Rolled version number to 1.4.0-01. Includes patches upto 1.3.0-02. + +* Thu Aug 16 2001 Charlie Brady +- [1.3.0-02] +- Configure a list of directories to omit from RPMs - e.g., RedHat supplied + directories.A +- Fix permissions/ownership of ~admin and ~admin/home +- Add space between %attr() and directory name + +* Thu Aug 16 2001 Charlie Brady +- [1.3.0-01] +- Rolled version number to 1.3.0-01. Includes patches upto 1.2.0-05. + +* Fri Jul 27 2001 Charlie Brady +- [1.2.0-05] +- Fix up misplaced defattr, so that files are root owned, unless stated + otherwise (rather than by the developer building the package). + +* Fri Jul 6 2001 Peter Samuel +- [1.2.0-04] +- Changed license to GPL + +* Sat May 05 2001 Paul Nesbit +- [1.2.0-03] +- Corrected permission in genfilelist. + +* Mon Jan 29 2001 Charlie Brady +- [1.2.0-02] +- Mark netlogon.bat as a noreplace config file. +- Add some horde config files rules, and rule for /root/.ssh + directory +- Add e-smith Maildir rules +- Give admin ownership of admin home directory + +* Fri Jan 26 2001 Peter Samuel +- [1.2.0-01] +- Rolled version number to 1.2.0-01. Includes patches upto 1.1.0-3. + +* Sat Jan 06 2001 Charlie Brady +- [1.1.0-3] +- Remove "other" execute permission for console and action scripts +- Add execute permission rule for /sbin/e-smith/dynamic-dns/*. +- Add permission rules for /etc/cron.d/* and /etc/profile.d/* files + +* Mon Dec 18 2000 Charlie Brady +- [1.1.0-2] +- Include ownership and permission for netlogon share + +* Wed Dec 13 2000 Gordon Rowell +- [1.1.0-1] +- Rolled version and tarball including patches to 0.1-11 + +* Mon Oct 30 2000 Charlie Brady +- Added settings for /home/dns/var/run and /home/dns/var/named + +* Mon Oct 30 2000 Charlie Brady +- Added default permissions setting for directories + +* Tue Sep 12 2000 Adrian Chung +- Changed /sbin/e-smith/web to /etc/e-smith/web. + +* Mon Sep 11 2000 Adrian Chung +- Changed permissions on functions dir to 4750. + +* Thu Aug 31 2000 Adrian Chung +- Added executable permissions to index.cgi. + +* Thu Aug 31 2000 Adrian Chung +- Modified all panel directories to root,admin. + +* Wed Aug 30 2000 Adrian Chung +- Modified web directories to (root,admin) permissions. + +* Wed Aug 30 2000 Adrian Chung +- Moved %defattr below to under files section. +- Changed genfilelist for new web permissions. +- Changed genfilelist for new permissions on some other + files. + +* Tue Aug 29 2000 Charlie Brady +- Fix another stupid ordering problem - can't get ordered searching of + hash. We only need to key by file and containing directory anyway. + +* Fri Aug 25 2000 Charlie Brady +- Fix ordering problem with using hash before defined. + +* Thu Aug 24 2000 Charlie Brady +- initial release + +%description +Tools for use in building RPMs for the e-smith serverand gateway. + +Use "genfilelist" to create a filelist file with correct ownerships and +permissions. + +%prep +%setup + +%build + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/sbin/e-smith +mkdir -p $RPM_BUILD_ROOT/root +mkdir -p $RPM_BUILD_ROOT/usr/share/perl5/vendor_perl/esmith/Build +mkdir -p $RPM_BUILD_ROOT/etc/yum.repos.d +mkdir -p $RPM_BUILD_ROOT/etc/e-smith/events/%{name}-update + +cp genfilelist $RPM_BUILD_ROOT/sbin/e-smith +cp buildtests $RPM_BUILD_ROOT/sbin/e-smith +cp validate-lexicon $RPM_BUILD_ROOT/sbin/e-smith +cp generate-lexicons $RPM_BUILD_ROOT/sbin/e-smith +cp update-po $RPM_BUILD_ROOT/sbin/e-smith +cp CreateLinks.pm $RPM_BUILD_ROOT/usr/share/perl5/vendor_perl/esmith/Build +cp Backup.pm $RPM_BUILD_ROOT/usr/share/perl5/vendor_perl/esmith/Build +cp e-smith-devtools.repo $RPM_BUILD_ROOT/etc/yum.repos.d/ + + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +%preun +%post +%postun + +%files +%defattr(-,root,root) +%attr(0755,root,root) /sbin/e-smith/genfilelist +%attr(0755,root,root) /sbin/e-smith/buildtests +%attr(0755,root,root) /sbin/e-smith/validate-lexicon +%attr(0755,root,root) /sbin/e-smith/generate-lexicons +%attr(0755,root,root) /sbin/e-smith/update-po +%attr(0644,root,root) /usr/share/perl5/vendor_perl/esmith/Build/CreateLinks.pm +%attr(0644,root,root) /usr/share/perl5/vendor_perl/esmith/Build/Backup.pm +%attr(0755,root,root) /etc/yum.repos.d/e-smith-devtools.repo +%attr(0755,root,root) /etc/e-smith/events/%{name}-update +%doc COPYING