OBS User unknown 2006-12-18 23:15:55 +00:00 committed by Git OBS Bridge
commit 9646ebdd7a
10 changed files with 611 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

176
fillup-1.42.dif Normal file
View File

@ -0,0 +1,176 @@
--- SRC/consume.c
+++ SRC/consume.c 2005-09-02 12:44:00.000000000 +0200
@@ -140,7 +140,7 @@
{
break; /* line break detected */
}
- else if( *buffer == EOF )
+ else if( *buffer == 0 )
{
break; /* End-Of-File detected */
}
--- SRC/file.c
+++ SRC/file.c 2005-09-02 12:44:00.000000000 +0200
@@ -35,18 +35,34 @@
File_t returnValue;
FILE * filePointer;
long fileLength;
- char * buffer = NULL;
if( FileOpened == openFileForReading( filename, &filePointer ) )
{
if( Success == getFileLength( filePointer, &fileLength ) )
{
- if( Success ==
- allocateBuffer( fileLength, ( void ** )&buffer ) )
+ void * ptr;
+
+ /*
+ * Allocate one byte more if a newline must be added
+ */
+ if( Success == allocateBuffer( fileLength + 1 , &ptr ) )
{
- if( Success ==
- readFileToBuffer( filePointer, fileLength, &buffer ) )
- {
+ char * buffer = ( char * )ptr;
+
+ if( Success == readFileToBuffer( filePointer, fileLength, &buffer ) )
+ {
+
+ if ( FALSE == queryParameter( IgnoreEOF ) )
+ {
+ char * eof = (buffer + fileLength - 1);
+
+ if ( *eof != '\n' )
+ {
+ *( eof + 1 ) = '\n';
+ fileLength++;
+ }
+ }
+
addToWatchdog( fileLength );
associateBuffer( fileSpecifier, fileLength, &buffer );
returnValue = FileOperationsSuccessful;
--- SRC/parameters.c
+++ SRC/parameters.c 2005-09-02 12:44:00.000000000 +0200
@@ -368,6 +368,13 @@
}
break;
+ case IgnoreEOF:
+ if( parameterIgnoreEOF == IsSet )
+ {
+ returnValue = TRUE;
+ }
+ break;
+
case IgnoreDefinites:
if( parameterIgnoreDefinites == IsSet )
{
--- SRC/parser.c
+++ SRC/parser.c 2005-09-02 12:44:00.000000000 +0200
@@ -296,6 +296,7 @@
unsigned long Size;
char * delimiterString;
char delimiterChar;
+ void * ptr;
queryStringParameter( Delimiter, &delimiterString );
delimiterChar = delimiterString[ 0 ];
@@ -305,23 +306,25 @@
countDelimiters( delimiterChar, baseFileBuffer, baseFileBufferLength );
baseFileBlocksLength++; /* add possible trailing comment */
Size = baseFileBlocksLength * sizeof( VariableBlock_t );
- if( Success != allocateBuffer( Size, ( void ** )&baseFileBlock ) )
+ if( Success != allocateBuffer( Size, &ptr ) )
{
fillup_exception( __FILE__, __LINE__, ConfigurationException,
"createAdministrationInfo" );
exitOnFailure( );
}
+ baseFileBlock = ( VariableBlock_t * )ptr;
additionalFileBlocksLength = countDelimiters(
delimiterChar, additionalFileBuffer, additionalFileBufferLength );
additionalFileBlocksLength++; /* add possible trailing comment */
Size = additionalFileBlocksLength * sizeof( VariableBlock_t );
- if( Success != allocateBuffer( Size, ( void ** )&additionalFileBlock ) )
+ if( Success != allocateBuffer( Size, &ptr ) )
{
fillup_exception( __FILE__, __LINE__, ConfigurationException,
"createAdministrationInfo" );
exitOnFailure( );
}
+ additionalFileBlock = ( VariableBlock_t * )ptr;
if( queryParameter( ForbiddenFile ) == TRUE )
{
@@ -329,12 +332,13 @@
delimiterChar, forbiddenFileBuffer, forbiddenFileBufferLength );
forbiddenFileBlocksLength++; /* add possible trailing comment */
Size = forbiddenFileBlocksLength * sizeof( VariableBlock_t );
- if( Success != allocateBuffer( Size, ( void ** )&forbiddenFileBlock ) )
+ if( Success != allocateBuffer( Size, &ptr ) )
{
fillup_exception( __FILE__, __LINE__, ConfigurationException,
"createAdministrationInfo" );
exitOnFailure( );
}
+ forbiddenFileBlock = ( VariableBlock_t * )ptr;
}
}
@@ -477,8 +481,8 @@
getVBeginOfBlock( outputBuffer, &Line );
Line = Line + getVLength( outputBuffer );
LinePointer = Line;
- for( lineIndex = 0;
- ( *LinePointer != EOF ) && ( *LinePointer != '\n' );
+ for( lineIndex = 0;
+ ( *LinePointer != 0 ) && ( *LinePointer != '\n' ) ;
lineIndex++ )
{
LinePointer++; /* concerns only the current line */
--- SRC/services.c
+++ SRC/services.c 2005-09-02 12:44:00.000000000 +0200
@@ -444,8 +444,9 @@
if( 0 == fseek( filePointer, 0L, SEEK_SET ) )
{
- if( fileLength ==
- ( long )fread( *fileBuffer, sizeof( char ), fileLength, filePointer ) )
+ if( ( fileLength ==
+ ( long )fread( *fileBuffer, sizeof( char ), fileLength, filePointer ) )
+ && ( 0 == ferror( filePointer ) ) )
{
returnValue = Success;
}
@@ -558,23 +559,22 @@
Service_t
allocateBuffer
(
- long fileLength, /* in */
+ long Length, /* in */
void ** buffer /* out */
)
{
Service_t returnValue;
- *buffer = malloc( fileLength + 1 );
+ *buffer = malloc( Length + 1 );
if( *buffer == NULL )
{
- fillup_exception( __FILE__, __LINE__, ServiceException,
- "malloc" );
+ fillup_exception( __FILE__, __LINE__, ServiceException, "malloc" );
returnValue = Error;
}
else
{
/* reset the buffer */
- ( void )memset( *buffer, EOF, fileLength + 1 );
+ ( void )memset( *buffer, 0, Length + 1 );
returnValue = Success;
}

BIN
fillup-1.42.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

32
fillup-optflags.patch Normal file
View File

@ -0,0 +1,32 @@
--- fillup-1.42/SRC/Makefile
+++ fillup-1.42/SRC/Makefile
@@ -46,24 +46,23 @@
COMPILER = -DGCC=1
# Set OPTIS to the following values
-OPTIS = $(OPTISPLUS) -O2 -fforce-addr -finline-functions -fno-function-cse \
- -fkeep-inline-functions
+OPTIS = $(OPTISPLUS) -O2
ifeq ($(COMPILE_OPTION),DEBUG)
# compile for debugging
- COMPILE = gcc -fsigned-char -DDEBUG -ansi -g -c ${WARNINGS} -I${SRC} -I${INC} ${COMPILER} ${SYS} ${DEFINES}
+ COMPILE = gcc -DDEBUG -ansi -g -c $(OPTIS) ${WARNINGS} -I${SRC} -I${INC} ${COMPILER} ${SYS} ${DEFINES}
LINK = gcc -g
endif
ifeq ($(COMPILE_OPTION),OPTIMIZE)
# compile with all optimizations
- COMPILE = gcc -fsigned-char -ansi -c $(OPTIS) $(WARNINGS) -I${SRC} -I${INC} ${COMPILER} ${SYS} ${DEFINES}
- LINK = gcc -O -s
+ COMPILE = gcc -ansi -c $(OPTIS) $(WARNINGS) -I${SRC} -I${INC} ${COMPILER} ${SYS} ${DEFINES}
+ LINK = gcc
endif
ifeq ($(COMPILE_OPTION),PROFILE)
# compile for use with "gprof"
- COMPILE = gcc -fsigned-char -ansi -pg -c ${WARNINGS} -I${SRC} -I${INC} ${COMPILER} ${SYS} ${DEFINES}
+ COMPILE = gcc -ansi -pg -c ${WARNINGS} -I${SRC} -I${INC} ${COMPILER} ${SYS} ${DEFINES}
LINK = gcc -pg
endif

11
fillup-retval.dif Normal file
View File

@ -0,0 +1,11 @@
--- TEST/FCSR/SRC/CreateRemoved.c
+++ TEST/FCSR/SRC/CreateRemoved.c
@@ -48,7 +48,7 @@
printf( "\n" );
index = 0;
- if( argument & 0x2L ) return; /* single variable but removed */
+ if( argument & 0x2L ) return 0; /* single variable but removed */
argument = argument >> 2;
while( ( index < numberOfKeywords ) && ( argument > 0 ) )

97
fillup-warnings.dif Normal file
View File

@ -0,0 +1,97 @@
diff -ruN fillup-1.42/SRC/metadata.c fillup-1.42-new/SRC/metadata.c
--- fillup-1.42/SRC/metadata.c 2003-09-10 14:20:00.000000000 +0200
+++ fillup-1.42-new/SRC/metadata.c 2005-07-06 10:50:55.000000000 +0200
@@ -165,6 +165,10 @@
MetadataKeyword_t loop;
long offset;
+ /* Both return values are explicitely initialized */
+ Result = Metadata_Number;
+ *length = 0;
+
offset = 0;
offset += consumeBlanksOrTabs( &precedingComment[ offset ], variableLength - offset );
for( loop=0; loop<Metadata_Number; loop++ )
diff -ruN fillup-1.42/SRC/parser.c fillup-1.42-new/SRC/parser.c
--- fillup-1.42/SRC/parser.c 2003-09-10 23:00:26.000000000 +0200
+++ fillup-1.42-new/SRC/parser.c 2005-07-06 11:01:35.000000000 +0200
@@ -106,6 +106,7 @@
long remainingInputChars /* in */
);
+#if DEBUG
static
void
printBlockInfo
@@ -121,13 +122,13 @@
VariableBlock_t * list /* in */
);
-
static
void
displayVerboseValue
(
long verboseValue /* in */
);
+#endif
static
void
@@ -597,6 +598,7 @@
}
}
+#if DEBUG
/*---------------- printBlockInfo ------------------*/
static
@@ -668,6 +670,7 @@
list = getVSucc( list );
}
}
+#endif
/*------------ displayVerboseString ---------------*/
void
@@ -682,6 +685,7 @@
}
}
+#if DEBUG
/*------------ displayVerboseValue ----------------*/
static
@@ -696,6 +700,7 @@
displayValue( verboseValue );
}
}
+#endif
/*------------ displayVerboseBuffer ---------------*/
@@ -907,6 +912,12 @@
break;
default:
+ /* next four statements are inserted to eliminate gcc warnings */
+ inputBuffer = (char *)NULL;
+ inputLength = 0;
+ outputBuffer = (VariableBlock_t *)NULL;
+ outputLength = 0;
+
fillup_exception( __FILE__, __LINE__, DefaultBranchException,
"parseFile" );
break;
diff -ruN fillup-1.42/SRC/services.c fillup-1.42-new/SRC/services.c
--- fillup-1.42/SRC/services.c 2003-09-10 14:20:01.000000000 +0200
+++ fillup-1.42-new/SRC/services.c 2005-07-06 14:03:37.000000000 +0200
@@ -251,7 +251,7 @@
char character /* in */
)
{
- ( void )fputc( character, stderr );
+ ( void )fputc( ( int )character, stderr );
}
/*---------------- displayVersion ------------------*/

