The debian-private mailing list leak, part 1. Volunteers have complained about Blackmail. Lynchings. Character assassination. Defamation. Cyberbullying. Volunteers who gave many years of their lives are picked out at random for cruel social experiments. The former DPL's girlfriend Molly de Blanc is given volunteers to experiment on for her crazy talks. These volunteers never consented to be used like lab rats. We don't either. debian-private can no longer be a safe space for the cabal. Let these monsters have nowhere to hide. Volunteers are not disposable. We stand with the victims.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

some sgrep macros for /var/lib/dpkg/status



Ramos, I don't know how useful these will be in the long run but I've been
playing with sgrep for an hour or so and have come up with the following
macros for sgrep. 

# dpkg macros
define(DEB_PACKAGE,("Package:" .. "\n"))
define(DEB_STATUS,("Status:" .. "\n"))
define(DEB_PRIORITY,("Priority:" .. "\n"))
define(DEB_SECTION,("Section:" .. "\n"))
define(DEB_MAINTAINER,("Maintainer:" .. "\n"))
define(DEB_VERSION,("Version:" .. "\n"))
define(DEB_CONFIG_VERSION,("Config_Version:" .. "\n"))
define(DEB_CONFFILES,("Conffiles:" .. "\n"))
define(DEB_PREDEPENDS,("Pre-Depends:" .. "\n"))
define(DEB_DEPENDS,("Depends:" .. "\n"))
define(DEB_RECOMMENDS,("Recommends:" .. "\n"))
define(DEB_SUGGESTS,("Suggests:" .. "\n"))
define(DEB_DESCRIPTION,("Description:" .. "\n\n"))
define(DEB_PKG,(DEB_PACKAGE .. DEB_DESCRIPTION))


They're far from polished but they might be a good start to using sgrep as
a tool for extracting package information from /var/lib/dpkg/status.

You might want to include these (or more complete versions of these) in
the next release of sgrep. BTW, there's a bug in the sgrep packaging
- sgrep contains an /etc/sgreprc file, but the binary looks for
/usr/lib/sgreprc.  I had to put in a symlink before sgrep would use the
supplied macros.

Examples:
---------

These macros can already be used to do things like:


    $ sgrep 'DEB_PKG containing (DEB_PACKAGE containing "sgrep")' /var/lib/dpkg/status   
    Package: sgrep
    Status: install ok installed
    Priority: optional
    Section: text
    Installed-Size: 158
    Maintainer: J. Ramos Goncalves <ramos@debian.org>
    Version: 0.99-2
    Depends: libc5
    Recommends: tk40 | tk41
    Conffiles:
     /etc/sgreprc e1314ffa85e47dfdba0728ffcb21833a
    Description: a tool to search a file for structured pattern
     Sgrep (structured grep) is a tool for searching text files and
     filtering text streams for structured criteria. Sgrep implements
     a query language based on so called region expressions.
     .
     Like grep, sgrep can be used for any kind of text files. However it
     is most useful for text files containing some kind of structured text.
     A file containing structured text could be defined as a file, which
     obeys some syntax. Examples of structured text files are SGML, HTML,
     C, Tex and mail files.

btw, this is a lot faster than 'dpkg -s sgrep'

time for the sgrep line above:
0.55user 0.16system 0:01.22elapsed 57%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (289major+130minor)pagefaults 0swaps

time for 'dpkg -s sgrep':
2.02user 0.59system 0:04.87elapsed 53%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (374major+475minor)pagefaults 0swaps

...nearly 4 times as fast on my system!

Also, it can list all packages which depend on a package (but a simple
search like 'containing "xforms"' is prone to picking up unwanted
packages. i.e. it would pick up packages depening upon a hypothetical
"xforms2" as well as "xforms").

    $ sgrep 'DEB_PKG containing (DEB_DEPENDS containing "xforms")' /var/lib/dpkg/status
    Package: xforms-dev
    Status: install ok installed
    Priority: optional
    Section: contrib
    Installed-Size: 1226
    Maintainer: Heiko Schlittermann <heiko@lotte.sax.de>
    Source: xforms
    Version: 0.81-4
    Depends: elf-x11r6lib, libc5 (>= 5.2.18), xforms (>= 0.81-4)
    Suggests: xpm-dev
    Description: GUI Toolkit for X Window Systems
     NOTE: No source available.
     .
     Forms Library is a graphical user interface toolkit based on Xlib
     for X Window Systems. It comes with a rich set of objects such as
     buttons, browsers, sliders and menus integrated into an elegant
     event/object callback execution model that allows fast and easy
     construction of X applications. The library consists of a flexible
     set of C-routines that can be used in C and C++ programs.
     .
     Bundled with the library is also a Form designer, fdesign, which
     can be used to build interaction forms in a WYSIWYG (what you see
     is what you get) way and to generate the corresponding C code for
     you.  50+ demos in source code are distributed with the library.
     .
     For compilation of the examples you need to have the xpm-dev package
     installed.

    Package: xmikmod
    Status: install ok installed
    Priority: optional
    Section: non-free
    Installed-Size: 104
    Maintainer: Steve McIntyre <stevem@chiark.greenend.org.uk>
    Version: 0.01B-4
    Depends: xforms, libc5 (>= 5.4.0-0), xlib6 (>= 3.2-0)
    Description: X version of the mikmod player
     XMikMod will play the XM, MOD, MTM, S3M, STM, ULT and UNI module formats.
     This version of the player is controllable via an X interface and will
     extract and play modules from a variety of different archive formats.
     Supports on-the-fly decompression of archived mods.

    Package: lyx
    Status: deinstall ok config-files
    Priority: optional
    Section: contrib
    Maintainer: Michael Meskes <meskes@debian.org>
    Version: pre-0.10.3-1
    Config-Version: pre-0.10.3-1
    Depends: libc5 (>= 5.2.18-7), elf-x11r6lib, xpm4.7, libg++27, xforms
    Recommends: latex, dvipsk
    Conffiles:
     /etc/lyx/system.lyxrc e6dd08c4256781d6c8cb57c5c8e5253c
    Description: High Level Word Processeor (ALPHA version)
     LyX is an almost WYSIWYG-frontend for LaTeX that runs under X-Windows. It
     makes the power and typesetting quality of LaTeX available for people who
     are used to word processors. Since LyX supports the LaTeX-concept of
     general mark-ups, it is even easier and faster to create beautiful
     documents with it than with usual word processors. It is also possible to
     use LaTeX-commands within LyX, so nothing of LaTeX's power is lost.
     .
     Note, that LyX is still under development. It may still have some bugs. But
     it is already very usable.



--
Please respect the confidentiality of material on the debian-private list.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-private-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com