//////////////////////////////////////////////////////////////////////////////
///
/// TODO
///

Here's the gig: RED items are targetted for the next release. GREEN items are stuff
that needs to be done, but aren't urgent. BLUE items are things that
would be nice to have someday. WHITE is where items that have been done
are put - this section is cleared when we release.

WHITE:
        - The launcher should only use the comments at the top, instead of
          rummaging around inside the stub. [curtis]
        - Add localized DisplayName and Summary package data to stub header. [curtis]

        - Add "Why am I asked for my password?" HTML-style link to autosu

        - Code cleanup ideas:  [ talk to mike before doing any of these ]
                * eliminate gratuitous uses of sed, ie in the logging system,
                  replacing them with the bash equivalents [curtis]
                * Make variables in stub use underscore_style [curtis]

        - makeinstaller should check that binaries were compiled with apbuild

        - Document $DEBUGLEVEL somewhere: Add debug mode text to package help, already in
          devguide under Installation Environment Variables. [curtis]
        - Sanity check root names a bit, eg don't allow: [curtis]
                * @http://somewhere.org/foo:1.0
                * @somewhere.org:1.0
                * etc (yes those have all been observed in the wild)
        - Add `package owner <filename>' to determine package ownership of absolute
          or relative filename. [curtis]
        - Use a .desktop file instead of metadata localestrings for package metadata [curtis]
        - Switch to LZMA compression [curtis, mike]
        - Add a webpage for the aptools
        - Add a --debuglevel switch to packages [curtis]
          - Removed --debuglevel switche in support code and 1.0 stub
            but kept improved trace in all stubs [curtis]
        - Delete the /dev/shm code, is it really needed? Seems to cause problems for some people
                removed from stub - probably need to look at setting up TMP from
                $TMP before $EXECUTED_FROM_DIRECTORY [curtis]

        - [Description] section metadata and package description files are deprecated [curtis]
        - Rename installDesktop() to installMenuItem and document change [curtis]
        - copyFiles displays a progress bar automatically when an item count is greater than 5 [curtis]
        - Apparently the devel RPM looks for a user/group called "mike" [curtis]
        - Rewrite the Help text in the launcher
        - Teach testForLib about 32/64 incompatibility
        - Make autopackage uninstallation go via the frontend protocol
        - Add removeOwningPackage() API for uninstalling native packages
                - done for RPM, DEB will have to wait until the rest of NPMI is completed
        - Add a way of skipping the MD5 sum check.
        - Extend glibc 2.3 symbol warning to remind about static libraries
        - Investigate C++ aspell crashes [mike]
          Filed a bug in the GCC bugzilla about it [#21405]
          Should be resolved by xdelta based c++ support (grrrr)

        - Document new BinReloc [hongli]
        - Packages are not allowed to be run directly except on first-run installation with support code [curtis]

        - installLib() isn't terribly intuitive as library symlinks are imported too
          so you have to do installLib libfoo.so.*.* - fix it
                - Skip installing symlinks so use 'installLib lib/*.so.*' [curtis]

        - Documented:
                Specfile keys: Compression, Type, PackageDesktop

        - Ship libstdc++.so.6! Backport this code from the 1.0 branch. [curtis]
        - Remove version fudge hack in installer/backend.template [curtis]

        - package all necessary tools in devel - http://lists.sunsite.dk/cgi-bin/ezmlm-cgi?21:mss:3935:200601:nlglcggnhcbgjlgbobid
          added binreloc and gtk-headers to devel tarball and add into install script
          apbuild macros were already being installed

        - gui (removal code) always hangs on removal of autopackage-gtk package
          gtkfe and qtfe are removed as first packages of session so that the package is not removed
          while possibly in use at the time
            Also reordered the support code to always be last in the session [curtis]

        - Add a smarter behaviour for writing the .xml files to make autopackage rebuilds easier (ie, robs comments)
            Add call to use repository key from skeleton if rootname --> skeleton is found [curtis]
        - The PATH mangling code breaks on zsh based systems [hongli]

        - Menu items show up twice on Arch Linux. That's because they're
          installed to /usr/share/applications and /opt/gnome/share/applications.
            Fixed compareVersions 2.10 is higher than 2.8 and patched gnome-2.10 to only use xdg menus [taj]
        - Have a "show system packages" toggle in the manager which shows all packages, not just ones with .desktop files [isak]
        - _retrievePayloadFromNet() doesn't work anymore due to dropping the .payload files [taj]
        - we see pango markup when the user is told to uninstall using the cli (cosmetic) [isak]
        - autopackage-gtk does not install because it fails on `package install<package-name>' requirement
            Change to using _autopackage_support_install for initial support installation knowledge [curtis]

        - Added PACKAGEREPORTING to package meta keys such that a package could opt-out of reporting
            anonymous statistics [curtis]
        - Removing packages during an installation session occurs after the prepare stage not initially [curtis]
        - Update generated luau xml repository files to dtd 1.2 and interface version 1.2 [curtis]

        - Properly escape file names like Register_(Help_Menu).htm in escapeFileName(). [taj]
        - Add triggers to collect and delay update commands until summary screen [curtis]

        - manager: the package view filter has 'Desktop Applications' as white text when
          highlighted and non-highlighted - should be black like the other text
        * I can't reproduce this! It sounds like a GTK+ and/or GTK theme bug to me. /Isak
       ** Actually, in gtkfe the text and graphics has a white window around it because
          the background is gray ... /me wonders if all openSuse/Suse kde has this issue. curtis

        - Need to write 1.2 migration guide [mike]
            - Make new APIs hyperlinks to their documentation at release time, when we push out [curtis]
            - new doc build [curtis]
            - document removeOwningPackage function in source



RED:
        - Need to document improved C++ support [hongli]

         removeOwningPackage() stuff:
        - Upgrade the packages we ship to use it

        Reported Bugs:
        - apbuild: linking error - http://lists.sunsite.dk/cgi-bin/ezmlm-cgi?21:mss:3906:200601:emgppobohkkbjmilbofe
        - it thinks yum is the native package manager for suse (it's yast or maybe zen)
        - urls should be un-escaped in gtk downloader gui (cosmetic)
        - figure out why autosu gives:
          --> /usr/bin/xauth:  error in locking authority file ~/.Xauthority
          --> could not run xauth, pclose != 0: No such file or directory
          on Ubuntu Dapper. Apparently running xauth from the shell gives the same
          error. Running the package through sudo works fine.



GREEN: (in approx order of priority)

        [1.0.x stable series]
        - Manager should not assume autopackage is in PATH
        - Rename the "hide in notification area" checkbox in the GTK+ launcher
        - Integrate some luau information in the specfile so you don't
          have to write the same things over and over in the luau XML file.

        - The glibc check is wrong, it needs to scan the version loaded into memory by the dynamic linker
          instead of assuming /lib is 32 bit (as on Gentoo it's not!)
          
        - Introduce a generic installBinary API that installExe and installLib layer on top of
          We can use this later as a hook point for LLVM translation and library labelling

        - Rename the "hide in notification area" checkbox in the GTK+ launcher
        - Have support for READMEs/relnotes at the end of the install [curtis]
                - backend is added - need help on the frontend code
                - Reworking to be an API call - installReleaseNotes $PREFIX/share/doc/$SHORTNAME-$SOFTWAREVERSION/relnotes

        - Apparently we hang when run inside screen (variant of other pty related hangs?)
        - bincompat: Some systems have a broken libPNG that does not link against libZ and libM
        - Figure out what problems Christian Hammond (galago) was hitting with glib skeleton, fix them
        - Fork the GTK+ headers and delete all the silent dependencies (they are mostly optimisations or esoteric features)
        - Add a verify button to the manager
        - Add more info for newbies to autosu:
        - Rotating security tips:
                - "Remember: legitimate software is never distributed via email"
                - "Be aware: software updates for this program are installed automatically" (when they actually are)
                - "Good passwords contain a mixture of numbers, letters and punctuation"
                - "Consider using a passphrase instead of a password: the longer it is, the better"
                - "Do not trust software that comes as an email attachment or instant messenger file transfer"
                - etc
        - Sometimes installing a package gives a message like:
          rm: cannot remove directory `/home/gabor/autopackage/tmp1269724575/payload/@scourge.sf.net/scourge:0.10/data/models/Bug':No such file or directory
        - RootInstallOnly only works in the first session
        - Some versions of autoconf produce a config.status that doesn't support the --file parameter
          (why do we use this over just passing the file as $1 anyway?)
        - relaytool needs improvements, needs its own webpage, needs to support multilink, deployment in larger packages [mike]
        - binreloc should be rewritten
        - Install QT frontend instead if GTK+ is not available.
        - relaytool can cause GCC to emit a (harmless?) warning about symbol conflicts, see if we can shut it up
        - Packages leave junk lying around if you press Ctrl+C
        - Document "dump-elf-metadata" and the accompanying apbuild macro

        [untargetted]

        - Fully scrub glibc and GTK+ headers

        - Do something about the -D_FORTIFY_SOURCE stuff in FC4.
          It adds glibc 2.3 symbols and apbuild can't handle them right now.
          (just build without _FORTIFY_SOURCE set??)


        - Introduce a generic installBinary API that installExe and installLib layer on top of
          We can use this later as a hook point for LLVM translation and library labelling

        - Menus don't work correctly on SuSE 9.3. Gaim shows up twice,
          Manage 3rd Party Software doesn't show up at all.

        - autopackage fails when X isn't available ("could not locate xauth")
        - Have support for READMEs/relnotes at the end of the install [curtis]
                - backend is added - need help on the frontend code
                - reworking to be an API location
                  $PREFIX/share/doc/$SHORTNAME-$SOFTWAREVERSION/relnotes
                  $PREFIX/share/doc/HTML/<lang>/$SHORTNAME-$SOFTWAREVERSION/relnotes
                  KDE has $PREFIX/share/doc/HTML/<lang>/$SHORTNAME

        - Disable programs like update-mime-database which generate useless caches in the build
          root we then accidentally ship

        - Rewrite abi-install in C (maybe just patch the original install sources?)
          The perl version slows down "make install" a lot, there's no need.

        - Update the FSFs address in the license blocks

        - Should be a "Run Program" button in frontends (basically ... send some user definable
          command to the frontend, which can then run it itself)

        - Icon definition
          This would allow the user to see the icon of the program when done
          installing so they can more easily spot the app on the desktop or menu
          structure.

        - Package whitelisting/blocking network based on trust chains [mike]

        - Native package manager integration [johane/malte/mike]
                - Add some kind of abstraction for package managers (johane/malte)
                - Add DPKG integration
                - Add RPM integration


        - SELinux compatibility: ship our own version of cp which is weak linked against libselinux,
          and which correctly sets file contexts for the destination. It should also notice when it's
          copying an ELF file and set shlib_t/shlib_textrel_t correctly. Low priority as this is only
          required with the strict policy, not targetted.

        - Support multiple CPU architectures. This is pretty important as AMD64 systems
          are getting deployed fast. LLVM is probably the way forward here:
          http://lists.sunsite.dk/cgi-bin/ezmlm-cgi?21:mss:1153:200501:cefeegdfhllemfaopjfo

        - Code cleanup ideas:  [ talk to mike before doing any of these ]
                * Don't set meta_dir/payload_dir multiple times in stub/installer.template
                * Make consistent use of spaces, ensure indenting is consistent
                * Don't pass magic parameters to the installers (eg, why do we muck about
                  with working_dir so much in the stub?)
                * apkg-funclib got really big again, split some of that stuff out into another file?
                * first_autosu should probably be combined with we_are_the_first+boot_frontend
                  and properly namespaced
                * eliminate gratuitous uses of sed, ie in the logging system, replacing them with
                  the bash equivalents

        - Support environment variables manipulations for csh users

        - Investigate what happens when you copy symlinks using copyFiles (for DSO symlinks)

        - Investigate integrating a C interpreter like EiC so we can ship better test programs
          that use DSO interfaces for version queries inside skeletons. EiC looks good but it
          needs to support linking against ELF DSOs.

        - Check .desktop files against the FDO defined categories to avoid simple Game/Games mistakes

        - Put together a collection of example specfiles

        - Make testForLib more robust, instead of parsing the output of ldconfig and such
          it should use a C program that tries to dlopen the library under the current
          environment. What about RPATHs?

        - Investigate integration of RDF into the package metadata (useful for DOAP integration
          so bug trackers/maintainers/websites etc can be linked to from packages)

        - Improve Python support
        - Improve C++ support
        - Add Mono/.NET support

        - Make the autosu window transient for the launcher, apparently evo has some code to do this:
          e-util/e-dialog-utils.c:e_dialog_set_transient_for_xid

        - Reconsider EULA support

        - Add an API to find the absolute path of a given soname: implemented in terms of dlopen
          and scanning the rtld debug link map

        - What happens if you hide the GTKFE window with no systray?

        - Document that the [Retrieval] section must set RETRIEVAL_VERSIONED_ROOTNAME variable
          ... is also ..... document the retrieval mechanism better

        - If compile fails in setup it shouldn't say it was successful

        - SELinux support

        - Properly abort install script when a function fails.
          - _sessionRollback is enabled as logging is more predictable but more testing in needed. -C
          - Need to notify frontend of rollback action.

        - uninstallPackage should support unversioned root names.

        - "package install" should take a name and a URL to a luau XML file, and install the latest version

        - Packages leave junk in /dev/shm if you press Ctrl+C.

        - Write a function for glib to return absolute runtime path of binary

        - Allow explicit inclusion of skeleton files

        - Dependency downloader should have a Pause button.

        - checkForPackage needs to be refactored, there's a lot of duplicated code there

        - Config file imports is kind of broken. We don't always respect deny_user and some of the
          imports are redundant

        - It's too easy to forget to update InterfaceVersion. Need some super-easy way to unify
          InterfaceVersion and installing libs with sonames - maybe parse globals before meta?

        - There is some nasty hackage in the download code to ensure GUI context stays sane, see note
          in _processInstallPayloads

        - GTKFE should clear the fail flag on any command ~TERMINATE, like ttyfe
        - GTKFE progress bar during prep doesn't seem to work?

        - Dedicated frontend for test harness, so we can check the protocol outputs of functions

        - should support multiple packages with the same shortname

        - Optimize getSection(), it's too slow

        - Better error handling in retrieve() for when invoking subpackages

        - Can't deal with uninstalling info files if the dirfile is compressed (not using install-info)

        - Move towards using more shared strings between the different front-ends
                  - Split up some of the strings that contains markup so that different
                    frontends can apply markup in the code. i.e. <b>text</b> for GTK+ and
                    `bold`text`normal` for ttyfe.

        - Make bash update its environment between removing a package, and reinstalling it.
          Otherwise, lines removed from ~/.bashrc won't be readded if --check is passed to updateEnv.

BLUE:
        - GUI notifications to designated "administrator" users, who can then opt
          to uninstall the package, or to uninstall it and reinstall it as global.

        - Make uninstall FE independant:
                - This is a total can of worms, to do this well requires a new program which
                  isn't a 5 minute job ...

        - Allow new submenus to be created (not sure if this is a good idea)

        - Do APT integration

        - Package metadata containing mime types the program can handle, then
          hook up to browser/email/files

        - Implement Solaris-style grouped symbol fixup in the linker, (seth cql com) said he'd be willing to help
          This has been partially done, the RTLD_DEEPBIND flag to dlopen is basically what we want, but for DT_NEEDED entries

        - Package signing with public keys embedded in the network?

        - Tight desktop integration, drag and drop from webpages for instance

        - Write GUI specfile creator

        - Write emacs mode for specfiles

        - Bug reporting tool: ie, "package bugreport foobar" which would
          prompt for a report and send it to the named bug reporting
          email address.

        - "Safe mode" features, so scripts can be prevented from tampering
          with things they aren't supposed to (LD_PRELOAD?) [no, best to use SELinux for this]

        - output methods for: (low priority)
                - warnings
                - dynamic labels (ie current file etc)

        - Figure out how to stop tar spewing warnings on systems where the clock is wrong.

        - design an easier extraction API. Perhaps based on deleting files, rather than extracting them?

        - Special support for add-on modules.
          Imagine packaging gimp plugins, Perl/Python modules, Gnome applets or any other addons as
          separate autopackages: you end up with an unnecessarily long list of installed packages.
          It would be a lot better UI-wise to have an add-on type of package that is still separately
          installable, removable and upgradeable, but would show up together with the main package in
          package lists. So the user would get something like this:

                    SomePackage x.y.z
                    Add-on software: asd module, omg extension, yada-yada plugin

        - Take a look at libsystemconfig:
          http://www.gnome.org/projects/gst/structure.html
          It's supposed to allow you to install stuff into
          distro-specific locations.