132
fillup.changes Normal file
View File

@ -0,0 +1,132 @@
-------------------------------------------------------------------
Tue Sep 19 14:40:35 CEST 2006 - rguenther@suse.de
- Do not install info or plaintext documentation (same as manpage).
- Remove sgmltool BuildRequires.
-------------------------------------------------------------------
Mon May 22 20:27:04 CEST 2006 - schwab@suse.de
- Don't strip binaries.
-------------------------------------------------------------------
Wed Jan 25 21:30:12 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Jan 11 19:14:17 CET 2006 - ro@suse.de
- fix missing return value in test-code (#139594)
-------------------------------------------------------------------
Fri Sep 2 13:20:59 CEST 2005 - werner@suse.de
- Fix segv on big endian (bug #114066)
* Correct usage of EOF macro, this is and was never a character
* Make it handle missing newline at EOF
- Make it strict alias safe
- Compare the correct debug output in test suite (bug #95371)
-------------------------------------------------------------------
Wed Jul 27 15:52:42 CEST 2005 - ro@suse.de
- silence some compiler warnings (#95370)
-------------------------------------------------------------------
Tue Jun 28 01:27:23 CEST 2005 - ro@suse.de
- removed -fsigned-char (#93875)
-------------------------------------------------------------------
Wed Jun 15 16:34:04 CEST 2005 - meissner@suse.de
- Use RPM_OPT_FLAGS -fno-strict-aliasing.
- compile OPTIMIZE, drop some no longer applying -f flags.
-------------------------------------------------------------------
Mon Mar 1 14:49:13 CET 2004 - ro@suse.de
- fix install_info stuff in postun
-------------------------------------------------------------------
Mon Oct 20 01:43:48 CEST 2003 - ro@suse.de
- use defattr
- don't build as root
-------------------------------------------------------------------
Thu Sep 11 18:11:16 CEST 2003 - ro@suse.de
- update to 1.42 (#30279)
-------------------------------------------------------------------
Mon Aug 25 16:18:41 CEST 2003 - ro@suse.de
- update to 1.41
- additional Keyword: PreSaveCommand
-------------------------------------------------------------------
Thu Aug 14 14:48:23 CEST 2003 - ro@suse.de
- update to 1.38 with additional MetaData keywords
-------------------------------------------------------------------
Mon Jun 16 14:31:46 CEST 2003 - kukuk@suse.de
- Remove /var/adm/fillup-templates, already in filesystem package
-------------------------------------------------------------------
Wed Mar 12 21:33:38 CET 2003 - ro@suse.de
- update to 1.24 including the last two patches and
more testcases for "make check"
-------------------------------------------------------------------
Wed Mar 12 14:14:51 CET 2003 - ro@suse.de
- switch behaviour to "fixed sequence of metadata" (#25119)
-------------------------------------------------------------------
Sun Mar 9 20:57:43 CET 2003 - ro@suse.de
- fix watchdog for removal part (factor 2 needed)
(fix for reopened #24648)
-------------------------------------------------------------------
Thu Mar 6 17:29:16 CET 2003 - ro@suse.de
- update to 1.22 (avoid possible infinite loop on failure) (#24648)
-------------------------------------------------------------------
Thu Mar 6 14:43:33 CET 2003 - ro@suse.de
- fix for stale comment when removing variable (#24540)
-------------------------------------------------------------------
Wed Feb 19 10:59:08 CET 2003 - ro@suse.de
- update to 1.21
- works around problem with comments wrongly typed as metadata
-------------------------------------------------------------------
Thu Feb 6 17:13:16 CET 2003 - ro@suse.de
- added install-info macros
-------------------------------------------------------------------
Thu Nov 28 14:36:50 CET 2002 - ro@suse.de
- update to 1.20 beta (aka prototype)
-------------------------------------------------------------------
Mon Nov 11 11:26:13 CET 2002 - ro@suse.de
- changed neededforbuild <sp> to <opensp>
-------------------------------------------------------------------
Mon Aug 12 13:53:04 CEST 2002 - ro@suse.de
- split off aaa_base

136
fillup.spec Normal file
View File

@ -0,0 +1,136 @@
#
# spec file for package fillup (Version 1.42)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: fillup
License: GPL
Group: System/Base
Provides: aaa_base:/bin/fillup
Autoreqprov: on
Version: 1.42
Release: 123
Summary: Tool for Merging Config Files
Source: fillup-%{version}.tar.bz2
Patch: fillup-optflags.patch
Patch1: fillup-warnings.dif
Patch2: fillup-%{version}.dif
Patch3: fillup-retval.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define fillup_info_entry * fillup: (fillup) fillup. SuSE-fillup-tool.
%description
fillup merges files that hold variables. A variable is defined by an
entity composed of a preceding comment, a variable name, an assignment
delimiter, and a related variable value. A variable is determined by
its variable name.
Authors:
--------
Joerg Dippel <jd@suse.de>
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p0
%patch3 -p0
%build
#
# Be sure that the tests for fillup are run in
# DEBUG mode for comparision with the references
#
make clean
make test OPTISPLUS="$RPM_OPT_FLAGS"
#
# For the real world make clean and use the
# optimzed version.
#
make clean
make compile COMPILE_OPTION=OPTIMIZE OPTISPLUS="$RPM_OPT_FLAGS"
%install
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
#
# install fillup
#
install -d -m 755 $RPM_BUILD_ROOT/bin
install -m 755 BIN/fillup $RPM_BUILD_ROOT/bin
install -d $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 644 SGML/fillup.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
%files
%defattr(-,root,root)
/bin/fillup
%{_mandir}/man8/fillup*
%changelog -n fillup
* Tue Sep 19 2006 - rguenther@suse.de
- Do not install info or plaintext documentation (same as manpage).
- Remove sgmltool BuildRequires.
* Mon May 22 2006 - schwab@suse.de
- Don't strip binaries.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 - ro@suse.de
- fix missing return value in test-code (#139594)
* Fri Sep 02 2005 - werner@suse.de
- Fix segv on big endian (bug #114066)
* Correct usage of EOF macro, this is and was never a character
* Make it handle missing newline at EOF
- Make it strict alias safe
- Compare the correct debug output in test suite (bug #95371)
* Wed Jul 27 2005 - ro@suse.de
- silence some compiler warnings (#95370)
* Tue Jun 28 2005 - ro@suse.de
- removed -fsigned-char (#93875)
* Wed Jun 15 2005 - meissner@suse.de
- Use RPM_OPT_FLAGS -fno-strict-aliasing.
- compile OPTIMIZE, drop some no longer applying -f flags.
* Mon Mar 01 2004 - ro@suse.de
- fix install_info stuff in postun
* Mon Oct 20 2003 - ro@suse.de
- use defattr
- don't build as root
* Thu Sep 11 2003 - ro@suse.de
- update to 1.42 (#30279)
* Mon Aug 25 2003 - ro@suse.de
- update to 1.41
- additional Keyword: PreSaveCommand
* Thu Aug 14 2003 - ro@suse.de
- update to 1.38 with additional MetaData keywords
* Mon Jun 16 2003 - kukuk@suse.de
- Remove /var/adm/fillup-templates, already in filesystem package
* Wed Mar 12 2003 - ro@suse.de
- update to 1.24 including the last two patches and
more testcases for "make check"
* Wed Mar 12 2003 - ro@suse.de
- switch behaviour to "fixed sequence of metadata" (#25119)
* Sun Mar 09 2003 - ro@suse.de
- fix watchdog for removal part (factor 2 needed)
(fix for reopened #24648)
* Thu Mar 06 2003 - ro@suse.de
- update to 1.22 (avoid possible infinite loop on failure) (#24648)
* Thu Mar 06 2003 - ro@suse.de
- fix for stale comment when removing variable (#24540)
* Wed Feb 19 2003 - ro@suse.de
- update to 1.21
- works around problem with comments wrongly typed as metadata
* Thu Feb 06 2003 - ro@suse.de
- added install-info macros
* Thu Nov 28 2002 - ro@suse.de
- update to 1.20 beta (aka prototype)
* Mon Nov 11 2002 - ro@suse.de
- changed neededforbuild <sp> to <opensp>
* Mon Aug 12 2002 - ro@suse.de
- split off aaa_base

0
ready Normal file
View File