OSDN Git Service

Guard against NULL pointer dereferences in tinyxml code.
[mingw/mingw-get.git] / ChangeLog
1 2010-03-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
2
3         Guard against NULL pointer dereferences in tinyxml code.
4
5         * src/pkgbase.h (pkgXmlNode::GetName): Verify `this' pointer is
6         non-NULL, before invoking the underlying tinyxml method.
7         (pkgXmlNode::GetParent, pkgXmlNode::GetChildren): Likewise.
8         (pkgXmlNode::GetNext, pkgXmlNode::GetPropVal): Likewise.
9         (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
10         (pkgXmlNode::GetDocumentRoot): Likewise.
11         (pkgXmlNode::IsElementOfType): Likewise.
12
13 2010-03-28  Cesar Strauss  <cestrauss@gmail.com>
14
15         Avoid running InternetAttemptConnect in pkgInternetAgent
16         constructor, since it is called during DLL initialisation.
17
18         * src/pkginet.cpp (pkgInternetAgent::pkgInternetAgent): Move the
19         InternetAttemptConnect call from constructor...
20         (pkgInternetAgent::OpenURL): ...to here.
21
22 2010-03-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
23
24         Automate object code dependency tracking.
25
26         * Makefile.in (DEPFLAGS): New macro; define it.
27         (%.OBJEXT: %.c, %.OBJEXT: %.cpp): Add dependency generator commands...
28         (%.d): ...to create these dependency maps; `sinclude' them, and...
29         (clean): ...remove them.
30         
31         * .cvsignore (*.d): Add wild card template to match them.
32
33 2010-03-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
34
35         Support case insensitive matching for file and subsystem names.
36
37         * src/pkgbase.h (safe_strcmp): New inline function; it provides NULL
38         argument safe comparison of strings, returning the boolean inverse of
39         the `strcmp' result, using either case-sensitive or case-insensitive
40         semantics; derive it from...
41         (match_if_explicit): ...this; redefine as macro; invoke `safe_strcmp'
42         using explicitly case-sensitive semantics.
43         (subsystem_strcmp): New macro; it invokes `safe_strcmp' with either
44         case-sensitive or case-insensitive semantics, depending on...
45         (CASE_INSENSITIVE_SUBSYSTEMS): ...this new context selection macro; it
46         fixes the choice between case-sensitive and case-insensitive matching
47         semantics for any given implementation, at compile time.
48         (pkg_strcmp): New macro; it invokes `safe_strcmp' with either
49         case-sensitive or case-insensitive semantics, depending on...
50         (CASE_INSENSITIVE_FILESYSTEM): ...this new context selection macro; it
51         fixes the choice between case-sensitive and case-insensitive matching
52         semantics for any given implementation, at compile time.
53
54         * src/sysroot.cpp (pkgXmlNode::GetSysRoot): Use `subsystem_strcmp'.
55
56 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
57
58         Add preliminary support for virtual packages.
59
60         * src/pkgkeys.h (yes_value, no_value): Redefine as aliases...
61         (value_yes, value_no): ...for these new global strings; declare them.
62         (value_none, value_virtual): New global strings; declare them.
63
64         * src/pkgkeys.c (yes_value, no_value): Rename...
65         (value_yes, value_no): ...to implement these, respectively.
66         (value_none, value_virtual): Implement them.
67
68         * src/pkgname.cpp (pkgXmlNode::ArchiveName): Check containing package
69         node for `class' attribute set to `value_virtual'; if present, always
70         return the effective `tarname' property as `value_none'.
71
72         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): For packages
73         with an effective `tarname' of `value_none', do not download anything.
74
75         * src/pkgexec.cpp (pkgActionItem::Execute): For packages with an
76         effective `tarname' of `value_none', do not invoke any tar archive
77         processing function.
78
79 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
80
81         Don't write installation records for unavailable packages.
82
83         * src/tarproc.cpp (pkgTarArchiveInstaller): In constructor, ensure
84         archive is ready for processing, before initialising an installation
85         manifest record.
86
87 2010-03-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
88
89         Rationalise path identification for XML file locations.
90
91         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Use `xmlfile()'
92         function to locate `sysroot' map file; free memory when done.
93         (pkgXmlDocument::UpdateSystemMap): Likewise.
94         (sigpath): Static global variable disused; delete it.
95
96 2010-03-01  Keith Marshall  <keithmarshall@users.sourceforge.net>
97
98         Extend package name search to include component packages.
99
100         * src/pkgfind.cpp (pkgHasMatchingName): Remove; fold it into...
101         (pkgXmlNode::FindPackageByName): ...this; augment to extend search
102         within package definition elements, seeking a potential match on an
103         included component package name or component class-implied name.
104
105         * src/pkgkeys.h (class_key): New global string constant; declare it.
106         * src/pkgkeys.c (class_key): Implement it.
107
108 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
109
110         Bump version for next release cycle.
111
112         * configure.ac (AC_INIT): Bump version suffix to alpha-2.
113
114 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
115
116         mingw-get-0.1-mingw32-alpha-1 released.
117
118 2010-02-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
119
120         Prepare initial package release.
121
122         * README: New file; use it to source release notes.
123
124         * Makefile.in (SRCDIST_FILES): Use ...
125         (LICENCE_FILES): ...this new macro; define it.
126         (licdist): New build goal; implement it.
127         (bindist): Require it; add alternative `zip' format package.
128
129         * src/profile (repository): Set default `package-index' name.
130         (system-map): Normalise spelling for default `sysroot' path names.
131
132 2010-02-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
133
134         Add directory/file records in installation manifests.
135
136         * src/pkgkeys.h (dirname_key, filename_key): New strings; declare...
137         * src/pkgkeys.c (dirname_key, filename_key): ...and implement them.
138
139         * src/pkgproc.h (pkgArchiveProcessor::installed): New class member
140         variable; declare it.
141         (pkgTarArchiveInstaller::UpdateInstallationManifest): New method;
142         declare it.
143
144         * src/tarproc.cpp: Miscellaneous comment updates.
145         (pkgTarArchiveInstaller): In constructor...
146         (pkgTarArchiveInstaller::installed): ...use new member variable...
147         (pkgArchiveProcessor::installed): ...inherited from this.
148         (pkgTarArchiveInstaller::UpdateInstallationManifest): Implement and...
149         (pkgTarArchiveInstaller::ProcessDataStream): ...use it.
150         (pkgTarArchiveInstaller::ProcessDirectory): Likewise.
151
152 2010-02-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
153
154         Work around a deficiency in Microsoft's stat() implementation.
155
156         * src/tarproc.cpp (pkgTarArchiveProcessor::ProcessDirectory): Don't
157         pass a `pathname' argument with trailing slashes; strip them off.
158
159 2010-02-06  Keith Marshall  <keithmarshall@users.sourceforge.net>
160
161         Add machinery for installation and packaging for distribution.
162
163         * install-sh: New file; source it from autoconf distribution.
164
165         * configure.ac (AC_PREFIX_DEFAULT): Assign it as `C:/MinGW'.
166         (AC_PROG_MKDIR_P, AC_PROG_INSTALL, AC_PROG_LN_S): Invoke these.
167         (STRIP): New output variable; use AC_CHECK_TOOL to define it.
168
169         * Makefile.in (abs_top_srcdir): Define to AC_SUBST value.
170         (PACKAGE_TARNAME, PACKAGE_VERSION): Define to AC_SUBST values.
171         (prefix, exec_prefix, bindir, libexecdir, localstatedir): Likewise.
172         (INSTALL, INSTALL_PROGRAM, INSTALL_SCRIPT, INSTALL_DATA): Likewise.
173         (STRIP): New macro; define it using AC_CHECK_TOOL substitution.
174         (mkinstalldirs): New macro; define it as AC_PROG_MKDIR_P result.
175         (LN_S): New macro; define it as AC_PROG_LN_S result.
176         (dist, srcdist, bindist): New build objectives; implement them.
177         (install, installdirs, install-strip, maintainer-clean): Likewise.
178         (SRCDIST_FILES, SRCDIST_SUBDIRS): New macros; define them.
179         (PACKAGE_DISTNAME, PACKAGE_DISTVERSION): Likewise.
180         (PACKAGE_DISTROOT, PACKAGE_ROOTVERSION): Likewise.
181         (PACKAGE_CONFIG_DIR): Likewise.
182
183 2010-02-02  Keith Marshall  <keithmarshall@users.sourceforge.net>
184
185         Implement package installer for tar archives.
186
187         * src/pkgexec.cpp (pkgXmlDocument::Execute): Replace existing
188         stub implementation of installer, using methods provided by...
189         * src/pkgproc.h, src/tarproc.cpp: ...these new files, with trap...
190         * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [installed]: Add entry...
191         (pkgActionItem::Selection) [to_remove]: ...for this; use it to detect
192         `install' requests for packages which are aleady installed.
193
194         * Makefile.in (CORE_DLL_OBJECTS): Add tarproc.$(OBJEXT); specify
195         dependencies as appropriate.
196
197         * src/sysroot.cpp (pkgXmlDocument::LoadSystemMap): Don't commit
198         newly created `sysroot' mapping records to disk; defer to...
199         (pkgXmlDocument::UpdateSystemMap): ...this new method.
200         (sigpath): Make it a global variable, with file (static) scope.
201
202         * src/climain.cpp (pkgXmlDocument::UpdateSystemMap): Invoke it.
203
204         * src/pkgkeys.h (download_key, modified_key, source_key): New global
205         string variables; declare them, providing their implementations...
206         * src/pkgkeys.c (download_key, modified_key, source_key): ...here.
207         * src/pkgname.cpp (download_key, source_key): Use them.
208
209         * src/pkginet.cpp (pkgActionItem::ArchivePath): Delete; replace...
210         * src/mkpath.c (pkgArchivePath): ...with this free standing function.
211         * src/mkpath.h (pkgArchivePath): Declare its prototype.
212
213         * src/pkgbase.h (pkgActionItem::ArchivePath): Delete declaration.
214         (pkgXmlDocument): Add a default constructor; implement as `inline'.
215         (pkgXmlDocument::AddDeclaration): Use heap memory to allocate the new
216         declaration object, instead of `auto' variable, to avoid scope error.
217         (pkgXmlDocument::UpdateSystemMap): Declare it.
218
219 2010-01-26  Keith Marshall  <keithmarshall@users.sourceforge.net>
220
221         Implement rudimentary dependency resolver.
222
223         * src/pkgdeps.cpp: New file.
224
225         * Makefile.in (CORE_DLL_OBJECTS): Add pkgdeps.$(OBJEXT) reference;
226         establish header file dependencies.
227
228         * src/pkgbase.h (to_remove, to_install, selection_types): New enum.
229         (pkgActionItem::selection): Extend it to store as enumerated pair...
230         (pkgActionItem::SelectPackage): New inline method; assign them.
231         (pkgActionItem::Selection): New inline method; retrieve them.
232         (pkgXmlNode::GetInstallationRecord): New method; declare it.
233
234         * src/pkgexec.cpp (pkgActionItem): In constructor...
235         (selection): ...initialise both references in enumerated pair.
236         (pkgActionItem::GetReference): Use `Selection()' method.
237         (pkgActionItem::SelectIfMostRecent): Ditto; also correct logic for
238         making selection, and assign to `to_install' element.
239         (pkgXmlDocument::Schedule): Don't update `request'.
240         (pkgActionItem::Execute): Implement as stub.
241
242         * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Use new
243         `Selection()' method.
244
245         * src/pkgkeys.h (yes_value, no_value): Declare new string constants.
246         * src/pkgkeys.c (yes_value, no_value): Implement them.
247
248         * src/vercmp.cpp: Update copyright notice.
249         (pkgVersionInfo::operator<=): Bug fix; must test for `<', but had `>'.
250
251 2010-01-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
252
253         Avoid segmentation faults when processing invalid data streams.
254
255         * src/pkgstrm.h: Update copyright notice.
256         (pkgArchiveStream::IsReady): New pure virtual method.
257         (pkgRawArchiveStream::IsReady): Provide inline implementation.
258         (pkgGzipArchiveStream::IsReady): Likewise.
259         (pkgBzipArchiveStream::IsReady): Likewise.
260         (pkgLzmaArchiveStream::IsReady): Likewise.
261         (pkgXzArchiveStream::IsReady): Likewise.
262
263         * src/pkgstrm.cpp: Update copyright notice.
264         (pkgLzmaArchiveStream, pkgXzArchiveStream) [fd == -1]: Decline to
265         perform any form of read or decode processing.
266
267         * src/pkginet.cpp (pkgInternetLzmaStreamingAgent): Use `fd = -2' as
268         pseudo-descriptor for the pkgLzmaArchiveStream derived component of
269         this internet data streaming class.
270
271 2010-01-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
272
273         Require liblzma >= liblzma-4.999.9beta_20091209-3-mingw32-dev
274
275         * src/pkgstrm.h (LZMA_API_STATIC): Remove definition and associated
276         comment; it was required to permit, (but not to enforce), linking to
277         the static liblzma.a library, with earlier beta releases, but this
278         anomaly has now been corrected.
279
280 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
281
282         Remove zlib sources from trunk.
283         (Application builders should use free standing implementation of
284          zlib, from MinGW's package distribution page on SourceForge).
285
286 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
287
288         Remove bzip2 sources from trunk.
289         (Application builders should use free standing implementation of
290          bzip2, from MinGW's package distribution page on SourceForge).
291
292 2010-01-22  Keith Marshall  <keithmarshall@users.sourceforge.net>
293
294         Add subsystem specific sysroot mapping facility.
295
296         * src/pkghash.c: New file; required by...
297         * src/sysroot.cpp: New file; it implements...
298         (pkgXmlDocument::LoadSystemMap, pkgXmlNode::GetSysRoot): New methods.
299
300         * src/pkgbase.h: Update copyright notice.
301         (pkgXmlDocument::LoadSystemMap): Declare it.
302         (pkgXmlDocument::AddDeclaration): New inline method.
303         (pkgXmlDocument::SetRoot, pkgXmlDocument::Save): Likewise.
304         (pkgXmlNode::GetSysRoot): Declare it.
305         (pkgXmlNode::GetDocumentRoot): New inline method.
306         (pkgXmlNode::AddChild, pkgXmlNode::DeleteChild): Likewise.
307
308         * src/climain.cpp: Update copyright notice.
309         (climain): Invoke pkgXmlDocument::LoadSystemMap() as required.
310
311         * Makefile.in (CORE_DLL_OBJECTS): Add ...
312         (pkghash.$(OBJEXT), sysroot.$(OBJEXT)): ...these; upate dependencies.
313         (DEBUGLEVEL): New macro; define it.
314         (CPPFLAGS): Use it.
315
316 2010-01-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
317
318         Assign standardised keys for XML database lookup.
319
320         * src/pkgkeys.h: New file; provide public key declarations.
321         * src/pkgkeys.c: New file; implement them.
322
323         * src/pkgbind.cpp: Use them; update copyright notice.
324         * src/pkgexec.cpp, src/pkgfind.cpp, src/pkginet.cpp: Likewise.
325         * src/pkgname.cpp, src/pkgspec.cpp: Likewise.
326
327         * Makfile.in (CORE_DLL_OBJECTS): Add pkgkeys.$(OBJEXT); update all
328         dependencies accordingly.
329
330 2010-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
331
332         Add CLI version reporting option.
333
334         * configure.ac: Update copyright notice for new year.
335         (COPYRIGHT_HOLDER): New AC_SUBST variable; define it.
336         (YEARS_OF_ISSUE): New AC_SUBST variable; define it.
337         (AC_CONFIG_FILES): Add `version.c'; source it from...
338
339         * version.c.in: ...this new file.
340
341         * Makefile.in: Update copyright notice for new year.
342         (mingw-get$(EXEEXT)): Add dependency on `version.$(OBJEXT)'.
343         (distclean): Add `version.c'.
344
345         * configure: Regenerated.
346
347         * src/clistub.c: Update copyright notice for new year.
348         (options): New array of `struct option'; define and use it as the
349         reference for `argv' parsing with `getopt_long_only()'.
350
351 2009-12-17  Keith Marshall  <keithmarshall@users.sourceforge.net>
352
353         Add CLI support for "update" action.
354
355         * src/pkgtask.h (ACTION_UPDATE): Define it, derived from...
356         (action_update): ...this new entry in anonymous enumeration.
357         
358         * src/pkgexec.cpp (action_name): Add "update" keyword identification.
359
360         * src/pkgbase.h: Typo in comment; s/xwXmlDocument/wxXmlDocument/.
361         (pkgXmlDocument::BindRepositories): Add `force_update' parameter...
362         * src/pkgbind.cpp (pkgXmlDocument::BindRepositories): Use it to...
363         (pkgXmlDocument::SyncRepository): ...invoke this method when passed as
364         a `true' flag, in addition to (as previously) first time reference.
365
366         * src/climain.cpp (climain): Interpret "update" keyword for...
367         [ACTION_UPDATE]: ...passing state as `force_update' parameter to...
368         (pkgXmlDocument::BindRepositories): ...this method, then...
369         [!ACTION_UPDATE]: Follow with normal action processing.
370
371 2009-12-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
372
373         Add status checking for Internet URL connections.
374
375         * src/pkginet.cpp (pkgInternetAgent::QueryStatus): New method.
376         (pkgInternetStreamingAgent::Get): Use it; set `dl_status' as return
377         value, deferring failure diagnostics to callers, i.e. to...
378         (pkgXmlDocument::SyncRepositories): ...this, and to...
379         (pkgActionItem::DownloadArchiveFiles): ...this.
380
381 2009-11-23  Keith Marshall  <keithmarshall@users.sourceforge.net>
382
383         Add package download and repository synchronisation machinery.
384
385         * src/pkgstrm.h: New header file.
386
387         * src/pkgbind.cpp, src/pkginet.cpp, src/pkgstrm.cpp,
388         src/pkgfind.cpp, src/pkgname.cpp, src/keyword.c: New files.
389         * Makefile.in (CORE_DLL_OBJECTS): Add build goals for them.
390
391         * xml: New directory.
392
393         * src/climain.cpp (climain): Establish repository bindings from...
394         * xml/profile.xml: ...this new configuration file.
395
396 2009-11-16  Keith Marshall  <keithmarshall@users.sourceforge.net>
397
398         Add XML database bindings and preliminary action executive for CLI.
399
400         * src/pkgbase.h, src/pkgtask.h,
401         src/mkpath.h, src/vercmp.h: New header files.
402
403         * src/climain.cpp, src/pkgexec.cpp, src/pkgspec.cpp,
404         src/mkpath.c, src/vercmp.cpp, src/xmlfile.c: New files.
405
406         * Makefile.in (CORE_DLL_OBJECTS): Define initial set of files...
407         (mingw-get-0.dll): ...build them into this new DLL target; add it...
408         (all): ...as prerequisite for this primary build goal.
409
410 2009-11-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
411
412         Avoid some potential GCC warnings.
413
414         * src/clistub.c: Include process.h for `execv' prototype...
415         (main): Cast `argv' to appropriately matched type when calling it.
416
417         * src/pkginfo/driver.c: Include stdlib.h for `free' prototype.
418
419 2009-11-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
420
421         Create diagnostic message handler for CLI usage.
422
423         * src/dmh.h: New header file; it defines the public interface.
424         * src/dmh.cpp: New file; it implements the message handler.
425
426 2009-11-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
427
428         Correct some identified TinyXML issues.
429
430         * tinyxml/tinyxml.h (IsWhiteSpace): Add FIXME annotation to flag
431         probable redundancy of checks for '\n' and '\r'.
432         * tinyxml/tinyxmlparser.cpp: Revert John E's 2008-08-09 change; remove
433         all such redundancies in IsWhiteSpace() calls throughout.
434
435         * tinyxml/tinyxml.cpp (TiXmlAttribute::SetDoubleValue): Correct format
436         specification in sprintf()/snprintf() calls; "%lf" is invalid; replace
437         with "%f".
438
439 2009-10-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
440
441         Add CLI loader stub.
442
443         * src/clistub.c: New file.
444         * Makefile.in: Add build rule for it; build as...
445         (mingw-get.exe): ...this; also add to...
446         (clean): ...this goal.
447
448 2009-10-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
449
450         Set up build mechanism.
451
452         * configure.ac, Makefile.in: New files.
453         * .cvsignore (configure, autom4te.cache): Add to ignored files.
454
455 2009-10-30  Keith Marshall  <keithmarshall@users.sourceforge.net>
456
457         Add GPL-v3 licensing terms.
458
459         * COPYING: New file, sourced from gnu.org.
460
461 2009-10-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
462
463         Add pkginfo implementation.
464
465         * src, src/pkginfo: New directories.
466         * src/pkginfo/pkginfo.h, src/pkginfo/pkginfo.l: New files.
467         * src/pkginfo/driver.c: New file.
468
469 2009-10-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
470
471         Create tdm-branch.
472
473         * All files (tdm-branch): Assign new branch tag.
474         * All top-level files: Remove from trunk.
475         * ChangeLog: New file.