ChangeLog 238 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464
  1. 2005-06-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2. Fix bugs introduced yesterday:
  3. * src/sparse.c (tar_sparse_init): Initialize
  4. dimped_size to 0.
  5. (sparse_scan_file): Initialize archive_file_size to 0. The
  6. variable keeps size of the file *as stored in the archive*, not
  7. the size reported by stat.
  8. 2005-06-22 Paul Eggert <eggert@cs.ucla.edu>
  9. A sweep of the sparse code prompted by a bug report by Jim Meyering.
  10. * src/sparse.c: Include <inttostr.h>.
  11. (struct tar_sparse_file): offset and dumped_size are off_t, not
  12. size_t. optab is now const *.
  13. (dump_zeros): Return bool success flag, not off_t.
  14. All callers changed.
  15. Use a constant-zero buffer rather than clearing a buffer each time.
  16. Don't mess up if write fails.
  17. (dump_zeros, check_sparse_region):
  18. Don't assume off_t is no wider than size_t.
  19. (tar_sparse_init): Don't bother clearing a field that is already clear.
  20. (zero_block_p): First arg is const *, not *.
  21. (clear_block, SPARSES_INIT_COUNT): Remove.
  22. (sparse_add_map): First arg is now struct start_stat_info *, not
  23. struct tar_sparse_file *. All callers changed.
  24. Use x2nrealloc to check for size_t overflow.
  25. (parse_scan_file): Cache commonly-used parts of file.
  26. Use an auto buffer, not a static one.
  27. Don't bother clearing the buffer; not needed.
  28. Don't bother clearing items that are already clear.
  29. (oldgnu_optab, star_optab, pax_optab): Now const.
  30. (sparse_dump_region): Don't bother clearing the buffer before
  31. reading into it; just clear the parts that aren't read into.
  32. (sparse_dump_file): Clear the whole local variable 'file'.
  33. (diff_buffer): Remove; now a local var.
  34. (check_sparse_region): Don't bother clearing buffer before
  35. reading into it. Don't assume off_t is promoted to long.
  36. (oldgnu_get_sparse_info, star_get_sparse_info):
  37. Use an auto status, not static.
  38. * src/tar.h (struct tar_stat_info): had_trailing_slash is
  39. now bool, not int.
  40. * src/xheader.c (sparse_offset_coder, sparse_numbytes_coder):
  41. Rewrite to avoid cast.
  42. (sparse_offset_decoder, sparse_numbytes_decoder):
  43. Diagnose excess entries rather than crashing.
  44. 2005-06-22 Jim Meyering <jim@meyering.net>
  45. * src/common.h (timespec_lt): Add a return type: bool.
  46. 2005-06-21 Paul Eggert <eggert@cs.ucla.edu>
  47. Further improvements inspired by Jim Meyering's fixes.
  48. * NEWS: Better support for full-resolution time stamps.
  49. The -v option now prints time stamps only to 1-minute resolution.
  50. * gnulib.modules: Add utimens.
  51. * lib/.cvsignore: Add imaxtostr.c, inttostr.c, inttostr.h,
  52. offtostr.c, umaxtostr.c, utimens.c, utimens.h. Remove paxconvert.c.
  53. * lib/Makefile.tmpl (libtar_a_SOURCES): Remove paxconvert.c.
  54. * lib/paxconvert.c: Remove; superseded by umaxtostr.c.
  55. * po/POTFILES.in: Remove lib/paxconvert.c. Add lib/xalloc-die.c,
  56. lib/obstack.c.
  57. * src/buffer.c (set_start_time, compute_duration, start_time):
  58. Use gettime rather than rolling our own code.
  59. * src/common.h (OLDGNU_NAME_FIELD_SIZE, MAXOCTAL11, MAXOCTAL7): Remove.
  60. (newer_ctime_option): Remove.
  61. (timespec_lt): New function.
  62. (OLDER_STAT_TIME): Use it.
  63. (string_to_chars): First arg is char const *, not char *.
  64. (tartime): Time arg is now struct timespec. New bool arg.
  65. All callers changed.
  66. (code_ns_fraction): New decl.
  67. (sys_stat_nanoseconds): Remove decl.
  68. (get_stat_atime, get_stat_ctime, get_stat_mtime): New functions.
  69. (set_stat_atime, set_stat_ctime, set_stat_mtime): New functions.
  70. * src/compare.c: Include utimens.h rather than rolling our own.
  71. (diff_dir, diff_file, diff_link, diff_symlink, diff_special):
  72. Prototype.
  73. (diff_dumpdir, diff_multivol): Prototype.
  74. (diff_file): Support higher-resolution time stamps.
  75. * src/create.c: Include utimens.h rather than rolling our own.
  76. (MAX_OCTAL_VAL): New macro.
  77. (tar_copy_str, string_to_chars): Don't bother to zero-fill;
  78. the destination is already zeroed.
  79. (string_to_chars): First arg is char const *.
  80. (start_private_header): Use MINOR_TO_CHARS, not MAJOR_TO_CHARS,
  81. for minor device number.
  82. (write_header_name, dump_hard_link, dump_file0):
  83. Simplify test for old GNU format.
  84. (start_header): Put in placeholders for uid, etc., even when
  85. using extended headers, for benefit of older "tar" implementations.
  86. Don't assume uintmax_t is wider than 32 bits.
  87. Output extended header for mtime if needed.
  88. (dump_regular_finish, dump_file0):
  89. Support extended time stamp resolution.
  90. * src/extract.c: Include utimens.h rather than rolling our own.
  91. (check_time): Support extended time stamp resolution.
  92. * src/list.c: Include <inttostr.h>.
  93. (tartime): Use umaxtostr rather than stringify_uintmax_t_backwards.
  94. * src/xheader.c: Include <inttostr.h>.
  95. Do not include <xstrtol.h>.
  96. (strtoimax) [!HAVE_DECL_STRTOIMAX && !defined strtoimax]: New decl.
  97. (strtoumax) [!HAVE_DECL_STRTOUMAX && !defined strtoumax]: New decl.
  98. (BILLION, LOG10_BILLION): New constants.
  99. (to_decimal): Remove; superseded by inttostr. All callers changed
  100. to use umaxtostr.
  101. (xheader_format_name): Don't assume pids and uintmax_t values
  102. fit in 63 bytes (!) when printed.
  103. (decode_record): Don't bother to check for ERANGE; an out of range
  104. value must be treater than len_max anyway.
  105. If the length is out of range, output it in the diagnostic.
  106. (format_uintmax): Remove; all callers changed to use umaxtostr.
  107. (xheader_print): Don't assume sizes can be printed in 99 bytes (!).
  108. (out_of_range_header): New function.
  109. (decode_time): Use it.
  110. (code_time): Accept struct timespec, not time_t and unsigned long.
  111. All callers changed. Size sbuf properly, and remove unnecessary check.
  112. Don't assume time stamps can fit in 199 bytes.
  113. Handle negative time stamps. Handle fractional time stamps
  114. more consistently. Don't output unnecessary trailing zeros.
  115. (decode_time): Yield struct timespec, not time_t and unsigned long.
  116. All callers changed.
  117. Handle negative time stamps. Truncate towards minus infinity
  118. consistently. Improve overflow checks, and output a better
  119. diagnostic on overflow.
  120. (code_num): Don't assume uintmax_t can be printed in 99 bytes (!).
  121. (decode_num): New function, for better diagnostics.
  122. (atime_coder, atime_decoder, gid_decoder, ctime_coder):
  123. (ctime_decoder, mtime_coder, mtime_decoder, size_decoder):
  124. (uid_decoder, sparse_size_decoder, sparse_numblocks_decoder):
  125. (sparse_offset_decoder, sparse_numbytes_decoder):
  126. Use decode_num, etc., instead of xstrtoumax, etc.
  127. 2005-06-21 Jim Meyering <jim@meyering.net>
  128. Carefully crafted invalid headers can cause buffer overrun.
  129. Invalid header fields go undiagnosed.
  130. Some valid time strings are ignored.
  131. * src/xheader.c (sparse_numblocks_decoder): Remove unchecked use
  132. of `calloc'. Use xcalloc instead.
  133. (decode_time, gid_decoder, size_decoder, uid_decoder):
  134. (sparse_size_decoder, sparse_offset_decoder, sparse_numblocks_decoder):
  135. Ensure that the result of calling xstrtoumax is no larger than
  136. the maximum value for the target type. Upon any failure, exit with
  137. a diagnostic.
  138. (sparse_numblocks_decoder): Avoid buffer overrun/heap corruption:
  139. use x2nrealloc, rather than `n *= 2' and xrealloc(p, n,....
  140. (decode_time): Rewrite to accept time strings like
  141. 1119018481.000000000. Before, such strings were always ignored.
  142. 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  143. * src/create.c (dump_file0): Check for is_avoided_name()
  144. first. Fixes bug reported by Martin Lohmeier
  145. <martin@mein-horde.de>
  146. * tests/update.at: New file
  147. * tests/Makefile.am (TESTSUITE_AT): Add update.at
  148. * tests/testsuite.at: Likewise
  149. 2005-06-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  150. * configure.ac (AC_STRUCT_ST_BLKSIZE)
  151. (AC_STRUCT_ST_BLOCKS): Removed. Handled by system.m4.
  152. 2005-06-02 Paul Eggert <eggert@cs.ucla.edu>
  153. * src/names.c (excluded_name): excluded_filename ->
  154. excluded_file_name, because the name was changed in gnulib.
  155. 2005-05-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  156. * src/tar.c (read_name_from_file,update_argv): Automatically
  157. detect nul-terminated list files.
  158. * NEWS: Updated
  159. 2005-05-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  160. * scripts/backup.sh.in: Bugfixes.
  161. 2005-05-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  162. * scripts/backup.in: Minor fixes
  163. * scripts/backup.sh.in (mt_begin,mt_rewind)
  164. (mt_offline,mt_status): Use $MT to invoke mt
  165. (init_common): Set --rsh-command option for mt if TAPE_FILE is a
  166. remote archive.
  167. * doc/tar.texi: Document new backup scripts behavior
  168. 2005-05-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  169. * lib/.cvsignore: Updated
  170. * lib/Makefile.tmpl: Add new paxutils files
  171. * po/POTFILES.in: Likewise
  172. * src/buffer.c: Update invocations of safer_name_suffix()
  173. * src/create.c: Likewise
  174. * src/extract.c: Likewise
  175. * src/xheader.c: Likewise
  176. * src/common.h: Include paxlib.h instead of paxerror.h
  177. (safer_name_suffix,removed_prefixes_p): Removed. The functions are
  178. imported from paxutils
  179. * src/names.c (hash_string_hasher,hash_string_compare)
  180. (hash_string_insert,hash_string_lookup,removed_prefixes_p)
  181. (safer_name_suffix): Moved to paxutils
  182. 2005-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  183. * bootstrap (copy_files): Accept optional third argument: a prefix
  184. to be appended to destination file names.
  185. Import paxutils/paxlib files.
  186. * configure.ac: Remove checking for LIB_SETSOCKOPT, it is handled
  187. by paxutils.
  188. * lib/Makefile.tmpl (libtar_a_SOURCES): Add paxerror.c paxexit.c
  189. paxconvert.c
  190. * po/POTFILES.in: Likewise.
  191. * src/common.h: Remove defines and declarations imported from
  192. paxutils
  193. * src/misc.c: Likewise
  194. * src/list.c (stringify_uintmax_t_backwards): Moved to paxutils
  195. 2005-05-17 Paul Eggert <eggert@cs.ucla.edu>
  196. * src/misc.c (remove_any_file): Fix typo in previous change.
  197. 2005-05-14 Paul Eggert <eggert@cs.ucla.edu>
  198. Port to Solaris 10's treatment of unlinking directories.
  199. * gnulib-modules: Add unlinkdir.
  200. * lib/.cvsignore: Add unlinkdir.h, unlinkdir.c.
  201. * src/common.h (we_are_root): Remove extern decl; it's now static.
  202. * src/extract.c (we_are_root): Now static.
  203. * src/misc.c: Include <unlinkdir.h>.
  204. (remove_any_file): Use cannot_unlink_dir () rather than we_are_root.
  205. * ChangeLog, ChangeLog.1, Makefile.am, NEWS, PORTS, README,
  206. README-alpha, TODO, bootstrap, configure.ac, doc/Makefile.am,
  207. doc/convtexi.pl, doc/fdl.texi, doc/gendocs_template,
  208. lib/Makefile.tmpl, lib/prepargs.c, lib/waitpid.c, po/POTFILES.in,
  209. scripts/Makefile.am, scripts/backup-specs, scripts/backup.in,
  210. scripts/backup.sh.in, scripts/restore.in, src/Makefile.am,
  211. src/arith.h, src/buffer.c, src/common.h, src/compare.c,
  212. src/create.c, src/delete.c, src/extract.c, src/incremen.c,
  213. src/list.c, src/mangle.c, src/misc.c, src/names.c, src/sparse.c,
  214. src/system.c, src/tar.c, src/tar.h, src/update.c, src/utf8.c,
  215. src/xheader.c, tests/Makefile.am, tests/append.at,
  216. tests/append01.at, tests/comprec.at, tests/delete01.at,
  217. tests/delete02.at, tests/delete03.at, tests/delete04.at,
  218. tests/delete05.at, tests/extrac01.at, tests/extrac02.at,
  219. tests/extrac03.at, tests/extrac04.at, tests/extrac05.at,
  220. tests/gzip.at, tests/ignfail.at, tests/incremental.at,
  221. tests/link01.at, tests/listed01.at, tests/listed02.at,
  222. tests/long01.at, tests/longv7.at, tests/multiv01.at,
  223. tests/multiv02.at, tests/multiv03.at, tests/multiv04.at,
  224. tests/old.at, tests/options.at, tests/options02.at, tests/pipe.at,
  225. tests/recurse.at, tests/same-order01.at, tests/same-order02.at,
  226. tests/shortrec.at, tests/sparse01.at, tests/sparse02.at,
  227. tests/testsuite.at, tests/truncate.at, tests/version.at,
  228. tests/volume.at, tests/star/gtarfail.at, tests/star/gtarfail2.at,
  229. tests/star/multi-fail.at, tests/star/pax-big-10g.at,
  230. tests/star/quicktest.sh, tests/star/ustar-big-2g.at,
  231. tests/star/ustar-big-8g.at:
  232. Update FSF postal mail address.
  233. 2005-05-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  234. * NEWS: Updated
  235. * THANKS: Updated
  236. * bootstrap: Install files from paxutils/doc
  237. * doc/Makefile.am (tar_TEXINFOS): Add genfile.texi
  238. * doc/tar.texi (Genfile): New appendix
  239. * src/compare.c (diff_file): diff_handle was not initialized
  240. * src/create.c (dump_regular_file): Correctly pad archive members
  241. that shrunk during archiving. Repored by Frank Heckenbach.
  242. * src/extract.c (file_newer_p): Return false if file does not
  243. exist
  244. (prepare_to_extract): Correct warning wording.
  245. * tests/truncate.at: New test case
  246. * tests/Makefile.am: Add truncate.at
  247. * tests/testsuite.at: Likewise.
  248. * doc/.cvsignore: Updated
  249. * lib/.cvsignore: Updated
  250. * tests/.cvsignore: Updated
  251. 2005-05-02 Paul Eggert <eggert@cs.ucla.edu>
  252. * tests/multivol04.at: Tell awk to read from /dev/null.
  253. Adjust to recent gnulib changes.
  254. * lib/.cvsignore: Add dup-safer.c, fd-safer.c, unistd-safer.h.
  255. * src/common.h (initial_umask): New var.
  256. * src/create.c (start_ueader): Use it, and adjust to new modechange
  257. API.
  258. (hash_link): unsigned -> size_t parameters and result.
  259. * src/incremen.c (hash_directory): Likewise.
  260. * src/names.c (hash_string_hasher): Likewise.
  261. * src/tar.c (parse_opt): Set it, and adjust to new modechange API.
  262. 2005-04-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  263. * tests/Makefile.am: Add shortrec.at.
  264. 2005-04-18 Paul Eggert <eggert@cs.ucla.edu>
  265. * src/buffer.c (reading_from_pipe): Remove. All uses removed.
  266. (short_read): Don't warn about short reads; they're normal.
  267. * tests/shortrec.at: New file.
  268. * tests/testsuite.at: Include it.
  269. * bootstrap (gnulib_modules): Don't create a file modlist.tmp, as
  270. it is sometimes left behind as a garbage file (maybe due to the
  271. multiple traps?).
  272. 2005-04-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  273. * src/list.c: Handle Solaris 'X' type flag
  274. * src/tar.h (SOLARIS_XHDTYPE): New define
  275. 2005-04-06 Sergey Poznyakoff <gray@mirddin.farlep.net>
  276. * src/tar.c: Minor fixes to text messages. Proposed by Benno
  277. Schulenberg.
  278. * src/extract.c: Likewise
  279. (extract_file): Assign orig_file_name
  280. to save_name uniformly over the program. This fixes matching
  281. directory names at the start of an archive volume.
  282. * src/buffer.c (flush_write): Warn when the name of the archive
  283. straddling volume boundary is longer than 100 characters. Earlier
  284. behavior was to issue a fatal error.
  285. (struct zip_magic): Reverted part of changes from 2005-04-04.
  286. They make the maintenance too costly. Removing `unsigned'
  287. qualifier from `magic' member should be enough.
  288. * src/compare.c (diff_init): Read directory file if in listed
  289. incremental. This prevents spurious 'Contents differ' diagnostics.
  290. (diff_archive): Minor fixes to text messages
  291. (diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
  292. to save_name uniformly over the program. This fixes matching
  293. directory names at the start of an archive volume.
  294. * src/create.c: Assign orig_file_name
  295. to save_name uniformly over the program. This fixes matching
  296. directory names at the start of an archive volume.
  297. * src/list.c: Likewise
  298. * tests/multiv03.at: Modified to match the new behavior
  299. * tests/multiv04.at: New file. Test splittind directory members between
  300. the archive volumes.
  301. * tests/Makefile.am: Add multiv04.at
  302. * tests/testsuite.at: Likewise.
  303. 2005-04-04 Paul Eggert <eggert@cs.ucla.edu>
  304. * configure.ac (AC_CONFIG_AUX_DIR): Rename from config to build-aux,
  305. for reasons discussed in the thread beginning at
  306. <http://lists.gnu.org/archive/html/bug-gnulib/2005-03/msg00119.html>.
  307. * .cvsignore: Remove config; add build-aux.
  308. * src/buffer.c (struct zip_magic): Use char arrays, not pointers.
  309. The unsigned char * pointer ran afoul of pedantic C compilers, and
  310. we didn't need pointers anyway. Put the size field before the
  311. data to avoid unnecessary padding. All uses changed.
  312. (magic) Make it const, since it doesn't change. All uses changed.
  313. 2005-04-02 Paul Eggert <eggert@cs.ucla.edu>
  314. * src/xheader.c (decode_record): Don't dump core when given
  315. a corrupted extended header. Problem reported by Jim Meyering.
  316. Also, check for other ways that the header might be invalid,
  317. e.g., missing newline at end. Do not allow keys with nulls.
  318. Allow blanks before and after length, as POSIX requires.
  319. Do not allow leading "-" in length. Check for length overflow.
  320. (xheader_decode, xheader_decode_global): Let decode_record
  321. check for exhaustion of record.
  322. (xheader_read): Null-terminate the extended record;
  323. decode_record relies on this.
  324. 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
  325. * bootstrap (TP_URL): Change from
  326. <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
  327. <http://www.iro.umontreal.ca/translation/maint/tar/> to avoid
  328. some redirection glitches.
  329. Use "trap - 0" rather than "trap 0" to fix a POSIX-conformance bug.
  330. * doc/.cvsignore: Change "tar.info" to "tar.info*". Sort.
  331. * lib/.cvsignore: Add intprops.h (new gnulib file).
  332. 2005-03-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  333. * src/list.c (print_header): Print UID/GID in case of
  334. empty user/group name. This could occur when dumping
  335. files belonging to non-existing users and when listing
  336. broken archives.
  337. Reported by Igor Lautar.
  338. * src/create.c: Correctly parse empty uname/gname
  339. * src/sparse.c (sparse_scan_file): Bugfix. offset had
  340. incorrect type.
  341. * scripts/backup.in: Use `head -n 1'. Provide missing
  342. argument to ${MT_STATUS}. Proposed by Jan Merka.
  343. * scripts/backup.sh.in: Likewise. Fixed typo in
  344. MT_OFFLINE assignment.
  345. * scripts/restore.in (restore_fs): Use root_fs
  346. 2005-02-15 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  347. * src/create.c: Replace strdup with xstrdup
  348. * src/names.c: Likewise
  349. * src/tar.c: Likewise
  350. * tests/append01.at: Added reference to bug-tar archive
  351. * tests/listed02.at: Use -print with find.
  352. 2005-02-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  353. * THANKS: Added Tim Adye. Fixed UTF.
  354. * src/list.c (read_header): Removed assignment to
  355. oldgnu_header.isextended. It was breaking append mode.
  356. * tests/append01.at: New test.
  357. * tests/Makefile.am: Added append01.at
  358. * tests/testsuite.at: Likewise
  359. 2005-02-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  360. * gnulib.modules: New file. List of required gnulib
  361. modules.
  362. * bootstrap: Merge list of required modules from
  363. paxutils with that from tar proper.
  364. * src/tar.c: Various fixes in help and diagnostic messages.
  365. 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  366. * src/common.h (EXTRACT_OVER_PIPE): New macro
  367. * src/compare.c: Code clean up.
  368. * src/extract.c (extract_archive): Do not check for
  369. EXTRACT_OVER_PIPE, decode_options() does this.
  370. * src/misc.c (exec_error,fork_error,dup2_error)
  371. (pipe_error): Removed unneeded functions.
  372. * src/system.c (sys_exec_command): Use xclose, xpipe,
  373. xfork, xdup2 and exec_fatal.
  374. * src/tar.c (options): Improved sorting. Document --backup=off.
  375. (decode_options): Clear backup_option if necessary.
  376. 2005-02-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  377. Initial implementation of --to-command option proposed
  378. by Hansjoerg Lipp.
  379. * bootstrap: Get setenv module from gnulib
  380. * src/buffer.c: Do not use 8-bit chars in comments
  381. * src/common.h (to_command_option)
  382. (ignore_command_error_option): New globals
  383. (sys_exec_command,sys_wait_command): New commands
  384. * src/extract.c (extract_file): Handle to_command_option
  385. Fix error recovery: decrease `size' by `written', not
  386. by `count', otherwise tar misses the next header
  387. Do not diagnose write error if to_command_option
  388. is set, since the command may have exited prematurely.
  389. It would be better to check for sigpipe, though.
  390. (prepare_to_extract): Handle to_command_option
  391. * src/misc.c (exec_error, fork_error, dup_error)
  392. (pipe_error): New functions
  393. * src/system.c (sys_exec_command)
  394. (sys_wait_command): New functions
  395. * src/tar.c: Handle new options --to-command,
  396. --ignore-command-error
  397. * THANKS: Added Hansjoerg Lipp
  398. 2005-02-03 Paul Eggert <eggert@cs.ucla.edu>
  399. * src/list.c (from_header): New arg OCTAL_ONLY, normally false.
  400. All uses changed. Fix typo that sometimes suppressed all "Archive
  401. contains obsolescent base-64 headers" warnings, not just the first
  402. one.
  403. (tar_checksum): Accept only octal checksums, since they aren't
  404. supposed to overflow into weird formats.
  405. Adjust to gnulib changes.
  406. * lib/.cvsignore: Add chdir-long.c, chdir-long.h, memrchr.c,
  407. memrchr.h, openat.c, openat.h. Remove pathmax.h (added by
  408. mistake, perhaps?), sysexit.h (my typo), xstrdup.c (gnulib removed
  409. this file). Sort entries.
  410. 2005-02-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  411. * src/extract.c: Further rewrite.
  412. * src/buffer.c: Removed unused variables.
  413. * src/list.c: Likewise
  414. * src/tar.c (update_argv): Changed type to void
  415. * src/common.h (OLDGNU_NAME_FIELD_SIZE): New constant
  416. * src/create.c (start_private_header,write_header_name)
  417. (dump_hard_link): Restore compatibility with 1.13.25
  418. * src/extract.c (extract_archive): Rewritten
  419. * src/list.c: Add translators' comments
  420. * src/tar.c (options) Minor spelling fix
  421. * tests/star/quicktest.sh: Determine path to the tar executable.
  422. 2005-02-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  423. * po/POTFILES.in: Added tests/genfile.c
  424. * src/buffer.c (short_read): Use ngettext()
  425. (new_volume): use quote().
  426. * src/create.c: Use quote()
  427. * src/extract.c: Likewise
  428. * src/xheader.c: Likewise
  429. * src/misc.c: Add comments to translators
  430. * tests/same-order01.at: sort ls output
  431. * tests/sparse01.at (RE_CHECK): Added missing space
  432. * tests/sparse02.at: Test extracting sparse files over a pipe.
  433. * tests/Makefile.am: Added sparse02.at
  434. * tests/testsuite.at: Likewise
  435. * tests/listed02.at: Skip the test on filesystems that do not
  436. update ctime of a file when renaming it. To be reverted when
  437. the new incremental mode is ready.
  438. * tests/sparse01.at: Extract and compare sparse file
  439. 2005-02-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  440. * src/sparse.c: Extract sparse files even if the output
  441. fd is not seekable.
  442. 2005-02-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  443. * bootstrap: Add a comment to lib/Makefile.am saying that this
  444. is an autogenerated file.
  445. Exit with code 1 if any of autotools fails.
  446. * lib/Makefile.tmpl: Insert Emacs magic to the first line.
  447. * tests/Makefile.am: Add append.at
  448. * m4/.cvsignore: Ignore all *.m4 files
  449. 2005-01-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  450. Rewritten handling of -T (--files-from) option. Now it
  451. inserts the file names immediately into argv array which allows
  452. for:
  453. 1) any valid tar options (including another -T) to be used in the file
  454. 2) any number of -T options to be given in command line
  455. * configure.ac: Raised version number to 1.15.2
  456. * src/common.h: Include obstack.h
  457. (files_from_option): Removed
  458. (unquote_option): New variable
  459. (stat_fatal): New function
  460. (name_close): Removed function.
  461. * src/incremen.c: Remove inclusion of obstack.h
  462. * src/xheader.c: Likewise.
  463. * src/misc.c (stat_fatal): New function
  464. * src/names.c (name_file): Removed variable.
  465. (read_name_from_file): Removed function. All callers changed.
  466. (name_close): Removed function. All callers changed.
  467. * src/tar.c: New options --unquote (--no-unquote) and
  468. --add-file
  469. (add_file_id,read_name_from_file,update_argv): New functions
  470. (parse_opt): Rewritten handling of -T option. Handle hidden
  471. --HANG option for debugging purposes.
  472. (decode_options): Init unquote_option to true. Init argv_stk.
  473. Remove unneeded references to files_from_option
  474. * doc/tar.texi: Document new options.
  475. Moved rendition macros and option value definitions into
  476. separate files
  477. * doc/rendition.texi: New file
  478. * doc/value.texi: New file
  479. * doc/Makefile.am: Updated
  480. 2005-01-13 Paul Eggert <eggert@cs.ucla.edu>
  481. * tests/testsuite.at (RE_CHECK): Use "join - file", not
  482. "join file -", to work around a bug in Solaris 8 join.
  483. Problem reported by Tomohiro Suzuki.
  484. 2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  485. * src/list.c (read_header): Fixed calculation of the
  486. size for GNU long name/link. Tar was reading one block
  487. more if name_size was divisible by 512. Thanks Josef
  488. Bauer.
  489. * tests/long01.at: New file. Test listing of GNU long names
  490. divisible by 512.
  491. * tests/pipe.at: Sort tar output.
  492. * tests/Makefile.am: Added long01.at
  493. * tests/testsuite.at: Likewise.
  494. * THANKS: Added Josef Bauer
  495. * lib/.cvsignore: Updated
  496. * m4/.cvsignore: Updated
  497. * NEWS: Updated
  498. 2005-01-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  499. * directory: Updated for 1.15.1
  500. * doc/Makefile.am: Use gendocs.sh to generate web documentation
  501. * doc/gendocs_template: Template file for gendocs.sh
  502. * doc/tar.texi: Updated docs for --[no-]same-permissions
  503. * src/tar.c: Reworded docstrings for --[no-]same-permissions
  504. 2005-01-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  505. * bootstrap: Create m4/paxutils.m4
  506. * configure.ac: Call tar_PAXUTILS
  507. * tests/options02.at: Test that tar correctly handles non-option
  508. arguments interspersed with options.
  509. * tests/Makefile.am: Add options02.at
  510. * tests/testsuite.at: Likewise
  511. * tests/listed02.at: Do not create useless directory
  512. 2005-01-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  513. * src/tar.c (parse_opt): Bugfix: Use ARGP_KEY_ARG. Thanks
  514. Mike Frysinger <vapier@gentoo.org> for reporting.
  515. 2005-01-04 Paul Eggert <eggert@cs.ucla.edu>
  516. * lib/Makefile.tmpl (localedir.h): Omit needless quotes and a
  517. needless sed command. Problem reported by Paul Jarc.
  518. 2004-12-23 Paul Eggert <eggert@cs.ucla.edu>
  519. Accommodate latest gnulib.
  520. * doc/.cvsignore: Add getdate.texi.
  521. * bootstrap: Do not treat alloca-opt specially; this is no
  522. longer needed (and breaks builds) with latest gnulib.
  523. 2004-12-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  524. * src/tar.c (main): Reverted recent changes (#ifdef).
  525. 2004-12-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  526. * configure.ac: Raise version number to 1.15.1
  527. Check for locale.h
  528. * NEWS: Entry for 1.15.1
  529. * src/buffer.c: Bugfix. Changes introduced 2004-11-26
  530. broke extraction from stdin.
  531. * src/list.c (from_header, tar_checksum): Changed declaration.
  532. All callers updated.
  533. * src/common.h: Likewise
  534. * src/tar.c (main): Protect invocation of setlocale by
  535. ifdef.
  536. * tests/comprec.at: New test
  537. * tests/pipe.at: New test
  538. * tests/Makefile.am (comprec.at,pipe.at): New tests
  539. * tests/testsuite.at: Likewise
  540. * tests/gzip.at: Use AT_GZIP_PREREQ
  541. * tests/star/pax-big-10g.at: Likewise
  542. * tests/star/ustar-big-2g.at: Likewise
  543. * tests/star/ustar-big-8g.at: Likewise
  544. * tests/extrac04.at: Discard stderr from sort, on some
  545. systems it spits out lots of irrelevant info.
  546. * tests/listed02.at: Likewise
  547. * doc/index.html.in: Rewritten in xhtml to follow recent
  548. GNU site standards.
  549. * THANKS: Updated
  550. 2004-12-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  551. Released version 1.15. Sources up to this point are
  552. tagged release_1_15.
  553. * configure.ac: Raised version number to 1.15
  554. * NEWS: Likewise
  555. * directory: Updated
  556. * bootstrap (update_po): Give -r to wget. Always remove index.html
  557. Ignore alloca-opt module (it duplicates alloca)
  558. * tests/Makefile.am: Distribute star/quicktest.sh
  559. * tests/star/README: Document quicktest.sh
  560. * tests/star/qucktest.sh: Removed.
  561. * tests/star/quicktest.sh: New file.
  562. 2004-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  563. * NEWS: Updated
  564. * doc/tar.texi: Document auto-detection of compressed archive
  565. formats.
  566. * src/tar.c (decode_options): Ignore --seek if used with --delete.
  567. Delete.c is based on the assumption that the archive is being
  568. actually read, not lseeked.
  569. * tests/delete05.at: New file
  570. * tests/extrac02.at: Fixed typo in AT_SETUP
  571. * tests/Makefile.am: Added delete05.at
  572. * tests/testsuite.at: Likewise.
  573. 2004-12-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  574. * src/delete.c (delete_archive_members): Bugfix: when
  575. attempting to delete an nonexistent member, the last
  576. blocking_factor blocks were zeroed.
  577. 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
  578. * TODO: Mention sub-second resolution, lutimes, lchmod.
  579. 2004-11-27 Paul Eggert <eggert@cs.ucla.edu>
  580. Adjust to recent gnulib changes.
  581. * doc/getdate.texi: Remove, since bootstrap gets it from gnulib now.
  582. * .cvsignore: Add rmt, rmt/*, rmt/*/*.
  583. * lib/.cvsignore: Add allocsa.c, allocsa.h, allocsa.valgrind,
  584. charset.alias, config.charset, getcwd.c, getcwd.h, localcharset.c,
  585. localcharset.h, ref-add.sed, ref-add.sin, ref-del.sed,
  586. ref-del.sin, setenv.c, setenv.h, unsetenv.c. Remove pathmax.h,
  587. xstrdup.c.
  588. * m4/.cvsignore: Add allocsa.m4, eealloc.m4, getcwd-path-max.m4,
  589. localcharset.m4, realloc.m4, setenv.m4. Remove malloc.m4,
  590. pathmax.m4, realloc.m4.
  591. 2004-11-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  592. * configure.ac: Raised version number to 1.14.91
  593. * scripts/tarcat: New file
  594. * scripts/Makefile.am: Added tarcat
  595. * src/buffer.c (hit_eof): Changed type to boolean
  596. (read_full_records,reading_from_pipe): New variables
  597. (check_compressed_archive,open_compressed_archive): New functions
  598. (open_archive): Autodetect compressed archives and act accordingly.
  599. Set reading_from_pipe. This fixes controversial set of changes
  600. introduced 2004-05-11,2004-03-22.
  601. * src/list.c (tar_checksum): New function
  602. (read_header): Use tar_checksum().
  603. * src/common.h (tar_checksum): New function
  604. * tests/star/README: Updated
  605. * NEWS: Updated
  606. * PORTS: Updated
  607. 2004-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  608. * src/tar.c (decode_options): Fixed -o semantics. Thanks
  609. Jean Delvare <khali@linux-fr.org>
  610. 2004-10-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  611. * bootstrap: Add localcharset
  612. * lib/Makefile.tmpl: Initialize SUFFIXES and CLEANFILES since the
  613. makefile snippet from localcharset uses '+=' on them.
  614. * src/Makefile.am (LDADD): Add LIBICONV
  615. * src/list.c (decode_header): Set uname/gname to NULL if their
  616. header counterparts are empty
  617. * src/tar.c (options): Use OPTION_NO_TRANS
  618. * src/utf8.c: Use locale_charset() from gnulib
  619. * tests/star/README: Updated
  620. * NEWS: Updated
  621. * TODO: Minor fix
  622. 2004-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  623. * THANKS: Added Bryan Ford
  624. * doc/Makefile.am (.text): Fixed rule
  625. * po/POTFILES.in: Added argp-help.c
  626. 2004-10-04 Bryan Ford <baford@mit.edu>
  627. * src/tar.c: New option --exclude-caches, to exclude
  628. cache directories automatically on archive creation.
  629. Cache directories are directories containing a
  630. standardized tag file, as specified at:
  631. http://www.brynosaurus.com/cachedir/spec.html
  632. * src/common.h: New variable exclude_caches_option.
  633. * src/create.c: New function check_cache_directory(),
  634. called from dump_dir0() if exclude_caches_option is set,
  635. to check for a cache directory tag and exclude the directory
  636. if such a tag is found.
  637. * doc/tar.texi: Updated accordingly.
  638. 2004-09-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  639. * doc/tar.texi: Minor fix
  640. * src/tar.c (options): Minor fix
  641. 2004-09-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  642. * TODO: Updated
  643. * lib/Makefile.tmpl: Added 'rtapelib.o: localedir.h' dependency
  644. * src/common.h: Comment WANT_DIRECTORY_REMOVE_OPTION.
  645. * src/extract.c: Normalized use of remove_any_file().
  646. * src/misc.c: Likewise.
  647. * src/tar.c (parse_opt): Emit warning if -l option is used.
  648. (show_default_settings): REMOTE_SHELL may be undefined
  649. 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  650. Test suite rewritten in autotest.
  651. * configure.ac: Updated for autotest
  652. * src/tar.c (argp_program_version): Modified.
  653. * tests/Makefile.am: Rewritten for autotest.
  654. * tests/.cvsignore: Updated
  655. * tests/append.at: New file
  656. * tests/atlocal.in: New file
  657. * tests/delete01.at: New file
  658. * tests/delete02.at: New file
  659. * tests/delete03.at: New file
  660. * tests/delete04.at: New file
  661. * tests/extrac01.at: New file
  662. * tests/extrac02.at: New file
  663. * tests/extrac03.at: New file
  664. * tests/extrac04.at: New file
  665. * tests/extrac05.at: New file
  666. * tests/gzip.at: New file
  667. * tests/ignfail.at: New file
  668. * tests/incremental.at: New file
  669. * tests/link01.at: New file
  670. * tests/listed01.at: New file
  671. * tests/listed02.at: New file
  672. * tests/longv7.at: New file
  673. * tests/multiv01.at: New file
  674. * tests/multiv02.at: New file
  675. * tests/multiv03.at: New file
  676. * tests/old.at: New file
  677. * tests/options.at: New file
  678. * tests/recurse.at: New file
  679. * tests/same-order01.at: New file
  680. * tests/same-order02.at: New file
  681. * tests/sparse01.at: New file
  682. * tests/testsuite.at: New file
  683. * tests/version.at: New file
  684. * tests/volume.at: New file
  685. * tests/star/gtarfail.at: New file
  686. * tests/star/gtarfail2.at: New file
  687. * tests/star/multi-fail.at: New file
  688. * tests/star/pax-big-10g.at: New file
  689. * tests/star/ustar-big-2g.at: New file
  690. * tests/star/ustar-big-8g.at: New file
  691. * tests/preset.in: Removed
  692. * tests/before: Removed
  693. * tests/after: Removed
  694. * tests/version.sh: Removed.
  695. * tests/append.sh: Removed.
  696. * tests/delete01.sh: Removed.
  697. * tests/delete02.sh: Removed.
  698. * tests/delete03.sh: Removed.
  699. * tests/delete04.sh: Removed.
  700. * tests/extrac01.sh: Removed.
  701. * tests/extrac02.sh: Removed.
  702. * tests/extrac03.sh: Removed.
  703. * tests/extrac04.sh: Removed.
  704. * tests/extrac05.sh: Removed.
  705. * tests/gzip.sh: Removed.
  706. * tests/incremen.sh: Removed.
  707. * tests/ignfail.sh: Removed.
  708. * tests/link01.sh: Removed.
  709. * tests/listed01.sh: Removed.
  710. * tests/listed02.sh: Removed.
  711. * tests/longv7.sh: Removed.
  712. * tests/multiv01.sh: Removed.
  713. * tests/multiv02.sh: Removed.
  714. * tests/multiv03.sh: Removed.
  715. * tests/old.sh: Removed.
  716. * tests/options.sh: Removed.
  717. * tests/same-order01.sh: Removed.
  718. * tests/same-order02.sh: Removed.
  719. * tests/volume.sh: Removed.
  720. * tests/recurse.sh: Removed.
  721. * tests/sparse01.sh: Removed.
  722. * tests/star/gtarfail.sh: Removed.
  723. * tests/star/gtarfail2.sh: Removed.
  724. * tests/star/multi-fail.sh: Removed.
  725. * tests/star/ustar-big-2g.sh: Removed.
  726. * tests/star/ustar-big-8g.sh: Removed.
  727. * tests/star/pax-big-10g.sh: Removed.
  728. 2004-09-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  729. * bootstrap: Install genfile.c from paxutils
  730. * tests/genfile.c: Removed. Integrated into
  731. paxutils.
  732. * tests/mksparse.c: Removed. Integrated into
  733. (paxutils) genfile.c
  734. * tests/Makefile.am: Removed mksparse
  735. * tests/sparse01.sh: Use genfile instead of mksparse
  736. 2004-09-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  737. Started merging with cpio into paxutils. Sources before
  738. this point are tagged alpha-1_14_90
  739. * Makefile.am: Updated for use with paxutils
  740. * README-alpha: Likewise
  741. * bootstrap: Likewise
  742. * configure.ac: Likewise
  743. * lib/Makefile.tmpl: Likewise
  744. * po/POTFILES.in: Likewise
  745. * src/Makefile.am: Likewise
  746. * src/buffer.c: Likewise
  747. * src/common.h: Likewise
  748. * src/compare.c: Likewise
  749. * src/create.c: Likewise
  750. * src/delete.c: Likewise
  751. * src/extract.c: Likewise
  752. * src/incremen.c: Likewise
  753. * src/list.c: Likewise
  754. * src/mangle.c: Likewise
  755. * src/misc.c: Likewise
  756. * src/names.c: Likewise
  757. * src/sparse.c: Likewise
  758. * src/system.c: Likewise
  759. * src/tar.c: Likewise
  760. * src/update.c: Likewise
  761. * src/utf8.c: Likewise
  762. * src/xheader.c: Likewise
  763. * src/system.h: Removed
  764. * src/rmt.c: Removed
  765. * src/rmt.h: Removed
  766. * src/rtapelib.c: Removed
  767. 2004-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  768. * tests/listed02.sh: Do not depend on any particular ordering
  769. of output.
  770. 2004-09-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  771. * doc/tar.texi: Document the use of -C option in
  772. file lists. Document --seek option.
  773. * configure.ac: New option --with-rmt. New configuration variable
  774. DEFAULT_RMT_DIR. Removed DEFAULT_RMT_COMMAND.
  775. * src/Makefile.am: Install rmt into rmtdir
  776. * src/tar.c (usage): Minor fix.
  777. * NEWS: Updated.
  778. * README: Updated.
  779. 2004-09-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  780. * configure.ac: Raised version number to 1.14.90
  781. * src/common.h (is_individual_file): New prototype
  782. * src/create.c (dump_file0): Fix bug introduced
  783. 2004-02-21.
  784. * src/names.c (register_individual_file)
  785. (is_individual_file): New functions.
  786. * tests/listed01.sh: Use genfile instead of dd.
  787. * tests/listed02.sh: New file.
  788. * tests/Makefile.am: Added listed02.sh
  789. * NEWS: Updated
  790. 2004-08-31 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  791. * src/sparse.c (sparse_add_map): Fixed improper initializations
  792. of sparse_map_size. We assume that whatever number it contains
  793. describes adequately the current size of sparse_map. The only
  794. number we need to reset is sparse_map_avail.
  795. * src/compare.c (verify_volume): Call set_next_block_after
  796. if read_header returns HEADER_FAILURE
  797. Destroy and reinitialize content of current_stat_info and
  798. extended_header after each iteration (bug reported by
  799. John L. Males <jlmales@yahoo.com>).
  800. Issue a warning if the created archive contains some members
  801. whose file names were stripped off their leading prefixes.
  802. This is a temporary fix of the issue reported by Bdale Garbee
  803. <bdale@gag.com> (Refs: Debian bug 230064, Message-Id
  804. <87n07kyzhi.fsf@rover.gag.com>, Sun, 15 Feb 2004 11:22:17 -0700)
  805. * src/names.c (removed_prefixes_p): New function.
  806. * src/buffer.c: When computing write rate do not take
  807. into account the time needed to verify the archive(s).
  808. The bug reported by John L. Males <jlmales@yahoo.com>
  809. (set_start_time,compute_duration): New functions.
  810. (print_total_written): Use the result of compute_duration().
  811. (close_archive): Call compute_duration.
  812. * src/common.h (set_start_time, removed_prefixes_p): New prototypes.
  813. * src/list.c (decode_header): Fixed initialization
  814. of stat_info->is_sparse
  815. * src/tar.c (main): Call set_start_time().
  816. * src/misc.c (unquote_string): Unquote '\a' and '\v'.
  817. Reported by Helmut Waitzmann <helmut.waitzmann@web.de>.
  818. * NEWS: Updated
  819. * THANKS: Updated
  820. 2004-08-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  821. * src/tar.c: Fix copy-n-paste errors in the license
  822. 2004-08-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  823. * scripts/backup.in: Renamed LIBPATH to LIBDIR.
  824. Use ROOT_FS with -C option. Do not send mail
  825. if ADMINISTRATOR is set to NONE.
  826. * scripts/backup.sh.in (test_root): Append / to
  827. ROOT_FS if it does not already end in it.
  828. * scripts/restore.in: Renamed LIBPATH to LIBDIR.
  829. New option -a (--all). Do not start restore unless
  830. -a or patterns are given.
  831. (restore_fs,restore_files): Fixed use of --listed option.
  832. * doc/tar.texi: Updated
  833. * NEWS: Updated
  834. 2004-08-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  835. * src/tar.c (find_argp_option): Fixed typo
  836. 2004-08-12 Paul Eggert <eggert@cs.ucla.edu>
  837. Merge argp, getopt, xalloc changes from gnulib.
  838. * bootstrap (gnulib_modules): Add xalloc-die.
  839. Remove code to test for patches; we don't have patches now.
  840. Set LC_ALL=C so that file names sort consistently.
  841. Prefer the gnulib copies of gettext.m4, glibc21.m4,
  842. lib-ld.m4, lib-prefix.m4, po.m4 too.
  843. * patches/getopt.diff: Remove; gnulib now works unpatched.
  844. * configure.ac (_getopt_long_only_r): Remove check.
  845. gl_ARGP now does this for us.
  846. * lib/.cvsignore: Add fnmatch.h, getopt_.h, sysexit.h,
  847. xalloc-die.c.
  848. * src/extract.c: Adjust to changes to gnulib xalloc module.
  849. (extr_init): Remove assignment to xalloc_fail_func; no longer needed.
  850. (xalloc_die): New function.
  851. 2004-08-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  852. * NEWS: Updated
  853. * src/buffer.c (flush_write): Limit filenames
  854. of the members that straddle multivolume archive
  855. boundary to 100 characters.
  856. (flush_read): Use strncmp when comparing multivolume member
  857. names.
  858. * tests/multiv03.sh: New file
  859. * tests/Makefile.am: Added multiv03.sh
  860. 2004-08-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  861. * src/list.c (read_and): Call decode_header before
  862. calling skip_member()
  863. (skip_member): Use is_sparse field to determine if the
  864. member is a sparse file.
  865. * tests/Makefile.am: Added extrac05.sh
  866. * tests/extrac05.sh: New file
  867. * tests/append.sh: Rearranged leading comments. Added explicit
  868. references to report messages wherever available.
  869. * tests/delete01.sh: Likewise
  870. * tests/delete02.sh: Likewise
  871. * tests/delete03.sh: Likewise
  872. * tests/delete04.sh: Likewise
  873. * tests/extrac01.sh: Likewise
  874. * tests/extrac02.sh: Likewise
  875. * tests/extrac03.sh: Likewise
  876. * tests/extrac04.sh: Likewise
  877. * tests/gzip.sh: Likewise
  878. * tests/ignfail.sh: Likewise
  879. * tests/incremen.sh: Likewise
  880. * tests/link01.sh: Likewise
  881. * tests/listed01.sh: Likewise
  882. * tests/longv7.sh: Likewise
  883. * tests/multiv01.sh: Likewise
  884. * tests/multiv02.sh: Likewise
  885. * tests/old.sh: Likewise
  886. * tests/options.sh: Likewise
  887. * tests/recurse.sh: Likewise
  888. * tests/same-order01.sh: Likewise
  889. * tests/same-order02.sh: Likewise
  890. * tests/sparse01.sh: Likewise
  891. * tests/version.sh: Likewise
  892. * tests/volume.sh: Likewise
  893. 2004-08-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  894. * bootstrap: Extended --update-po option to take an
  895. optional argument specifying the po file to update.
  896. * src/create.c: Improved compatibility with 1.13.25
  897. * tests/link01.sh: New file.
  898. * tests/Makefile.am: Added link01.sh
  899. 2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
  900. Merge from gnulib.
  901. * patches/argp.diff: Remove; no longer needed.
  902. * lib/.cvsignore: Add stat-macros.h.
  903. Remove addext.c, malloc.c, realloc.c.
  904. * src/extract.c: Include <getcwd.h>.
  905. (extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
  906. * src/extract.c (make_directories):
  907. FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
  908. * src/misc.c (must_be_dot_or_slash): Likewise.
  909. * src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
  910. Likewise.
  911. * src/tar.c (parse_opt): Likewise.
  912. * src/incremen.c (purge_directory): Fix format buffer typos in warning
  913. strings.
  914. * src/tar.c (options): Add missing initializers to pacify gcc.
  915. (decode_options): Remove unused var.
  916. 2004-08-02 Paul Eggert <eggert@cs.ucla.edu>
  917. * bootstrap (gnulib_modules): Add getpagesize.
  918. * configure.ac (valloc): Remove check; valloc no longer used.
  919. * lib/.cvsignore: Add getpagesize.h.
  920. * m4/.cvsignore: Add getpagesize.m4.
  921. * src/buffer.c (record_buffer): New var.
  922. (open_archive): Don't use valloc; on older or buggy hosts, you can't
  923. free the result. Use page_aligned_alloc instead.
  924. * src/compare.c (diff_init): Likewise.
  925. * src/buffer.c (open_archive): Record the pointer to be freed
  926. into record_buffer.
  927. (close_archive): Free record_buffer.
  928. * src/common.h (page_aligned_alloc): New decl.
  929. * src/misc.c (quote_n, quote): Remove these redundant functions.
  930. (ptr_align): New function, from coreutils/src/system.h.
  931. (page_aligned_alloc): New function.
  932. * src/system.h (valloc): Remove.
  933. 2004-07-09 Paul Eggert <eggert@cs.ucla.edu>
  934. * src/extract.c (extract_archive): Do not report an error
  935. when hard-linking X to X when X exists. Problem reported by
  936. Toby Peterson.
  937. * lib/.cvsignore: Add fchown-stub.c.
  938. 2004-06-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  939. * NEWS: Updated
  940. * src/common.h (root_device): New global.
  941. (gnu_restore): Renamed to purge_directory().
  942. * src/extract.c (extr_init): Save the device number
  943. of the root device.
  944. (extract_archive): Renamed gnu_restore() to purge_directory().
  945. * src/incremen.c (gnu_restore): Renamed to purge_directory().
  946. Do not attempt to purge the directory if it is on a different
  947. device and one_file_system_option is set.
  948. 2004-06-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  949. * doc/tar.texi: The actual default for exclude patterns
  950. is --no-anchored. Fixed.
  951. * src/tar.c (options): Likewise.
  952. Thanks "Felix Natter" <felix.natter@ldc.de> for noticing.
  953. 2004-06-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  954. * doc/tar.texi: Fixed several inconsistencies.
  955. * src/tar.c: Fixed docstring for --checkpoint option.
  956. 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  957. * src/buffer.c (seek_archive): New function
  958. * src/common.h (seek_archive): New function
  959. (seekable_archive): New global.
  960. * src/list.c (skip_file): Use seek_archive() if
  961. possible.
  962. * src/tar.c (struct fmttab): Accept 'pax' as alias
  963. for 'posix'
  964. (options): New option -n (--seek).
  965. * src/update.c: Determine type of the archive before
  966. appending to it.
  967. * TODO: Updated.
  968. 2004-05-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  969. * bootstrap: New option --update-po
  970. * src/tar.c: New option -H (short alias to --format)
  971. * doc/tar.texi: Document -H option
  972. * src/names.c (safer_name_suffix): Fixed bug introduced
  973. 2004-05-11.
  974. 2004-05-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  975. * bootstrap: Apply patches from patch subdirectory
  976. * patches: New dir
  977. * patches/argp.diff: New file
  978. * patches/getopt.diff: New file
  979. * configure.ac: Check for _getopt_long_only_r and
  980. force using included version of getopt if the function
  981. is not available.
  982. * src/tar.c: Use argp for command line parsing.
  983. * src/system.h: Minor formatting fix
  984. * m4/.cvsignore: Updated
  985. * lib/.cvsignore: Updated
  986. * doc/tar.texi: Minor fix.
  987. * src/extract.c: Fix improper use of 'path' term
  988. * src/incremen.c: Likewise
  989. * src/list.c: Likewise
  990. * src/misc.c: Likewise
  991. * src/names.c: Likewise
  992. * src/rmt.h: Likewise
  993. * src/rtapelib.c: Likewise
  994. * src/update.c: Likewise
  995. * src/xheader.c: Likewise
  996. * tests/star/README: Minor fix
  997. 2004-05-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  998. * configure.ac: Raised version number to 1.14.1
  999. * src/tar.c: Renamed --strip-path to --strip-components
  1000. Changed improper use of _() to ngettext().
  1001. * src/extract.c: Renamed strip_path_option to strip_components_option
  1002. * src/common.h: Likewise.
  1003. * NEWS: Updated.
  1004. * doc/tar.texi: Updated
  1005. 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1006. * src/system.c (sys_child_open_for_uncompress): Do not
  1007. set read_full_records_option: the compressed archive is
  1008. likely not to contain integer number of records. Should
  1009. the user wish to use reblocking, he may always give tar
  1010. -B option. This is a minor improvement over the change
  1011. dated 2004-03-22.
  1012. * src/buffer.c (open_archive): Removed assignment to
  1013. read_full_records_option.
  1014. * src/names.c (safer_name_suffix): (safer_name_suffix): Use "%s"
  1015. as the format argument, rather than a possibly-translated variable
  1016. string. Patch provided by Jim Meyering <jim@meyering.net>
  1017. * src/tar.c (decode_options): Fixed typo in the comment.
  1018. * tests/star/README: Minor correction
  1019. 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1020. * directory: New file. GNU directory entry for tar.
  1021. * doc/Makefile.am: Rewritten. Added rules for generating
  1022. documentation for the project's website.
  1023. * doc/.cvsignore: Updated
  1024. * doc/index.html.in: New file.
  1025. 2004-05-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1026. * configure.ac: Raised version number to 1.14
  1027. * NEWS: Updated.
  1028. * tests/after: Added copyleft statement
  1029. * tests/before: Added copyleft statement
  1030. * tests/preset.in: Added copyleft statement
  1031. Tar 1.14 is released. Sources up to this point are tagged
  1032. release_1_14
  1033. 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1034. * configure.ac: Fixed prerequisite headers for sys/buf.h
  1035. (needed on FreeBSD)
  1036. * src/system.h: Likewise.
  1037. * tests/after (compare): Fixed argument quoting under eval
  1038. * tests/before: Quote TAR_ARCHIVE_FORMATS
  1039. 2004-05-10 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1040. * NEWS: Updated
  1041. * README: Updated
  1042. * PORTS: Updated
  1043. * configure.ac: Call gl_AC_TYPE_INTMAX_T. Document
  1044. DEFAULT_.* variables. Use DEFAULT_RMT_COMMAND to set
  1045. the pathname of the rmt utility.
  1046. New option --enable-backup-scripts.
  1047. * doc/tar.texi: Updated
  1048. * scripts/Makefile.am: Install the scripts only if requested
  1049. by the configure.
  1050. * scripts/backup.in: Fixed --version output.
  1051. Fixed initialization of the listing files and printing
  1052. the time of the last previous level dump.
  1053. * scripts/restore.in: Fixed --version output.
  1054. * src/Makefile.am (localedir.h rule): Generate correct
  1055. DEFAULT_RMT_COMMAND variable.
  1056. * src/common.h (rmt_command_option): New variable.
  1057. * src/list.c (read_and): Print block number before
  1058. issuing 'Skipping to next header' diagnostics, if
  1059. requested by block_number_option.
  1060. * src/rtapelib.c: Use rmt_command_option instead of
  1061. hardcoded "/etc/rmt".
  1062. * src/tar.c: New option --rmt-command.
  1063. (decode_options): Handle --rmt-command. Initialize
  1064. rmt_command_option to DEFAULT_RMT_COMMAND.
  1065. 2004-05-09 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1066. * doc/tar.texi: Further update.
  1067. 2004-05-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1068. * configure.ac: Minor fix
  1069. * scripts/Makefile.am: Updated
  1070. * scripts/backup-specs: Updated
  1071. * scripts/backup.in: Minor fixes
  1072. * scripts/backup.sh: Removed
  1073. * scripts/backup.sh.in: New file. Source for backup.sh
  1074. * scripts/restore.in: New file
  1075. * scripts/.cvsignore: Updated
  1076. * scripts/WARNING: Removed
  1077. * doc/tar.texi: Updated
  1078. * NEWS: Updated
  1079. 2004-05-07 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1080. * src/names.c (name_gather): Bugfix: Honor single -C with
  1081. --same-order.
  1082. * tests/same-order01.sh: New file
  1083. * tests/same-order02.sh: New file
  1084. * tests/Makefile.am: Updated
  1085. * tests/append.sh: Added copyleft header
  1086. * tests/delete01.sh: Likewise
  1087. * tests/delete02.sh: Likewise
  1088. * tests/delete04.sh: Likewise
  1089. * tests/extrac01.sh: Likewise
  1090. * tests/extrac02.sh: Likewise
  1091. * tests/extrac03.sh: Likewise
  1092. * tests/extrac04.sh: Likewise
  1093. * tests/gzip.sh: Likewise
  1094. * tests/ignfail.sh: Likewise
  1095. * tests/incremen.sh: Likewise
  1096. * tests/multiv01.sh: Likewise
  1097. * tests/old.sh: Likewise
  1098. * tests/options.sh: Likewise
  1099. * tests/recurse.sh: Likewise
  1100. * tests/version.sh: Likewise
  1101. * tests/volume.sh: Likewise
  1102. * tests/star/gtarfail.sh: Likewise
  1103. * tests/star/gtarfail2.sh: Likewise
  1104. * tests/star/multi-fail.sh: Likewise
  1105. * tests/star/pax-big-10g.sh: Likewise
  1106. * tests/star/qucktest.sh: Likewise
  1107. * tests/star/ustar-big-2g.sh: Likewise
  1108. * tests/star/ustar-big-8g.sh: Likewise
  1109. * doc/.cvsignore: Updated
  1110. 2004-05-06 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1111. * configure.ac: Check whether date accepts +format argument
  1112. (for backup scripts).
  1113. * scripts/level-0: Removed
  1114. * scripts/level-1: Removed
  1115. * scripts/weekly.new: Removed
  1116. * scripts/dump-remind: Removed
  1117. * scripts/backup.in: New file
  1118. * scripts/backup.sh: New file
  1119. * scripts/dump-remind.in: New file
  1120. * scripts/backup-specs: Updated
  1121. * scripts/Makefile.am: Updated for new directory contents.
  1122. * scripts/.cvsignore: Updated
  1123. 2004-05-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1124. * TODO: Updated
  1125. * doc/tar.texi: Updated
  1126. * src/tar.c: --utc implies -vv
  1127. 2004-04-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1128. * src/utf8.c: Make sure ICONV_CONST is defined. AM_ICONV
  1129. does not define it if it fails to find iconv.h.
  1130. 2004-04-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1131. * bootstrap: Use gnulib-tool to generate lib/Makefile.am
  1132. and parts of configure.ac
  1133. * configure.ac: Invoke tar_GNULIB to configure gnulib stuff.
  1134. * lib/Makefile.am: Removed
  1135. * lib/Makefile.tmpl: New file.
  1136. * lib/.cvsignore: Updated
  1137. * m4/.cvsignore: Updated
  1138. * src/xheader.c: Include stpcpy.h
  1139. * src/create.c: Produce an error, not warning, if the
  1140. filename is too long.
  1141. * tests/longv7.sh: Synchronized with the recent changes.
  1142. 2004-04-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1143. * configure.ac: Fixed test for iconv_t
  1144. * src/rmt.h: Bugfix by Jürgen Weigert
  1145. * THANKS: Add Jürgen Weigert
  1146. * tests/star/README: Fixed typo
  1147. 2004-04-04 Paul Eggert <eggert@twinsun.com>
  1148. Merge getdate documentation changes from coreutils.
  1149. * doc/getdate.texi: Update from coreutils CVS.
  1150. * doc/tar.texi: Fix getdate menu to match getdate.texi's.
  1151. Merge recent gnulib changes, and remove some lint.
  1152. Improve support for nanosecond-resolution time stamps.
  1153. * bootstrap: Add gettime, timespec modules.
  1154. * configure.ac (gl_GETTIME, gl_TIMESPEC): Add.
  1155. * lib/.cvsignore (getopt_int.h, gettime.c, gettimeofday.c,
  1156. timespec.h): Add.
  1157. * lib/Makefile.am (libtar_a_SOURCES): Add gettime.c, timespec.h.
  1158. * m4/.cvsignore: Add clock_time.m4, gettime.m4, gettimeofday.m4,
  1159. st_mtim.m4, timespec.m4. Remove malloc.m4, realloc.m4.
  1160. * src/common.h (newer_mtime_option): Now a struct timespec, not
  1161. time_t. All uses changed.
  1162. (NEWER_OPTION_INITIALIZED, OLDER_STAT_MTIME): New macros.
  1163. * src/create.c (dump_file0): Use OLDER_STAT_TIME to compare times.
  1164. * src/incremen.c (scan_path): Likewise.
  1165. * src/list.c (read_and): Likewise.
  1166. * src/list.c (read_and): Use NEWER_OPTION_INITIALIZED to decide
  1167. whether newer_mtime_option is initialized.
  1168. * src/tar.c (decode_options): Likewise.
  1169. * src/tar.c (decode_options): Adjust to new signature for get_date.
  1170. * src/buffer.c (short_read, flush_read): Use size_t, not ssize_t, for
  1171. result of safe_read, full_write, and similar functions.
  1172. Detect safe_read error by comparing to SAFE_READ_ERROR;
  1173. detect full_write error by comparing to 0.
  1174. All uses changed.
  1175. * src/common.h (write_error_details, sys_write_archive_buffer):
  1176. Likewise.
  1177. * src/misc.c (write_error_details): Likewise.
  1178. * src/rmt.c (main): Likewise.
  1179. * src/rmt.h (rmt_read__, rmt_write__): Likewise.
  1180. * src/rtapelib.c (rmt_read__, rmt_write__, rmt_ioctl__): Likewise.
  1181. * src/sparse.c (sparse_scan_file, sparse_dump_region,
  1182. check_sparse_region, check_data_region): Likewise.
  1183. * src/system.c (sys_write_archive_buffer, sys_drain_input_pipe,
  1184. sys_child_open_for_compress, sys_child_open_for_uncompress): Likewise.
  1185. * src/update.c (append_file): Likewise.
  1186. * src/buffer.c (clear_read_error_count): Use explicit (void)
  1187. to indicate a function with no arguments.
  1188. * src/create.c (check_links): Likewise.
  1189. * src/system.c (sys_get_archive_stat, sys_save_archive_dev_ino,
  1190. sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell,
  1191. sys_reset_uid_gid, sys_get_archive_stat, sys_save_archive_dev_ino,
  1192. sys_detect_dev_null_output, sys_drain_input_pipe, sys_spawn_shell):
  1193. Likewise.
  1194. * src/utf8.c (get_input_charset): Likewise.
  1195. * src/xheader.c (xheader_ghdr_name, xheader_write_global,
  1196. xheader_decode_global, extended_header_init): Likewise.
  1197. * tests/mksparse.c (usage): Likewise.
  1198. * src/buffer.c (new_volume): Rename local variables to avoid
  1199. shadowing warnings.
  1200. * src/common.h (file_dumpable_p, sys_stat_nanoseconds,
  1201. sparse_file_p, sparse_member_p, sparse_fixup_header,
  1202. sparse_dump_file, sparce_extract_file, sparse_skip_file,
  1203. sparse_diff_file): Likewise.
  1204. * src/compare.c (diff_archive): Likewise.
  1205. * src/create.c (file_dumpable_p, dump_regular_file, dump_dir0,
  1206. dump_dir, dump_hard_link, file_count_links, dump_file0, dump_file):
  1207. Likewise.
  1208. * src/extract.c (repair_delayed_set_stat): Likewise.
  1209. * src/misc.c (maybe_backup_file, add_hierarchy_to_namelist):
  1210. Likewise.
  1211. * src/sparse.c (struct tar_sparse_optab, tar_sparse_dump_region,
  1212. tar_sparse_extract_region, sparse_dump_region, sparse_extract_region,
  1213. sparse_dump_file, sparse_file_p, sparse_member_p,
  1214. sparse_fixup_header, sparse_extract_file, sparse_skip_file,
  1215. check_data_region, sparse_diff_file): Likewise.
  1216. * src/system.c (sys_stat_nanoseconds): Likewise.
  1217. * src/xheader.c (xheader_format_name): Likewise.
  1218. * src/common.h (enum old_files): Remove comma before }; not portable.
  1219. * src/common.h (read_fatal_details): Add __attribute__ ((noreturn)).
  1220. * src/rmt.c (usage): Likewise.
  1221. * src/xheader.c (xheader_set_single_keyword): Likewise.
  1222. * tests/genfile.c (usage): Likewise.
  1223. * tests/mksparse.c (die, usage): Likewise. Also add printf attribute
  1224. to die.
  1225. * src/common.h (gname_to_gid, uname_to_uid): Add const to avoid
  1226. some gcc warnings.
  1227. * src/names.c (uname_to_uid, gname_to_gid): Likewise.
  1228. * src/utf8.c (struct langtab.lang, struct langtab.terr, struct
  1229. langtab.charset, charset_lookup): Likewise.
  1230. * src/common.h (name_init): Remove unused args. All callers changed.
  1231. * src/names.c (name_init): Likewise.
  1232. * src/common.h (usage, xheader_write, xheader_write_global,
  1233. sys_reset_uid_gid): New decls.
  1234. * src/compare.c (report_difference, process_noop): Add
  1235. __attribute__ ((unused)) for unused attributes.
  1236. * src/sparse.c (oldgnu_sparse_member_p, star_sparse_member_p):
  1237. Likewise.
  1238. * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
  1239. gid_coder, gname_coder, linkpath_coder, ctime_coder, mtime_coder,
  1240. path_coder, size_coder, uid_coder, uname_coder,
  1241. sparse_numblocks_coder): Likewise.
  1242. * src/create.c (dump_regular_finish, dump_dir0, dump_dir,
  1243. dump_file0): Now static.
  1244. * src/utf8.c (charset_lookup): Likewise.
  1245. * src/xheader.c (xheader_protected_pattern_p,
  1246. xheader_protected_keyword_p, xheader_set_single_keyword,
  1247. xheader_keyword_deleted_p, xheader_keyword_override_p,
  1248. xheader_list_append, xheader_list_destroy, xheader_set_keyword_equal):
  1249. Likewise.
  1250. * tests/genfile.c (usage): Likewise.
  1251. * tests/mksparse.c (die, mkhole, mksparse, usage, xlat_suffix):
  1252. Likewise.
  1253. * src/create.c (hash_link): Rewrite to avoid cast.
  1254. * src/extract.c (file_newer_p): Use parameter, not global var.
  1255. * src/misc.c (write_error_details): Likewise.
  1256. * src/extract.c (prepare_to_extract): Remove directory arg; not
  1257. used. All callers changed.
  1258. * src/misc.c (close_fatal): Remove; not used.
  1259. * src/system.c (sys_utimes): Likewise.
  1260. * src/rmt.c (get_string): Avoid buffer overrun (off by 1 error).
  1261. * src/rmt.c (main): Update copyright date to 2004.
  1262. * src/tar.c (decode_options): Likewise.
  1263. * src/rtapelib.c (get_status_string): Don't lose errno when
  1264. skipping the error messages.
  1265. (get_status): Report an error if atol returns a negative number.
  1266. * src/utf8.c (struct langtab, langtab, charset_lookup,
  1267. get_input_charset) [!defined HAVE_LIBCONV]: Omit unused
  1268. definitions.
  1269. (iconv_open, iconv, iconv_close) [!defined HAVE_LIBCONV]:
  1270. Use macros, not definitions, to avoid type clashes with system
  1271. headers.
  1272. (charset_lookup): Local var is now auto, not static.
  1273. (utf8_convert): Use ICONV_CONST instead of const, to avoid
  1274. type clashes.
  1275. * src/utf8.c (langtab): Initialize all elements of struct, to
  1276. avoid gcc warning.
  1277. * src/xheader.c (xhdr_tab): Likewise.
  1278. * src/xheader.c: Include fnmatch.h, since we use fnmatch.
  1279. * tests/mksparse.c (mkhole): Fix typo: bool was assigned to off_t.
  1280. 2004-04-04 Sergey Poznyakoff <gray@Noldor.runasimi.org>
  1281. * NEWS: Updated
  1282. * configure.ac: Raised version number to 1.13.94
  1283. * src/system.h: Protect inclusion of <sys/time.h>
  1284. by ifdef.
  1285. Declare time() if HAVE_DECL_TIME is 0
  1286. * tests/.cvsignore: Added mksparse
  1287. * tests/sparse01.sh: New file
  1288. * tests/multiv02.sh: New file
  1289. * tests/Makefile.am: Add sparse01.sh and multiv02.sh
  1290. * tests/longv7.sh: Added missing call to 'after'
  1291. * src/common.h: Added missing prototypes
  1292. * src/compare.c (diff_archive): Use is_sparse member
  1293. instead of GNUTYPE_SPARSE.
  1294. * src/create.c: Removed unused variables
  1295. * src/extract.c (extract_archive): Use sparse_member_p instead
  1296. of GNUTYPE_SPARSE.
  1297. Removed unused variables
  1298. * src/list.c (decode_header): Use sparse_fixup_header to correct
  1299. the st_size value.
  1300. (print_header): Do not rely on GNUTYPE_SPARSE type.
  1301. Use st->stat.st_size to print real file size.
  1302. (skip_member): Assign stat_info.file_name to save_name. This fixes
  1303. bug reported by Mads Martin Joergensen <mmj@suse.de>
  1304. Use sparse_skip_file() to skip sparse members.
  1305. * src/rtapelib.c: include "common.h"
  1306. * src/sparse.c (struct tar_sparse_optab.sparse_member_p)
  1307. (struct tar_sparse_optab.fixup_header): New member
  1308. (tar_sparse_member_p): New function.
  1309. (tar_sparse_init): Return true if decode_header is not provided
  1310. (tar_sparse_fixup_header)
  1311. (sparse_member_p,sparse_fixup_header)
  1312. (sparse_skip_file)
  1313. (oldgnu_sparse_member_p,oldgnu_fixup_header,star_sparse_member_p)
  1314. (star_fixup_header, pax_sparse_member_p): New function
  1315. (pax_decode_header): Remove
  1316. * src/system.h: Include <sys/time.h> and <utime.h> when available
  1317. * src/tar.c (usage): Prototype moved to common.h
  1318. * src/tar.h (struct tar_stat_info.is_sparse): New member
  1319. * src/utf8.c (utf8_convert): Changed prototype
  1320. (get_input_charset): Removed unused variable
  1321. * src/xheader.c: include <fnmatch.h>
  1322. (size_decoder): Assign to both st->archive_file_size and
  1323. st->stat.st_size.
  1324. (st->stat.st_size): Assign to st->stat.st_size
  1325. (sparse_numbytes_decoder): Removed unused variable
  1326. * src/.cvsignore: Added .gdbinit
  1327. * THANKS: Added Mads Martin Joergensen
  1328. 2004-03-26 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1329. * src/create.c (write_long_name): Do not allow more than
  1330. NAME_FIELD_SIZE-1 characters in a file name for V7 format
  1331. archives.
  1332. * tests/longv7.sh: New file.
  1333. * tests/Makefile.am: Add longv7.sh
  1334. 2004-03-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1335. * src/buffer.c (open_archive): Clear read_full_records_option
  1336. if reading from a pipe.
  1337. (short_read): Display warning about the deduced record size
  1338. if version > 1
  1339. * tests/star/pax-big-10g.sh: Updated to match the above changes.
  1340. * tests/star/ustar-big-2g.sh: Likewise.
  1341. * tests/star/ustar-big-8g.sh: Likewise.
  1342. * configure.ac: Added gl_FUNC_STRTOULL
  1343. * src/create.c (start_header): Check for GNU_FORMAT
  1344. if incremental_option is set.
  1345. * src/xheader.c (to_decimal): New function.
  1346. (xheader_format_name): Use to_decimal() instead of snprintf.
  1347. * tests/listed01.sh: Use genfile instead of dd
  1348. * tests/multiv01.sh: Likewise.
  1349. 2004-03-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1350. * src/list.c (read_and): Stop processing the archive after
  1351. encountering a single zero record. Many old archives contain
  1352. arbitrary garbage after it.
  1353. The warning is issued anyway.
  1354. 2004-03-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1355. * src/rtapelib.c (rmt_lseek__,rmt_ioctl__): Bugfix. The
  1356. conversion buffer was not null terminated. Fix provided
  1357. by Leland Lucius <llucius@tiny.net>
  1358. * THANKS: Added Leland Lucius
  1359. * src/utf8.c (utf8_convert): Indentation fix.
  1360. 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1361. * src/buffer.c (flush_read): Bugfix: the
  1362. condition at line 714 included
  1363. || (status > 0 && !read_full_records_option)
  1364. which is grossly wrong, since even if new_volume() below succeeds,
  1365. the subsequent call to rmtread will overwrite the chunk of data
  1366. already read in the buffer and thus spoil everything.
  1367. * src/system.c (sys_child_open_for_uncompress): Minor stylistic
  1368. fix.
  1369. * tests/star/multi-fail.sh: New test.
  1370. * tests/Makefile.am: Added multi-fail.sh
  1371. * tests/star/README: Updated
  1372. 2004-02-29 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1373. * NEWS: Updated
  1374. * configure.ac: Removed spurious AC_CHECK_LIB(iconv)
  1375. * src/common.h (utc_option): new global
  1376. (enum old_files.KEEP_NEWER_FILES): New element
  1377. * src/extract.c: Handle --keep-newer-files option
  1378. * src/list.c (tartime): Print UTC if --utc was given.
  1379. * src/tar.c: New options: --utc and keep-newer-files
  1380. * tests/Makefile.am: Added new tests
  1381. * tests/after: Rewritten
  1382. * tests/before: Rewritten
  1383. * tests/preset.in: Rewritten
  1384. * tests/delete03.sh: Accommodate for the new testsuite logic
  1385. * tests/gzip.sh: Likewise
  1386. * tests/incremen.sh: Likewise
  1387. * tests/listed01.sh: Likewise
  1388. * tests/multiv01.sh: Likewise
  1389. * tests/old.sh: Likewise
  1390. * tests/options.sh: Likewise
  1391. * tests/version.sh: Likewise
  1392. * tests/volume.sh: Likewise
  1393. * tests/star: New directory
  1394. * tests/star/README: New file
  1395. * tests/star/gtarfail.sh: New file
  1396. * tests/star/gtarfail2.sh: New file
  1397. * tests/star/pax-big-10g.sh: New file
  1398. * tests/star/qucktest.sh: New file
  1399. * tests/star/ustar-big-2g.sh: New file
  1400. * tests/star/ustar-big-8g.sh: New file
  1401. 2004-02-26 Paul Eggert <eggert@twinsun.com>
  1402. * doc/tar.texi (dircategory Individual utilities): Append period,
  1403. as suggested by Karl Berry.
  1404. 2004-02-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1405. * src/list.c (decode_header): Call xheader_decode before
  1406. the assignment to current_stat_info.archive_file_size.
  1407. 2004-02-23 Paul Eggert <eggert@twinsun.com>
  1408. * configure.ac: Invoke AM_ICONV, to define ICONV_CONST if needed.
  1409. 2004-02-23 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1410. 1.13.93 released.
  1411. * NEWS: Updated
  1412. * tests/before: Move testing of the prerequisite archive formats
  1413. to the separate function 'prereq'. Do not expect any arguments
  1414. * tests/delete03.sh: Use prereq() instead of passing arguments
  1415. to 'before'.
  1416. * tests/incremen.sh: Likewise.
  1417. * tests/listed01.sh: Likewise.
  1418. * tests/multiv01.sh: Likewise.
  1419. 2004-02-22 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1420. Added UTF-8 support. Finished global extended header
  1421. support.
  1422. * NEWS: Minor fix
  1423. * configure.ac: Detect libiconv
  1424. * src/utf8.c: New file. Conversions to and from utf-8.
  1425. * src/Makefile.am: Added utf8.c
  1426. * src/create.c (write_header_name) In pax format, use
  1427. "path" keyword if the file name is not ASCII
  1428. (start_header): Likewise for uname and gname.
  1429. * src/list.c: Decode encountered global headers.
  1430. * src/xheader.c: Use keywords from the global
  1431. headers.
  1432. Correctly handle UTF-8 conversions.
  1433. (xheader_list_destroy): New function.
  1434. (xheader_set_single_keyword,xheader_set_keyword_equal): Added
  1435. missing gettext markers
  1436. (decode_record): Rewritten using caller-provided handler and
  1437. data closure.
  1438. * tests/listed01.sh: Give credit to Andreas Schuldei.
  1439. 2004-02-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1440. * src/create.c (dump_file0): The conditional at line
  1441. 1296 prevented incremental backups on individual files
  1442. from working, as reported by Andreas Schuldei
  1443. <andreas@schuldei.org>.
  1444. This is due to the condition
  1445. (0 < top_level || !incremental_option)
  1446. Removing it makes incremental backups work for individual
  1447. files as well as for directories. On the other hand, it does
  1448. not affect other functionality, as shown by the reasoning below:
  1449. To begin with, the two parts of this condition are mutually
  1450. superfluous, because
  1451. 1) when top_level < 0, incremental_option == 1
  1452. so the condition yields false
  1453. 2) when top_level >= 0, incremental_option == 0
  1454. so the condition yields true.
  1455. In other words, it is completely equivalent to
  1456. (!incremental_option)
  1457. Now, let's consider the effect of its removal. There are two cases:
  1458. 1) when incremental_option==1
  1459. This means incremental backup in progress. In this case dump_file
  1460. is invoked only for directories or for files marked with 'Y' by
  1461. get_directory_contents. The latter are those that did not meet the
  1462. condition in incremen.c:242, which is exactly the same condition
  1463. as this at create.c:1296. So, for these files the check
  1464. (!incremental_option) is useless, since the rest of the
  1465. conditional will yield false anyway. On the other hand, if
  1466. dump_file is invoked on a directory, the conditional will yield
  1467. false due to !S_ISDIR assertion, so these will be processed as usual.
  1468. Thus, for this case the extra condition (!incremental_option) is
  1469. irrelevant, and its removal won't alter the behavior of tar,
  1470. *except* that it will enable incremental backups on individual
  1471. files, which is the wanted effect.
  1472. 2) when incremental_option==0
  1473. In this case the condition yields true and its removal does not
  1474. affect the functionality.
  1475. * THANKS: Updated
  1476. * configure.ac: Raised patchlevel to 93
  1477. * src/incremen.c: Minor stylistic fixes.
  1478. * tests/listed01.sh: New test. Check listed incremental
  1479. backups on individual files.
  1480. * tests/Makefile.am: Added listed01.sh
  1481. 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1482. * src/common.h (simple_finish_header,start_private_header): New
  1483. declarations
  1484. (xheader_ghdr_name): Changed declaration
  1485. * src/create.c (start_private_header): Removed static qualifier.
  1486. (write_extended): Removed superfluous last argument. Use
  1487. xheader_write()
  1488. (simple_finish_header): New function.
  1489. (finish_header): Use simple_finish_header() to break recursive
  1490. dependency between this function and write_extended().
  1491. * src/tar.c (assert_format): Do not bail out if several
  1492. --format arguments are given. This is a common case when
  1493. TAR_OPTIONS are used.
  1494. (decode_options): New option --show-defaults displays the
  1495. compiled-in defaults.
  1496. Use POSIX format if no --format option was given and
  1497. --pax-option was specified.
  1498. Do not allow to use --pax-option unless the archive format is
  1499. set to POSIX (or reading subcommand is requested).
  1500. * src/update.c (update_archive): Write global extended header if
  1501. constructed.
  1502. * src/xheader.c (xheader_format_name): Bugfix.
  1503. (xheader_xhdr_name): Changed the default extended header name
  1504. to '%d/PaxHeaders.%p/%f', as POSIX requires.
  1505. (xheader_ghdr_name): Removed unused argument.
  1506. (xheader_write,xheader_write_global): New function.
  1507. (xheader_decode): Modified to honor overrides whatever
  1508. the current archive format is.
  1509. * src/delete.c (delete_archive_members): Call xheader_decode
  1510. unconditionally.
  1511. * src/list.c (decode_header): Likewise.
  1512. * src/incremen.c (sort_obstack): Fixed typo in the comment
  1513. * doc/tar.texi: Document new default for extended
  1514. header names.
  1515. * tests/before: Accept an optional list of allowed archive
  1516. formats. Exit with the status 77 if the current archive
  1517. format does not match any of them.
  1518. * tests/delete03.sh: Require gnu, oldgnu or posix format
  1519. * tests/incremen.sh: Require gnu or oldgnu format
  1520. * tests/multiv01.sh: Likewise
  1521. 2004-02-20 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1522. * doc/tar.texi (Option Summary): Documented --pax-option
  1523. * src/tar.c: Likewise.
  1524. * NEWS: Likewise.
  1525. * src/create.c (to_chars): Added a comment.
  1526. * src/tar.h: Comment to GNU_FORMAT
  1527. 2004-02-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1528. * README: Updated
  1529. * configure.ac: Added stpcpy
  1530. * bootstrap: Likewise
  1531. * lib/Makefile.am: Likewise
  1532. * src/common.h (xheader_xhdr_name,xheader_ghdr_name): New
  1533. functions
  1534. * src/create.c (write_extended): Call xheader_xhdr_name
  1535. instead of using hardcoded "././@PaxHeader" name.
  1536. * src/tar.c: New option --pax-option (equivalent to -o option
  1537. of pax).
  1538. * src/xheader.c: Implement pax -o option. Fixed misleading
  1539. heading comment (introduced 2003-09-02).
  1540. * src/incremen.c: Minor fixes
  1541. * m4/.cvsignore: Updated
  1542. 2004-02-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1543. * src/incremen.c: Removed accumulator stuff in favor of obstack.
  1544. (get_directory_contents): Split into two functions
  1545. * src/update.c: Minor changes
  1546. * doc/tar.texi: Fixed typo
  1547. 2004-02-15 Paul Eggert <eggert@twinsun.com>
  1548. Fix Debian bug 230872, originally reported by Jeff King in
  1549. <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230872>.
  1550. * doc/tar.texi (posix compliance): Remove. The whole section
  1551. was a misunderstanding of what POSIXLY_CORRECT is supposed to
  1552. mean. The GNU Coding Standards says that POSIXLY_CORRECT
  1553. is for disabling extensions that are incompatible with POSIX:
  1554. it is not for disabling compatible extensions. All references
  1555. to this section removed.
  1556. (posix): This format is created only if the posix format is
  1557. specified; it is no longer created if gnu format is specified
  1558. and POSIXLY_CORRECT is set.
  1559. * src/tar.c (decode_options): Ignore POSIXLY_CORRECT.
  1560. POSIX does not specify the behavior of tar, so we should
  1561. not worry about POSIXLY_CORRECT here.
  1562. 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1563. * Makefile.am: Removed m4
  1564. * configure.ac: Require automake-1.8/autoconf-2.59. Removed
  1565. m4/Makefile.
  1566. * README-alpha: Updated
  1567. * bootstrap: Updated TP URL, improved help output. Default
  1568. to :ext:anoncvs and set CVS_RSH, unless already set.
  1569. * m4/Makefile.am: Removed
  1570. 2004-01-21 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1571. * bootstrap: Bugfix by Marco Gerards <metgerards@student.han.nl>:
  1572. Use $option instead of $1 so all options will be parsed.
  1573. 2004-01-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1574. Started rewriting buffer.c ...
  1575. * bootstrap: New option --no-po
  1576. * src/buffer.c (new_volume,check_label_pattern): Changed return type.
  1577. (time_to_start_writing): Changed data type
  1578. (file_to_switch_to): Removed. Variable never assigned to.
  1579. (open_archive) Moved option compatibility checks to tar.c
  1580. Other minor changes.
  1581. * src/common.h (maybe_backup_file): Changed return type
  1582. * src/misc.c: Likewise.
  1583. * src/create.c: Updated invocations of safer_name_suffix
  1584. * src/extract.c: Likewise
  1585. * src/delete.c: Updated assignment to write_archive_to_stdout
  1586. * src/tar.c (decode_options): More option compatibility checks
  1587. (moved from buffer.c)
  1588. * src/update.c (time_to_start_writing): Changed data type.
  1589. * tests/recurse.sh: New test case.
  1590. * tests/mksparse.c: New file.
  1591. * tests/Makefile.am: Added recurse.sh and mksparse.c
  1592. 2004-01-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1593. * src/sparse.c (sparse_diff_file): Bugfix. Thanks
  1594. Martin Simmons for the patch.
  1595. * src/create.c (dump_dir0): Bugfix. Thanks Piotr Czerwinski
  1596. <pius@pld-linux.org> for the patch.
  1597. 2003-12-26 Paul Eggert <eggert@twinsun.com>
  1598. Synchronize with Gettext 0.13.1, Automake 1.8, Autoconf 2.59,
  1599. and translation website.
  1600. * bootstrap: Don't bother skipping codeset.m4, glibc21.m4,
  1601. intdiv0.m4, inttypes_h.m4, inttypes.m4, inttypes-pri.m4,
  1602. isc-posix.m4, and lcmessage.m4 from gnulib. This list of files is
  1603. a bit obsolete anyway, now that gettext 0.13.1 is out. Also, the
  1604. files are replaced by autoreconf. Also, there seems to be a bug
  1605. in gettext/autoconf/automake if we try to omit these files after
  1606. autoreconf has replaced them, even though the gettext manual says
  1607. they're optional. So give up and just include them for now, even
  1608. though they make 'configure' longer and slower.
  1609. Change translation URL from
  1610. <http://www.iro.umontreal.ca/contrib/po/maint/tar/> to
  1611. <http://www2.iro.umontreal.ca/~gnutra/po/maint/tar/> to
  1612. accommodate translator website revamp.
  1613. Fail if autoreconf fails.
  1614. * m4/.cvsignore: Add intmax.m4, longdouble.m4, printf-posix.m4,
  1615. signed.m4, size_max.m4, wchar_t.m4, wint_t.m4, xsize.m4, to
  1616. ignore files now supplied by gettext 0.13.1.
  1617. 2003-12-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1618. Synchronized with the backup repository on Mirddin
  1619. 2003-12-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1620. * configure.ac: Check for varios members of struct stat
  1621. that may represent file modification times with a subsecond
  1622. precision.
  1623. Check for utimes (for future use)
  1624. * src/buffer.c (short_read): Issue a warning on short reads.
  1625. * src/common.h (sys_stat_nanoseconds): New function
  1626. * src/create.c (dump_file0): Use sys_stat_nanoseconds().
  1627. * src/list.c (read_and): Treat only two successive zero
  1628. filled blocks as an EOF indicator. Issue a warning if
  1629. a single one is encountered.
  1630. * src/system.c (sys_stat_nanoseconds): New function
  1631. * src/tar.h (tar_stat_info.atime_nsec,mtime_nsec,ctime_nsec): New
  1632. members.
  1633. * src/xheader.c (code_time,decode_time): Support for subsecond
  1634. precision.
  1635. (atime_coder,atime_decoder,ctime_coder,ctime_decoder)
  1636. (mtime_coder,mtime_decoder): Update invocations of code_time and
  1637. decode_time.
  1638. (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder)
  1639. (sparse_numblocks_decoder,sparse_offset_decoder)
  1640. (sparse_numbytes_decoder): Updated
  1641. 2003-12-18 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1642. * src/names.c (safer_name_suffix): Reverted change made
  1643. 2003-11-14. Reason: Discussion with Paul Eggert and
  1644. Jean-Louis Martineau. See also ChangeLog entry from
  1645. 1999-08-14.
  1646. * tests/delete03.sh: Likewise.
  1647. * tests/extrac04.sh: Likewise.
  1648. * tests/multiv01.sh: Likewise.
  1649. 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1650. * src/incremen.c (write_directory_file): Use sys_truncate
  1651. * src/list.c (print_header): Use archive_file_size member
  1652. when printing real file size.
  1653. * src/sparse.c (sparse_scan_file): Correctly handle files with
  1654. a hole at the end.
  1655. (sparse_dump_region,sparse_extract_region): Allow for zero size
  1656. trailing blocks
  1657. 2003-12-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1658. * configure.ac: Raised version number to 1.13.92
  1659. * src/list.c (decode_header): Discern between pax and ustar
  1660. formats
  1661. Initialize current_stat_info.archive_file_size.
  1662. NOTE: Modifications from this date on are temporarily
  1663. stored on local CVS on mirddin. This repository will
  1664. be synchronized with Savannah as soon as the latter
  1665. becomes operational again.
  1666. 2003-12-01 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1667. * TODO: Updated
  1668. * src/sparse.c: Initial implementation of GNU/pax sparse
  1669. file format.
  1670. * src/common.h (xheader_store): Changed prototype.
  1671. * src/create.c: Update calls to xheader_store
  1672. * src/extract.c (extract_archive): Check reported size vs.
  1673. archive file size to determine if we have to do with a
  1674. sparse file.
  1675. * src/tar.c (usage): Cleaned up the sample argument to --newer
  1676. option.
  1677. (decode_options): Allow --sparse for POSIX_FORMAT archives.
  1678. * src/xheader.c (struct xhdr_tab.coder; all coder function): Added
  1679. extra argument
  1680. Implemented GNU.sparse.* keywords.
  1681. 2003-11-30 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1682. * configure.ac: Check for setlocale. Thanks Bruno Haible for
  1683. reporting.
  1684. 2003-11-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1685. * src/create.c (write_gnu_long_link): Use oldgnu
  1686. magic with @LongLink blocks.
  1687. 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1688. * src/tar.h: Support for star sparse format.
  1689. * src/sparse.c: Likewise.
  1690. 2003-11-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1691. * src/sparse.c (sparse_diff_file): New function
  1692. * src/common.h (sys_compare_uid,sys_compare_gid): New functions
  1693. (sys_compare_uid_gid): Removed.
  1694. (sys_compare_links,report_difference): Changed prototype
  1695. (sparse_diff_file): New function
  1696. * src/system.c (sys_compare_uid,sys_compare_gid): New functions
  1697. (sys_compare_uid_gid): Removed.
  1698. (sys_compare_links): Changed declaration
  1699. * src/compare.c (diff_archive): Use sparse_diff_file.
  1700. 2003-11-16 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1701. Rewritten sparse file handling.
  1702. * src/sparse.c: New file. Provides a universal framework
  1703. for various methods for sparse files handling.
  1704. * src/Makefile.am: Added sparse.c
  1705. * src/common.h (struct sp_array,sparsearray,sp_array_size)
  1706. (init_sparsearray,fill_in_sparse_array): Removed
  1707. (enum dump_status): New data type
  1708. (pad_archive,close_diag,open_diag,read_diag_details)
  1709. (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
  1710. functions.
  1711. (sparse_file_p,sparse_dump_file,sparse_extract_file): New
  1712. functions.
  1713. (print_header): Changed prototype declaration.
  1714. * src/tar.h (struct sp_array): Declaration from common.h
  1715. (struct tar_stat_info): New members archive_file_size,
  1716. sparse_map_avail,sparse_map.
  1717. * src/create.c: Major rewrite.
  1718. * src/extract.c: Use new sparse file interface.
  1719. * src/compare.c (diff_sparse_files): Temporary placeholder.
  1720. * src/buffer.c: Minor changes
  1721. * src/tar.c: Likewise.
  1722. * src/list.c: Likewise.
  1723. * src/misc.c (close_diag,open_diag,read_diag_details)
  1724. (readlink_diag,savedir_diag,seek_diag_details,stat_diag): New
  1725. diagnostics functions.
  1726. * src/incremen.c: Use new diagnostics functions.
  1727. * src/names.c: Likewise.
  1728. 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1729. * configure.ac: Fixed check for setsockopt
  1730. * src/create.c: Do not zero-terminate name field if
  1731. the name is exactly 100 characters long.
  1732. (write_ustar_long_name): Fixed cheking for unsplittable
  1733. names.
  1734. 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1735. * src/create.c (start_header): Removed debugging hook
  1736. (dump_file): Fixed handling of linkname field.
  1737. * src/names.c (safer_name_suffix): If the input
  1738. file name ends with a slash, output one should do so
  1739. as well.
  1740. * doc/tar.texi: Documented --format=ustar
  1741. 2003-11-14 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1742. * src/tar.h (archive_format): USTAR_FORMAT: New type.
  1743. * src/create.c: Added POSIX.1-1988 support.
  1744. * src/names.c (safer_name_suffix): Skip leading ./
  1745. * src/tar.c: New option --format=ustar forces
  1746. POSIX.1-1988 archive format.
  1747. * tests/delete03.sh: Updated.
  1748. * tests/extrac04.sh: Updated.
  1749. * tests/multiv01.sh: Updated.
  1750. 2003-11-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1751. * src/list.c (read_and): Initialize current_stat_info
  1752. and extended_header at the start of the loop.
  1753. * src/names.c (all_names_found): Check if the argument
  1754. contains valid filename. Fixes coredump on `not_a_tar_file'
  1755. * src/xheader.c (atime_decoder,gid_decoder,ctime_decoder)
  1756. (mtime_decoder,size_decoder,uid_decoder): Use xstrtoumax.
  1757. Fixes `pax-big-10g' bug.
  1758. 2003-11-12 Paul Eggert <eggert@twinsun.com>
  1759. Fix some C compatibility bugs reported by Joerg Schilling.
  1760. * src/common.h (stripped_prefix_len): Fix misspelling
  1761. "stripped_path_len" in declaration.
  1762. * src/rmt.c (main): Use "return FOO;" rather than
  1763. "exit (FOO);"; we no longer have to worry about
  1764. pre-ANSI hosts that mishandled returned values from "main".
  1765. * src/tar.c (main): Likewise. This avoids warnings on some
  1766. compilers.
  1767. * src/system.c: Include signal.h, for 'kill'.
  1768. * src/system.h (DEV_BSIZE): Remove.
  1769. (DEFAULT_ST_BLKSIZE): New macro.
  1770. (ST_BLKSIZE): Use it, instead of DEV_BSIZE.
  1771. * src/tar.c (enum): Remove comma just before }.
  1772. 2003-11-12 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1773. * src/list.c (decode_header): Initialize st_atime and
  1774. st_ctime.
  1775. 2003-11-11 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1776. * configure.ac (tar_save_LIBS): Bugfix. Thanks Adrian
  1777. Bunk <bunk@fs.tum.de> for reporting.
  1778. * doc/tar.texi: Fixed spelling. Thanks Martin Buchholz
  1779. <martin@xemacs.org> for spotting.
  1780. 2003-11-04 Paul Eggert <eggert@twinsun.com>
  1781. * src/xheader.c (xhdr_tab): Make it extern, not static, as C89 and
  1782. C99 require this.
  1783. 2003-10-26 Paul Eggert <eggert@twinsun.com>
  1784. * src/system.c (sys_spawn_shell): Cast trailing null to (char *).
  1785. Bug reported by Christian Weisgerber.
  1786. 2003-10-19 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1787. * AUTHORS: Updated
  1788. * NEWS: Updated
  1789. * src/tar.c (decode_options): Removed superfluous archive format
  1790. check
  1791. * doc/tar.texi: Documented new features.
  1792. 2003-10-08 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1793. * NEWS: Updated
  1794. * THANKS: Added Wojciech Polak
  1795. * configure.ac: Added checks for missing functions. Raised
  1796. version number to indicate alpha release.
  1797. * lib/Makefile.am: Added missing headers
  1798. * lib/waitpid.c: Added missing includes.
  1799. * src/extract.c: Likewise.
  1800. * src/names.c: Removed spurious includes.
  1801. * src/xheader.c: Likewise.
  1802. * src/system.h [MSDOS]: Fixed spelling of EACCES. Added
  1803. macro overriding broken mkdir prototypes.
  1804. 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1805. * configure.ac: Check for dev_t and ino_t.
  1806. * m4/Makefile.am: Added missing files.
  1807. * src/system.c: New file.
  1808. * src/Makefile.am: Added system.c
  1809. * src/common.h: Prototypes for functions from system.c
  1810. * src/system.h (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines
  1811. * src/buffer.c: Moved system dependencies to system.c
  1812. * src/compare.c: Likewise.
  1813. * src/create.c: Likewise.
  1814. * src/delete.c: Likewise.
  1815. * src/extract.c: Likewise.
  1816. * src/rtapelib.c: Likewise.
  1817. 2003-10-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1818. Implemented --occurrence option.
  1819. * NEWS: Updated.
  1820. * src/tar.c: New option --occurrence.
  1821. * src/common.h (occurrence_option): New global
  1822. (struct name): Changed `found' member to `uintmax_t
  1823. found_count'.
  1824. (names_done): Removed
  1825. (all_names_found): Changed prototype.
  1826. (ISFOUND,WASFOUND): New macros
  1827. * src/delete.c (delete_archive_members): Honor --occurrence
  1828. option.
  1829. * src/list.c (read_and): Likewise.
  1830. * src/names.c: Count number of occurrences of each name in the
  1831. archive.
  1832. (name_match): Honor --occurrence option.
  1833. (names_done): Removed
  1834. (all_names_found,names_notfound): Rewritten.
  1835. 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1836. * src/tar.c: Removed extra precaution regarding
  1837. subcommand_option == CAT_SUBCOMMAND
  1838. * lib/Makefile.am: Updated
  1839. 2003-10-02 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1840. * src/common.h (names_done): New function.
  1841. * src/names.c: Likewise.
  1842. * src/list.c (read_and): Use all_names_found() as `while'
  1843. condition.
  1844. * src/tar.c: New option --first-copy
  1845. * NEWS: Updated
  1846. 2003-09-24 Paul Eggert <eggert@twinsun.com>
  1847. * src/rmt.c (main): Don't translate Copyright string; international
  1848. law says the word "Copyright" should be in English.
  1849. * src/tar.c (decode_options): Likewise.
  1850. 2003-09-22 Paul Eggert <eggert@twinsun.com>
  1851. * doc/tar.texi (extracting untrusted archives): New section.
  1852. * src/common.h (stripped_path_len): Renamed from cut_path_elements.
  1853. Return size_t, not pointer, so that we don't have to worry about
  1854. violating the C standard by converting char const * to char *.
  1855. All callers changed.
  1856. * src/names.c (stripped_path_len): Likewise. Strip file system
  1857. prefix, too. Count adjacent slashes as if they were one slash;
  1858. that is the POSIX standard.
  1859. 2003-09-17 Paul Eggert <eggert@twinsun.com>
  1860. * README-alpha: Document maintainer tool assumptions a bit. GNU
  1861. 'sed' is no longer required. For GNU m4 1.4, suggest the patch in
  1862. Debian bug 211447. Fix minor misspellings/whitespace nits.
  1863. * configure.ac (AC_AIX, AC_MINIX): Remove; subsumed by
  1864. gl_USE_SYSTEM_EXTENSIONS.
  1865. * lib/.cvsignore: Add exit.h, time_r.c, time_r.h.
  1866. * m4/.cvsignore: Add restrict.m4, time_r.m4.
  1867. 2003-09-17 Paul Eggert <eggert@twinsun.com>
  1868. * bootstrap: Don't use "for option; do";
  1869. Solaris 8 /bin/sh doesn't like that.
  1870. 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1871. * README-alpha: Updated
  1872. * bootstrap: Updated
  1873. 2003-09-17 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1874. * README-alpha: Updated
  1875. * bootstrap: Updated
  1876. * po/POTFILES.in: Added src/xheader.c
  1877. * src/common.h (cut_path_elements): Added proto.
  1878. 2003-09-05 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1879. * src/buffer.c: Use ngettext where appropriate.
  1880. * src/compare.c: Likewise.
  1881. * src/create.c: Likewise.
  1882. * src/misc.c: Likewise.
  1883. * src/tar.c: Likewise.
  1884. * src/update.c: Likewise.
  1885. 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1886. * .cvsignore: Added *.shar.gz
  1887. * NEWS: Updated
  1888. * TODO: Updated
  1889. * src/common.h (strip_path_elements): New variable.
  1890. * src/extract.c (extract_archive): Implemented --strip-path
  1891. * src/names.c (cut_path_elements): New function.
  1892. * src/tar.c: New option --strip-path=NUM.
  1893. (decode_options) Assign boolean values to bool variables.
  1894. 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1895. * src/delete.c: Fixed deletion from the POSIX archives.
  1896. * src/list.c (read_header): Minor change.
  1897. * src/tar.c (main): Do not check for volume_label_option
  1898. if subcommand_option is not CREATE_SUBCOMMAND.
  1899. * src/xheader.c (xheader_decode): Store the header as
  1900. well (for eventual delete).
  1901. * tests/incremen.sh: Explicitly request GNU format. This will
  1902. disappear when GNU extended header keywords are working.
  1903. * tests/multiv01.sh: Likewise
  1904. * tests/volume.sh: Likewise
  1905. 2003-09-04 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1906. * src/create.c: Support for "linkpath" extended keyword.
  1907. * src/xheader.c (decode_record): Reversed the return
  1908. condition.
  1909. 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1910. * configure.ac: Allow to redefine the default output format.
  1911. * src/tar.c: Use DEFAULT_ARCHIVE_FORMAT macro
  1912. (archive_format_string): New function.
  1913. (usage): Updated help output.
  1914. * README: Updated.
  1915. * NEWS: Updated.
  1916. * TODO: Updated.
  1917. 2003-09-02 Paul Eggert <eggert@twinsun.com>
  1918. * src/common.h (destroy_stat, xheader_decode, xheader_store,
  1919. xheader_read, xheader_finish, xheader_destroy): Add decls;
  1920. C99 requires this.
  1921. * src/create.c (write_extended): Remove unused local 'bufsize'.
  1922. * src/delete.c (delete_archive_members): Handle case of
  1923. HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
  1924. * src/list.c (read_and): Abort if HEADER_SUCCESS_EXTENDED
  1925. occurs, as it's not possible.
  1926. * src/update.c (update_archive): Likewise.
  1927. Use "const" when possible in new code.
  1928. * src/tar.c (struct fmttab.name): Now char const *. All uses changed.
  1929. (fmttab): Now const. All uses changed.
  1930. * src/xheader.c (struct xhdr_tab.keyword): Now pointer to const.
  1931. (struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
  1932. decode_record, xheader_store, xheader_print, code_string, code_time,
  1933. code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
  1934. gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
  1935. linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
  1936. mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
  1937. uid_coder, uid_decoder, uname_coder, uname_decoder):
  1938. Use pointers to const when possible.
  1939. (xhdr_tab): Now const.
  1940. * src/tar.c (fmttab): Avoid GCC warning by not eliding initializers.
  1941. (set_archive_format): Report an error if no format name matches,
  1942. instead of returning an undefined value.
  1943. * src/xheader.c (struct xhdr_tab.decoder, dummy_decoder,
  1944. atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
  1945. ctime_decoder, mtime_decoder, path_decoder, size_decoder,
  1946. uid_decoder, uname_decoder): Remove unused keyword arg.
  1947. All uses changed.
  1948. * src/tar.c (set_archive_format): Now static.
  1949. * src/xheader.c (xhdr_tab, format_uintmax): Now static.
  1950. * src/xheader.c (dummy_coder, dummy_decoder, atime_coder,
  1951. atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
  1952. linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
  1953. ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
  1954. size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
  1955. Remove forward decls; no longer needed.
  1956. (xhdr_tab): Move to end, so that the forward decls aren't needed.
  1957. Add a forward declaration.
  1958. Use 'bool' in new code, when appropriate.
  1959. * src/xheader.c (decode_record): Return bool, not int.
  1960. * src/common.h (read_header): Since it accepts bool, change
  1961. all callers to use false and true rather than 0 and 1.
  1962. * src/xheader.c (decode_record): Fix misspelling in diagnostic
  1963. "extended headed" -> "extended header".
  1964. GNU coding style fixes.
  1965. * src/xheader.c (decode_record, xheader_decode):
  1966. Do not use decls like "char *p, *q;".
  1967. Minor style fixes.
  1968. (xheader_store): Avoid parentheses around object operand of sizeof.
  1969. 2003-09-03 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  1970. * src/create.c (start_header): Store long file names
  1971. in "path" keyword of an extended header if in POSIX
  1972. mode.
  1973. (finish_header): print header before calling write_extended().
  1974. * src/list.c (list_archive): Always decode the header. This
  1975. is necessary so the extended header is processed and the correct
  1976. filename is printed no matter what the state of verbose_option.
  1977. * src/xheader.c (xhdr_tab): Reserved GNU keywords (commented out
  1978. for the time being).
  1979. 2003-09-01 Paul Eggert <eggert@twinsun.com>
  1980. Update from gnulib, and correct fnmatch to fnmatch-gnu.
  1981. * bootstrap (gnulib_modules): Change fnmatch to fnmatch-gnu.
  1982. Sort.
  1983. * configure.ac (gl_USE_SYSTEM_EXTENSIONS): Use this instead
  1984. of AC_GNU_SOURCE.
  1985. * lib/.cvsignore: Add alloca.h, stdbool.h. Sort. Append newline.
  1986. * lib/Makefile.am (lib_OBJECTS): New macro, for convenience when
  1987. copying rules from gnulib module descriptions.
  1988. (BUILT_SOURCES, EXTRA_DIST, all-local, alloca.h):
  1989. Update from gnulib modules alloca, fnmatch, getline, stdbool.
  1990. * m4/.cvsignore: Add utimes-null.m4. Sort.
  1991. 2003-09-01 Sergey Poznyakoff
  1992. Added initial support for creating POSIX headers.
  1993. * src/common.h (MAXOCTAL11,MAXOCTAL7): New defines
  1994. (string_to_chars): New functions
  1995. (struct xheader): Changed structure
  1996. (gid_to_gname,gname_to_gid,uid_to_uname,uname_to_uid): Changed
  1997. prototypes.
  1998. * src/create.c (string_to_chars): New function.
  1999. (write_extended): New function
  2000. (start_header): Create extended POSIX headers if necessary.
  2001. (finish_header): Likewise.
  2002. * src/list.c (print_header): Take user/group from
  2003. current_stat_info.
  2004. * src/names.c (gid_to_gname,gname_to_gid)
  2005. (uid_to_uname,uname_to_uid): Changed prototypes.
  2006. * src/tar.c: New option --format.
  2007. * src/tar.h (OLDGNU_COMPATIBILITY): Removed
  2008. (struct extra_header): Removed unused structure.
  2009. (union block.extra_header): Removed unused member.
  2010. * src/xheader.c: Implemented coder functions.
  2011. * bootstrap: Added obstack.
  2012. * lib/.cvsignore: Likewise.
  2013. * configure.ac: Added 'gl_OBSTACK'
  2014. * m4/Makefile.am: Added new files.
  2015. * m4/.cvsignore: Likewise.
  2016. * TODO: Minor formatting change
  2017. 2003-08-31 Sergey Poznyakoff
  2018. Added initial support for POSIX extended and STAR headers
  2019. (only for listing/extracting).
  2020. * src/xheader.c: New file.
  2021. * src/Makefile.am: Added xheader.c
  2022. * src/tar.h (struct star_header): New datatype
  2023. (XHDTYPE,XGLTYPE): New defines
  2024. (enum archive_format:STAR_FORMAT): New member
  2025. (struct tar_stat_info): New datatype.
  2026. (union block.star_header): New member.
  2027. * src/common.h (orig_file_name,current_file_name)
  2028. (current_trailing_slash,current_link_name): Removed variables.
  2029. (current_stat_info): New variable
  2030. (current_stat): Removed
  2031. (extended_header): New variable
  2032. (decode_header): Changed prototype.
  2033. * src/list.c (decode_header): Added initial support for POSIX extended
  2034. and STAR headers.
  2035. (skip_member): Check oldgnu_header only if current_format is set
  2036. to OLDGNU_FORMAT.
  2037. * src/buffer.c: Use current_stat_info
  2038. * src/compare.c: Likewise.
  2039. * src/create.c: Likewise.
  2040. * src/delete.c: Likewise.
  2041. * src/incremen.c: Likewise.
  2042. * src/mangle.c: Likewise.
  2043. * src/update.c: Likewise.
  2044. * src/extract.c: Likewise.
  2045. (make_directories): Improved check for the existence of the directory
  2046. * src/tar.c (destroy_stat): New function.
  2047. 2003-08-29 Paul Eggert <eggert@twinsun.com>
  2048. * NEWS, bootstrap: Drop en_GB locale; it was more trouble than it
  2049. was worth (e.g., different users in en_GB disagree about -ize
  2050. versus -ise).
  2051. * po/en_GB.po: Remove.
  2052. 2003-07-28 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2053. * TODO: Updated
  2054. * NEWS: Updated
  2055. * src/tar.c: Removed support for the obsolete command line
  2056. options.
  2057. * doc/tar.texi: Removed references to the obsolete command
  2058. line options.
  2059. 2003-07-27 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2060. * TODO: Updated
  2061. * NEWS: Updated
  2062. * doc/tar.texi: Updated
  2063. * src/common.h (check_links_option): New variable
  2064. (orig_file_name): New variable
  2065. (check_links): New proto.
  2066. * src/create.c (struct link.nlink): New member
  2067. (link_table): Static for the module.
  2068. (dump_file): Update `link' member when adding new links
  2069. to the link_table.
  2070. (check_links): New function.
  2071. * src/list.c (print_header): Use orig_file_name.
  2072. * src/tar.c: New option --check-links. Changed semantics of
  2073. -o to comply to UNIX98 when extracting and to its previous
  2074. semantics otherwise.
  2075. (main): Call check_links if --check-links. was given.
  2076. 2003-07-25 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2077. * src/list.c (print_header): Revised
  2078. * NEWS: Started the entry for 1.13.26
  2079. * doc/Makefile.am (tar.dvi): Fixed TEXINPUTS value.
  2080. 2003-07-24 Sergey Poznyakoff <gray@Mirddin.farlep.net>
  2081. * .cvsignore: Added to the repository.
  2082. * doc/.cvsignore: Likewise.
  2083. * lib/.cvsignore: Likewise.
  2084. * m4/.cvsignore: Likewise.
  2085. * po/.cvsignore: Likewise.
  2086. * scripts/.cvsignore: Likewise.
  2087. * src/.cvsignore: Likewise.
  2088. * tests/.cvsignore: Likewise.
  2089. * lib/Makefile.am: Added exitfail.[hc]
  2090. * src/misc.c (chdir_do): Fixed call to restore_cwd
  2091. * src/buffer.c (flush_read): Fixed behavior on short
  2092. reads right after opening the new archive (multiv01.sh test).
  2093. (new_volume): Special handling for "-".
  2094. * src/list.c (print_header): Print trailing slash if
  2095. current_trailing_slash was set (extrac03.sh,extrac04.sh tests).
  2096. * tests/multiv01.sh: Minor changes.
  2097. * m4/Makefile.am: Added missing files.
  2098. 2003-07-05 Paul Eggert <eggert@twinsun.com>
  2099. Finish the checkin begin yesterday.
  2100. * NEWS: Document the user-visible changes installed in the last
  2101. two days.
  2102. * TODO: New file (actually, resurrected; but with new contents).
  2103. * src/list.c (read_and): Give full type for procedure arg.
  2104. (read_header): Strip trailing slashes, setting current_trailing_slash.
  2105. (tartime): Avoid int overflow when printing year (!).
  2106. (print_header): New arg specifying block ordinal. All uses changed.
  2107. Print link as 'h' type. Give labels for long links and names.
  2108. * src/misc.c (contains_dot_dot): Moved to names.c
  2109. (must_be_dot_or_slash): New function.
  2110. (safer_rmdir): Use it.
  2111. (remove_any_file): Now takes enum as option, not boolean.
  2112. Check for (Linux) EISDIR as well as (POSIX) EPERM when attempting
  2113. to unlink a directory.
  2114. (deref_stat): Accept bool, not int.
  2115. * src/names.c (namelist_match): Allow partial matches only if
  2116. recursive.
  2117. (hash_string_hasher): Renamed from hash_avoided_name.
  2118. (hash_string_compare): Renamed from compare_avoided_anames.
  2119. (hash_string_insert, hash_string_lookup): New functions.
  2120. (add_avoided_name, is_avoided_name): Use them.
  2121. (safer_name_suffix): New function.
  2122. (contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
  2123. * src/rmt.c: Don't include print-copyr.h.
  2124. (prepare_input_buffer): New arg FD.
  2125. Do not read more than INT_MAX bytes at once,
  2126. since it breaks on some brain damaged Tru64 hosts.
  2127. Divide size by two
  2128. when retrying instead of subtracting 1024; for speed.
  2129. (main): Use gettext to translate (C), not print_copyright.
  2130. * src/system.h: Include <alloca.h> and <stdbool.h> unconditionally,
  2131. now that gnulib handles this.
  2132. Include <stddef.h> and <limits.h> unconditionally, now that we assume
  2133. C89 or better.
  2134. Assume that offsetof is defined in stddef.h.
  2135. Do not include <sys/param.h>.
  2136. (realloc, lseek): Do not declare.
  2137. (HAVE_DECL_VALLOC): Renamed from HAVE_VALLOC.
  2138. (CHAR_BIT, CHAR_MAX, UCHAR_MAX, LONG_MAX): Remove
  2139. declarations, since we now assume C89 or better.
  2140. (PARAMS): Remove, as we now assume C89. All uses changed.
  2141. (bindtextdomain, textdomain): Include <gettext.h> to define.
  2142. Include <unlocked-io.h>.
  2143. (valloc): Define if not defined, and if valloc is not declared.
  2144. (xstrdup): Remove decl.
  2145. * src/tar.c: Do not include <print-copyr.h>.
  2146. Include <getdate.h>.
  2147. (get_date): Remove decl.
  2148. (ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
  2149. IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
  2150. NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
  2151. SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
  2152. (long_options, decode_options): Use them.
  2153. (OVERWRITE_DIR_OPTION): Remove.
  2154. (long_options): New options --index-file, --no-overwrite-dir.
  2155. Remove --overwrite-dir option.
  2156. (usage): Use PACKAGE_BUGREPORT.
  2157. (decode_options): Terminate new argv properly.
  2158. Use PACKAGE_NAME, PACKAGE_VERSION.
  2159. If verbose, report how we grokked any textual date option.
  2160. (main): Add support for index-file.
  2161. * tests/Makefile.am: Convert to UTF-8.
  2162. (AUTOMAKE_OPTIONS): Remove.
  2163. (TESTS): Add delete04.sh, multiv01.sh, options.sh.
  2164. (INCLUDES): Remove ../intl.
  2165. (LDADD): Don't link libtar.a twice.
  2166. * tests/genfile.c: Convert to UTF-8.
  2167. Don't include <print-copyr.h>.
  2168. (DEFAULT_PATTERN): Renamed from DEFAULT.
  2169. (ZEROS_PATTERN): Renamed from ZEROS.
  2170. (main): Use gettext to translate (C), not print_copyright.
  2171. 2003-07-04 Paul Eggert <eggert@twinsun.com>
  2172. Revamp to meet current standards of autoconf, automake,
  2173. gettext, and gnulib, and incorporate new translations.
  2174. * config/config.guess, config/config.sub, config/depcomp,
  2175. config/install-sh, config/mdate-sh, config/missing,
  2176. config/mkinstalldirs, config/texinfo.texi:
  2177. Moved here from parent directory, or from doc.
  2178. * config.hin: Renamed from config.h.in.
  2179. * config/config.rpath: New file.
  2180. * intl: Remove this subdirectory.
  2181. * lib/fnmatch_.h: Renamed from lib/fnmatch.hin.
  2182. * lib/getstr.c, lib/getstr.h, lib/msleep.c, lib/print-copyr.c,
  2183. lib/print-copyr.h, lib/readutmp.c, lib/rename.c, lib/stpcpy.c,
  2184. lib/strstr.c, lib/strtoimax.c, lib/strtoll.c, lib/strtoull.c,
  2185. lib/strtoumax.c, lib/unicodeio.c, lib/unicodeio.h,
  2186. lib/xstrtoimax.c, m4/c-bs-a.m4, m4/ccstdc.m4, m4/check-decl.m4,
  2187. m4/decl.m4, m4/jm-mktime.m4, m4/prereq.m4, m4/xstrtoimax.m4,
  2188. stamp-h.in: Remove.
  2189. * lib/alloca_.h, lib/fnmatch_loop.c, lib/gettext.h, lib/pathmax.h,
  2190. lib/safe-write.c, lib/safe-write.h, lib/stdbool_.h, lib/strcase.h,
  2191. lib/stripslash.c, lib/unlocked-io.h, lib/xgetcwd.h, m4/alloca.m4,
  2192. m4/backupfile.m4, m4/bison.m4, m4/chown.m4, m4/dirname.m4,
  2193. m4/dos.m4, m4/exclude.m4, m4/fileblocks.m4, m4/ftruncate.m4,
  2194. m4/getdate.m4, m4/getopt.m4, m4/hash.m4, m4/human.m4,
  2195. m4/intdiv0.m4, m4/intmax_t.m4, m4/inttypes-pri.m4,
  2196. m4/inttypes_h.m4, m4/isc-posix.m4, m4/lchown.m4, m4/lib-ld.m4,
  2197. m4/lib-link.m4, m4/lib-prefix.m4, m4/memset.m4, m4/mktime.m4,
  2198. m4/modechange.m4, m4/nls.m4, m4/onceonly.m4, m4/pathmax.m4,
  2199. m4/po.m4, m4/quote.m4, m4/quotearg.m4, m4/rmdir.m4,
  2200. m4/safe-read.m4, m4/safe-write.m4, m4/save-cwd.m4, m4/savedir.m4,
  2201. m4/ssize_t.m4, m4/stdbool.m4, m4/stdint_h.m4, m4/strcase.m4,
  2202. m4/strtoimax.m4, m4/strtol.m4, m4/strtoll.m4, m4/strtoul.m4,
  2203. m4/strtoull.m4, m4/strtoumax.m4, m4/tm_gmtoff.m4, m4/uintmax_t.m4,
  2204. m4/unlocked-io.m4, m4/xalloc.m4, m4/xgetcwd.m4, m4/xstrtol.m4,
  2205. po/LINGUAS, po/Makevars, po/Rules-quot, po/boldquot.sed,
  2206. po/en@boldquot.header, po/en@quot.header, po/en_GB.po,
  2207. po/insert-header.sin, po/remove-potcdate.sin, po/stamp-po: New files.
  2208. * ABOUT-NLS, INSTALL, lib/addext.c, lib/alloca.c, lib/argmatch.c,
  2209. lib/argmatch.h, lib/backupfile.c, lib/backupfile.h, lib/dirname.c,
  2210. lib/dirname.h, lib/error.c, lib/exclude.c, lib/exclude.h,
  2211. lib/fnmatch.h, lib/full-write.c, lib/full-write.h, lib/getdate.h,
  2212. lib/getdate.y, lib/getline.c, lib/getline.h, lib/getopt.c,
  2213. lib/getopt.h, lib/getopt1.c, lib/hash.c, lib/hash.h, lib/human.c,
  2214. lib/human.h, lib/lchown.c, lib/malloc.c, lib/mktime.c,
  2215. lib/modechange.c, lib/modechange.h, lib/quote.c, lib/quote.h,
  2216. lib/quotearg.c, lib/quotearg.h, lib/realloc.c, lib/safe-read.c,
  2217. lib/safe-read.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
  2218. lib/savedir.h, lib/strcasecmp.c, lib/utime.c, lib/xalloc.h,
  2219. lib/xgetcwd.c, lib/xmalloc.c, lib/xstrdup.c, lib/xstrtol.c,
  2220. lib/xstrtol.h, lib/xstrtoumax.c, m4/codeset.m4, m4/d-ino.m4,
  2221. m4/error.m4, m4/fnmatch.m4, m4/getcwd.m4, m4/getline.m4, m4/gettext.m4,
  2222. m4/glibc21.m4, m4/iconv.m4, m4/inttypes.m4, m4/lcmessage.m4,
  2223. m4/longlong.m4, m4/malloc.m4, m4/mbrtowc.m4, m4/mbstate_t.m4,
  2224. m4/progtest.m4, m4/realloc.m4, m4/strerror_r.m4, m4/ulonglong.m4,
  2225. m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4, m4/xstrtoumax.m4,
  2226. po/Makefile.in.in:
  2227. Upgrade to latest version from external source. The file "bootstrap"
  2228. now grabs these automatically, so we needn't keep track of them
  2229. in this change long any longer.
  2230. * Makefile.am (AUTOMAKE_OPTIONS): Remove. Now done by configure.ac.
  2231. (SUBDIRS): Remove intl.
  2232. * PORTS: Update for star, Macintosh.
  2233. * README, README-alpha: Suggest Autoconf 2.57, Automake 1.7.5,
  2234. Bison 1.875, gettext 0.12.1.
  2235. * THANKS: Add Bernhard Rosenkraenzer, Solar Designer.
  2236. * configure.ac (AC_INIT, AM_INIT_AUTOMAKE): Convert to modern form.
  2237. (AC_CONFIG_AUX_DIR): New.
  2238. (AC_CONFIG_HEADERS): Rename config.h.in to config.hin, to be more
  2239. like coreutils.
  2240. (AC_PREREQ): Bump from 2.52 to 2.57.
  2241. (AC_GNU_SOURCE): New.
  2242. (AC_PROG_GCC_TRADITIONAL, AM_C_PROTOTYPES, AC_C_CONST): Remove;
  2243. we no longer support K&R C.
  2244. (YACC): Remove.
  2245. (AC_CHECK_HEADERS): Remove limits.h, poll.h, stdbool.h, stropts.h,
  2246. sys/ioccom.h, sys/param.h, sys/time.h, sys/timeb.h, wchar.h, wctype.h.
  2247. (AC_MBSTATE_T): Remove.
  2248. (HAVE_UTIME_H, HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
  2249. HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
  2250. HAVE_DECL_STRTOULL, HAVE_MKNOD): Remove our special code.
  2251. (AM_STDBOOL_H): Add.
  2252. (AC_HEADER_TIME, AC_STRUCT_TIMEZONE,
  2253. jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Remove.
  2254. (AC_CHECK_TYPE): Remove ssize_t.
  2255. (gt_TYPE_SSIZE_T): Add.
  2256. (jm_AC_PREREQ_XSTRTOUMAX, jm_PREREQ_ADDEXT, jm_PREREQ_ERROR,
  2257. jm_PREREQ_HUMAN, jm_PREREQ_QUOTEARG, jm_PREREQ_XGETCWD,
  2258. AC_FUNC_ALLOCA, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STRERROR_R,
  2259. AC_FUNC_FNMATCH, AC_FUNC_VPRINTF, AM_FUNC_GETLINE, jm_FUNC_MALLOC,
  2260. jm_FUNC_MKTIME, jm_FUNC_REALLOC):
  2261. Remove. Switch to gnulib macros like gl_BACKUPFILE instead.
  2262. (tar_LDADD): Rename to LIB_CLOCK_GETTIME. All uses changed.
  2263. (rmt_LDADD): Rename to LIB_SETSOCKOPT. All uses changed.
  2264. (AC_CHECK_FUNCS): Remove fchdir, ftime, getcwd, isascii, nap,
  2265. napms, poll, select, strstr, usleep.
  2266. (AC_REPLACE_FUNCS): Remove ftruncate, lchown, memset, rename,
  2267. rmdir, strcasecmp, strncasecmp, strtol, strtoul.
  2268. (AM_GNU_GETTEXT): Use external and need-ngettext options.
  2269. (AM_GNU_GETTEXT_VERSION): New.
  2270. (AC_OUTPUT): Remove intl/Makefile.
  2271. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2272. ($(srcdir)/tar.info, tar.dvi): Remove obsolete warnings.
  2273. * doc/fdl.texi: Update to current GNU version.
  2274. * doc/gettext.texi: Update to current coreutils version,
  2275. plus a copyright notice.
  2276. * doc/tar.texi: Switch to new method for doing copyright notices.
  2277. Use @acronym instead of @sc where appropriate.
  2278. Remove empty examples. Give a few more examples.
  2279. * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2280. (EXTRA_DIST, libtar_a_SOURCES): Switch to gnulib, so that they
  2281. are built up in pieces with +=.
  2282. (noinst_HEADERS, INCLUDES): Remove.
  2283. (BUILT_SOURCES, MAINTAINERCLEANFILES, MOSTLYCLEANFILES): New.
  2284. (libtar_a_LIBADD): Use $ rather than @.
  2285. (all-local, alloca.h, fnmatch.h, stdbool.h): New rules, from gnulib.
  2286. * m4/Makefile.am (EXTRA_DIST): Add alloca.m4, backupfile.m4,
  2287. bison.m4, chown.m4, dirname.m4, dos.m4, exclude.m4, fileblocks.m4,
  2288. ftruncate.m4, getdate.m4, getopt.m4, hash.m4, human.m4,
  2289. intdiv0.m4, intmax_t.m4, inttypes_h.m4, inttypes-pri.m4,
  2290. isc-posix.m4, lcown.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
  2291. memset.m4, mktime.m4, modechange.m4, nls.m4, onceonly.m4,
  2292. pathmax.m4, po.m4, quotearg.m4, quote.m4, rmdir.m4, safe-read.m4,
  2293. safe-write.m4, save-cwd.m4, savedir.m4, ssize_t.m4, stdbool.m4,
  2294. stdint_h.m4, strcase.m4, strtoimax.m4, strtoll.m4, strtol.m4,
  2295. strtoull.m4, strtoul.m4, strtoumax.m4, tm_gmtoff.m4, uintmax_t.m4,
  2296. unlocked-io.m4, xalloc.m4, xgetcwd.m4, xstrtol.m4.
  2297. Remove c-bs-a.m4, ccstdc.m4, check-decl.m4, decl.m4, jm-mktime.m4,
  2298. prereq.m4, xstrtoimax.m4.
  2299. * po/POTFILES.in: Remove tests/genfile.c; it doesn't need to
  2300. be translated, since it's not a user-visible tool.
  2301. * scripts/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2302. * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
  2303. (INCLUDES): Remove ../intl. Put top-srcdir before ., for
  2304. consistency with coreutils.
  2305. (LDADD): Link LIBINTL after libtar.a, since
  2306. it's now external and should stand by itself.
  2307. * src/buffer.c (print_total_written): Adjust to new human.h
  2308. interface.
  2309. (child_open_for_compress): Do not increase size to BLOCKSIZE.
  2310. (open_archive): Open index file name.
  2311. Strip trailing slahes from file names.
  2312. (flush_write): Set size to 0 if not saving names.
  2313. (flush_write, flush_read): Use safer_name_suffix rather than
  2314. inline code.
  2315. * src/common.h: Include <quote.h>.
  2316. (absolute_names_option, atime_preserve_option, backup_option,
  2317. block_number_option, checkpoint_option, dereference_option,
  2318. force_local_option, ignore_failed_read_option, ignore_zeros_option,
  2319. incremental_option, interactive_option, multi_volume_option,
  2320. numeric_owner_option, one_file_system_option, recursive_unlink_option,
  2321. read_full_records_option, remove_files_option, same_order_option,
  2322. show_omitted_dirs_option, sparse_option, starting_file_option,
  2323. to_stdout_option, totals_option, touch_option, verify_option,
  2324. dev_null_output, now_verifying, we_are_root): Now bool, not int.
  2325. (current_trailing_slash, index_file_name, recent_long_name_blocks,
  2326. recent_long_link_blocks): New vars.
  2327. (NO_OVERWRITE_DIR_OLD_FILES): New constant.
  2328. (OVERWRITE_OLD_DIRS): Remove.
  2329. (enum remove_option): New enum.
  2330. (remove_any_file): Use it as option arg, not int.
  2331. (is_avoided_name, contains_dot_dot): Return bool, not int.
  2332. (safer_name_suffix): New decl.
  2333. * src/compare.c (now_verifying): Now bool, not int.
  2334. (fill_in_sparse_array): Move to extract.c. Now returns bool;
  2335. all callers changed to test for failure.
  2336. (diff_sparse_files): Take size from current_stat, not from param.
  2337. (diff_archive): Do not count trailing slashes in archives.
  2338. (verify_volume): Test for header failure after loop, not before.
  2339. * src/create.c (relativize): Remove; replaced by safer_name_suffix.
  2340. All callers changed.
  2341. (start_header): Clear devmajor and devminor fields, too.
  2342. (finish_header): New arg block_ordinal.
  2343. (init_sparsearray): Now extern. Set sp_array_size to
  2344. SPARSES_IN_OLDGNU_HEADER if it is zero.
  2345. (dump_file): Keep link table as a hash.
  2346. Do not count "file changed as we read it" as a failure.
  2347. * src/delete.c (recent_long_name_blocks, recent_long_link_blocks):
  2348. Move extern decl to common.h.
  2349. * src/extract.c (we_are_root): Now bool, not int.
  2350. (check_time): Warn about implausibly old time stamps.
  2351. (set_stat): Use utimbuf, not stat_info.
  2352. (prepare_to_extract): New arg DIRECTORY.
  2353. (fill_in_sparse_array): Moved here from compare.c.
  2354. (extract_sparse_file): Now returns off_t, giving size left.
  2355. Truncate file at end.
  2356. (extract_archive): Use safer_name_suffix rather than rolling our own.
  2357. Use fill_in_sparse_array rather than rolling our own.
  2358. Strip trailing slashes more effectively.
  2359. Check for unsafe names.
  2360. * src/incremen.c (struct directory): nfs and found are now of type
  2361. bool, not int.
  2362. (gnu_restore): Now takes directory name as argument, not offset
  2363. of directory name in a global. All uses changed.
  2364. (CURRENT_FILE_NAME): Remove.
  2365. New tests.
  2366. * tests/delete04.sh, tests/multiv01.sh, tests/options.sh: New
  2367. files.
  2368. 2002-09-30 Paul Eggert <eggert@twinsun.com>
  2369. * src/rmt.c (prepare_input_buffer): Renamed form
  2370. prepare_record_buffer. All uses changed. Do not assume that
  2371. size_t is the same width as int.
  2372. 2002-03-29 Paul Eggert <eggert@twinsun.com>
  2373. * src/incremen.c (get_directory_contents):
  2374. If ignore_failed_read_option, only warn about
  2375. get_directory_contents failures. Fix suggested by
  2376. Mark Costlow.
  2377. 2002-01-31 Mark W. Eichin <eichin@thok.org>
  2378. * src/buffer.c (child_open_for_compress): Don't try to read
  2379. past the end of the buffer.
  2380. 2001-10-11 Jim Meyering <meyering@lucent.com>
  2381. * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
  2382. and quote_n (1, ... to avoid clobbering a buffer.
  2383. 2001-09-26 Paul Eggert <eggert@twinsun.com>
  2384. * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.25.
  2385. * src/buffer.c (flush_read): Don't diagnose partial blocks before
  2386. end of file; just ignore them silently.
  2387. * src/list.c (read_header): Don't keep around extended name
  2388. and link info indefinitely; keep it only for the next file.
  2389. This fixes a bug introduced in 1.13.24, and removes the need
  2390. for some static variables. Set recent_long_name and
  2391. recent_long_link to zero if there were no long links; this
  2392. avoids a violation of ANSI C rules for pointers in delete.c.
  2393. * THANKS: Add Christian Laubscher.
  2394. 2001-09-26 Jim Meyering <meyering@lucent.com>
  2395. * doc/tar.texi (Remote Tape Server): is know -> is known
  2396. 2001-09-25 Paul Eggert <eggert@twinsun.com>
  2397. * lib/unicodeio.c (EILSEQ): Include <iconv.h> first, since
  2398. <iconv.h> may define EILSEQ (e.g. libiconv). Define a
  2399. replacement EILSEQ to be ENOENT, not EINVAL, since callers may
  2400. want to distinguish EINVAL and EILSEQ.
  2401. 2001-09-24 Christophe Kalt <Christophe.Kalt@kbcfp.com>
  2402. * src/extract.c (maybe_recoverable):
  2403. Treat OVERWRITE_OLD_DIRS like DEFAULT_OLD_FILES.
  2404. 2001-09-22 Paul Eggert <eggert@twinsun.com>
  2405. * NEWS, configure.ac (AM_INIT_AUTOMAKE): Version 1.13.24.
  2406. * ABOUT-NLS, intl/*: Update to gettext-0.10.40, replacing LGPL
  2407. with GPL.
  2408. * INSTALL, mkinstalldirs: Update to autoconf 2.52 version.
  2409. * PORTS: Add copyright notice, 'star' reference.
  2410. * README-alpha: Add copyright notice, autoconf 2.52 patch.
  2411. * THANKS: Add Christophe Kalt.
  2412. * config.sub: Upgrade to 2001-09-14 version.
  2413. * configure.ac (ALL_LINGUAS): Add ko.
  2414. * po/ko.po: Resurrected file.
  2415. * doc/convtexi.pl: Add coding advice for Emacs.
  2416. * doc/getdate.texi: Add copyright notice.
  2417. * doc/mdate-sh: Upgrade to automake 1.5 version.
  2418. * doc/tar.texi (extracting files): Mention --to-stdout.
  2419. (Option Summary, Dealing with Old Files): New option --overwrite-dir.
  2420. (Overwrite Old Files): Likewise.
  2421. * lib/Makefile.am (noinst_HEADERS):
  2422. Remove copysym.h. Add print-copyr.h, unicodeio.h.
  2423. (libtar_a_SOURCES): Remove copysym.c, Add print-copyr.c, unicodeio.c.
  2424. * lib/copysym.c, lib/copysym.h: Remove.
  2425. * lib/print-copyr.c, lib/print-copyr.h, lib/unicodeio.c,
  2426. lib/unicodeio.h: New files.
  2427. * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
  2428. lib/mktime.c, lib/strtoll.c: Switch from LGPL to GPL.
  2429. * lib/quotearg.c (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
  2430. (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
  2431. * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4.
  2432. * m4/isc-posix.m4: Remove.
  2433. * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit.
  2434. * po/POTFILES.in: Add copyright notice.
  2435. * src/Makefile.am (LDADD): Like libtar.a before @INTLLIBS@ as
  2436. well as after.
  2437. * tests/Makefile.am (LDADD): Likewise.
  2438. * src/buffer.c (write_archive_buffer, close_archive):
  2439. If an archive is a socket, treat it like a FIFO.
  2440. (records_read, records_written): New vars.
  2441. (write_archive_to_stdout): Now bool, not int.
  2442. (open_archive, flush_write, flush_read): Keep records_read and
  2443. records_written up to date.
  2444. * src/common.h (enum old_files): New value OVERWRITE_OLD_DIRS.
  2445. (write_archive_to_stdout): Now bool, not int.
  2446. (enum read_header): New value HEADER_SUCCESS_EXTENDED.
  2447. (read_header): Now takes bool arg. Existing callers modified
  2448. to pass 0, unless otherwise specified.
  2449. * src/delete.c (records_read): Remove; now a global.
  2450. (acting_as_filter): Now bool, not int.
  2451. (recent_long_name, recent_long_link, recent_long_name_blocks,
  2452. recent_long_link_blocks, records_read, records_written): New decls.
  2453. (records_skipped): New var.
  2454. (move_archive): Don't divide by zero if arg is 0.
  2455. Use the above vars to compute how far to move.
  2456. (write_recent_blocks): New function.
  2457. (delete_archive_member): Pass 1 to read_header, so that it doesn't
  2458. read more than 1 block. Handle resulting HEADER_SUCCESS_EXTENDED code.
  2459. Keep track of how many records have been skipped.
  2460. Let the buffer code count records.
  2461. When copying a header, copy any extended headers that came before it.
  2462. * src/extract.c (extract_archive): When marking a directory to be
  2463. updated after symlinks, stat all directories after it in the
  2464. delayed-set-stat list too, since they will be checked after
  2465. symlinks. Add support for --overwrite-dir.
  2466. * src/list.c (recent_long_name, recent_long_link,
  2467. recent_long_name_blocks, recent_long_link_blocks): New vars.
  2468. (read_and): Pass 0 to read_header.
  2469. (read_header): New arg RAW_EXTENDED_HEADERS. Store away extended
  2470. headers into new vars. Null-terminate incoming symbolic links.
  2471. * src/rmt.c: Include print-copyr.h, not copysym.h.
  2472. (main): Use print_copyright, not copyright_symbol.
  2473. * src/tar.c (decode_options): Likewise.
  2474. (OVERWRITE_DIR_OPTION): New constant.
  2475. (long_options, usage, decode_options): Add --overwrite-dir.
  2476. * src/tar.h: Put copyright notice into documentation.
  2477. * tests/Makefile.am (TESTS): Add delete03.sh.
  2478. * tests/delete03.sh: New file.
  2479. * tests/genfile.c: Include print-copyr.h, not copysym.h.
  2480. (main): Use print_copyright, not copyright_symbol.
  2481. Include <argmatch.h>.
  2482. (pattern_strings): Remove.
  2483. (pattern_args, pattern_types): New constants.
  2484. (main): Use XARGMATCH, not argmatch.
  2485. 2001-09-20 Jim Meyering <meyering@lucent.com>
  2486. * lib/xstrtol.c (strtoimax): Guard declaration with
  2487. `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
  2488. The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
  2489. have their own, conflicting declaration of strtoimax in sys/inttypes.h.
  2490. (strtoumax): Likewise, for completeness (it wasn't necessary).
  2491. * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
  2492. Check for declaration of strtoimax.
  2493. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
  2494. Check for declaration of strtoumax.
  2495. 2001-09-16 Paul Eggert <eggert@twinsun.com>
  2496. * fnmatch.m4 (jm_FUNC_FNMATCH): Fix typo in previous patch: yes -> no.
  2497. 2001-09-14 Paul Eggert <eggert@twinsun.com>
  2498. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.23.
  2499. * README-alpha: Describe automake patch.
  2500. * configure.ac (LIBOBJS):
  2501. Remove automake 1.4 workaround, as we're using 1.5 now.
  2502. (USE_INCLUDED_LIBINTL): New AC_DEFINE.
  2503. * lib/copysym.c: Include stddef.h, for size_t.
  2504. Include langinfo.h if needed.
  2505. Use locale_charset only if USE_INCLUDED_LIBINTL;
  2506. if not, use nl_langinfo (CODESET) if available.
  2507. 2001-09-13 Paul Eggert <eggert@twinsun.com>
  2508. * config.guess, config.sub: Sync with canonical versions.
  2509. * configure.ac (jm_PREREQ_XGETCWD): Add.
  2510. * lib/Makefile.am (noinst_HEADERS): Add copysym.h.
  2511. (libtar_a_SOURCES): Add copysym.c.
  2512. * copysym.c, copysym.h: New files.
  2513. * lib/error.c: Sync with fileutils version.
  2514. * m4/Makefile.am (EXTRA_DIST): Add getcwd.m4; remove uintmax_t.m4.
  2515. * m4/getcwd.m4: New file.
  2516. * m4/uintmax_t.m4: Remove.
  2517. * m4/gettext.m4 (AM_WITH_NLS):
  2518. Fix bug with calculating version of Bison 1.29.
  2519. Reported by Karl Berry.
  2520. * src/Makefile.am (datadir): Remove.
  2521. * src/rmt.c: Include copysym.h.
  2522. (main): Use copyright_symbol to translate copyright notice,
  2523. instead of gettext.
  2524. * src/tar.c: Likewise.
  2525. * tests/genfile.c: Likewise.
  2526. * src/system.h (MB_LEN_MAX): New symbol.
  2527. 2001-09-11 Paul Eggert <eggert@twinsun.com>
  2528. * src/extract.c (struct delayed_set_stat): New member
  2529. 'after_symlinks'.
  2530. (delay_set_stat): Initialize it to 0.
  2531. (set_mode): New arg current_stat_info. Use it (if nonnull) to avoid
  2532. taking an extra stat ourselves. All callers changed.
  2533. (set_stat): Likewise.
  2534. (apply_nonancestor_delayed_set_stat): New arg 'after_symlinks'.
  2535. If false, stop when encountering a struct whose 'after_symlinks'
  2536. member is true. Otherwise, go through all structures but check
  2537. them more carefully. All callers changed.
  2538. (extract_archive): When extracting a deferred symlink, if its parent
  2539. directory's status needs fixing, then mark the directory as needing
  2540. to be fixed after symlinks.
  2541. (extract_finish): Fix status of ordinary directories, then apply
  2542. delayed symlinks, then fix the status of directories that are
  2543. ancestors of delayed symlinks.
  2544. * src/rtapelib.c (rexec):
  2545. Remove declaration; it ran afoul of prototypes on Crays.
  2546. Reported by Wendy Palm of Cray.
  2547. 2001-09-06 Paul Eggert <eggert@twinsun.com>
  2548. * lib/strtoimax.c (HAVE_LONG_LONG):
  2549. Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
  2550. (strtoimax): Use sizeof (long), not
  2551. sizeof strtol (ptr, endptr, base),
  2552. to work around bug in IBM C compiler.
  2553. 2001-09-04 Paul Eggert <eggert@twinsun.com>
  2554. * lib/xgetcwd.c: Include "xalloc.h".
  2555. (xgetcwd): Do not return NULL when memory is exhausted; instead,
  2556. report an error and exit.
  2557. * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
  2558. (jm_PREREQ): Use it.
  2559. 2001-09-03 Paul Eggert <eggert@twinsun.com>
  2560. * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
  2561. (jm_PREREQ_XGETCWD): New macro.
  2562. * lib/exclude.c (fnmatch_no_wildcards):
  2563. Fix typo that caused us to do case-folding
  2564. search even when that was not desired. This occurred only in the
  2565. no-wildcard case.
  2566. * lib/xgetcwd.c: Include pathmax.h if not HAVE_GETCWD.
  2567. Do not include xalloc.h.
  2568. (INITIAL_BUFFER_SIZE): New symbol.
  2569. Do not use xmalloc / xrealloc, since the caller is responsible for
  2570. handling errors. Preserve errno around `free' during failure.
  2571. Do not overrun buffer when using getwd.
  2572. * lib/xgetcwd.c (xgetcwd):
  2573. Use HAVE_GETCWD_NULL, not defined __GLIBC__ && __GLIBC__ >= 2,
  2574. to decide whether to use getcwd (NULL, 0).
  2575. 2001-09-02 Paul Eggert <eggert@twinsun.com>
  2576. * lib/xgetcwd.c: Fix typo in local var; from Jim Meyering.
  2577. 2001-09-01 Jim Meyering <meyering@lucent.com>
  2578. * exclude.c: Use `""', not `<>' to #include non-system header files.
  2579. (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
  2580. and strncasecmp as r-values. Unixware didn't have declarations.
  2581. 2001-08-31 Jim Meyering <meyering@lucent.com>
  2582. * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
  2583. Use an initial, malloc'd, buffer of length 128 rather than
  2584. a statically allocated one of length 1024.
  2585. 2001-08-30 Paul Eggert <eggert@twinsun.com>
  2586. * lib/utime.c: Include full-write.h.
  2587. * lib/xstrtol.c (strtoimax): New decl.
  2588. 2001-08-29 Paul Eggert <eggert@twinsun.com>
  2589. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.22.
  2590. * src/create.c (dump_file): Relativize link names before dumping.
  2591. This fixes a bug reported by Jose Pedro Oliveira.
  2592. * src/create.c (dump_file): Use offsetof when computing sizes for
  2593. struct hack; this avoids wasted space in some cases.
  2594. * src/incremen.c (note_directory, find_directory): Likewise.
  2595. * src/names.c (name_gather, addname): Likewise.
  2596. * src/extract.c (extract_archive): Use strcpy, not memcpy,
  2597. for consistency with other code that does similar things.
  2598. * src/names.c (name_gather): Likewise.
  2599. * src/names.c (read_name_from_file, name_next, name_gather,
  2600. add_hierarchy_to_namelist): Avoid quadratic behavior when
  2601. reallocating buffers. Check for buffer size overflow.
  2602. (addname): Avoid unnecessary clearing of memory.
  2603. 2001-08-29 "Jan D." <Jan.Djarv@mbox200.swipnet.se>
  2604. * src/extract.c (delay_set_stat): Fix off-by-one error in file
  2605. name size allocation that caused core dumps.
  2606. 2001-08-28 Paul Eggert <eggert@twinsun.com>
  2607. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.21.
  2608. * configure.ac (GNU_SOURCE): Define to 1, not /**/.
  2609. (major_t, minor_t, ssize_t): Use new-style AC_CHECK_TYPE.
  2610. (daddr_t): Remove; no longer used.
  2611. (jm_PREREQ_HUMAN): Add.
  2612. * acconfig.h: Remove; no longer needed.
  2613. * config.guess, config.sub:
  2614. New files, from automake 1.5. Gettext 0.10.39 needs them.
  2615. * depcomp, missing, mkinstalldirs: Upgrade to automake 1.5.
  2616. * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2.
  2617. (SUBDIRS): Put intl before lib, as gettext requires.
  2618. * ABOUT-NLS: Upgrade to gettext 0.10.39.
  2619. * intl: Upgrade entire directory to gettext 0.10.39.
  2620. * m4/codeset.m4, m4/glibc21.m4, m4/iconv.m4:
  2621. New files, from gettext 0.10.39.
  2622. * m4/gettext.m4, m4/isc-posix.m4, m4/lcmessage.m4, m4/progtest.m4,
  2623. Upgrade to gettext 0.10.39,
  2624. * po/Makefile.in.in: Likewise, except fix a typo in its copying
  2625. permissions.
  2626. * po/cat-id-tbl.c, po/stamp-cat-id:
  2627. Remove; no longer used by gettext 0.10.39.
  2628. * po/ChangeLog: New file.
  2629. * doc/Makefile.am (EXTRA_DIST): Add freemanuals.texi.
  2630. $(srcdir)/tar.texi: Likewise.
  2631. * doc/freemanuals.texi: New file.
  2632. * doc/tar.texi (Free Software Needs Free Documentation): New appendix.
  2633. `fileds' -> `fields'
  2634. * doc/texinfo.tex: Upgrade to version 2001-07-25.07.
  2635. * lib/Makefile.am (EXTRA_DIST): Add strtoll.c, strtoimax.c.
  2636. (noinst_HEADERS): Add quote.h.
  2637. (libtar_a_SOURCES): Add quote.c, xstrtoimax.c.
  2638. * lib/exclude.c: Fix typo in '#include <stdint.h>' directive.
  2639. * lib/full-write.c, lib/savedir.c: Comment fix.
  2640. * lib/pathmax.h: Remove.
  2641. * lib/quote.c, lib/quote.h: New files.
  2642. * lib/xgetcwd.c: Don't include pathmax.h.
  2643. Include stdlib.h and unistd.h if available.
  2644. Include xalloc.h.
  2645. (xmalloc, xstrdup, free): Remove decls.
  2646. (xgetcwd): Don't assume sizes fit in unsigned.
  2647. Check for overflow when computing sizes.
  2648. Simplify reallocation code.
  2649. * lib/xmalloc.c: Quote failure tests.
  2650. * lib/strtoumax.c, lib/xstrtoimax.c: New files.
  2651. * lib/strtoimax.c: Renamed from strtouxmax.c. Make it more
  2652. similar to strtol.c.
  2653. (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
  2654. (verify): New macro.
  2655. (strtoumax, uintmax_t, strtoull, strtol): Remove.
  2656. (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
  2657. (strtoimax): Renamed from strtoumax. All uses of unsigned values
  2658. changed to signed values. Check sizes at compile-time, not
  2659. run-time. Prefer strtol to strtoll if both work.
  2660. (main): Remove.
  2661. * lib/xstrtol.h (xstrtoimax): New decl.
  2662. * m4/Makefile.am (EXTRA_DIST):
  2663. Add codeset.m4, glibc21.m4, iconv.m4, inttypes.m4,
  2664. longlong.m4, xstrtoimax.m4.
  2665. * m4/inttypes.m4 (jm_AC_HEADER_INTTYPES_H):
  2666. Remove; now done by autoconf.
  2667. (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T): Replace with
  2668. Use AC_CHECK_TYPE instead of merely looking for the header.
  2669. * m4/uintmax_t.m4: Use shorter comment.
  2670. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
  2671. Quote first arg of AC_DEFUN.
  2672. Require jm_AC_TYPE_INTMAX_T and jm_AC_TYPE_LONG_LONG since they
  2673. is needed to parse the include file.
  2674. Simplify logic behind the args to AC_REPLACE.
  2675. * src/Makefile.am (OMIT_DEPENDENCIES): Remove.
  2676. * src/ansi2knr.1, src/ansi2knr.c: Remove; wasn't being used.
  2677. * src/rmt.c (main):
  2678. Use "Copyright %d" to simplify the translator's job in the future.
  2679. Advise translator about circle-C.
  2680. * src/tar.c: (decode_options): Likewise.
  2681. * tests/genfile.c (main): Likewise.
  2682. 2001-08-28 Jim Meyering <meyering@lucent.com>
  2683. * lib/argmatch.c: Include "quote.h".
  2684. (argmatch_invalid): Quote the context.
  2685. * lib/dirname.c (dir_name): Fix typo on PC platforms.
  2686. * lib/backupfile.c, lib/basename.c, lib/dirname.c, lib/strtoul.c:
  2687. Use single-quote for local .h files.
  2688. * lib/error.h (__attribute__): Don't depend on __STRICT_ANSI__.
  2689. * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Upgrade to recent
  2690. glibc versions.
  2691. * lib/getdate.y (get_date): Initialize tm_isdst to -1 before
  2692. invoking mktime the last time.
  2693. * lib/pathmax.h: Use #if rather than #ifdef for HAVE_UNISTD_H.
  2694. * lib/rename.c: Major rewrite by Volker Borchert to use system
  2695. rename function, but to work around problems with trailing
  2696. slashes.
  2697. * lib/strtoll.c: New file, from glibc.
  2698. * lib/strtoul.c: Update from glibc.
  2699. * lib/strtouxmax.c: Renamed from lib/strtoumax.c.
  2700. Add support for signed numbers, too.
  2701. (strtoul, strtoull): Do not declare if STRTOUXMAX_UNSIGNED
  2702. is not defined.
  2703. (strtol, strtoll): Declare as needed, if STRTOUXMAX_UNSIGNED is
  2704. not defined.
  2705. (strtoumax, uintmax_t, strtoull, strtoul): New macros.
  2706. (main): Use generic names in debugging output.
  2707. * lib/strtoimax.c: Plus add the following changes of my own:
  2708. (main): Use accurate names in debugging output.
  2709. * lib/xgetcwd.c (xgetcwd): Use getcwd if glibc 2 or later.
  2710. Don't use PATH_MAX.
  2711. * m4/c-bs-a.m4, m4/check-decl.m4, m4/d-ino.m4, m4/error.m4,
  2712. m4/getline.m4, m4/jm-mktime.m4, m4/malloc.m4, m4/mbrtowc.m4,
  2713. m4/mbstate_t.m4, m4/realloc.m4, m4/uintmax_t.m4, m4/utimbuf.m4,
  2714. m4/utime.m4, m4/utimes.m4:
  2715. Quote the first argument in each use of AC_DEFUN.
  2716. * m4/getline.m4: Don't use string.h.
  2717. * m4/inttypes.m4, m4/longlong.m4, m4/xstrtoimax.m4: New files.
  2718. * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): @%:@ -> #.
  2719. 2001-08-27 Paul Eggert <eggert@twinsun.com>
  2720. * NEWS, configure.ac (AC_INIT_AUTOMAKE): Version 1.13.20.
  2721. The biggest change is the new --exclude semantics and options.
  2722. The basic idea was suggested by Gerhard Poul; thanks!
  2723. * NEWS: Describe new --exclude semantics and options, and bug fixes.
  2724. * README: ignfail.sh fails on some NFS hosts.
  2725. * NEWS, README, lib/xstrtol.h: Add copyright notice.
  2726. * Makefile.am (ACLOCAL_AMFLAGS): Add -I m4.
  2727. (M4DIR, ACINCLUDE_INPUTS, $(srcdir)/acinclude.m4):
  2728. Remove; the automake bug has been fixed.
  2729. * acinclude.m4: Remove.
  2730. * configure.ac: Renamed from configure.in.
  2731. (AC_PREREQ): Bump from 2.13 to 2.52.
  2732. (ALL_LINGUAS): Add id, tr. Remove ko, as po/ko.po (dated
  2733. 1997-05-30) has an encoding error.
  2734. (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf.
  2735. (AC_FUNC_FNMATCH): Use AC_CONFIG_LINKS, not AC_LINK_FILES.
  2736. * doc/fdl.texi: Update to current GNU version.
  2737. * doc/tar.texi: Put leading '*' in direntry.
  2738. Accommodate new gfdl sectioning.
  2739. New option --recursion (the default) that is the inverse of
  2740. --no-recursion.
  2741. New options --anchored, --ignore-case, --wildcards,
  2742. --wildcards-match-slash, and their negations (e.g., --no-anchored).
  2743. Along with --recursion and --no-recursion, these control how exclude
  2744. patterns are interpreted. The default interpretation of exclude
  2745. patterns is now --no-anchored --no-ignore-case --recursion
  2746. --wildcards --wildcards-match-slash.
  2747. * lib/Makefile.am (OMIT_DEPENDENCIES): Remove.
  2748. * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
  2749. (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
  2750. (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
  2751. Include if available.
  2752. (<xalloc.h>): Include
  2753. (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
  2754. (verify): New macro. Use it to verify that EXCLUDE macros do not
  2755. collide with FNM macros.
  2756. (struct patopts): New struct.
  2757. (struct exclude): Use it, as exclude patterns now come with options.
  2758. (new_exclude): Support above changes.
  2759. (new_exclude, add_exclude_file):
  2760. Initial size must now be a power of two to simplify overflow checking.
  2761. (free_exclude, fnmatch_no_wildcards): New function.
  2762. (excluded_filename): No longer requires options arg, as the options
  2763. are determined by add_exclude. Now returns bool, not int.
  2764. (excluded_filename, add_exclude):
  2765. Add support for the fancy new exclusion options.
  2766. (add_exclude, add_exclude_file): Now takes int options arg.
  2767. Check for arithmetic overflow when computing sizes.
  2768. (add_exclude_file): xrealloc might modify errno, so don't
  2769. realloc until after errno might be used.
  2770. * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
  2771. New macros.
  2772. (free_exclude): New decl.
  2773. (add_exclude, add_exclude_file): Now takes int options arg.
  2774. (excluded_filename): No longer requires options arg, as the options
  2775. are determined by add_exclude. Now returns bool, not int.
  2776. * lib/prepargs.c: Include <string.h>; required for C99 since
  2777. we use strlen.
  2778. * lib/quotearg.c:
  2779. BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
  2780. * lib/xstrtol.h (_DECLARE_XSTRTOL): Improve quality of
  2781. diagnostic for LONGINT_INVALID_SUFFIX_CHAR.
  2782. * m4/Makefile.am (EXTRA_DIST): Add check-decl.m4, mbrtowc.m4.
  2783. Remove inttypes_h.m4, largefile.m4, mktime.m4.
  2784. * m4/inttypes_h.m4, m4/largefile.m4, m4/mktime.m4: Remove;
  2785. subsumed by Autoconf 2.50.
  2786. * m4/error.m4: Upgrade to serial 2.
  2787. * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Upgrade to serial 4, but
  2788. remove test for GNU C library. It's not correct, as some
  2789. older glibcs are buggy.
  2790. * m4/getline.m4, m4/malloc.m4: Upgrade to serial 4.
  2791. * m4/prereq.m4: Upgrade to serial 20, but then:
  2792. (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
  2793. (jm_PREREQ_EXCLUDE): New macro.
  2794. (jm_PREREQ_HUMAN): Remove jm_AC_HEADER_INTTYPES_H, as it is subsumed
  2795. by autoconf 2.5x.
  2796. * m4/realloc.m4: Upgrade to serial 4.
  2797. * m4/strerror_r.m4: Revert to serial 1002.
  2798. * m4/uintmax_t.m4: Upgrade to autoconf 2.5x.
  2799. * m4/utimes.m4: Upgrade to latest version (still "serial 3").
  2800. * m4/xstrtoumax.m4: Upgrade to serial 3, but then:
  2801. (jm_AC_PREREQ_XSTRTOUMAX): Remove jm_AC_HEADER_INTTYPES_H, as
  2802. it is now subsumed by autoconf. Add inttypes.h.
  2803. * po/cs.po, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
  2804. po/it.po, po/pl.po, po/sl.po, po/sv.po: Sync with translation project.
  2805. * src/buffer.c (new_volume): Stop if the script exits with an error.
  2806. * src/common.h (excluded_with_slash, excluded_without_slash):
  2807. Remove, replacing by:
  2808. (excluded): New decl.
  2809. (link_error): New decl.
  2810. (excluded_name): Now returns bool.
  2811. * src/extract.c:
  2812. (struct delayed_symlinks, extract_archive, apply_delayed_symlinks):
  2813. Support hard links to symbolic links.
  2814. (struct delayed_symlink): Remove 'names' member, replacing it with
  2815. 'sources' and 'target' member. All uses changed.
  2816. (struct string_list): New type.
  2817. (delayed_set_stat, extract_archive): Use offsetof when computing sizes
  2818. for struct hack; this avoids wasted space in some cases.
  2819. (extract_archive): Fix test for absolute pathnames and/or "..".
  2820. Use link_error to report errors for links.
  2821. Remove redundant trailing '/' at "really_dir", for all uses, not
  2822. just before invoking mkdir.
  2823. If overwriting old files, do not worry so much about existing
  2824. directories.
  2825. Fix mode computation in the case where the directory exists.
  2826. (apply_delayed_symlinks): If we can't make a hard link to a symbolic
  2827. link, make a copy of the symbolic link.
  2828. * src/incremen.c (get_directory_contents):
  2829. If ignore_failed_read_option, only warn about
  2830. stat failures.
  2831. * src/list.c (from_header): Do not issue a diagnostic if TYPE is zero.
  2832. However, check for error even for '-' or '+' case.
  2833. (print_header): Try parsing uids and gids as unsigned integers first,
  2834. and as a uid_t or gid_t only if that fails. This adds support for
  2835. listing positive uids and gids that are greater than UID_MAX and
  2836. GID_MAX.
  2837. * src/misc.c (link_error): New function.
  2838. * src/names.c (collect_and_sort_names):
  2839. If ignore_failed_read_option, only warn about
  2840. stat errors.
  2841. (excluded_name): Now returns bool. Simplify, as the fancy
  2842. features are now all in excluded_filename.
  2843. * src/rtapelib.c (base_name): Remove decl, as system.h now
  2844. declares it.
  2845. * src/system.h: Include stddef.h if available.
  2846. (offsetof): Declare if stddef.h doesn't.
  2847. Include <dirname.h>.
  2848. (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now defined by dirname.h.
  2849. * src/tar.c (ANCHORED_OPTION, IGNORE_CASE_OPTION,
  2850. NO_ANCHORED_OPTION, NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION,
  2851. NO_WILDCARDS_MATCH_SLASH_OPTION, WILDCARDS_OPTION,
  2852. WILDCARDS_MATCH_SLASH_OPTION):
  2853. New enum values.
  2854. (long_options, usage, decode_options): Add support for --anchored,
  2855. --ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
  2856. --no-wildcards-match-slash, --recursion, --wildcards,
  2857. --wildcards-match-slash.
  2858. (decode_options): Implement the new way of interpreting exclude
  2859. patterns.
  2860. (usage): --newer-mtime takes a DATE operand. DATE may be a file name.
  2861. (OPTION_STRING, decode_options): Add -I, -y. Currently these options
  2862. just print error messages suggesting alternatives.
  2863. (add_filtered_exclude): Remove.
  2864. * tests/Makefile.am (TESTS): Alphabetize, except put version.sh first.
  2865. * tests/extrac04.sh (out): Remove
  2866. directory/subdirectory/file1, as the new semantics for
  2867. --exclude exclude it.
  2868. * tests/genfile.c (main): Don't use non-ASCII char in msgid.
  2869. 2001-08-12 Paul Eggert <eggert@twinsun.com>
  2870. * lib/addext.c (<errno.h>): Include.
  2871. (errno): Declare if not defined.
  2872. (addext): Work correctly on the Hurd, where pathconf returns -1 and
  2873. leaves errno alone, because there is no limit. Also, work even if
  2874. size_t is narrower than long.
  2875. 2001-07-08 Paul Eggert <eggert@twinsun.com>
  2876. * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
  2877. 2001-05-10 Paul Eggert <eggert@twinsun.com>
  2878. * lib/addext.c (ISSLASH, base_name): Remove decls; now in dirname.h.
  2879. Include <backupfile.h> and <dirname.h> after size_t is defined.
  2880. (addext): Use base_len to trim redundant trailing slashes instead of
  2881. doing it ourselves.
  2882. * lib/backupfile.c (ISSLASH, base_name):
  2883. Remove decls; now in dirname.h.
  2884. Include <argmatch.h>, <backupfile.h>, <dirname.h> after size_t
  2885. is defined.
  2886. (find_backup_file_name): Rename locals to avoid new functions.
  2887. Use base_len instead of rolling it ourselves.
  2888. Work even if dirlen is 0.
  2889. Use a dir of '.' if given the empty string.
  2890. * lib/basename.c:
  2891. Do not include <stdio.h>, <assert.h>; no longer needed.
  2892. (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Remove; now in dirname.h.
  2893. Include <string.h>, <dirname.h>.
  2894. (base_name): Allow file names ending in slashes, other than names
  2895. that are all slashes. In this case, return the basename followed
  2896. by the slashes.
  2897. * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
  2898. (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove; now in dirname.h.
  2899. (dir_len): Renamed from dirlen.
  2900. All callers changed.
  2901. * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
  2902. New macros.
  2903. (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
  2904. 2001-02-16 Paul Eggert <eggert@twinsun.com>
  2905. * lib/quotearg.c (mbrtowc, mbrtowc, mbsinit):
  2906. Do not declare or define if HAVE_MBRTOWC,
  2907. since the test for HAVE_MBRTOWC now requires proper declarations.
  2908. * lib/alloca.c (malloc): Undef before defining.
  2909. 2001-02-13 Paul Eggert <eggert@twinsun.com>
  2910. * src/compare.c (read_and_process): Use off_t for size.
  2911. From Maciej W. Rozycki.
  2912. 2001-01-26 Paul Eggert <eggert@twinsun.com>
  2913. * lib/quotearg.c: Include stddef.h. From Jim Meyering.
  2914. 2001-01-12 Paul Eggert <eggert@twinsun.com>
  2915. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.19.
  2916. * lib/savedir.h (savedir): Remove size arg.
  2917. * doc/tar.texi: Add @setchapternewpage odd.
  2918. Remove -I as an alias for -T, for now.
  2919. Add @dircategory.
  2920. Update copyright. Remove "Published by".
  2921. Dates beginning with / or . are taken to be file names.
  2922. * src/tar.c (<time.h>): Do not include;
  2923. (time): Do not declare.
  2924. (usage): Remove -I as an alias for -T.
  2925. (OPTION_STRING): Remove -I.
  2926. (decode_options): Dates that look like an absolute path name,
  2927. or that start with '.', are presumed to be file names whose
  2928. dates are taken.
  2929. Remove 'I' as an aliase for 'T'.
  2930. Update copyright.
  2931. * src/extract.c (<time.h>): Do not include; system.h now does this.
  2932. (make_directories): Skip filesystem prefixes.
  2933. Don't assume '/' is the only separator.
  2934. (extract_sparse_file): Use new full_write semantics.
  2935. On write error, return instead of invoking skip_file.
  2936. Do not free sparsearray; caller does this now.
  2937. (apply_nonancestor_delayed_set_stat): Do not assume '/' is the only
  2938. separator.
  2939. (extract_archive): Don't assume file name lengths fit in int.
  2940. Report what got stripped from member name; it might be more than '/'.
  2941. Use new full_write semantics.
  2942. Do not pass redundant trailing "/" to mkdir, as POSIX does not allow
  2943. mkdir to ignore it.
  2944. Do not report mkdir error if old_files_option == KEEP_OLD_FILES.
  2945. * src/buffer.c (<time.h>): Do not include; system.h now does this.
  2946. (time): Remove decl; likewise.
  2947. (child_open_for_uncompress): Use new full_write semantics.
  2948. (flush_write): Use ISSLASH instead of testing for '/'.
  2949. (flush_read): Likewise.
  2950. * src/rmt.h (_remdev): Look for / anywhere in Path.
  2951. * src/misc.c (contains_dot_dot): Skip filesystem prefix.
  2952. Don't assume '/' is the only separator.
  2953. (safer_rmdir): Don't assume '/' is the only separator.
  2954. * src/compare.c (diff_archive): Don't assume '/' is the only separator.
  2955. * lib/dirname.h (dirlen): New decl.
  2956. * src/incremen.c (get_directory_contents):
  2957. Remove path_size arg; all callers changed.
  2958. Don't assume '/' is the only directory separator.
  2959. (gnu_restore): Work even if file name length doesn't fit in int.
  2960. * lib/addext.c (ISSLASH): New macro.
  2961. (addext): Trim any redundant trailing slashes.
  2962. * src/names.c (name_next):
  2963. Don't assume '/' is the only directory separator.
  2964. (namelist_match): Likewise.
  2965. (add_hierarchy_to_namelist): Remove dirsize arg.
  2966. Do not assume '/' is the only directory separator.
  2967. (new_name): Likewise.
  2968. * lib/Makefile.am (noinst_HEADERS): Add dirname.h, full-write.h.
  2969. (libtar_a_SOURCES): Add dirname.c.
  2970. * src/create.c (relativize):
  2971. New function, with much of old start_header's guts.
  2972. Handle filesystem prefixes.
  2973. (start_header): Use this new function.
  2974. (init_sparsearray): Don't bother to zero out the new array;
  2975. it's not needed.
  2976. (deal_with_sparse): Fix array allocation bug.
  2977. (create_archive): Don't assume '/' is the only separator.
  2978. (dump_file): Likewise.
  2979. Don't worry about leading / in symlink targets.
  2980. * lib/savedir.c (savedir):
  2981. Remove size arg; it wasn't portable. All callers changed.
  2982. * lib/utime.c (utime_null): Adjust to new full_write convention.
  2983. * configure.in (YACC): Avoid portability problem with Ultrix sh.
  2984. * lib/backupfile.c: Include <dirname.h>.
  2985. (ISSLASH): New macro.
  2986. (find_backup_file_name): Use dirlen to calculate directory lengths.
  2987. (max_backup_version): Strip redundant trailing slashes.
  2988. * src/common.h: Include <full-write.h>.
  2989. (get_directory_contents): No longer has size arg.
  2990. (gnu_restore): Arg is size_t, not int.
  2991. * src/system.h: Include <time.h>.
  2992. (time): Declare if not defined.
  2993. * lib/full-write.c: Include full-write.h, not safe-read.h.
  2994. full_write returns size_t, with short writes meaning failure.
  2995. All callers changed.
  2996. * src/rtapelib.c: Include full-write.h.
  2997. * src/rmt.c: Include full-write.h.
  2998. (main): Update copyright.
  2999. * doc/getdate.texi: Mention that only English is supported.
  3000. Show how to use "date" so that the output is acceptable to getdate.
  3001. Mention Z as an abbreviation for UTC.
  3002. * lib/full-write.h: New file.
  3003. * src/list.c: system.h now does time.h stuff.
  3004. * lib/dirname.c:
  3005. Use HAVE_STDLIB_H, not STDC_HEADERS, to decide whether to include
  3006. stdlib.h.
  3007. Do not include string.h, strings.h, or assert.h; no longer needed.
  3008. (strrchr, memrchr, malloc): Remove decls; no longer needed.
  3009. Include <xalloc.h>.
  3010. (base_name): New decl.
  3011. (BACKSLASH_IS_PATH_SEPARATOR): Remove.
  3012. (dir_name_r): Remove.
  3013. (dirlen): New function.
  3014. (dir_name): Use dirlen instead of dir_name_r.
  3015. (<string.h>, <strings.h>): Include only if test program.
  3016. (main): Use "return 0", not "exit (0)".
  3017. 2000-12-08 Paul Eggert <eggert@twinsun.com>
  3018. * lib/dirname.h: New file.
  3019. 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
  3020. * lib/fnmatch.c: Do not comment out all the code if we are using
  3021. the GNU C library, because in some cases we are replacing buggy
  3022. code in the GNU C library itself.
  3023. 2000-10-30 Paul Eggert <eggert@twinsun.com>
  3024. * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
  3025. 2000-10-29 Paul Eggert <eggert@twinsun.com>
  3026. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.18.
  3027. * src/tar.c: Include <fnmatch.h>, for FNM_LEADING_DIR.
  3028. 2000-10-28 Paul Eggert <eggert@twinsun.com>
  3029. * doc/tar.texi: --no-recursion now applies to extraction, too.
  3030. * src/create.c (dump_file): no_recurse_option -> ! recursion_option
  3031. * src/names.c (namelist_match, excluded_name):
  3032. Do not match subfiles of a directory
  3033. if --no-recursion is specified.
  3034. * src/tar.c (NO_RECURSE_OPTION): Remove.
  3035. (long_options): Have getopt set the --no-recursion flag.
  3036. (decode_options): Initialize recursion_option to FNM_LEADING_DIR.
  3037. Remove case for NO_RECURSE_OPTION.
  3038. * src/common.h (recursion_option):
  3039. Renamed from no_recurse_option, with sense
  3040. negated, and with FNM_LEADING_DIR being the nonzero value.
  3041. * names.c (namelist_match): New function.
  3042. (name_match, name_scan): Use it to eliminate duplicate code.
  3043. (names_notfound): Remove special case for Amiga.
  3044. 2000-10-27 Paul Eggert <eggert@twinsun.com>
  3045. * src/misc.c (read_error_details, read_warn_details,
  3046. read_fatal_details): Don't assume size_t is unsigned long.
  3047. * src/buffer.c (flush_read): If read_full_records_option, try to
  3048. fill the input buffer, as --delete -f - needs this.
  3049. 2000-10-24 Paul Eggert <eggert@twinsun.com>
  3050. * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Port to autoconf 2.13.
  3051. * src/buffer.c (check_label_pattern):
  3052. Make sure header name is a string before
  3053. passing it to fnmatch.
  3054. (init_volume_number): Check for global_volno overflow.
  3055. (new_volume): Check for global_volno overflow.
  3056. * src/tar.c (decode_options):
  3057. Check that volume label is not too long to overflow
  3058. name in tar header block.
  3059. * Makefile.am (EXTRA_DIST): Remove rebox.el.
  3060. * configure.in (HAVE_DECL_STRERROR_R): Remove our handwritten code.
  3061. (AC_FUNC_STRERROR_R): Use this instead.
  3062. 2000-10-23 Paul Eggert <eggert@twinsun.com>
  3063. * src/extract.c: Include <time.h>, since we invoke "time".
  3064. * lib/prepargs.c (prepend_default_options):
  3065. Don't use NULL, for portability.
  3066. * m4/fnmatch.m4: Add "working" to message.
  3067. * src/names.c: (_GNU_SOURCE): Remove; autoconf now does this.
  3068. Include <hash.h>.
  3069. (getpwuid, getgrgid): Declare only if system headers don't.
  3070. (gid_to_gname): Don't invoke setgrent.
  3071. (namelist): Now static, not global.
  3072. (nametail): New var. All uses of namelast changed to use
  3073. nametail, with one extra level of indirection.
  3074. (name_gather): Use memcpy instead of strncpy + assignment of NUL.
  3075. (name_match): Set nametail too, when setting namelist to null.
  3076. (add_hierarchy_to_namelist): Change type of dir arg from char * to
  3077. struct name *, so that we don't have to look up the name again
  3078. here. Get change_dir from dir rather than as a separate arg. Add
  3079. dirsize arg, and pass it along to get_directory_contents. Remove
  3080. unnecessary check of directory type.
  3081. (new_name): Do not append a slash if PATH already ends in one.
  3082. (avoided_names, struct avoided_name): Remove.
  3083. (avoided_name_table): New var, replacing avoided_names.
  3084. (hash_avoided_name, compare_avoided_names): New function.
  3085. (add_avoided_name, is_avoided_name): Use hash table rather than
  3086. linked list.
  3087. * src/buffer.c (_GNU_SOURCE): Remove; autoconf now does this.
  3088. (child_open_for_compress, child_open_for_uncompress,
  3089. close_archive): Propagate any failure of the compression process
  3090. back to "tar".
  3091. (open_archive, flush_write, flush_read, close_archive): Do not
  3092. allocate an array of size PATH_MAX, as PATH_MAX might be (size_t)
  3093. -1. Instead, allocate an array with the size that's needed.
  3094. (open_archive): Don't bother checking S_ISCHR of /dev/null.
  3095. (backspace_output): Don't try to backspace past start of archive.
  3096. (close_archive): Remove special case for DELETE_SUBCOMMAND.
  3097. * acconfig.h (_GNU_SOURCE, DEFAULT_ARCHIVE, DEFAULT_BLOCKING,
  3098. DENSITY_LETTER, DEVICE_PREFIX, EMUL_OPEN3, HAVE_GETGRGID,
  3099. HAVE_GETPWUID, HAVE_MKNOD, HAVE_RTAPELIB, HAVE_ST_FSTYPE_STRING,
  3100. HAVE_UNION_WAIT, HAVE_UTIME_H, HAVE_VALLOC, MTIO_CHECK_FIELD, PACKAGE,
  3101. PROTOTYPES, REMOTE_SHELL, STD_INC_PATH, VERSION, WITH_CATALOGS,
  3102. WITH_DMALLOC, WITH_REGEX):
  3103. Remove; now generated automatically.
  3104. * configure.in (_GNU_SOURCE): Define to empty, not 1, for
  3105. compatibility for glibc fragments.
  3106. (_GNU_SOURCE, HAVE_UTIME_H, MTIO_CHECK_FIELD,
  3107. HAVE_ST_FSTYPE_STRING, HAVE_MKNOD, REMOTE_SHELL, DENSITY_LETTER,
  3108. DEVICE_PREFIX, DEFAULT_ARCHIVE, DEFAULT_BLOCKING): Add comment so
  3109. that we needn't put an entry into acconfig.h.
  3110. (ALL_LINGUAS): Add da.
  3111. (AC_C_BACKSLASH_A): Remove; jm_PREREQ_QUOTEARG now does this.
  3112. (AC_CHECK_HEADERS): Add stdbool.h (for hash.h users), wctype.h
  3113. (for strtol.c).
  3114. (AC_MBSTATE_T): Add.
  3115. (RMT): Append $(EXEEXT).
  3116. (HAVE_GETGRGID, HAVE_GETPWUID, pe_AC_TYPE_SIGNED_CHAR): Remove.
  3117. (HAVE_DECL_FREE, HAVE_DECL_GETGRGID, HAVE_DECL_GETPWUID,
  3118. HAVE_DECL_GETENV, HAVE_DECL_MALLOC, HAVE_DECL_STRTOUL,
  3119. HAVE_DECL_STRTOULL, HAVE_DECL_STRERROR_R): New macros.
  3120. (jm_PREREQ_ADDEXT, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG): Add.
  3121. (AC_REPLACE_FUNCS): Remove execlp; no longer needed.
  3122. (AC_CHECK_FUNCS): Add clock_gettime; AC_SEARCH_LIBS wasn't enough.
  3123. Remove mbrtowc; jm_PREREQ_QUOTEARG now does this.
  3124. (EMUL_OPEN3): Remove; no longer needed.
  3125. (DENSITY_LETTER, DEVICE_PREFIX): Simplify m4 quoting.
  3126. * m4/fnmatch.m4 (AC_FUNC_FNMATCH): Detect d*/*1 vs d/s/1 bug.
  3127. * src/common.h: Do not include basename.h.
  3128. * src/rtapelib.c (base_name): Do not include basename.h;
  3129. declare base_name instead.
  3130. * lib/basename.h, lib/execlp.c, lib/getpagesize.h, lib/mkdir.c:
  3131. Remove these files.
  3132. * lib/getstr.c, lib/getstr.h, lib/hash.h, lib/hash.h, lib/prepargs.c,
  3133. lib/prepargs.h, lib/savedir.c, lib/savedir.h: New files.
  3134. * lib/Makefile.am (EXTRA_DIST, noinst_HEADERS, libtar_a_SOURCES):
  3135. Adjust to the above changes.
  3136. * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove ../src/ansi2knr.
  3137. * src/open3.c: Remove.
  3138. * src/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
  3139. (tar_SOURCES): Remove open3.c.
  3140. (INCLUDES): Remove -I.., as automake does that.
  3141. (OMIT_DEPENDENCIES): ../lib/fnmatch.h -> fnmatch.h. Add localedir.h.
  3142. The following changes are to put LOCALEDIR into localedir.h instead
  3143. of passing it on the command line.
  3144. (DEFS): Remove.
  3145. (DISTCLEANFILES): New macro.
  3146. (localedir.h): New rule.
  3147. (rmt.o tar.o): Now depend on localedir.h.
  3148. * tests/delete02.sh, tests/extrac04.sh: New files.
  3149. * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove ansi2knr.
  3150. (TESTS): Add extrac04.sh, and restore delete02.sh.
  3151. (DEFS): Remove; LOCALEDIR is now done via localedir.h.
  3152. (INCLUDES): Remove -I.. as automake does this now.
  3153. * src/rtapelib.c (rexec): Don't declare unless using it.
  3154. (do_command): Simplify signal-handling code slightly.
  3155. * src/delete.c (blocks_needed): Remove. All uses changed to use
  3156. blocking_factor - new_blocks.
  3157. (acting_as_filter): New var.
  3158. (write_record, delete_archive_members): Use acting_as_filter
  3159. rather than archive == STDIN_FILENO to detect whether we're acting
  3160. as a filter, as open can return STDIN_FILENO in some cases.
  3161. (delete_archive_members): Ignore zero blocks if
  3162. ignore_zeros_option is nonzero. Fix bug that messed up last
  3163. output block: write_eot can't be used here, as it gets confused
  3164. when the input is at end of file.
  3165. * src/compare.c (diff_archive): Do not impose an arbitrary limit on
  3166. symbolic link contents length. Pass directory size to
  3167. get_directory_contents.
  3168. * m4/decl.m4, m4/error.m4, m4/mbstate_t.m4, m4/prereq.m4,
  3169. m4/strerror_r.m4: New files.
  3170. * m4/signedchar.m4: Remove this file.
  3171. * Makefile.am (ACINCLUDE_INPUTS): Adjust to above changes.
  3172. * m4/Makefile.am (EXTRA_DIST): Likewise.
  3173. * Makefile.am (DISTCLEANFILES): Add intl/libintl.h.
  3174. * po/da.po: New translation file.
  3175. * src/mangle.c (extract_mangle):
  3176. Fix diagnostic with wrong number of %s'es.
  3177. * lib/fnmatch.c (fnmatch):
  3178. Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
  3179. e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
  3180. * lib/full-write.c (full_write): Some buggy drivers return 0 when you
  3181. fall off a device's end. Detect this.
  3182. * src/system.h (IN_CTYPE_DOMAIN): Renamed from CTYPE_DOMAIN. All
  3183. uses changed.
  3184. (open): Remove macro; we no longer support EMUL_OPEN3. Do not
  3185. include <pathmax.h> and directory include files like <dirent.h>;
  3186. no longer used. Include <savedir.h> instead.
  3187. (closedir, signed_char): remove macro; no longer used.
  3188. (bool, false, true): Include <stdbool.h> if you have the include
  3189. file, otherwise define.
  3190. * src/misc.c:
  3191. (is_dot_or_dotdot, closedir_error, closedir_warn, opendir_error,
  3192. opendir_warn, readdir_error): Remove; no longer needed.
  3193. (safer_rmdir): Strip leading ./ (or .// or ./// or ././ or etc.)
  3194. before deciding whether we're trying to remove ".".
  3195. (remove_any_file): Try unlink first if we are not root. Use
  3196. savedir when recursively removing directories, to avoid exhausting
  3197. file descriptors.
  3198. (savedir_error, savedir_warn, symlink_error): New functions.
  3199. * src/list.c: (read_and): Do not invoke
  3200. apply_nonancestor_delayed_set_stat; DO_SOMETHING is now
  3201. responsible for that. Do not invoke apply_delayed_set_stat; our
  3202. caller is now responsible for that.
  3203. (read_header): Use signed char instead of signed_char. Prevent
  3204. later references to current_header from mistakenly treating it as
  3205. an old GNU header.
  3206. (from_header): Quote invalid base-64 strings in diagnostics.
  3207. (time_from_header): Do not warn about future timestamps in
  3208. archive; check_time now does that.
  3209. (print_header): Quote unknown file types.
  3210. (skip_member): New function, replacing skip_extended_headers and
  3211. now skipping the whole member instead of just the extended
  3212. headers. All callers changed. This makes the code handle
  3213. extended headers uniformly, and fixes some bugs.
  3214. * src/update.c (update_archive): Use skip_member.
  3215. * src/extract.c (we_are_root): Now global.
  3216. (struct delayed_symlink): New type.
  3217. (delayed_symlink_head): New var.
  3218. (extr_init, fatal_exit): Invoke extract_finish on fatal errors,
  3219. not apply_delayed_set_stat.
  3220. (set_mode, set_stat): Pointer args are now const pointers.
  3221. (check_time): New function.
  3222. (set_stat): Warn if setting a file's timestamp to be the future.
  3223. (make_directories): Do not save and restore errno.
  3224. (maybe_recoverable): Set errno to ENOENT if we cannot make missing
  3225. intermediate directories.
  3226. (extract_archive): Invoke apply_nonancestor_delayed_set_stat here,
  3227. not in caller. Extract potentially dangerous symbolic links more
  3228. carefully, deferring their creation until the end, and using a
  3229. regular file placeholder in the meantime. Do not remove trailing
  3230. / and /. from file names. Do not bother checking for ".." when
  3231. checking whether a directory loops back on itself, as loopbacks
  3232. can occur with symlinks too. Also, in that case, do not bother
  3233. saving and restoring errno; just set it to EEXIST.
  3234. (apply_nonancestor_delayed_set_stat): A prefix is a potential
  3235. ancestor if it ends in slash too (as well as ending in a char just
  3236. before slash).
  3237. (apply_delayed_set_stat): Remove.
  3238. (apply_delayed_symlinks, extract_finish): New functions.
  3239. * doc/fdl.texi: New file.
  3240. * doc/Makefile.am (EXTRA_DIST): Add fdl.texi.
  3241. ($(srcdir)/tar.info): Add fdl.texi. Invoke makeinfo with --no-split.
  3242. * doc/tar.texi: Add Free Documentation License. New section
  3243. "Overwrite Old Files", and revamp that section to make it easier to
  3244. follow. "tar" -> "GNU tar" where appropriate. Migrate getdate
  3245. documentation into getdate.texi. Fix several minor typos. Describe
  3246. TAR_OPTIONS. Describe incompatibility between incremental backups and
  3247. --atime-preserve. Describe incompatibility between --verify and other
  3248. options. Mention that tar normally removes symbolic links rather than
  3249. following them, when extracting a file of the same name.
  3250. * THANKS: Add gpoul. Change skip's address.
  3251. * po/POTFILES.in: Add lib/human.c.
  3252. * src/common.h (namelist, namelast): Remove decls.
  3253. (we_are_root, extract_finish, skip_member, savedir_error,
  3254. savedir_warn, symlink_error, gnu_list_name): New decls.
  3255. (apply_delayed_set_stat, apply_nonancestor_delayed_set_stat,
  3256. skip_extended_headers, is_dot_or_dotdot, closedir_error,
  3257. closedir_warn, opendir_error, opendir_warn, readdir_error,
  3258. readdir_warn): Remove decls.
  3259. (get_directory_contents): New off_t arg.
  3260. (addname): Now returns struct name *.
  3261. * src/tar.h, tests/genfile.c: Fix comments.
  3262. * src/create.c: Include hash.h.
  3263. (gnu_list_name): Remove decl.
  3264. (struct link): Remove "next" member.
  3265. (linklist): Remove.
  3266. (start_header): Say "leading `FOO'" rather than "`FOO' prefix" for
  3267. consistency with other diagnostics.
  3268. (deal_with_sparse): Check for I/O error when closing the file.
  3269. (create_archive): Do not allocate an array of size PATH_MAX, as
  3270. PATH_MAX might be (size_t) -1. Instead, allocate an array with
  3271. the size that's needed.
  3272. (hash_link, compare_links): New functions.
  3273. (dump_file): Do not exhaust open file descriptors when descending
  3274. deeply into a directory, by using savedir rather than
  3275. opendir/readdir. Do not zero-fill the name buffer unnecessarily.
  3276. Hash the set of links already created, instead of using a linked
  3277. list. Fix some bugs in outputting sparse files which caused the
  3278. sparse tables to be incorrect. When a file unexpectedly shrinks,
  3279. output zeros rather than garbage. Do not allocate an array of
  3280. size PATH_MAX, as PATH_MAX might be (size_t) -1. Instead,
  3281. allocate an array with the size that's needed.
  3282. * src/incremen.c: Include hash.h.
  3283. (struct directory): Remove "next", "dir_text". Change "name" to
  3284. be char[1] with struct hack, not const char *. Add "found".
  3285. (directory_list): Remove. Replaced by directory_table.
  3286. (directory_table): New var.
  3287. (nfs_string): Renamed from nfs.
  3288. (hash_directory, compare_directories): New functions.
  3289. (note_directory): Now returns struct directory *. First arg is
  3290. now const pointer. struct stat arg is now dev_t, ino_t, nfs.
  3291. Remove text arg. New "found" arg, basically corresponding to the
  3292. old text arg not being null. All callers changed.
  3293. (note_directory, find_directory): Use hash table rather than
  3294. linked list.
  3295. (get_directory_contents): New arg "device". Use savedir to do the
  3296. hard work. Save the nfs-ness of stat_data, since it might change
  3297. under us. Use note_directory instead of find_directory to save
  3298. some work. When adding an "A" record, do it with
  3299. add_to_accumulator instead of cheating with strcat.
  3300. (read_directory_file): Use "+" flag before device to indicate
  3301. whether it was NFS. Fix typo in checking for strtoul error.
  3302. (write_directory_file_entry): New function.
  3303. (write_directory_file): Use it, and use the hash routines to
  3304. traverse the directory table.
  3305. (gnu_restore): Use savedir rather than opendir/readdir.
  3306. * src/tar.c: Include localedir.h, prepargs.h.
  3307. (long_options): Now static.
  3308. (long_options, usage, decode_options): -j is now short for
  3309. --bzip2, and -I is now an alias for -T.
  3310. (decode_options, main): argv is not const pointer now.
  3311. (decode_options): Invoke prepend_default_options to support
  3312. TAR_OPTIONS. In diagnostic, mention the string that was the
  3313. invalid blocking factor, tape length, group, owner, or record
  3314. size. --delete is no longer incompatible with -f -, undoing
  3315. 2000-01-07 change.
  3316. (main): Invoke extract_finish at end of extraction.
  3317. * src/rmt.c: Include localedir.h.
  3318. (main): Update copyright date to 2000.
  3319. * doc/getdate.texi: New file, taken from fileutils 4.0.27, with the
  3320. following changes: Use @sc where appropriate. Document the ranges of
  3321. supported times more precisely. Add Eggert to getdate authors.
  3322. Document old Latin 12m/12pm tradition. Remove list of alphabetic time
  3323. zone names, as it wasn't correct and people shouldn't be relying on it
  3324. anyway. Relative items also account for non-DST adjustments. Fix
  3325. some misspellings.
  3326. * lib/prepargs.c, lib/prepargs.h, tests/extrac04.sh: New file.
  3327. * tests/ignfail.sh: opendir -> savedir in diagnostics.
  3328. * tests/preset.in: Set LANGUAGE to the empty string, for some
  3329. brain damaged host.
  3330. 2000-10-20 Paul Eggert <eggert@twinsun.com>
  3331. * m4/fnmatch.m4: Mention the GNU C library.
  3332. 2000-10-19 Paul Eggert <eggert@twinsun.com>
  3333. * m4/fnmatch.m4: Add a couple more test cases to catch bugs in
  3334. glibc 2.1.95.
  3335. 2000-10-17 Paul Eggert <eggert@twinsun.com>
  3336. * lib/human.c (<limits.h>): Do not include; human.h does it if needed.
  3337. (CHAR_BIT): Remove.
  3338. * lib/human.h (<limits.h>): Include if HAVE_LIMITS_H.
  3339. (CHAR_BIT): Define if not defined.
  3340. 2000-09-09 Paul Eggert <eggert@twinsun.com>
  3341. * lib/quotearg.c: From fileutils: rename ISASCII to IN_CTYPE_DOMAIN.
  3342. 2000-08-07 Paul Eggert <eggert@twinsun.com>
  3343. * lib/xmalloc.c: Memory exhausted -> memory exhausted
  3344. * lib/xalloc.h (xalloc_msg_memory_exhausted):
  3345. change to array from char *.
  3346. 2000-08-06 Paul Eggert <eggert@twinsun.com>
  3347. * m4/mbstate_t.m4: Define mbstate_t to be int, not char, for
  3348. compatibility with glibc 2.1.3 strftime.c.
  3349. 2000-07-31 Paul Eggert <eggert@twinsun.com>
  3350. * lib/quotearg.c (quotearg_n_options):
  3351. Don't make the initial slot vector a constant,
  3352. since it might get modified.
  3353. * lib/quotearg.c: Add support for more than one preallocated slot.
  3354. 2000-07-30 Paul Eggert <eggert@twinsun.com>
  3355. * lib/quotearg.c (quotearg_n_options):
  3356. Preallocate a slot 0 buffer, so that the caller
  3357. can always quote one small component of a "memory exhausted" message
  3358. in slot 0.
  3359. 2000-07-23 Paul Eggert <eggert@twinsun.com>
  3360. * lib/quotearg.c:
  3361. Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that
  3362. mbstate_t is always defined.
  3363. Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in
  3364. some GCC installations, and this configuration error is likely to be
  3365. common.
  3366. 2000-07-22 Paul Eggert <eggert@twinsun.com>
  3367. * lib/quotearg.c:
  3368. When the system forces us to redefine mbstate_t, shadow its mbsinit
  3369. function. From Bruno Haible.
  3370. 2000-07-14 Paul Eggert <eggert@twinsun.com>
  3371. * lib/xmalloc.c: Simplify exhausted message.
  3372. * lib/quotearg.h: Update copyright date; from Jim Meyering.
  3373. 2000-07-13 Paul Eggert <eggert@twinsun.com>
  3374. * lib/quotearg.h (enum quoting style):
  3375. New constant clocale_quoting_style.
  3376. * lib/quotearg.c:
  3377. (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled):
  3378. Add support for clocale_quoting_style, undoing previous change to
  3379. locale_quoting_style.
  3380. 2000-07-10 Paul Eggert <eggert@twinsun.com>
  3381. * lib/quotearg.c:
  3382. <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX,
  3383. since otherwise we don't need it.
  3384. (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
  3385. since we don't do multibytes in that case.
  3386. (quotearg_buffer_restyled): If a unibyte locale, don't bother to
  3387. invoke multibyte primitives.
  3388. * m4/mbstate_t.m4 (AC_MBSTATE_T):
  3389. Renamed from AC_MBSTATE_T_OBJECT. All uses changed.
  3390. Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
  3391. and mbstate_t, to a single-part test that simply defines mbstate_t.
  3392. * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
  3393. Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
  3394. to decide whether to define the BeOS workaround macro;
  3395. this adjusts to the change to AC_MBSTATE_T.
  3396. * m4/strerror_r.m4: New file.
  3397. 2000-07-05 Paul Eggert <eggert@twinsun.com>
  3398. * lib/quotearg.c: Use double-quote to quote.
  3399. * lib/quotearg.c (N_): New macro.
  3400. (gettext_default): New function.
  3401. (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}",
  3402. "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"")
  3403. for right quote.
  3404. * lib/quotearg.c (struct quoting_options):
  3405. Simplify quote_these_too dimension.
  3406. From Bruno Haible <haible@clisp.cons.org>.
  3407. * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT):
  3408. Test for mbstate_t only if the test
  3409. for an object-type mbstate_t fails.
  3410. * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
  3411. 2000-07-03 Paul Eggert <eggert@twinsun.com>
  3412. * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
  3413. Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
  3414. * lib/quotearg.c (mbrtowc):
  3415. Assign to *pwc, and return 1 only if result is nonzero.
  3416. (iswprint): Define to ISPRINT if we are substituting our own mbrtowc.
  3417. 2000-07-02 Paul Eggert <eggert@twinsun.com>
  3418. * lib/quotearg.c (mbstate_t):
  3419. Do not define; it should be defined with AC_CHECK_TYPE.
  3420. 2000-06-26 Paul Eggert <eggert@twinsun.com>
  3421. * m4/mbstate_t.m4: Include stdio.h before wchar.h, to work around
  3422. a bug in glibc 2.1.3.
  3423. * lib/xmalloc.c: Fix inaccurate comment for xrealloc.
  3424. 2000-06-19 Paul Eggert <eggert@twinsun.com>
  3425. * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
  3426. inclusion of wctype.h to work around solaris2.6 namespace pollution.
  3427. (ISPRINT): Likewise.
  3428. Reported by Tom Tromey.
  3429. 2000-06-15 Paul Eggert <eggert@twinsun.com>
  3430. * lib/human.c (adjust_value): New function.
  3431. (human_readable_inexact): Apply rounding style even when printing
  3432. approximate values.
  3433. * lib/human.c: Avoid shadowing warnings.
  3434. From Jim Meyering.
  3435. 2000-06-14 Paul Eggert <eggert@twinsun.com>
  3436. * lib/human.c (human_readable_inexact): Allow an input block size
  3437. that is not a multiple of the output block size, and vice versa.
  3438. * lib/getdate.y (get_date): Apply relative times after time zone
  3439. indicator, not before.
  3440. 2000-05-31 Paul Eggert <eggert@twinsun.com>
  3441. * m4/largefile.m4: Rewrite so that we don't need to run getconf,
  3442. and thus don't need AC_CANONICAL_HOST.
  3443. (AC_SYS_LARGEFILE_FLAGS, AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
  3444. (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
  3445. (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
  3446. CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY. All uses
  3447. changed. Instead of inspecting the output of getconf, try to
  3448. compile the test program without and with the macro definition.
  3449. (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check for
  3450. getconf. Instead, check for the needed flags by compiling test
  3451. programs.
  3452. * configure.in (AC_CANONICAL_HOST): Remove; the largefile stuff no
  3453. longer needs it.
  3454. * config.guess, config.sub: Remove these files, for similar reasons.
  3455. 2000-05-03 Paul Eggert <eggert@twinsun.com>
  3456. * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to be
  3457. 500, instead of _GNU_SOURCE to be 1, to work around glibc 2.1.3
  3458. bug. This avoids a clash when files like regex.c that define
  3459. _GNU_SOURCE.
  3460. 2000-05-02 Paul Eggert <eggert@twinsun.com>
  3461. * m4/largefile.m4 (AC_SYS_LARGEFILE):
  3462. Define _GNU_SOURCE if this is needed to make
  3463. ftello visible (e.g. glibc 2.1.3). Use compile-time test, rather than
  3464. inspecting host and OS, to decide whether to define _LARGEFILE_SOURCE.
  3465. * lib/quotearg.c (mbrtowc, mbstat_t):
  3466. Add definitions if !HAVE_MBSTATE_T_OBJECT.
  3467. (<wctype.h>): Include if HAVE_WCTYPE_H.
  3468. (iswprint): Define to 1 if we lack it
  3469. 2000-04-18 Paul Eggert <eggert@twinsun.com>
  3470. * m4/mbstate_t.m4: New file.
  3471. 2000-04-17 Bruno Haible <haible@clisp.cons.org>
  3472. * tests/ignfail.sh: Test for uid 0 along with user "root".
  3473. 2000-04-05 Paul Eggert <eggert@twinsun.com>
  3474. * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS):
  3475. Don't use -n32 on IRIX if the installer said
  3476. otherwise.
  3477. 2000-02-28 Paul Eggert <eggert@twinsun.com>
  3478. * lib/quotearg.c (ALERT_CHAR): New macro.
  3479. (quotearg_buffer_restyled): Use it.
  3480. 2000-02-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
  3481. * src/list.c (tartime): Fix off-by-one error when copying year if
  3482. OLD_CTIME.
  3483. 2000-02-18 Paul Eggert <eggert@twinsun.com>
  3484. * lib/getdate.y: Handle two-digit years with leading zeros correctly.
  3485. (textint): New typedef.
  3486. (parser_control): Changed from struct parser_control to typedef
  3487. (for consistency). Member year changed from int to textint. All
  3488. uses changed.
  3489. (YYSTYPE): Removed; replaced by %union with int and textint
  3490. members.
  3491. (tID): Removed; not used.
  3492. (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE,
  3493. tMERIDIAN, tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER,
  3494. tUNUMBER, tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
  3495. (tSNUMBER, tUNUMBER): Now of type <textintval>.
  3496. (date, number, to_year): Use width of number in digits, not its
  3497. value, to determine whether it's a 2-digit year, or a 2-digit
  3498. time.
  3499. (yylex): Store number of digits of numeric tokens. Return '?' for
  3500. unknown identifiers, rather than (unused) tID.
  3501. 2000-01-16 Paul Eggert <eggert@twinsun.com>
  3502. * lib/quotearg.c (quotearg_buffer_restyled):
  3503. Do not quote alert, backslash, formfeed,
  3504. and vertical tab unnecessarily in shell quoting style.
  3505. 2000-01-15 Paul Eggert <eggert@twinsun.com>
  3506. * m4/c-bs-a.m4:
  3507. Change quoting to be compatible with future autoconf versions.
  3508. 2000-01-11 Paul Eggert <eggert@twinsun.com>
  3509. * lib/exclude.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Remove unused macros.
  3510. 2000-01-07 Paul Eggert <eggert@twinsun.com>
  3511. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.17.
  3512. Fix bug with fnmatch.h dependency, as follows:
  3513. * src/Makefile.am (OMIT_DEPENDENCIES): New macro.
  3514. * lib/Makefile.am (OMIT_DEPENDENCIES): New macro.
  3515. * src/common.h (apply_nonancestor_delayed_set_stat):
  3516. Renamed from apply_delayed_set_stat.
  3517. (apply_delayed_set_stat, decode_mode, chmod_error_details,
  3518. chown_error_details, close_warn, closedir_warn, mkdir_error,
  3519. read_error_details, read_fatal_details, read_warn_details,
  3520. seek_error_details, seek_warn_details, utime_error,
  3521. write_error_details, write_fatal_details): New decls.
  3522. Make diagnostic messages more regular.
  3523. * src/create.c (dump_file): Quote file names with colons if possible.
  3524. * src/compare.c (diff_archive): Likewise.
  3525. * src/extract.c (repair_delayed_set_stat, extract_archive): Likewise.
  3526. * src/incremen.c (get_directory_contents, gnu_restore): Likewise.
  3527. * src/mangle.c (extract_mangle): Likewise.
  3528. * src/misc.c (call_arg_error, call_arg_fatal, call_arg_warn):
  3529. Likewise.
  3530. * src/buffer.c (archive_write_error, flush_archive, close_archive,
  3531. new_volume, xclose):
  3532. Use error message functions to report errors consistently.
  3533. * src/compare.c (diff_sparse_files, diff_archive): Likewise.
  3534. * src/create.c (finish_sparse_file, dump_file): Likewise.
  3535. * src/extract.c (set_mode, set_stat, extract_sparse_file,
  3536. extract_archive): Likewise.
  3537. * src/list.c (list_archive): Likewise.
  3538. * src/update.c (append_file): Likewise.
  3539. * src/compare.c (diff_init, diff_sparse_files):
  3540. Use xalloc_die to report memory exhaustion.
  3541. * src/incremen.c (gnu_restore): Likewise.
  3542. * src/list.c (read_header): Likewise.
  3543. * src/mangle.c (extract_mangle): Likewise.
  3544. * src/misc.c (maybe_backup_file): Likewise.
  3545. * src/tar.c (decode_options): Likewise.
  3546. * src/compare.c (read_and_process, fill_in_sparse_array,
  3547. diff_sparse_files):
  3548. Use consistent terminology for unexpected-EOF message.
  3549. * src/extract.c (extract_sparse_file, extract_archive): Likewise.
  3550. * src/list.c (list_archive, read_header, skip_file,
  3551. skip_extended_headers): Likewise.
  3552. * src/buffer.c (archive_write_error): Add noreturn attribute to decl.
  3553. (xdup2): Regularize messages with rest of tar.
  3554. * src/buffer.c (flush_read): Don't read past EOF.
  3555. * src/extract.c (extr_init):
  3556. If we run out of memory, invoke apply_delayed_set_stat.
  3557. (prepare_to_extract): Don't complain if we can't remove ".".
  3558. (apply_delayed_set_stat): New function.
  3559. (apply_nonancestor_delayed_set_stat):
  3560. Renamed from apply_delayed_set_stat. All uses changed.
  3561. Don't remove head if it doesn't apply.
  3562. * src/create.c (find_new_file_size):
  3563. Return size instead of storing through pointer.
  3564. All callers changed.
  3565. (deal_with_sparse): Don't keep reading after read errors.
  3566. (finish_sparse_file): Just abort if there is an internal error.
  3567. (dump_file): Fix typo: stat_warn and stat_error were interchanged.
  3568. Don't restore access times on directories during incremental dumps
  3569. until after dealing with the directory.
  3570. If ignoring failed reads, count closedir, read, and unknown
  3571. file errors as warnings, not errors.
  3572. Fix buffer overrun problem when dumping sparse files.
  3573. * src/list.c (read_and):
  3574. Invoke apply_nonancestor_delayed_set_stat on file names
  3575. after handling them.
  3576. (decode_mode): Remove; moved to misc.c.
  3577. * src/misc.c (safer_rmdir): New function.
  3578. (remove_any_file): Use it to avoid problems with rmdir(".").
  3579. (maybe_backup_file): Regularize diagnostics.
  3580. (undo_backup_file): Likewise.
  3581. (decode_mode): Moved here from list.c.
  3582. (chmod_error_details, chown_error_details, close_fatal,
  3583. close_warn, closedir_warn, mkdir_error, read_error_details,
  3584. read_warn_details, read_fatal_details, seek_error_details,
  3585. seek_warn_details, utime_error, write_error_details,
  3586. write_fatal_details): New functions.
  3587. * src/delete.c (save_record): Remove static variable (now local).
  3588. (move_archive): Don't position before start of archive.
  3589. (write_record): Abort if count is zero at inopportune time.
  3590. Plug memory leak.
  3591. * src/tar.c (decode_options): --delete and -f - are now
  3592. incompatible, since we didn't have time to fix their bugs.
  3593. * tests/Makefile.am (TESTS): Remove delete02.sh.
  3594. * tests/ignfail.sh: Adjust to new quoting scheme again.
  3595. 2000-01-06 Paul Eggert <eggert@twinsun.com>
  3596. * lib/getdate.y: Sync tm_diff with the GNU C Library.
  3597. (TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN. All uses changed.
  3598. (tm_diff): Renamed from difftm. All uses changed.
  3599. Replace body with that taken from GNU C Library 2.1.3pre1.
  3600. (get_date): Prefer tm_gmtoff to tm_diff if available.
  3601. 1999-12-29 "Melissa O'Neill" <oneill@cs.sfu.ca>
  3602. * tests/incremen.sh: Invoke stat on newly created file so that its
  3603. ctime is updated on Nextstep.
  3604. 1999-12-21 Machael Stone <mstone@cs.loyola.edu>
  3605. * lib/getdate.y (get_date):
  3606. Fix typo when checking for time_t overflow in time zone calculations.
  3607. 1999-12-13 Paul Eggert <eggert@twinsun.com>
  3608. * NEWS, configure.in (AC_INIT_AUTOMAKE): Version 1.13.16.
  3609. * README-alpha: New file.
  3610. * README: New sections for gzip and bzip2, Solaris.
  3611. Remove mention of BACKLOG.
  3612. * configure.in (AC_C_BACKSLASH_A): Add.
  3613. (AC_CHECK_HEADERS): Add wchar.h.
  3614. (AC_CHECK_FUNCS): Add mbrtowc.
  3615. (AC_FUNC_CLOSEDIR_VOID): Add.
  3616. * tests/Makefile.am (TESTS): Add delete02.sh.
  3617. (POSTPONED_TESTS): Remove.
  3618. (EXTRA_DIST): Remove $(POSTPONED_TESTS).
  3619. * tests/preset.in:
  3620. Set LC_ALL rather than LANGUAGE, LANG, and LC_MESSAGES.
  3621. * tests/ignfail.sh (err): Adjust to new quoting scheme.
  3622. * tests/delete02.sh: Fix typo: need to list archive2, not archive.
  3623. * tests/extrac03.sh: Use -P option, so that .. doesn't get diagnosed.
  3624. * src/tar.c ("quotearg.h"): New include.
  3625. (usage): Now has __attribute__ ((noreturn)).
  3626. (confirm): Report errno if we can't open tty.
  3627. (confirm, decode_options):
  3628. Quote arbitrary strings in diagnostics.
  3629. (OVERWRITE_OPTION): New constant.
  3630. (long_options, usage, decode_options): New --overwrite option.
  3631. (decode_options): --keep-old-files, --overwrite, and --unlink-first
  3632. are now mutually exclusive.
  3633. Don't assume that gettext preserves errno.
  3634. (main): Set default quoting style to escape_quoting_style.
  3635. * src/update.c (<quotearg.h>): New include.
  3636. (append_file):
  3637. Don't assume that gettext preserves errno.
  3638. Quote arbitrary strings in diagnostics.
  3639. Check for close error.
  3640. * src/names.c (<quotearg.h>): New include.
  3641. (name_init, name_next, name_close, names_notfound,
  3642. collect_and_sort_names): Don't assume that gettext preserves
  3643. errno. Quote arbitrary strings in diagnostics.
  3644. (excluded_name): Fix typo that caused empty patterns to be
  3645. mishandled.
  3646. * src/misc.c (<quotearg.h>): New include.
  3647. (quote_copy_string): Quote only newline and backslash; the output is no
  3648. longer meant for humans, and is locale-independent.
  3649. (contains_dot_dot): New function.
  3650. (remove_any_file): Don't use lstat; just rmdir the file and then use
  3651. unlink if the rmdir fails because the file isn't a directory.
  3652. Check for readdir and closedir errors.
  3653. (maybe_backup_file): Report "stat" for stat errors.
  3654. (maybe_backup_file, chdir_do):
  3655. Quote arbitrary strings in diagnostics.
  3656. (maybe_backup_file, undo_last_backup):
  3657. Don't assume that gettext preserves errno.
  3658. (call_arg_error, call_arg_fatal, call_arg_warn,
  3659. chdir_fatal, close_error, closedir_error, exec_fatal, mkfifo_error,
  3660. mknod_error, open_error, open_fatal, open_warn, opendir_error,
  3661. opendir_warn, read_error, read_fatal, readdir_error, readdir_warn,
  3662. readlink_error, readlink_warn, seek_error, seek_warn, stat_error,
  3663. stat_warn, truncate_error, truncate_warn, unlink_error, waitpid_error,
  3664. write_error, write_fatal, xfork, xpipe, quote_n, quote): New functions.
  3665. * src/system.h (__attribute__): New macro.
  3666. (O_NDELAY, O_NONBLOCK, O_APPEND): Remove.
  3667. (S_ISDOOR): New macro.
  3668. (closedir): New macro, if CLOSEDIR_VOID.
  3669. * src/rmt.c, src/rtapelib.c (decode_oflag):
  3670. O_APPEND might not be defined.
  3671. * src/list.c: (read_and, list_archive):
  3672. Quote arbitrary strings in diagnostics.
  3673. (from_header): Use locale_quoting_style to quote diagnostics.
  3674. (print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
  3675. * src/rmt.h (REM_BIAS): Increase from 128 to (1 << 30).
  3676. * src/Makefile.am: Use ## for copyright comments.
  3677. * src/extract.c (<quotearg.h>): New include.
  3678. (enum permstatus): New enum.
  3679. (struct delayed_set_stat): file_name is now at end of buffer, to avoid
  3680. two mallocs. New members file_name_len, invert_permissions, permstatus.
  3681. (extr_init): Remove hack that silently adjusted newdir_umask.
  3682. (set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
  3683. Use these args to decide whether and how to set modes.
  3684. (set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
  3685. Don't assume that gettext preserves errno.
  3686. (set_stat): Remove arg symlink_flag; subsumed by typeflag.
  3687. (delay_set_stat, repair_delayed_set_stat): New functions.
  3688. (make_directories): Avoid mkdir where last part of path is "..".
  3689. Create a struct delayed_set_stat for each directory made.
  3690. (prepare_to_extract): Renamed from unlink_destination, and
  3691. return 0 immediately if to_stdout_option; all callers changed.
  3692. (maybe_recoverable): New parameter interdir_made.
  3693. Add support for --overwrite.
  3694. (extract_sparse_file, extract_archive):
  3695. Quote arbitrary strings in diagnostics.
  3696. (extract_archive): By default, warn about ".." in member names, and skip them.
  3697. Don't open files with O_NONBLOCK or O_APPEND.
  3698. Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
  3699. overwriting them. Pass only rwxrwxrwx permissions to `open' and `mkdir',
  3700. minus the current umask. Keep track of intermediate directories made,
  3701. to avoid looping when making x/../x when x doesn't exist; the
  3702. earlier code solved this in a different way that didn't fit well
  3703. into the new scheme. Don't extract permissions onto existing
  3704. directories unless --overwrite is given. Do not add -wx------
  3705. permissions to new directories permanently; just do it temporarily.
  3706. Remove no-longer-needed hack with MSDOS and directory time stamps.
  3707. (apply_delayed_set_stat): New argument specifies which directories to
  3708. fix statuses of. Do not wait until the end of extraction to fix
  3709. statuses; instead, fix a directory's status once we exit that directory.
  3710. This requires less memory and does the right thing in some cases
  3711. where the old method didn't.
  3712. (fatal_exit): New function.
  3713. * src/incremen.c (<quotearg.h>): New include.
  3714. (get_directory_contents, gnu_restore):
  3715. Check for readdir and closedir errors.
  3716. (get_directory_contents, read_directory_file, gnu_restore):
  3717. Quote arbitrary strings in diagnostics.
  3718. (get_directory_contents, read_directory_file, write_directory_file):
  3719. Don't assume that gettext preserves errno.
  3720. * src/create.c (<quotearg.h>): New include.
  3721. (start_header): Use `member names' to refer to archive member names, not
  3722. `archive names'. Warn about `..' in member names.
  3723. (finish_sparse_file, dump_file):
  3724. Quote arbitrary strings in diagnostics.
  3725. (finish_sparse_file, dump_file):
  3726. Don't assume that gettext preserves errno.
  3727. (dump_file): Don't use `access' to determine whether a directory is readable;
  3728. this isn't reliable if tar is setuid. Use `opendir' instead.
  3729. Check for readdir and closedir failures.
  3730. Don't dump sockets as if they were fifos; just warn and skip.
  3731. * src/delete.c (move_archive):
  3732. Don't report fatal error merely because sizes don't fit
  3733. into struct mtop values; fall back on lseek instead.
  3734. Say `Cannot' uniformly, instead of `Could not' sometimes and `Cannot' others.
  3735. Say `reposition' instead of `re-position'.
  3736. (delete_archive_members):
  3737. Set archive to STDOUT_FILENO before outputting trailing buffer.
  3738. * src/compare.c (<quotearg.h>): New include.
  3739. (diff_init): Use `Cannot' uniformly, instead of `Could not' sometimes
  3740. and `Cannot' others.
  3741. (report_difference, diff_archive):
  3742. Quote arbitrary strings in diagnostics.
  3743. (process_rawdata, diff_sparse_files, get_stat_data, diff_archive, seek_warn):
  3744. Don't assume that gettext preserves errno.
  3745. (diff_archive): Don't open regular files with O_NONBLOCK.
  3746. Preserve access times of files if --atime.
  3747. * src/common.h (FATAL_ERROR): Use new fatal_exit function to exit.
  3748. (FATAL_ERROR, USAGE): Don't return 0.
  3749. (enum old files): New enum.
  3750. (old_files_option): New variable, replacing keep_old_files_option and
  3751. unlink_first_option.
  3752. (apply_delayed_set_stat): Now takes char const * param.
  3753. (fatal_exit, contains_dot_dot, chdir_fatal, close_error,
  3754. closedir_error, exec_fatal, mkfifo_error, mknod_error, open_error,
  3755. open_fatal, open_warn, opendir_error, opendir_warn, read_error,
  3756. read_fatal, readdir_error, readdir_warn, readlink_error,
  3757. readlink_warn, seek_error, seek_warn, stat_error, stat_warn,
  3758. truncate_error, truncate_warn, unlink_error, waitpid_error,
  3759. write_error, write_fatal, xfork, xpipe, quote, quote_n): New decls.
  3760. * src/buffer.c:
  3761. (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
  3762. archive_write_error, archive_read_error, flush_archive, close_archive,
  3763. init_volume_number, new_volume):
  3764. Don't assume that gettext preserves errno.
  3765. (xdup2): Don't report errno if dup returns an unexpected nonnegative value.
  3766. (open_archive): Reject multivolume verify attempts a bit earlier.
  3767. Rename local variable `access', in case it's defined by system header.
  3768. (open_archive, backspace_output): Use `Cannot' uniformly, instead of
  3769. `Could not' sometimes and `Cannot' others.
  3770. (open_archive, flush_read, flush_archive, close_archive, new_volume):
  3771. Quote arbitrary strings in diagnostics.
  3772. (read_error): Set archive to STDOUT_FILENO temporarily when writing
  3773. archive buffer.
  3774. (init_volume_number): Check for input and output errors in volno_file.
  3775. (new_volume): Use new fatal_exit function to exit, and new xfork
  3776. function to fork.
  3777. * m4/Makefile.am (EXTRA_DIST): Add c-bs-a.m4.
  3778. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/c-bs-a.m4.
  3779. * doc/tar.texi: Add --overwrite.
  3780. --absolute-names rejects ".." in names.
  3781. * lib/quotearg.c: Add support for multibyte characters.
  3782. (ISGRAPH): Remove.
  3783. (ISPRINT): New macro.
  3784. (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
  3785. (isprint, mbrtowc, mbsinit, mbstate_t): New macros,
  3786. defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
  3787. (quotearg_buffer_restyled): New function, with most of the old
  3788. quotearg_buffer's contents.
  3789. Major rewrite to support multibyte characters.
  3790. (quotearg_buffer): Now just calls quotearg_buffer_restyled.
  3791. * m4/c-bs-a.m4: New file.
  3792. * lib/Makefile.am: Use ## for copyright notice.
  3793. * scripts/Makefile.am: Use ## on copyright notice.
  3794. * doc/Makefile.am:
  3795. ($(srcdir)/tar.info, tar.dvi): We now use texinfo 4.0.
  3796. 1999-12-05 Paul Eggert <eggert@twinsun.com>
  3797. * doc/ChangeLog, lib/ChangeLog, scripts/ChangeLog,
  3798. src/ChangeLog, tests/ChangeLog: Remove these files.
  3799. * ChangeLog.1: New file, incorporating the above files, plus old
  3800. ChangeLog entries.
  3801. * Makefile.am (EXTRA_DIST): Add ChangeLog.1.
  3802. 1999-12-05 Dale Worley <worley@ariadne.com>
  3803. * src/compare.c (<utime.h>, struct utimbuf): Add.
  3804. (diff_archive): Restore access times if --atime.
  3805. * doc/tar.texi: Explain that --atime also preserves modification time.
  3806. 1999-12-04 Gerhard Poul <gpoul@gnu.org>
  3807. * ABOUT-NLS: Update to latest version from ftp.gnu.org.
  3808. * BACKLOG, TODO: Remove.
  3809. * Makefile.am (all-local, BABYL, dist-zoo, id, ID): Remove.
  3810. * README: Bring up to date.
  3811. 1999-12-03 Paul Eggert <eggert@twinsun.com>
  3812. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.15.
  3813. * src/compare.c (diff_archive):
  3814. Do not set errno to EPIPE; we no longer use perror.
  3815. * src/create.c (dump_file):
  3816. If a parent directory said that a file should be there but it is
  3817. absent, diagnose it as being removed in the meantime.
  3818. Do not pass meaningless errno to ERROR when reporting that the
  3819. file changed as we read it.
  3820. Report that a file changed if its ctime changes; this is more
  3821. sensitive than mtime+size, and more accurate.
  3822. * src/incremen.c (enum children): New type.
  3823. (struct directory): Change old char allnew member to new enum children
  3824. children member.
  3825. All uses changed.
  3826. (get_directory_contents): When doing an incremental dump that does
  3827. not cross filesystem boundaries, dump the mount points, even though
  3828. they are in a different filesystem. This is for convenience when
  3829. restoring, and for consistency with non-incremental dumps.
  3830. This requires a 3-way flag for keeping track of which children we want,
  3831. so we use enum children rather than boolean.
  3832. * src/open3.c (modes): Remove.
  3833. (open3): Remove unportable assumptions about flag encodings.
  3834. Use `stat' instead of `access' for testing file existence,
  3835. to avoid problems with setuid programs.
  3836. * src/names.c (name_next): If file names are given both in the
  3837. command line (e.g. via -C) and in a file (via -T), do not
  3838. ignore the command-line names.
  3839. * m4/uintmax_t.m4: Backport to autoconf 2.13.
  3840. * doc/tar.texi: Clarify getdate authorship.
  3841. 1999-11-23 Paul Eggert <eggert@twinsun.com>
  3842. * lib/Makefile.am (DISTCLEANFILES): New macro.
  3843. * configure.in (tar_fnmatch_hin):
  3844. Remove; it runs afoul of a bug in autoconf 2.13.
  3845. Instead, always link fnmatch.h to some file, even if it's a throwaway.
  3846. 1999-11-19 Paul Eggert <eggert@twinsun.com>
  3847. * m4/largefile.m4: Update serial.
  3848. 1999-11-18 Paul Eggert <eggert@twinsun.com>
  3849. * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a bug in
  3850. the QNX shell, which doesn't propagate exit status of failed
  3851. commands inside shell assignments.
  3852. 1999-11-07 Paul Eggert <eggert@twinsun.com>
  3853. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.14.
  3854. * configure.in (AC_PREREQ): Bump to 2.13.
  3855. (ALL_LINGUAS): Add pt_BR, ja.
  3856. (AC_FUNC_FNMATCH): Remove lib/funmatch.h before invoking, not after.
  3857. (tar_cv_path_RSH): Prefer a non-symlink rsh to a symlink one,
  3858. for AIX crossbuilds.
  3859. * doc/tar.texi: New node create options for --ignore-failed-read.
  3860. Remove unused version control symbols.
  3861. Modernize texinfo usage.
  3862. * src/tar.c (usage): Add examples.
  3863. * m4/fnmatch.m4 (AC_FUNC_FNMATCH):
  3864. Include fnmatch.h when testing fnmatch.
  3865. * src/common.h (collect_and_sort_names): New decl.
  3866. * src/list.c (from_header):
  3867. Handle 32-bit two's complement negative time stamps
  3868. even if the leading octal digit is 2 or 3.
  3869. * src/extract.c (set_stat): Remove duplicate code.
  3870. * src/create.c (to_chars): Remove trailing newline from warning.
  3871. (dump_file): Ignore doors.
  3872. (finish_header): Report block numbers with origin 0, not origin 1.
  3873. * src/rmt.c: Include getopt.h.
  3874. (long_opts): New constant.
  3875. (usage): New function.
  3876. (main): Implement --help and --version.
  3877. Output usage message if arguments are bad.
  3878. 1999-10-10 Paul Eggert <eggert@twinsun.com>
  3879. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.13.
  3880. * README: Remove --with-dmalloc.
  3881. Add --disable-largefile.
  3882. Remove old NeXT dirent problems, or AIX valloc problems.
  3883. Remove old union wait advice, and old %lld advice.
  3884. Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
  3885. * doc/tar.texi: Clarify documentation for portable file names.
  3886. * configure.in (AM_WITH_DMALLOC): Remove.
  3887. (ALL_LINGUAS): Add ja.
  3888. * src/tar.c (decode_options):
  3889. Invalid dates are now treated as (time_t) -1.
  3890. Redo version message to conform to GNU standards.
  3891. * src/create.c (dump_file):
  3892. Fix typo: last two args to dump_file were interchanged.
  3893. * src/update.c (update_archive): Likewise.
  3894. * src/common.h (tartime): New decl.
  3895. * src/list.c (tartime): Now extern.
  3896. (read_and): Invalid headers cause errors, not warnings.
  3897. 1999-10-03 Paul Eggert <eggert@twinsun.com>
  3898. * lib/getdate.y (__attribute__):
  3899. Don't use if GCC claims to be before 2.8; this is
  3900. needed for OPENStep 4.2 cc. Also, don't use if strict ANSI.
  3901. 1999-09-25 Paul Eggert <eggert@twinsun.com>
  3902. * lib/fnmatch.c, lib/fnmatch.hin: Merge changes from latest glibc.
  3903. * lib/getopt.c, lib/getopt.h, lib/getopt1.c: Likewise.
  3904. * tests/incremen.sh: Add yet another sleep.
  3905. 1999-09-24 Paul Eggert <eggert@twinsun.com>
  3906. * NEWS: A read error now causes a nonzero exit status.
  3907. * src/create.c (to_chars): Fix base-256 output.
  3908. * src/buffer.c (write_error):
  3909. Read error is an error, not just a warning.
  3910. 1999-09-24 Paul Eggert <eggert@twinsun.com>
  3911. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.12.
  3912. * src/tar.c (<time.h>): Include.
  3913. (time): Declare if not defined.
  3914. (confirm): Don't read past EOF.
  3915. (long_options, usage): Add --no-same-owner, --no-same-permissions.
  3916. (main): Use clock_gettime if available.
  3917. * tests/Makefile.am (TESTS): Add incremen.sh
  3918. (INCLUDES): Add -I../lib, for fnmatch.h.
  3919. * src/update.c (update_archive):
  3920. Remove call to name_expand; had no effect.
  3921. Use chdir_do to change into directory.
  3922. Use deref_stat instead of stat.
  3923. Use add_avoided_name to mark names to be avoided; the old method of
  3924. setting a bit with the name caused all descendants of that name to
  3925. be avoided, in some circumstances.
  3926. * tests/incremen.sh: Remove unnecessary sleeps.
  3927. * src/names.c (name_next): Go back to using plain chdir.
  3928. (name_gather): Use chdir_arg to keep track of arguments to chdir.
  3929. (addname): Likewise.
  3930. (name_match): Use chdir_do to act on chdir args.
  3931. (merge_sort): Moved here from incremen.c.
  3932. (compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
  3933. Likewise.
  3934. (name_expand): Remove.
  3935. (name_from_list): Skip fake names.
  3936. Use chdir_do to act on chdir args.
  3937. (struct avoided_name): New struct.
  3938. (avoided_names): New var.
  3939. (add_avoided_name, is_avoided_name): New functions.
  3940. * src/system.h (stat, lstat): Define in terms of statx on
  3941. STX_HIDDEN && !_LARGE_FILES /* AIX */ hosts.
  3942. (UCHAR_MAX): New macro.
  3943. (TYPE_MAXIMUM): Cast to arg type, for types narrow than int.
  3944. * m4/largefile.m4: Work around GCC 2.95.1 bug with HP-UX 10.20.
  3945. * src/incremen.c (<time.h>): Remove include; no longer used.
  3946. (time): Remove decl.
  3947. (time_now): Remove.
  3948. (get_directory_contents): Use deref_stat.
  3949. Consider a subdirectory to be all new only if
  3950. listed_incremental_option or if it its timestamp is newer than the
  3951. cutoff.
  3952. (add_hierarchy_to_namelist, merge_sort): Move to names.c.
  3953. (read_directory_file): Now extern. Do not set time_now.
  3954. (write_directory_file): Renamed from write_dir_file.
  3955. Use start_time instead of time_now.
  3956. (compare_names, collect_and_sort_names): Move to names.c.
  3957. * src/mangle.c (<time.h>): Remove; not used.
  3958. (time): Do not declare.
  3959. * src/misc.c (chdir_from_initial_wd): Remove.
  3960. (deref_stat): New function.
  3961. (struct wd): New struct.
  3962. (wd, wds, wd_alloc): New variables.
  3963. (chdir_arg, chdir_do): New function.
  3964. * src/compare.c (get_stat_data): Use deref_stat.
  3965. * src/common.h (name_expand): Remove.
  3966. * src/list.c (time): Declare if not defined.
  3967. (base_64_digits): Moved here from create.c.
  3968. (base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char)
  3969. -1.
  3970. (read_and): Don't get time from header unless we need it now;
  3971. as getting time can cause duplicate diagnostics if bogus.
  3972. Remove "Hmm, " from diagnostic.
  3973. Use "Skipping to next header" uniformly.
  3974. (from_header): Renamed from from_chars. All uses changed.
  3975. Allow different forms for unportable 2's complement numbers.
  3976. Don't check for extended forms when parsing checksums.
  3977. Parse base-256 output.
  3978. (gid_from_header): Renamed from gid_from_chars. All uses changed.
  3979. (major_from_header): Renamed from major_from_chars. All uses changed.
  3980. (minor_from_header): Renamed from minor_from_chars. All uses changed.
  3981. (mode_from_header): Renamed from mode_from_chars. All uses changed.
  3982. (off_from_header): Renamed from off_from_chars. All uses changed.
  3983. (size_from_header): Renamed from size_from_chars. All uses changed.
  3984. (time_from_header): Renamed from time_from_chars. All uses changed.
  3985. Warn about future timestamps.
  3986. (uid_from_header): Renamed from uid_from_chars. All uses changed.
  3987. (uintmax_from_header): Renamed from uintmax_from_chars.
  3988. All uses changed.
  3989. (tartime): New function, incorporating isotime.
  3990. (isotime): Delete.
  3991. (print_header): Use tartime.
  3992. * src/create.c (to_chars): Fix typo in decl.
  3993. Don't assign through char const *.
  3994. Rename name_expand back to collect_and_sort_names.
  3995. * src/extract.c (<time.h>): No need to include.
  3996. (time): No need to declare.
  3997. (now): Remove variable.
  3998. (extr_init): Don't initialize `now'.
  3999. Increment same_permissions_option and same_owner_option if we_are_root
  4000. is nonzero; this supports the new --no-same-owner option.
  4001. (set_stat): Use start_time instead of `now'.
  4002. * src/create.c (struct link): Remove unused linkcount member.
  4003. (base_64_digits): Move to list.c.
  4004. (base_8_digits): Remove.
  4005. (to_octal): New function, with some of old contents of to_base.
  4006. (to_base): Remove.
  4007. (to_base256): New function.
  4008. (to_chars): Use base 256, not base 64, for huge values.
  4009. (mode_to_chars): Don't use two's complement in GNU format or POSIX
  4010. format.
  4011. (dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
  4012. it means we have an incremental dump where we don't know whether this
  4013. is a top-level call.
  4014. Use deref_stat instead of statx / stat / lstat.
  4015. Cast result of alloca.
  4016. Check for dates if 0 < top_level, not if listed_incremental_option.
  4017. Move multiple-link check after directory check.
  4018. Do not dump avoided names.
  4019. Dump hard links to symbolic names as links, not as separate
  4020. symbolic links.
  4021. start_header cannot return a null pointer, so don't test for it.
  4022. Likewise for find_next_block.
  4023. * src/buffer.c, src/common.h (<human.h>): Include.
  4024. (read_error): Read error is an error, not just a warning.
  4025. (print_total_written): Also print human-readable byte count, and
  4026. bytes/s.
  4027. (open_archive, flush_write): Use start_time, not current time.
  4028. (flush_read): Report about garbage bytes ignored at end of archive,
  4029. but act on non-garbage bytes (instead of ignoring them).
  4030. (new_volume): Use WARN for warnings.
  4031. * doc/Makefile.am:
  4032. ($(srcdir)/tar.info): Add -I$(srcdir) so that subdir builds work.
  4033. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/fnmatch.m4.
  4034. * m4/Makefile.am (EXTRA_DIST): Add fnmatch.m4.
  4035. * lib/Makefile.am (noinst_HEADERS):
  4036. Rename fnmatch.h to fnmatch.hin; add human.h.
  4037. (libtar_a_SOURCES): Add human.c, xstrtoul.c.
  4038. (INCLUDES): Remove -I.. -I$(srcdir) -- automake adds this for us.
  4039. * src/Makefile.am (rmt_LDADD, tar_LDADD): New macros.
  4040. * lib/fnmatch.c (strchrnul):
  4041. Define to __strchrnul if _LIBC, to our own replacement otherwise.
  4042. Do not define if !_LIBC and if it already exists.
  4043. (internal_fnmatch): Use it.
  4044. * configure.in (tar_LDADD): New variable, used only when linking tar.
  4045. (rmt_LDADD): Similarly, for rmt.
  4046. (AC_FUNC_FNMATCH): Link fnnmatch.hin to fnmatch.h if we're using our
  4047. fnmatch.c; otherwise, use the system fnmatch.h.
  4048. * doc/tar.texi: Add --no-same-owner, --no-same-permissions.
  4049. Modernize sample backup script.
  4050. * THANKS: Martin Goik's email address has changed.
  4051. * m4/fnmatch.m4: New file.
  4052. 1999-09-03 Paul Eggert <eggert@twinsun.com>
  4053. * lib/lchown.h (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
  4054. Use EINVAL instead.
  4055. 1999-08-29 Paul Eggert <eggert@twinsun.com>
  4056. * lib/getdate.y (get_date):
  4057. Rename outermost local `probe' to `quarter'.
  4058. Rename latter local `tm' to probe_tm.
  4059. From: Jim Meyering <meyering@ascend.com>
  4060. Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
  4061. 1999-08-28 Paul Eggert <eggert@twinsun.com>
  4062. * lib/getdate.y (PC): New macro; use it when possible.
  4063. (number): Handle `Nov 11 1996' example correctly.
  4064. See Risks Digest 20.55 (1999-08-27)
  4065. http://catless.ncl.ac.uk/Risks/20.55.html#subj18
  4066. 1999-08-23 Paul Eggert <eggert@twinsun.com>
  4067. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.11.
  4068. Remove minor cases of lint from many source files: this includes
  4069. unnecessary casts, uses of NULL, etc.
  4070. * configure.in (AC_PROG_YACC): Remove.
  4071. (YACC): Always use bison.
  4072. (AC_STRUCT_TIMEZONE): Add.
  4073. (AC_REPLACE_FUNCS): Add strcasecmp, strncasecmp.
  4074. * doc/tar.texi: --bzip2 is now -I. Remove obsolete time zone info.
  4075. Fix spelling.
  4076. * lib/Makefile.am (EXTRA_DIST): Add strcasecmp.c, strncasecmp.c.
  4077. ($(srcdir)/getdate.c): Rename y.tab.c to getdate.c only if successful.
  4078. * lib/strcasecmp.c, lib/strncasecmp.c: New files.
  4079. * src/common.h (merge_sort): Remove decl; no longer exported.
  4080. * src/system.h (voidstar): Remove.
  4081. (memcpy, memcmp): Cast args.
  4082. ("xalloc.h"): Add include.
  4083. (xmalloc, xrealloc): Remove decl.
  4084. * src/mangle.c (time): Do not declare if defined.
  4085. (first_mangle, mangled_num): Remove.
  4086. * src/list.c (from_chars): Report out-of-range values more precisely.
  4087. (off_from_chars): Do not allow negative offsets.
  4088. (uid_from_chars): Allow negative uids.
  4089. * src/create.c (linklist): Now static.
  4090. (to_chars): Fix wording of message to match from_chars.
  4091. * src/misc.c (merge_sort): Move to incremen.c.
  4092. * src/incremen.c (merge_sort): Move here from misc.c; now static.
  4093. It's too painful to make it both generic and portable.
  4094. (read_directory_file): "timestamp" -> "time stamp" in messages.
  4095. * src/tar.c (long_options, usage, main): -y is now -I (for --bzip).
  4096. (usage): Fix misspelling.
  4097. (OPTION_STRING): -y is now -I.
  4098. (decode_options): Use -1, not EOF, for getopt_long result.
  4099. Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
  4100. Handle operands after any "--" argument.
  4101. (main): Report any output errors.
  4102. * src/rmt.c (main): status is ssize_t, not long.
  4103. * src/names.c (name_gather): Handle trailing -C option correctly.
  4104. (addname): use memcpy, not strncpy, to copy a string of known length.
  4105. (name_match): Handle trailing -C option correctly.
  4106. Propagate -C option to following files.
  4107. (name_match, name_scan): Remove redundant matching code.
  4108. * src/buffer.c (open_archive): Use American spelling in diagnostic.
  4109. * lib/getdate.y: Major rewrite. Add copyright notice.
  4110. (<stdio.h>): Include only if testing.
  4111. (ISUPPER): Remove.
  4112. (ISLOWER): New macro.
  4113. (<string.h>): Include if HAVE_STRING_H, not USG.
  4114. (bcopy): Remove.
  4115. (yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
  4116. bison.
  4117. (EPOCH_YEAR): Renamed from EPOCH.
  4118. (table): Renamed from TABLE.
  4119. (meridian): Now an anonymous enum.
  4120. (struct parser_control): New type.
  4121. (YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
  4122. (yyInput, ..., yyRelYear): Migrated into struct parser_control.
  4123. (%pure_parser): Added, so that the parser is pure.
  4124. (%union): Removed; the type is now just plain int.
  4125. All %type directives removed.
  4126. (tLOCAL_ZONE): New %token.
  4127. (month_day_table): Renamed from MonthDayTable.
  4128. (gmtime, localtime, mktime, time): Declare only if not defined.
  4129. (meridian_table): New table.
  4130. (dst_table): New table.
  4131. (units_table): renamed from UnitsTable.
  4132. (relative_time_table): Renamed from OtherTable.
  4133. (time_zone_table): Renamed from TimezoneTable. Modernized.
  4134. (military_table): Renamed from MilitaryTable.
  4135. (to_hour): Renamed from ToHour.
  4136. (to_year): Renamed from ToYear.
  4137. (lookup_zone): New function.
  4138. (LookupWord): Renamed from lookup_word. Use lookup_zone for time
  4139. zones.
  4140. (yylex): Now reentrant. All callers changed.
  4141. (get_date): Add support for local time zone abbreviations.
  4142. Make it reentrant.
  4143. 1999-08-20 Paul Eggert <eggert@twinsun.com>
  4144. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.10.
  4145. * src/create.c (to_chars): Generate GNU base-64 representation
  4146. if we are generating an old or new GNU format tar file for a
  4147. number that can't be represented with the POSIX format.
  4148. * configure.in (AC_CHECK_FUNCS): Add fchdir.
  4149. (AM_FUNC_GETLINE): Add.
  4150. (LIBOBJS): Add getline.o to workaround comment.
  4151. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/getline.m4.
  4152. * m4/Makefile.am (EXTRA_DIST): Add getline.m4.
  4153. * lib/Makefile.am (noinst_HEADERS): Add getline.h, save-cwd.h.
  4154. (libtar_a_SOURCES): Add save-cwd.c, xgetcwd.c.
  4155. * lib/getline.c, lib/getline.h, lib/save-cwd.c,
  4156. lib/save-cwd.h, m4/getline.m4: New files.
  4157. * src/misc.c (<save-cwd.h>): Include.
  4158. (chdir_from_initial_wd): New function.
  4159. * src/names.c (name_next): Use chdir_from_initial_wd, not chdir.
  4160. (name_gather): Handle `-C x -C y' correctly.
  4161. Do not rely on addname to handle -C.
  4162. (addname): New CHANGE_DIR parameter. All callers changed.
  4163. Remove ugly calls to getcwd; no longer needed.
  4164. (name_match, name_from_list): Use chdir_from_initial_wd, not chdir.
  4165. * src/incremen.c (listed_incremental_stream): New var.
  4166. (read_directory_file): Remove arbitrary limits on file name length.
  4167. Do not attempt to get the working directory; we can bypass this
  4168. on fchdir hosts. Open the listed_incremental_option file for both
  4169. read and write instead of opening it twice. Check for I/O errors
  4170. when doing I/O to this file. Check for invalid data in the file,
  4171. and report line numbers of invalid data.
  4172. (write_dir_file): Likewise.
  4173. (collect_and_sort_names): Use chdir_from_initial_wd, not chdir.
  4174. Do not invoke write_dir_file; that's our caller's responsibility.
  4175. * src/list.c (max): New macro.
  4176. (isotime): Now takes time_t, not time_t *. Report the decimal values
  4177. of times that can't be broken down.
  4178. (print_header): Don't assume that major and minor device numbers can
  4179. fit into uintmax_t.
  4180. * src/common.h (struct name): change_dir is now char const *.
  4181. (write_directory_file): Remove unused decl.
  4182. (STRINGIFY_BIGINT): Assume b always points to UINTMAX_STRSIZE_BOUND
  4183. chars; the old `sizeof (b)' broke when b was a pointer not an array.
  4184. (chdir_from_initial_wd): New decl.
  4185. (addname): New 2nd arg.
  4186. * THANKS: Torsten Lull -> Catrin Urbanneck
  4187. 1999-08-18 Paul Eggert <eggert@twinsun.com>
  4188. * configure.in (HAVE_GETHOSTENT, HAVE_SETSOCKOPT):
  4189. Don't depend on ac_cv_func variables.
  4190. From Albert Chin-A-Young <china@thewrittenword.com>.
  4191. 1999-08-18 Paul Eggert <eggert@twinsun.com>
  4192. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.9
  4193. * m4/signedchar.m4: New file.
  4194. * configure.in (pe_AC_TYPE_SIGNED_CHAR): Add.
  4195. * src/system.h (signed_char): New macro.
  4196. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/signedchar.m4.
  4197. * m4/Makefile.am (EXTRA_DIST): Add signedchar.m4.
  4198. * src/create.c (write_eot): Write at least two zero blocks.
  4199. * src/extract.c (extract_archive): Fix sparse array bug:
  4200. we did not find end of array correctly.
  4201. * src/compare.c: (fill_in_sparse_array, diff_sparse_files):
  4202. Don't assume find_next_block yields nonnull.
  4203. * src/extract.c (extract_sparse_file, extract_archive): Likewise.
  4204. * src/list.c (skip_extended_headers): Likewise.
  4205. * src/list.c (read_and, list_archive): Simplify code.
  4206. (read_header): Fix computation of signed checksums on machines where
  4207. char is unsigned.
  4208. Do not consider a block to be zero unless all its bytes are zero,
  4209. even the checksum bytes. Do not attempt to parse the checksum of
  4210. a zero block. Fix memory leak with long names and links.
  4211. (from_chars): Accommodate a buggy tar that outputs leading NUL
  4212. if the previous field overflows.
  4213. * src/misc.c (quote_copy_string): Generate \177 for '\177', not
  4214. \?, for portability to non-ASCII hosts.
  4215. 1999-08-16 Paul Eggert <eggert@twinsun.com>
  4216. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.8.
  4217. * src/extract.c (make_directories): Do not chown intermediate
  4218. directories, even if we are root.
  4219. * src/list.c (read_header): Fix bugs when interpreting
  4220. POSIX-compliant headers that do not contain null bytes in the
  4221. header or link names.
  4222. 1999-08-14 Paul Eggert <eggert@twinsun.com>
  4223. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.7.
  4224. * configure.in (AC_CHECK_HEADERS): Remove sys/wait.h.
  4225. (AC_HEADER_SYS_WAIT): Add.
  4226. (AC_REPLACE_FUNCS): Add waitpid.
  4227. (tar_cv_header_union_wait, HAVE_UNION_WAIT): Remove.
  4228. * lib/waitpid.c: New file.
  4229. * lib/Makefile.am (EXTRA_DIST): Add waitpid.c.
  4230. * src/system.h (WCOREDUMP): Remove; no longer used.
  4231. (WIFSTOPPED): Likewise.
  4232. (WEXITSTATUS, WIFSIGNALED): Default to Solaris 7 versions.
  4233. * src/buffer.c (child_open_for_compress): Undo previous change.
  4234. (close_archive): Use waitpid, POSIX-style, instead of old BSD style.
  4235. (new_volume): Likewise.
  4236. * src/buffer.c, src/extract.c, src/incremen.c (time):
  4237. Don't declare if defined.
  4238. * src/extract.c (extr_init): Remove unneeded cast around 0 arg to time.
  4239. * src/incremen.c (read_directory_file):
  4240. Invoke `time' the same way everyone else does.
  4241. Check validity of --listed-incremental file contents a bit better.
  4242. Do not worry about --after-date-option; tar.c now checks this.
  4243. * src/list.c (isotime): Report ??? if localtime returns null.
  4244. Don't assume years fit into four digits.
  4245. Don't append trailing newline.
  4246. (print_header): Report ??? if localtime returns null;
  4247. Don't assume years fit into four digits.
  4248. * src/compare.c (diff_archive): Do not fall back on absolute name
  4249. when --absolute-names is not specified.
  4250. * src/create.c (start_header):
  4251. Include text of ignored filesystem prefix in warning.
  4252. (create_archive): Check for excluded names when doing incremental
  4253. pass through directory.
  4254. (dump_file): Do not dump old files explicitly given on command line
  4255. when using --listed-incremental. Do not strip ./ prefix from names.
  4256. * src/tar.c: -g now implies after_date_option = 1.
  4257. -g and -N are now incompatible options.
  4258. * doc/tar.texi: Explain --exclude better. Don't strip leading `./'.
  4259. 1999-08-11 Jeff Dairiki <dairiki@dairiki.org>
  4260. * src/list.c (read_header): Don't parse OLDGNU_FORMAT
  4261. incremental headers as POSIX prefixes.
  4262. 1999-08-11 Paul Eggert <eggert@twinsun.com>
  4263. * NEWS, configure.in: Version 1.13.6.
  4264. * configure.in (ALL_LINGUAS): Add pt_BR.
  4265. * po/pt_BR.po: New file.
  4266. * doc/Makefile.am ($(srcdir)/tar.info, $(srcdir)/header.texi):
  4267. Renamed from tar.info and header.texi; adjust actions so that
  4268. they work in other directories.
  4269. * doc/tar.texi: Add -y and --bzip2.
  4270. Patterns containing / now exclude only file names whose prefix match.
  4271. * lib/exclude.h (excluded_filename): New option parameter.
  4272. (add_exclude_file): New ADD_FUNC parameter.
  4273. (excluded_pathname): Remove decl.
  4274. * lib/exclude.c (_GNU_SOURCE):
  4275. Remove; no longer needed since we don't use FNM_ macros.
  4276. (excluded_filename): Renamed from excluded_filename_opts.
  4277. (excluded_filename, excluded_pathname): Remove.
  4278. (add_exclude_file): New ADD_FUNC parameter.
  4279. * po/POTFILES.in: Add lib/quotearg.c.
  4280. * src/buffer.c (_GNU_SOURCE): Define.
  4281. (<fnmatch.h>): Include unconditionally.
  4282. (child_open_for_compress): Dup after closing, to avoid possible file
  4283. descriptor exhaustion.
  4284. (flush_write): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
  4285. (flush_read): Likewise.
  4286. * src/common.h (LG_8, LG_64): New macros.
  4287. (excluded_with_slash, excluded_without_slash): New vars.
  4288. (excluded): Remove.
  4289. (base_64_digits): New decl.
  4290. (gid_to_chars, major_to_chars, minor_to_chars, mode_to_chars,
  4291. off_to_chars, size_to_chars, time_to_chars, uid_to_chars,
  4292. uintmax_to_chars,
  4293. GID_TO_CHARS, MAJOR_TO_CHARS, MINOR_TO_CHARS, MODE_TO_CHARS,
  4294. OFF_TO_CHARS, SIZE_TO_CHARS, TIME_TO_CHARS, UID_TO_CHARS,
  4295. UINTMAX_TO_CHARS):
  4296. Renamed from gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
  4297. off_to_oct, size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
  4298. GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, OFF_TO_OCT,
  4299. SIZE_TO_OCT, TIME_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT,
  4300. respectively. All definitions and uses changed.
  4301. (excluded_name): New decl.
  4302. * src/compare.c (diff_archive):
  4303. Open files with O_NONBLOCK instead of O_NDELAY.
  4304. * src/create.c (base_64_digits): New constant.
  4305. (base_8_digits): New macro.
  4306. (MAX_VAL_WITH_DIGITS): New macro.
  4307. (to_base): First half of old to_oct. Support base 64 too.
  4308. (to_chars): Other half of old to_oct, for 64-bit support.
  4309. (GID_NOBODY, UID_NOBODY): Don't define if the headers don't.
  4310. (gid_substitute, uid_substitute): Look up names dynamically if
  4311. GID_NOBODY and UID_NOBODY aren't defined; use -2 if all else fails.
  4312. (mode_to_chars): Renamed from mode_to_oct.
  4313. Support negative values in all the _to_chars functions.
  4314. (start_header): Use FILESYSTEM_PREFIX_LEN instead of MSDOS ifdef.
  4315. Abort if archive format is DEFAULT_FORMAT when it shouldn't be.
  4316. (dump_file): Inspect entire pathname, not just new file name
  4317. component, when deciding whether to exclude it.
  4318. * src/extract.c (extract_archive):
  4319. Open files with O_NONBLOCK instead of O_NDELAY.
  4320. * src/incremen.c (get_directory_contents):
  4321. Inspect entire pathname, not just new file name
  4322. component, when deciding whether to exclude it.
  4323. * src/list.c (<fnmatch.h>): Do not include.
  4324. (from_chars): Renamed from from_oct. New parameter specifying
  4325. the negative of the minimum allowed value. Support negative
  4326. and base-64 values.
  4327. (base64_map): New var.
  4328. (base64_init): New function.
  4329. (print_header): Output numeric uids and gids if numeric_owner_option.
  4330. * src/misc.c (quote_copy_string): Use LG_8 instead of constants.
  4331. * src/names.c (_GNU_SOURCE): Define.
  4332. (<fnmatch.h>): Include unconditionally.
  4333. (excluded_name): New function, taking over duties of excluded_pathname.
  4334. All uses changed.
  4335. * src/rmt.c (decode_oflag): New function.
  4336. (main): Use it to support symbolic open flags.
  4337. * src/rtapelib.c (encode_oflag): New function.
  4338. (rmt_open__): Do not allow newlines in the path.
  4339. Propagate errno correctly.
  4340. Decode symbolic open flags, if present.
  4341. * src/system.h (FILESYSTEM_PREFIX_LEN, ISSLASH, O_ACCMODE, O_NONBLOCK):
  4342. New macros.
  4343. * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
  4344. New -y or --bzip2 option.
  4345. (add_filtered_exclude): New function.
  4346. (decode_options): Put excluded patterns with / into
  4347. excluded_with_slash, and without / into excluded_without_slash.
  4348. Compare newer_mtime_option to its new initial value
  4349. TYPE_MINIMUM (time_t) when deciding whether more than one
  4350. threshold date was specified.
  4351. 1999-07-20 Paul Eggert <eggert@twinsun.com>
  4352. * NEWS, configure.in: Version 1.13.5.
  4353. * src/common.h (FATAL_ERROR): Invoke apply_delayed_set_stat
  4354. before exiting.
  4355. * src/buffer.c (new_volume): Likewise.
  4356. * src/incremen.c (read_directory_file): Likewise.
  4357. * src/tar.c (decode_options):
  4358. ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
  4359. for consistency.
  4360. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13.4.
  4361. * configure.in (AC_CHECK_FUNCS): Add lstat, readlink, symlink.
  4362. * src/system.h (lstat): Define only if !HAVE_LSTAT && !defined lstat.
  4363. (S_ISMPB, S_ISMPC, S_ISNWK): Remove unused macros.
  4364. (S_ISBLK, S_ISCHR, S_ISCTG, S_ISFIFO, S_ISLNK, S_ISSOCK):
  4365. Define to 0 if the corresponding S_IF* macro is not defined.
  4366. (mkfifo): Do not define if already defined, or if S_IFIFO
  4367. is not defined.
  4368. * src/compare.c (diff_archive): Use HAVE_READLINK, not
  4369. S_ISLNK, to determine whether to invoke readlink.
  4370. * src/create.c (dump_file): Likewise.
  4371. * src/extract.c (set_mode):
  4372. Do not chmod unless we are root or the -p option was given;
  4373. this matches historical practice.
  4374. (unlink_destination): New function, which checks for unlink failures.
  4375. (maybe_recoverable): Stay quiet if -U.
  4376. (extract_archive): Use O_EXCL if unlink_first_option.
  4377. Report unlink failures.
  4378. Use HAVE_SYMLINK, not S_ISLNK, to determine whether symlink exists.
  4379. Use HAVE_MKFIFO || defined mkfifo, not S_ISFIFO, to determine whether
  4380. mkfifo exists.
  4381. * src/incremen.c (get_directory_contents): Depend on
  4382. S_ISHIDDEN, not AIX, to determine whether to invoke S_ISHIDDEN.
  4383. * src/list.c: Remove S_IS* ifdefs.
  4384. * src/misc.c (maybe_backup_file): Likewise.
  4385. * src/misc.c (maybe_backup_file):
  4386. "Virtual memory exhausted" -> "Memory exhausted",
  4387. to conform to the other places this message is issued.
  4388. * src/mangle.c (extract_mangle):
  4389. Replace #ifdef S_ISLNK with #ifdef HAVE_SYMLINK.
  4390. * src/rtapelib.c (rmt_open__):
  4391. Remove typo that caused us to omit the first char
  4392. of the basename.
  4393. 1999-07-16 Paul Eggert <eggert@twinsun.com>
  4394. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.13.3.
  4395. * doc/tar.texi: A path name is excluded if any of its file name
  4396. components matches an excluded pattern, even if the path name was
  4397. specified on the command line.
  4398. * src/create.c (create_archive): Likewise.
  4399. * src/list.c (read_and): Likewise.
  4400. * src/update.c (update_archive): Likewise.
  4401. * lib/exclude.h (excluded_pathname): New decl.
  4402. * lib/exclude.c (_GNU_SOURCE): Define.
  4403. (FILESYSTEM_PREFIX_LEN, ISSLASH): New macros.
  4404. (excluded_filename_opts): New function.
  4405. (excluded_pathname): New function.
  4406. * lib/Makefile.am (EXTRA_DIST):
  4407. xstrtol.c moved here from libtar_a_SOURCES.
  4408. (libtar_a_SOURCES): Move xstrtol.c to EXTRA_DIST.
  4409. Remove xstrtoul.c; no longer needed.
  4410. * lib/xstrtol.c: Remove.
  4411. * src/tar.c (decode_options):
  4412. Set newer_time_option to TYPE_MINIMUM, so that
  4413. negative timestamps are handled correctly.
  4414. Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
  4415. uniformity (and so that we don't need to have the other fns).
  4416. (main): Remove call to init_total_written; no longer needed.
  4417. * configure.in (AC_CHECK_SIZEOF): Remove no-longer-needed
  4418. checks for unsigned long and long long.
  4419. * src/arith.c: Remove.
  4420. * src/Makefile.am (tar_SOURCES): Remove arith.c.
  4421. * po/POTFILES.in: Remove src/arith.c.
  4422. * src/arith.h: Use double, to simplify configuration gotchas.
  4423. (tarlong): Now double.
  4424. (TARLONG_FORMAT): New macro.
  4425. (BITS_PER_BYTE, BITS_PER_TARLONG, SUPERDIGIT, BITS_PER_SUPERDIGIT,
  4426. LONGS_PER_TARLONG, SIZEOF_TARLONG, struct tarlong,
  4427. zerop_tarlong_helper, lessp_tarlong_helper, clear_tarlong_helper,
  4428. add_to_tarlong_helper, mult_tarlong_helper, print_tarlong_helper,
  4429. zerop_tarlong, lessp_tarlong, clear_tarlong, add_to_tarlong,
  4430. mult_tarlong, print_tarlong): Remove. All callers replaced with
  4431. arithmetic ops.
  4432. * src/common.h (init_total_written): Remove decl.
  4433. * src/buffer.c (total_written):
  4434. Remove; replaced with prev_written + bytes_written.
  4435. (prev_written): New var.
  4436. (init_total_written): Remove.
  4437. (print_total_written): Use TARLONG_FORMAT instead of print_tarlong.
  4438. * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG):
  4439. Make sure that we can shift, multiply
  4440. and divide unsigned long long values; Ultrix cc can't do it.
  4441. * lib/modechange.c (mode_compile): Use uintmax_t, not unsigned long.
  4442. Check for any unknown bits, not just unknown bits left of the leftmost
  4443. known bit.
  4444. * lib/quotearg.c (quotearg_buffer):
  4445. Don't quote spaces if C quoting style.
  4446. * src/list.c (from_oct):
  4447. Use C quoting style for error; omit trailing NULs.
  4448. 1999-07-14 Paul Eggert <eggert@twinsun.com>
  4449. * configure.in (AM_INIT_AUTOMAKE), NEWS: Version 1.13.2.
  4450. * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
  4451. <inttypes.h> defines strtoumax as a macro (and not as a function).
  4452. HP-UX 10.20 does this.
  4453. * src/tar.c (usage): tar-bugs@gnu.org -> bug-tar@gnu.org
  4454. * PORTS, README, TODO, doc/tar.texi: Likewise.
  4455. 1999-07-12 Paul Eggert <eggert@twinsun.com>
  4456. * configure.in (AM_INIT_AUTOMAKE): Version 1.13.1.
  4457. (LIBOBJS): Add mktime.o to automake 1.4 bug workaround.
  4458. * src/list.c (decode_header):
  4459. Do not assume that S_IFBLK and S_IFCHR are defined.
  4460. * src/create.c (start_header): Do not assume S_IFMT is defined.
  4461. (dump_file): Remove unnecessary check for screwy apollo lossage.
  4462. Do not assume S_IFBLK and S_IFCHR are defined.
  4463. * src/extract.c (extract_archive):
  4464. Test whether S_IFCHR and S_IFBLK are nonzero,
  4465. not whether they are defined, for consistency with other tests.
  4466. * src/buffer.c (is_regular_file):
  4467. Don't succeed on files that we can't access due to
  4468. permissions problems.
  4469. (open_archive): Fix wording on fatal error message.
  4470. Don't bother to stat /dev/null if the archive is not a character
  4471. special device.
  4472. * src/compare.c (process_rawdata, diff_sparse_files, diff_archive):
  4473. Report an error, not a warning, for I/O errors.
  4474. (process_rawdata, process_dumpdir, diff_sparse_files):
  4475. Change ungrammatical "Data differs" to "Contents differ".
  4476. (get_stat_data): Find hidden files on AIX.
  4477. Accept file name as argument; all uses changed.
  4478. (get_stat_data, diff_archive): Use system error message for
  4479. nonexistent files rather than rolling our own.
  4480. (diff_archive): Unknown file types are errors, not warnings.
  4481. Normalize spelling of message to "File type differs".
  4482. Use get_stat_data to get link status, for consistency.
  4483. Do not inspect st_rdev for fifos.
  4484. Do not assume st_mode values contain only file types and mode bits.
  4485. Check for mode changes and device number changes separately.
  4486. * src/update.c (append_file):
  4487. Open the file before statting it, to avoid a race.
  4488. Complain about file shrinkage only when we reach EOF.
  4489. 1999-07-08 Paul Eggert <eggert@twinsun.com>
  4490. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.13 released.
  4491. * configure.in (AC_EXEEXT): Add.
  4492. * lib/Makefile.am (noinst_HEADERS):
  4493. Add basename.h, exclude.h. Remove full-write.h.
  4494. (libtar_a_SOURCES): Add exclude.c.
  4495. * lib/basename.h, lib/exclude.c, lib/exclude.h, lib/safe-read.h:
  4496. New files.
  4497. * lib/full-write.c: Include safe-read.h instead of full-write.h.
  4498. * lib/safe-read.h (safe_read): New decl.
  4499. * src/rmt.c: Include safe-read.h.
  4500. * src/rtapelib.c: Include basename.h, save-read.h.
  4501. (rmt_open__): Use base_name to compute base name.
  4502. * src/common.h:
  4503. Include basename.h, exclude.h; don't include full-write.h.
  4504. (exclude_option): Remove decl.
  4505. (excluded): New decl.
  4506. (add_exclude, add_exclude_file, check_exclude): Remove decls.
  4507. * src/list.c (read_and):
  4508. Use excluded_filename instead of check_exclude.
  4509. Check base name of incoming file name, not entire file name, when
  4510. deciding whether to exclude it.
  4511. * src/create.c (finish_sparse_file):
  4512. Use excluded_filename instead of check_exclude.
  4513. Don't bother to stat excluded file names.
  4514. * src/incremen.c (get_directory_contents): Likewise.
  4515. * src/names.c (exclude_pool, exclude_pool_size,
  4516. allocated_exclude_pool_size, simple_exclude_array,
  4517. simple_excludes, allocated_simple_excludes,
  4518. pattern_exclude_array, pattern_excludes,
  4519. allocated_pattern_excludes, add_exclude, add_exclude_file,
  4520. check_exclude):
  4521. Remove; now done in ../lib/exclude.c.
  4522. * src/tar.c (decode_options): Initialize `excluded'.
  4523. Use new add_exclude_file and add_exclude functions.
  4524. 1999-07-05 Paul Eggert <eggert@twinsun.com>
  4525. * m4/gettext.m4: Use changequote rather than [[ ]].
  4526. * lib/safe-read.c: Renamed from lib/full-read.c.
  4527. (safe_read): Renamed from full_read. All uses changed.
  4528. * lib/safe-read.h, lib/full-write.h: New files.
  4529. * lib/Makefile.am (noinst_HEADERS): Add full-write.h, safe-read.h.
  4530. (libtar_a_SOURCES): Rename full-read.c to safe-read.c.
  4531. * lib/full-write.c: Include full-write.h.
  4532. * src/common.h: Include full-write.h, safe-read.h.
  4533. * src/system.h: (full_read, full_write): Remove decls.
  4534. * src/Makefile.am (datadir): New var; needed for Solaris gettext.
  4535. * src/system.h (bindtextdomain, textdomain): undef before
  4536. defining, to avoid preprocessor warnings with --disable-nls
  4537. on hosts whose locale.h includes libintl.h.
  4538. * lib/xstrtol.c (__strtol): Remove decl; it doesn't work if __strtol
  4539. expands to a macro, which occurs in HP-UX 10.20 with strtoumax.
  4540. (strtol, strtoul): New decls (for pre-ANSI hosts), to replace
  4541. the above decl.
  4542. 1999-07-02 Paul Eggert <eggert@twinsun.com>
  4543. * Makefile.am (ACINCLUDE_INPUTS): Add $(M4DIR)/mktime.m4.
  4544. * m4/mktime.m4: New file.
  4545. * m4/Makefile.am.in, m4/README: Remove these files.
  4546. * m4/Makefile.am (EXTRA_DIST): Add mktime.m4;
  4547. remove README, Makefile.am.in.
  4548. (Makefile.am): Remove rule; it didn't work in BSD/OS 4.0.
  4549. * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Invoke AC_FUNC_MKTIME,
  4550. not AM_FUNC_MKTIME.
  4551. * src/tar.c: Include signal.h.
  4552. (SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
  4553. (main): Ensure SIGCHLD is not ignored.
  4554. (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
  4555. MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
  4556. OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
  4557. RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
  4558. VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES,
  4559. OBSOLETE_BLOCK_COMPRESS, OBSOLETE_BLOCKING_FACTOR,
  4560. OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH,
  4561. OBSOLETE_VERSION_CONTROL): Make sure they can't be valid chars, so
  4562. they don't overlap with char codes. Use an enum instead of a lot
  4563. of #defines.
  4564. * src/system.h (ISASCII): Remove.
  4565. (CTYPE_DOMAIN, ISDIGIT, ISODIGIT, ISPRINT, ISSPACE, S_ISUID,
  4566. S_ISGID, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP,
  4567. S_IROTH, S_IWOTH, S_IXOTH, MODE_WXUSR, MODE_R, MODE_RW,
  4568. MODE_RWX, MODE_ALL, SEEK_SET, SEEK_CUR, SEEK_END, CHAR_MAX,
  4569. LONG_MAX): New macros.
  4570. * src/incremen.c (ISDIGIT, ISSPACE): Remove; now in system.h.
  4571. (read_directory_file): Cast ISSPACE arg to unsigned char.
  4572. * src/misc.c (ISPRINT): Remove; now in system.h.
  4573. (remove_any_file): Add brackets to pacify gcc -Wall.
  4574. * src/list.c: Don't include <ctype.h>; system.h already does this.
  4575. (ISODIGIT, ISSPACE): Remove; now in system.h.
  4576. (decode_header): No need to AND mode with 07777; MODE_FROM_OCT
  4577. does this now.
  4578. (from_oct): Cast ISSPACE arg to unsigned char.
  4579. * src/create.c (mode_to_oct): Translate modes from internal to
  4580. external form.
  4581. * src/list.c (mode_from_oct): Translate modes from external to
  4582. internal form. Do not complain about unrecognized mode bits.
  4583. * src/common.h (TSUID, TSGID, TSVTX, TUREAD, TUWRITE, TUEXEC,
  4584. TGREAD, TGWRITE, TGEXEC, TOREAD, TOWRITE, TOEXEC): Remove undefs.
  4585. * src/extract.c: (extr_init, make_directories, extract_archive):
  4586. Do not assume mode bits have traditional Unix values.
  4587. * src/list.c (decode_mode): Likewise.
  4588. * src/create.c (start_header, dump_file): Likewise.
  4589. * src/buffer.c (child_open_for_compress,
  4590. child_open_for_uncompress, open_archive, (close_archive): Likewise.
  4591. * src/compare.c (diff_archive): Likewise.
  4592. * src/extract.c (set_mode): Use %04 not %0.4 format.
  4593. (extract_sparse_file): Do not use data_block uninitialized.
  4594. Check for lseek failures.
  4595. * src/rtapelib.c (rmt_lseek__):
  4596. Convert lseek whence values to portable integers on the wire.
  4597. * src/rmt.c (main): Likewise. Check for whence values out of range.
  4598. * src/create.c (finish_sparse_file): Use lseek whence macros
  4599. instead of integers.
  4600. * src/buffer.c (backspace_output): Likewise.
  4601. * src/compare.c (diff_archive, verify_volume): Likewise.
  4602. * src/delete.c (move_archive): Likewise.
  4603. * src/extract.c (extract_sparse_file): Likewise.
  4604. * src/create.c (dump_file): Do not invoke finish_sparse_file
  4605. on a negative file descriptor.
  4606. * src/buffer.c: Add braces to pacify gcc -Wall.
  4607. * src/compare.c (diff_sparse_files): Report lseek errors.
  4608. * configure.in (ALL_LINGUAS): Add cs, es, ru.
  4609. * PORTS, TODO: gnu.ai.mit.edu -> gnu.org
  4610. * src/arith.c, src/buffer.c (new_volume): Don't put ^G in
  4611. message to be internationalized; \a doesn't work with msgfmt.
  4612. * src/tar.c (long_options, main, usage, OPTION_STRING):
  4613. Remove -E or --ending-file.
  4614. * src/list.c (read_and): Likewise.
  4615. * src/common.h (ending_file_option): Likewise.
  4616. * src/buffer.c (close_archive): Likewise.
  4617. * tests/after: Don't run two commands together in a pipeline,
  4618. as some old shells mishandle pipeline exit status.
  4619. 1999-06-28 Paul Eggert <eggert@twinsun.com>
  4620. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64015.
  4621. * NEWS: Describe changes since 1.12.
  4622. * README: Update bug reporting address; move paxutils ref to NEWS.
  4623. Handle EINTR correctly.
  4624. * lib/Makefile.am (libtar_a_SOURCES): Add full-read.c, full-write.c.
  4625. * lib/full-read.c, lib/full-write.c: New files.
  4626. * src/buffer.c (child_open_for_compress, child_open_for_uncompress):
  4627. Prefer full_read to read and full_write to write.
  4628. * src/compare.c (process_rawdata, diff_sparse_files): Likewise.
  4629. * src/create.c (deal_with_sparse, finish_sparse_file, dump_file):
  4630. Likewise.
  4631. * src/extract.c (extract_sparse_file): Likewise.
  4632. * src/rmt.c (get_string, main, report_error_message,
  4633. report_numbered_error): Likewise.
  4634. * src/rmt.h (rmtread, rmtwrite): Likewise.
  4635. * src/rtapelib.c (do_command, get_status_string, rmt_read__,
  4636. rmt_write__, rmt_ioctl__): Likewise.
  4637. * src/update.c (append_file): Likewise.
  4638. * src/system.h (full_read, full_write): New decls.
  4639. * po/POTFILES.in: Add lib/argmatch.c, lib/error.c lib/getopt.c,
  4640. lib/xmalloc.c, src/arith.c, src/misc.c.
  4641. * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
  4642. New macros. All uses of STDIN and STDOUT changed.
  4643. * src/rmt.c (prepare_record_buffer, main): Use STDIN_FILENO
  4644. instead of 0 and STDOUT_FILENO instead of 1.
  4645. * src/rtapelib.c (_rmt_rexec): Use STDIN_FILENO and STDOUT_FILENO
  4646. instead of fileno (stdin) and fileno (stdout) or 0 and 1.
  4647. * src/rmt.c (private_strerror): Avoid const. Translate results.
  4648. * tests/Makefile.am (TESTS): Remove incremen.sh; it doesn't work
  4649. in the presence of NFS clock skew.
  4650. 1999-06-25 Paul Eggert <eggert@twinsun.com>
  4651. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64014.
  4652. * src/buffer.c (write_archive_buffer): New function.
  4653. (child_open_for_compress, flush_write, flush_read): Use it to write
  4654. buffers.
  4655. (open_archive): Report error if fstat of archive fails.
  4656. Improve efficiency of check for /dev/null.
  4657. Also, fix some corner cases with remote archives and /dev/null checking.
  4658. (close_archive): Test for input fifo only if not remote.
  4659. Truncate output archive only if it's not remote.
  4660. * src/misc.c (remove_any_file):
  4661. Don't terminate if you see . or ..; just skip them.
  4662. 1999-06-18 Paul Eggert <eggert@twinsun.com>
  4663. * configure.in (AM_INIT_AUTOMAKE): version 1.12.64013.
  4664. Output sizes using a format that's more compatible with
  4665. traditional tar (and with GNU Emacs).
  4666. * src/common.h (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT,
  4667. MODE_TO_OCT, SIZE_TO_OCT, UID_TO_OCT, UINTMAX_TO_OCT):
  4668. Don't subtract 1 from size.
  4669. * src/create.c (to_oct): Prepend leading zeros, not spaces.
  4670. Output a trailing NUL unless the value won't fit without it.
  4671. (finish_header): No need to append NUL to chksum, now that
  4672. to_oct is doing it.
  4673. 1999-06-16 Paul Eggert <eggert@twinsun.com>
  4674. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64012.
  4675. * src/Makefile.am (LDADD): Link libtar.a after @INTLLIBS@, since
  4676. @INTLLIBS@ might invoke rpl_realloc.
  4677. * src/tar.c (backup_type): Remove decl; backupfile.h now has it.
  4678. (intconv): Remove; use xstrto* fns instead.
  4679. ("xstrtol.h"): Include.
  4680. (check_decimal): Remove.
  4681. (long_options, usage, OPTION_STRING, decode_options):
  4682. Remove -y, --bzip2, --unbzip2.
  4683. (decode_options): Use xget_version instead of get_version.
  4684. Check for overflow with -b and -L and RECORD_SIZE_OPTION.
  4685. Replace invocations of check_decimal with xstrtoumax.
  4686. * tests/preset.in (echo_n, echo_c): Remove.
  4687. * tests/after: Don't rely on $echo_c and $echo_n.
  4688. * lib/addext.c, lib/dirname.c, lib/lchown.c, lib/lchown.h,
  4689. lib/malloc.c, lib/mktime.c, lib/realloc.c, lib/strtol.c, lib/strtoul.c,
  4690. lib/strtoull.c, lib/strtoumax.c, lib/utime.c, lib/xstrtol.c,
  4691. lib/xstrtol.h, lib/xstrtoul.c, lib/xstrtoumax.c,
  4692. m4/Makefile.am.in, m4/README, m4/ccstdc.m4, m4/d-ino.m4,
  4693. m4/gettext.m4, m4/inttypes_h.m4, m4/isc-posix.m4,
  4694. m4/jm-mktime.m4, m4/largefile.m4, m4/lcmessage.m4,
  4695. m4/malloc.m4, m4/progtest.m4, m4/realloc.m4, m4/uintmax_t.m4,
  4696. m4/ulonglong.m4, m4/utimbuf.m4, m4/utime.m4, m4/utimes.m4,
  4697. m4/xstrtoumax.m4: New files.
  4698. * configure.in(fp_PROG_ECHO): Remove; no longer needed.
  4699. (AC_SYS_LARGEFILE): Renamed from AC_LFS.
  4700. (jm_AC_HEADER_INTTYPES_H): Replaces inline code.
  4701. (jm_STRUCT_DIRENT_D_INO, jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX): Add.
  4702. (AC_CHECK_FUNCS): Remove lchown.
  4703. (AC_REPLACE_FUNCS): Remove basename, dirname.
  4704. Add lchown, strtol, strtoul.
  4705. (jm_FUNC_MKTIME): Add.
  4706. (LIBOBJS): Replace .o with $U.o, so that the .o files in LIBOBJS
  4707. are also built via the ANSI2KNR-filtering rules.
  4708. Use a no-op line to work around bug in automake 1.4 with malloc and
  4709. realloc.
  4710. (AC_OUTPUT): Add m4/Makefile.
  4711. * lib/Makefile.am (EXTRA_DIST):
  4712. Add lchown.c, malloc.c, mktime.c, realloc.c,
  4713. strtol.c, strtoul.c, strtoull.c, strtoumax.c, utime.c.
  4714. (noinst_HEADERS): Add lchown.h, modechange.h, xstrtol.h.
  4715. (libtar_a_SOURCES): Add addext.c, basename.c, xstrtol.c,
  4716. xstrtoul.c, xstrtoumax.c. Remove getversion.c.
  4717. ($(srcdir)/getdate.c:): Remove `expect conflicts' line.
  4718. * src/system.h (uintmax_t): Don't declare; configure now does this.
  4719. * src/common.h (backup_type): New decl.
  4720. * src/common.h, src/misc.c, src/tar.c:
  4721. Move include of backupfile.h to common.h.
  4722. * src/misc.c (maybe_backup_file):
  4723. Pass backup_type to find_backup_file_name.
  4724. * src/list.c (print_header): Change sizes of uform and gform from 11 to
  4725. UINTMAX_STRSIZE_BOUND.
  4726. * doc/tar.texi: Remove --bzip2.
  4727. Fix @xref typos reported by latest makeinfo.
  4728. * Makefile.am (ACLOCAL_AMFLAGS): New macro.
  4729. (SUBDIRS): Add m4.
  4730. (M4DIR, ACINCLUDE_INPUTS): New macros.
  4731. ($(srcdir)/acinclude.m4): New rule.
  4732. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
  4733. HAVE_INTTYPES_H, HAVE_LC_MESSAGES, HAVE_STPCPY): Remve #undefs;
  4734. now generated automatically by autoconf.
  4735. 1999-05-15 Paul Eggert <eggert@twinsun.com>
  4736. * doc/tar.texi: Remove -y.
  4737. 1999-04-09 Paul Eggert <eggert@twinsun.com>
  4738. * src/system.h (INT_STRLEN_BOUND): Fix off-by-factor-of-10 typo
  4739. (we were allocating too much storage).
  4740. (uintmax_t): Don't declare; configure now does this.
  4741. * ABOUT-NLS: Update to gettext 0.10.35 edition.
  4742. 1999-03-22 Paul Eggert <eggert@twinsun.com>
  4743. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64010
  4744. * acinclude.m4 (AC_LFS_FLAGS):
  4745. Don't use -mabi=n32 with GCC on IRIX 6.2; it's the default.
  4746. (AC_LFS): -n32, -o32, and -n64 are CPPFLAGS, not CFLAGS.
  4747. (jm_FUNC_MALLOC, jm_FUNC_REALLOC): New macros.
  4748. * configure.in (jm_FUNC_MALLOC, jm_FUNC_REALLOC):
  4749. New macros; needed for latest GNU xmalloc.c.
  4750. * Makefile.am (noinst_HEADERS): Add quotearg.h, xalloc.h.
  4751. (libtar_a_SOURCES): Add quotearg.c.
  4752. * list.c: Include <quotearg.h>.
  4753. (from_oct): Add forward decl.
  4754. (read_header): Return HEADER_FAILURE if we can't parse the checksum.
  4755. (from_oct): Report an error only if TYPE is nonzero.
  4756. Quote any funny characters in bad header.
  4757. 1999-03-20 Paul Eggert <eggert@twinsun.com>
  4758. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64009
  4759. * acinclude.m4 (AC_LFS_FLAGS): Add support for IRIX 6.2 and later.
  4760. (AC_LFS_SPACE_APPEND): Assume $2 is quoted properly; all callers
  4761. changed.
  4762. (AC_LFS): Simplify AIX revision number test.
  4763. 1999-03-17 Paul Eggert <eggert@twinsun.com>
  4764. * NEWS, configure.in (AM_INIT_AUTOMAKE): version 1.12.64008
  4765. * configure.in (AC_VALIDATE_CACHED_SYSTEM_TUPLE):
  4766. Remove; it doesn't work that well
  4767. with AC_CANONICAL_HOST.
  4768. (fp_WITH_INCLUDED_MALLOC): Remove; we'll just use the system malloc.
  4769. * Makefile.am (EXTRA_DIST): Remove AC-PATCHES, AM-PATCHES, BI-PATCHES.
  4770. * Makefile.am (EXTRA_DIST): Remove gmalloc.c.
  4771. * acinclude.m4 (fp_WITH_INCLUDED_MALLOC): Remove.
  4772. * tar.texi: Fix bug-report addr.
  4773. * README: Remove --with-included-malloc.
  4774. Upgrade version numbers of build software.
  4775. 1999-03-07 Paul Eggert <eggert@twinsun.com>
  4776. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64007.
  4777. * acinclude.m4 (AM_WITH_NLS): Port to Solaris 2.5.1,
  4778. where bindtextdomain and gettext require -lintl.
  4779. (AC_LFS_FLAGS): Simplify so that it only gets the flags;
  4780. `no' means it failed.
  4781. (AC_LFS_SPACE_APPEND, AC_LFS_MACRO_VALUE): New macros.
  4782. (AC_LFS): Use them. Set _FILE_OFFSET_BITS, _LARGEFILE_SOURCE, and
  4783. _LARGE_FILES from LFS_CFLAGS, so that in the normal case we don't need
  4784. to add anything to the command line (it's all in config.h).
  4785. Put any extra -D and -I options into CPPFLAGS, the rest into CFLAGS.
  4786. 1999-03-01 Paul Eggert <eggert@twinsun.com>
  4787. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64006.
  4788. * acinclude.m4 (AC_LFS_FLAGS): Port to AIX 4.2.
  4789. * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
  4790. mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
  4791. uid_from_oct, uintmax_from_oct): Use TYPE_MAXIMUM instead of macros
  4792. like OFF_MAX, which are not reliable
  4793. (e.g. OFF_MAX in AIX 4.2 is incorrect).
  4794. * src/system.h (GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX, OFF_MAX,
  4795. SIZE_MAX, TIME_MAX,UID_MAX, UINTMAX_MAX): Remove; no longer used.
  4796. * src/incremen.c (get_directory_contents):
  4797. Don't use statx if _LARGE_FILES; it doesn't work under AIX 4.2.
  4798. Have statx depend on STX_HIDDEN, not AIX.
  4799. * src/create.c (to_oct):
  4800. New parameter substitute, giving a substitute value to use
  4801. when the original value is out of range. Do not append a space to the
  4802. output; modern tars don't. When a value is out of range, specify the
  4803. maximum value, not the number of bits.
  4804. (GID_NOBODY, UID_NOBODY): New macros.
  4805. (gid_to_oct, uid_to_oct): Use them as substitutes.
  4806. (finish_header): Do not assume that UINTMAX_TO_OCT appends a space.
  4807. (dump_file): Check whether the file changed as we read it.
  4808. * src/rmt.c (main): Remove suspicious AIX/386 code.
  4809. 1999-02-19 Paul Eggert <eggert@twinsun.com>
  4810. * intl/localealias.c (read_alias_file): Don't assume that memcpy
  4811. returns a type compatible with char *; it doesn't on SunOS
  4812. 4.1.4 with Sun cc, since <string.h> doesn't declare memcpy.
  4813. * NEWS, configure.in (AM_INIT_AUTOMAKE): Version 1.12.64005.
  4814. * src/tar.c (long_options, usage): Prefer --unbzip2 to --bunzip2.
  4815. * doc/tar.texi: Add --bzip2, --unbzip2 options.
  4816. * configure.in (AC_CANONICAL_HOST, AC_VALIDATE_CACHED_SYSTEM_TUPLE):
  4817. Add.
  4818. (AC_LINK_FILES): Omit; AM_GNU_GETTEXT now does this.
  4819. (AC_OUTPUT): Omit munging of po/Makefile; AM_GNU_GETTEXT now does this.
  4820. * acinclude.m4 (AM_WITH_NLS):
  4821. Update to latest gettext version (serial 5).
  4822. (AC_LFS_FLAGS): New macro
  4823. (AC_LFS): Use it. Append to CFLAGS, LDFLAGS, LDLIBS instead of
  4824. working only with unset variables. Append to CFLAGS, not CPPFLAGS.
  4825. Work properly in cross-compilation scenario, by checking for getconf
  4826. with AC_CHECK_TOOL and by ditching uname in favor of
  4827. AC_CANONICAL_HOST and $host_os. Add --disable-lfs option.
  4828. * lib/getdate.y: Update to fileutils 4.0 getdate.y, with one patch:
  4829. replace FORCE_ALLOCA_H with HAVE_ALLOCA_H.
  4830. * lib/Makefile.am (AUTOMAKE_OPTIONS): Append ../src/ansi2knr,
  4831. since getdate.y now uses ANSI code.
  4832. * config.guess, config.sub: New files; taken from automake 1.4.
  4833. * intl/Makefile.in, intl/VERSION, intl/bindtextdom.c,
  4834. intl/cat-compat.c, intl/dcgettext.c, intl/dgettext.c,
  4835. intl/explodename.c, intl/finddomain.c, intl/gettext.c,
  4836. intl/gettext.h, intl/gettextP.h, intl/hash-string.h,
  4837. intl/l10nflist.c, intl/libgettext.h, intl/loadinfo.h,
  4838. intl/loadmsgcat.c, intl/localealias.c, intl/textdomain.c:
  4839. Update to GNU gettext 0.10.35, with patches as per GCC snapshot 990109.
  4840. 1999-02-01 Paul Eggert <eggert@twinsun.com>
  4841. * src/tar.c: Update copyright.
  4842. * NEWS: 1.12.64004
  4843. 1999-02-01 Paul Eggert <eggert@twinsun.com>
  4844. * NEWS, configure.in: Version 1.12.64004
  4845. * configure.in (AC_LFS): Use this macro, instead of open-coding it.
  4846. * acinclude.m4 (AC_LFS, AM_PROG_CC_STDC): New macros.
  4847. * src/extract.c (extract_archive): Fix bug when extracting sparse
  4848. files: they were trashing the tar file header.
  4849. * src/tar.c: (long_options, usage, OPTION_STRING, decode_options):
  4850. Add -y or --bzip2 or --bunzip2 option.
  4851. 1999-01-30 Paul Eggert <eggert@twinsun.com>
  4852. * src/names.c (cached_no_such_uname, cached_no_such_gname,
  4853. cached_no_such_uid, cached_no_such_gid): New vars.
  4854. (uid_to_uname, gid_to_gname, uname_to_uid, gname_to_gid):
  4855. Cache failures, too.
  4856. * src/tar.c (decode_options):
  4857. Don't pass names longer than UNAME_FIELD_SIZE to
  4858. uname_to_uid, as it messes up the cache. Similarly for gname_to_uid.
  4859. 1999-01-27 Paul Eggert <eggert@twinsun.com>
  4860. * NEWS, configure.in: Version 1.12.64003
  4861. * src/buffer.c (backspace_output, close_archive): Cast
  4862. rmtlseek position arg to off_t, for benefit of K&R compilers
  4863. with long long.
  4864. * src/compare.c (verify_volume): Likewise.
  4865. * NEWS, configure.in: Version 1.12.64002
  4866. * src/create.c (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct,
  4867. off_to_oct, size_to_oct, time_to_oct, uid_to_oct):
  4868. Cast arg to uintmax_t for benefit of pre-ANSI compilers with long long.
  4869. * src/list.c: (gid_from_oct, major_from_oct, minor_from_oct,
  4870. mode_from_oct, off_from_oct, size_from_oct, time_from_oct,
  4871. uid_from_oct): Likewise.
  4872. 1999-01-25 Paul Eggert <eggert@twinsun.com>
  4873. * incremen.sh: Fix timing bug in regression test.
  4874. 1999-01-22 Paul Eggert <eggert@twinsun.com>
  4875. * NEWS, configure.in: Update version
  4876. * Makefile.am (localedir): Change to $(datadir)/locale.
  4877. (DEFS): New macro, defining LOCALEDIR.
  4878. (tar.o, tar._o, rmt.o, rmt._o): Remove.
  4879. (INCLUDES): Add -I..
  4880. * Makefile.am (localedir): Change to $(datadir)/locale.
  4881. 1999-01-21 Paul Eggert <eggert@twinsun.com>
  4882. * NEWS, README, configure.in: Unofficial version 1.12.64001.
  4883. * tests/Makefile.am (localedir): Change to $(datadir)/locale.
  4884. * src/Makefile.am (localedir): Likewise.
  4885. (DEFS): New macro, defining LOCALEDIR.
  4886. (tar.o, tar._o, rmt.o, rmt._o): Remove.
  4887. (INCLUDES): Add `-I..'.
  4888. * tests/incremen.sh: Fix timing bug.
  4889. 1999-01-20 Paul Eggert <eggert@twinsun.com>
  4890. * NEWS, README, configure.in: Unofficial version 1.12.64000.
  4891. `lfs.7' changed to `64000' in version number
  4892. to conform to gnits standards.
  4893. * COPYING, INSTALL, doc/texinfo.tex, install-sh, missing,
  4894. mkinstalldirs, ansi2knr.c: Update to latest public versions.
  4895. Rebuild with automake 1.4 and autoconf 2.13, to work around some
  4896. porting problems.
  4897. 1998-12-07 Paul Eggert <eggert@twinsun.com>
  4898. * NEWS, README, configure.in: Unofficial version 1.12.lfs.6.
  4899. * src/list.c (read_header):
  4900. Accept file names as specified by POSIX.1-1996 section 10.1.1.
  4901. 1998-11-30 Paul Eggert <eggert@twinsun.com>
  4902. * configure.in: Quote the output of uname.
  4903. * src/extract.c (set_stat): chmod after chown even when not root;
  4904. if we are using --same-owner this is needed e.g. on Solaris 2.5.1.
  4905. 1998-11-15 Paul Eggert <eggert@twinsun.com>
  4906. * NEWS, README, configure.in: Unofficial version 1.12.lfs.5.
  4907. * configure.in (ac_test_CPPFLAGS, ac_test_LDFLAGS, ac_test_LIBS,
  4908. ac_getconfs, ac_result): Special case for HP-UX 10.20 or later.
  4909. 1998-10-28 Paul Eggert <eggert@twinsun.com>
  4910. * NEWS, README, configure.in: Unofficial version 1.12.lfs.4.
  4911. * src/system.h (voidstar): Use void * if __STDC__ is defined,
  4912. not merely nonzero.
  4913. * src/rtapelib.c: Don't use rexec code unless compiled with WITH_REXEC.
  4914. On many installations, rexec is disabled.
  4915. 1998-08-07 Paul Eggert <eggert@twinsun.com>
  4916. * NEWS, README, configure.in: Unofficial version 1.12.lfs.3.
  4917. * src/names.c (uid_to_uname, gid_to_gname): Don't used cached name
  4918. for nameless users and groups.
  4919. 1998-02-17 Paul Eggert <eggert@twinsun.com>
  4920. * NEWS, README, configure.in: Unofficial version 1.12.lfs.2.
  4921. * NEWS, README: Add explanation of why this isn't an official version.
  4922. 1998-02-02 Paul Eggert <eggert@twinsun.com>
  4923. * NEWS, README, configure.in: Unofficial version 1.12.lfs.1.
  4924. This is an unofficial version.
  4925. 1997-12-17 Paul Eggert <eggert@twinsun.com>
  4926. * src/incremen.c (ST_DEV_MSB): New macro.
  4927. (NFS_FILE_STAT): Use most significant bit of st_dev,
  4928. even if it's unsigned.
  4929. 1997-12-08 Paul Eggert <eggert@twinsun.com>
  4930. * src/system.h (ST_NBLOCKS): Fix typo in definition.
  4931. 1997-11-19 Paul Eggert <eggert@twinsun.com>
  4932. * configure.in (HAVE_INTTYPES_H):
  4933. Don't ignore cache variable if it's already set.
  4934. 1997-11-10 Paul Eggert <eggert@twinsun.com>
  4935. * src/rmt.c (main): Don't assume mt_count is of type daddr_t.
  4936. * src/delete.c (records_read): Now off_t.
  4937. (move_archive): Don't assume mt_count is of type daddr_t.
  4938. 1997-10-30 Paul Eggert <eggert@twinsun.com>
  4939. * configure.in (CPPFLAGS, LDFLAGS, LIBS):
  4940. Set to appropriate values if large file support
  4941. needs explicit enabling.
  4942. (HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING, daddr_t, major_t, minor_t,
  4943. ssize_t):
  4944. New macros to configure.
  4945. (AC_TYPE_MODE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T): Add.
  4946. * acconfig.h (daddr_t, HAVE_INTTYPES_H, HAVE_ST_FSTYPE_STRING,
  4947. major_t, minor_t, ssize_t): New macros.
  4948. * src/arith.h (TARLONG_FORMAT):
  4949. Fix typo: %uld -> %lu. Use unsigned when long long
  4950. (%lld -> %llu).
  4951. (add_to_tarlong_helper, mult_tarlong_helper): 2nd arg is now unsigned long.
  4952. (add_to_tarlong, mult_tarlong): Cast 2nd arg to unsigned long.
  4953. * src/arith.c (add_to_tarlong_helper, mult_tarlong_helper):
  4954. 2nd arg is now unsigned long.
  4955. * src/rmt.c (allocated_size): Now size_t, and now initialized to 0.
  4956. (prepare_record_buffer): Arg is now size_t.
  4957. Remove now-useless casts.
  4958. (main): Use `long' for status, so that it can store ssize_t.
  4959. Use daddr_t, mode_t, size_t, off_t when appropriate.
  4960. Convert daddr_t and off_t values ourselves, since they might be longer
  4961. than long. Convert other types using `long' primitives.
  4962. When processing MTIOCTOP, do not try to pass resulting
  4963. count back, since it won't work (it could be too large) and it's
  4964. not expected anyway.
  4965. * src/update.c:
  4966. (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
  4967. now-useless casts. Use unsigned long to print *_t types, except use
  4968. STRINGIFY_BIGINT for off_t.
  4969. (update_archive): Cast -1 to dev_t when necessary.
  4970. * src/tar.c (check_decimal):
  4971. Now returns 1 if successful, 0 otherwise, and returns
  4972. uintmax_t value into new arg. Check for arithmetic overflow.
  4973. (decode_options): Avoid overflow if record_size fits in size_t but not int.
  4974. Check for overflow on user or group ids.
  4975. * src/compare.c (diff_init, process_rawdata, read_and_process,
  4976. diff_sparse_files, diff_archive):
  4977. Use off_t, pid_t, size_t, ssize_t when appropriate.
  4978. Remove now-useless casts. Use unsigned long to print *_t types,
  4979. except use STRINGIFY_BIGINT for off_t.
  4980. (process_noop, process_rawdata, process_dumpdir, read_and_process):
  4981. Size arg is now size_t.
  4982. (diff_sparse_files): Arg is now off_t. Check for size_t overflow
  4983. when allocating buffer.
  4984. * src/rtapelib.c:
  4985. (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__):
  4986. Use pid_t, size_t, ssize_t when appropriate. Remove now-useless casts.
  4987. Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
  4988. off_t.
  4989. (get_status_string, get_status_off): New function.
  4990. (get_status): Now returns long, so that it can store ssize_t.
  4991. Invoke get_status_string to do the real work.
  4992. (rmt_read__, rmt_write__): Now returns ssize_t. Size arg is now size_t.
  4993. (rmt_lseek__): Now returns off_t, using new get_status_off function.
  4994. (rmt_ioctl__): Convert mt_count by hand,
  4995. since it might be longer than long.
  4996. * src/mangle.c (extract_mangle):
  4997. Check for overflow when converting off_t to size_t.
  4998. Use off_t, size_t when appropriate. Remove now-useless casts.
  4999. * src/system.h (mode_t): Remove; now done by autoconf.
  5000. (ST_NBLOCKS): Do not overflow if st_size is near maximum.
  5001. Return number of ST_NBLOCKSIZE-byte blocks,
  5002. not number of 512-byte blocks;
  5003. this also helps to avoid overflow.
  5004. (st_blocks): Declare if needed.
  5005. (ST_NBLOCKSIZE): New macro.
  5006. (<limits.h>, <inttypes.h>): Include if available.
  5007. (CHAR_BIT): New macro.
  5008. (uintmax_t): New typedef.
  5009. (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_STRLEN_BOUND,
  5010. UINTMAX_STRSIZE_BOUND, GID_MAX, MAJOR_MAX, MINOR_MAX, MODE_MAX,
  5011. OFF_MAX, SIZE_MAX, TIME_MAX, UID_MAX, UINTMAX_MAX): New macros.
  5012. * src/names.c (name_init):
  5013. Fix typo in error message: FILE* was passed, but char*
  5014. was wanted.
  5015. (read_name_from_file, name_gather, addname, name_match, name_scan,
  5016. add_exclude): Use size_t when appropriate. Remove now-useless casts.
  5017. (exclude_pool_size, allocated_exclude_pool_size): Now size_t.
  5018. * src/extract.c (newdir_umask, current_umask): Now mode_t.
  5019. (extract_sparse_file): Args now use off_t.
  5020. (set_mode, set_stat, make_directories, extract_sparse_file,
  5021. extract_archive): Use off_t, size_t, ssize_t when appropriate. Remove
  5022. now-useless casts. Use unsigned long to print *_t types, except use
  5023. STRINGIFY_BIGINT for off_t.
  5024. * src/misc.c (quote_copy_string):
  5025. Use size_t when appropriate. Remove now-useless casts.
  5026. * src/list.c (read_and, list_archive, read_header, decode_mode,
  5027. print_header, print_for_mkdir):
  5028. Use mode_t, off_t, size_t when appropriate. Remove
  5029. now-useless casts. Use unsigned long to print *_t types, except use
  5030. STRINGIFY_BIGINT for off_t.
  5031. (read_header): Check for overflow when converting header size.
  5032. (from_oct): Now static. Now returns uintmax_t. `where' arg is now
  5033. const char *. Size arg is now size_t. Now takes new type and maxval
  5034. args. Compute result using uintmax_t, not long. Report error if
  5035. field does not contain octal number in range.
  5036. (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
  5037. off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
  5038. uintmax_from_oct): New functions.
  5039. (stringify_uintmax_t_backwards): New function.
  5040. (decode_mode, print_for_mkdir): Mode arg is now mode_t.
  5041. (skip_file): Offset arg is now off_t.
  5042. * src/buffer.c (record_start_block, save_totsize, save_sizeleft,
  5043. real_s_totsize, real_s_sizeleft, current_block_ordinal):
  5044. Now off_t.
  5045. (write_error): Arg is now ssize_t.
  5046. (child_pid): Now pid_t.
  5047. (available_space_after): Now size_t.
  5048. (child_open_for_compress, child_open_for_uncompress, flush_write,
  5049. open_archive, flush_write, write_error, flush_read, close_archive):
  5050. Use pid_t, ssize_t, size_t when appropriate. Remove now-useless
  5051. casts. Use unsigned long to print *_t types, except use
  5052. STRINGIFY_BIGINT for off_t.
  5053. * src/delete.c (records_read): Now daddr_t.
  5054. (move_archive): Arg is now daddr_t. Check for overflow when
  5055. computing offset.
  5056. (move_archive, delete_archive_members): Use daddr_t, off_t when
  5057. appropriate. Remove now-useless casts.
  5058. * src/rmt.h (rmt_read__, rmt_write__): Now returns ssize_t.
  5059. (rmt_lseek): Now returns off_t.
  5060. * src/create.c (to_oct):
  5061. Now static. Value arg is now uintmax_t. Accept new args
  5062. giving name of type of octal field, for error messages. Report an
  5063. error if the value is too large to fit in the field.
  5064. (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
  5065. size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.
  5066. (write_eot, write_long, finish_header, deal_with_sparse,
  5067. finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
  5068. appropriate. Remove now-useless casts. Use unsigned long to print
  5069. *_t types, except use STRINGIFY_BIGINT for off_t.
  5070. (find_new_file_size): 1st arg is now off_t*.
  5071. (finish_sparse_file): Args now use off_t, not long.
  5072. Check for lseek error.
  5073. (create_archive, dump_file): Cast -1 to dev_t when necessary.
  5074. (dump_file): Device arg is now dev_t.
  5075. Avoid overflow when testing whether file has holes
  5076. by using the new ST_NBLOCKSIZE macro.
  5077. * src/incremen.c (struct accumulator, add_to_accumulator,
  5078. get_directory_contents, add_hierarchy_to_namelist, gnu_restore):
  5079. Use size_t for sizes.
  5080. (struct directory, get_directory_contents, add_hierarchy_to_namelist):
  5081. Use dev_t, ino_t for devices and inodes.
  5082. (gnu_restore): Use off_t for file offsets.
  5083. (struct directory): Use char for flags. Add new flag `nfs'.
  5084. (nfs): New constant
  5085. (NFS_FILE_STAT): New macro.
  5086. (note_directory): Accept struct stat * instead of
  5087. device and inode number. All callers changed.
  5088. (note_directory, get_directory_contents):
  5089. Use NFS_FILE_STAT to determine whether directory is an NFS directory.
  5090. (write_dir_file): Cast time_t to unsigned long before printing as %lu.
  5091. * src/common.h (record_size, struct name, struct sp_array,
  5092. available_space_after):
  5093. Use size_t for sizes.
  5094. (save_sizeleft, save_totsize, current_block_ordinal, skip_file):
  5095. Use off_t for file offsets.
  5096. (struct name): dir_contents is now const char *, not char *.
  5097. (dump_file, get_directory_contents): Use dev_t for devices.
  5098. (to_oct): Remove decl.
  5099. (GID_TO_OCT, MAJOR_TO_OCT, MINOR_TO_OCT, MODE_TO_OCT, SIZE_TO_OCT,
  5100. UID_TO_OCT, UINTMAX_TO_OCT, OFF_TO_OCT, TIME_TO_OCT, STRINGIFY_BIGINT,
  5101. GID_FROM_OCT, MAJOR_FROM_OCT, MINOR_FROM_OCT, MODE_FROM_OCT,
  5102. OFF_FROM_OCT, SIZE_FROM_OCT, TIME_FROM_OCT, UID_FROM_OCT,
  5103. UINTMAX_FROM_OCT): New macros.
  5104. (gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
  5105. size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct,
  5106. stringify_uintmax_t_backwards, gid_from_oct, major_from_oct,
  5107. minor_from_oct, mode_from_oct, off_from_oct, size_from_oct,
  5108. time_from_oct, uid_from_oct, uintmax_from_oct): New decls.
  5109. (print_for_mkdir): 2nd arg is now mode_t.
  5110. See ChangeLog.1 for earlier changes.
  5111. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software
  5112. Foundation, Inc.
  5113. This file is part of GNU tar.
  5114. GNU tar is free software; you can redistribute it and/or modify
  5115. it under the terms of the GNU General Public License as published by
  5116. the Free Software Foundation; either version 2, or (at your option)
  5117. any later version.
  5118. GNU tar is distributed in the hope that it will be useful,
  5119. but WITHOUT ANY WARRANTY; without even the implied warranty of
  5120. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  5121. GNU General Public License for more details.
  5122. You should have received a copy of the GNU General Public License
  5123. along with GNU tar; see the file COPYING. If not, write to
  5124. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  5125. Boston, MA 02110-1301, USA.
  5126. Local Variables:
  5127. mode: change-log
  5128. version-control: never
  5129. End: