From 9646ebdd7afa01e3714294694e647138115c8c6214399978c82bce9c28a1588f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 18 Dec 2006 23:15:55 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fillup?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + fillup-1.42.dif | 176 ++++++++++++++++++++++++++++++++++++++++++ fillup-1.42.tar.bz2 | 3 + fillup-optflags.patch | 32 ++++++++ fillup-retval.dif | 11 +++ fillup-warnings.dif | 97 +++++++++++++++++++++++ fillup.changes | 132 +++++++++++++++++++++++++++++++ fillup.spec | 136 ++++++++++++++++++++++++++++++++ ready | 0 10 files changed, 611 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fillup-1.42.dif create mode 100644 fillup-1.42.tar.bz2 create mode 100644 fillup-optflags.patch create mode 100644 fillup-retval.dif create mode 100644 fillup-warnings.dif create mode 100644 fillup.changes create mode 100644 fillup.spec create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fillup-1.42.dif b/fillup-1.42.dif new file mode 100644 index 0000000..f2b055c --- /dev/null +++ b/fillup-1.42.dif @@ -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; + } diff --git a/fillup-1.42.tar.bz2 b/fillup-1.42.tar.bz2 new file mode 100644 index 0000000..0cf7e91 --- /dev/null +++ b/fillup-1.42.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:107b361c846ed1f58b81debbdda05d7607a56e846eecccf515523ccdee8d0f8c +size 42971 diff --git a/fillup-optflags.patch b/fillup-optflags.patch new file mode 100644 index 0000000..73016a9 --- /dev/null +++ b/fillup-optflags.patch @@ -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 + diff --git a/fillup-retval.dif b/fillup-retval.dif new file mode 100644 index 0000000..1955dc8 --- /dev/null +++ b/fillup-retval.dif @@ -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 ) ) diff --git a/fillup-warnings.dif b/fillup-warnings.dif new file mode 100644 index 0000000..f163fa4 --- /dev/null +++ b/fillup-warnings.dif @@ -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 to + +------------------------------------------------------------------- +Mon Aug 12 13:53:04 CEST 2002 - ro@suse.de + +- split off aaa_base + diff --git a/fillup.spec b/fillup.spec new file mode 100644 index 0000000..ef1895e --- /dev/null +++ b/fillup.spec @@ -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 + +%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 to +* Mon Aug 12 2002 - ro@suse.de +- split off aaa_base diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4