The changes for Emdebian Grip do not appear to demand rebuilding the package - indeed, if the goal is retaining functionality as close as possible to Debian as possible, then rebuilding (let alone cross-building) gets in the way. http://www.emdebian.org/emdebian/flavours.html Therefore, I'm experimenting with *not* rebuilding for Emdebian Grip, just for Emdebian Crush. i.e. Emdebian Grip can be quickly and easily implemented for Eee PC and similar devices, from existing packages and mirrors. Whilst it is certainly possible to run emgrip on the target machine, the expectation is that maintainers of local mirrors can opt to run emgrip on incoming packages before inclusion into the mirror - as well as filtering out packages that are simply not useful on the target devices for such a mirror - in order to reduce the size of Packages.gz and the consequent delays in loading the dpkg database. In essence, setting up (and maintaining) an Emdebian Grip repository could be as simple as setting up the -cross repository that Simon created. Status: 50% complete Objective: a separate source package - possibly taking the place of dpkg-cross and possibly merged into dpkg-dev (before Squeeze). Initial home: /usr/share/emdebian-tools/ in emdebian-tools 1.4.11 (unreleased - possibly before LinuxLive, most likely afterwards.) http://linux.codehelp.co.uk/emdebian/man/emgrip.html NAME emgrip - converts a .deb to Emdebian Grip on-the-fly Description Converts a .deb package to Emdebian Grip by unpacking, pruning particular classes of files (determined by DEB_BUILD_OPTIONS) and repacking with a note in the description and the em1 version suffix. emgrip is entirely architecture-agnostic, it can process any .deb for any architecture on any architecture. Copyright and Licence Copyright (C) 2007-2008 Neil Williams <codehelp@debian.org> This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>;. Emdebian Grip The idea here is based on dpkg-cross: 1. receive .deb as a command-line option 2. parse DEB_BUILD_OPTIONS (not fully functional yet) 3. unpack the .deb as dpkg-cross does 4. remove files as per DEB_BUILD_OPTIONS 5. repack the .deb with a suitable addition to the description and an Emdebian version suffix. 6. build new .deb and a new .changes so that the original source can be retained. (only .deb currently) 7. Include the gripped packages into a local mirror to reduce the size of Packages.gz and the size of the mirror itself. (only tested locally so far) As few dependencies as possible - this script should become a new package and have a new set of lintian checks to allow perl etc. NO FUNCTIONAL CHANGES IN THE FINAL .DEB ! Also needs to handle tdebs and convert to Emdebian TDebs. Future versions will also have to understand Dpkg Classes but until those are implemented, this uses brute force. Same package also needs dh_grip which can be added to all debian/rules files just before dpkg-build .. or dh_builddeb and which does nothing in the normal circumstance but does the same as emgrip *if* the DEB_BUILD_OPTION "usegrip" is set or if the other DEB_BUILD_OPTION's are set, like "nodocs" or "noessential". DEB_BUILD_OPTIONS nodocs Remove all content in /usr/share/doc/*/ except the copyright file and compress the copyright file itself. noessential Remove the 'Essential: yes' tag from DEBIAN/control - this is a brute force removal, no additional dependencies are to be generated (no patches) so care is needed here. splittdeb Generate Emdebian-type TDebs instead of Debian ones - one TDeb per source per locale instead of one TDeb only per source package. The TDebs generated need to be organised by locale root in the repository. Priority and Section are overridden in the Emdebian TDeb to 'extra' and 'misc' respectively. usegrip Combination flag that sets all DEB_BUILD_OPTIONS that emgrip understands. Currently, emgrip assumes that 'usegrip' is always set. Field removal Functional control fields are retained but the question arises: Who defines functional? Well, for the current purposes of Emdebian Grip, functional includes only the following control fields: Package Source Architecture Priority Section Maintainer Depends Pre-Depends Conflicts Replaces Description Recommends is explicitly rejected, as is Suggests - the expectation is that Emdebian Grip will disable Install-Recommends in apt anyway. Note also that 'Essential' is not. Currently, Installed-Size is also removed as it cannot yet be recalculated and would be misleading if retained. Homepage, VCS* and all X- control fields are dropped. The net result is a (potentially) much cleaner dpkg database. A further option to trim the description at a certain number of complete paragraphs or to remove all long paragraphs could be added. Alternatively, a hard limit on the number of lines could have a comment appended: "Rest of description trimmed." emgrip will be in /usr/share/emdebian-tools/ in 1.4.11 as development continues after http://www.linuxexpolive.co.uk/ There is a functional version in Emdebian SVN. http://buildd.emdebian.org/svn/browser/current/host/trunk/emdebian-tools/trunk/emgrip $ dpkg-architecture -qDEB_BUILD_ARCH amd64 $ ./emgrip -v /opt/working/dpkg-cross/test/wget_1.10.2-3_arm.deb Taking a grip on: /opt/working/dpkg-cross/test/wget_1.10.2-3_arm.deb Extracting /opt/working/dpkg-cross/test/wget_1.10.2-3_arm.deb Extracting information from control file Creating control file Building wget_1.10.2-3em1_arm.deb in /tmp dpkg-deb: building package `wget' in `/tmp/wget_1.10.2-3em1_arm.deb'. $ debdiff /opt/working/dpkg-cross/test/wget_1.10.2-3_arm.deb /tmp/wget_1.10.2-3em1_arm.deb [The following lists of changes regard files as different if they have different names, permissions or owners.] Files in second .deb but not in first ------------------------------------- -rw-r--r-- root/root /usr/share/doc/wget/copyright.gz Files in first .deb but not in second ------------------------------------- -rw-r--r-- root/root /usr/share/doc/wget/AUTHORS -rw-r--r-- root/root /usr/share/doc/wget/ChangeLog.README -rw-r--r-- root/root /usr/share/doc/wget/MAILING-LIST -rw-r--r-- root/root /usr/share/doc/wget/NEWS.gz -rw-r--r-- root/root /usr/share/doc/wget/README -rw-r--r-- root/root /usr/share/doc/wget/TODO.gz -rw-r--r-- root/root /usr/share/doc/wget/changelog.Debian.gz -rw-r--r-- root/root /usr/share/doc/wget/changelog.gz -rw-r--r-- root/root /usr/share/doc/wget/copyright -rw-r--r-- root/root /usr/share/info/wget.info.gz -rw-r--r-- root/root /usr/share/locale/bg/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/ca/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/cs/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/da/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/de/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/el/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/en_GB/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/eo/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/es/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/et/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/eu/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/fi/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/fr/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/ga/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/gl/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/he/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/hr/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/hu/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/it/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/ja/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/nl/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/no/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/pl/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/pt_BR/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/ro/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/ru/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/sk/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/sl/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/sr/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/sv/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/tr/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/uk/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/vi/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/zh_CN/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/locale/zh_TW/LC_MESSAGES/wget.mo -rw-r--r-- root/root /usr/share/man/man1/wget.1.gz Control files: lines which differ (wdiff format) ------------------------------------------------ Description: retrieves files from the web {+(gripped)+} [-Installed-Size: 1908-] {+.+} {+ This is a 'gripped' package. See emgrip (1)+} Version: [-1.10.2-3-] {+1.10.2-3em1+} $ ls -lh /opt/working/dpkg-cross/test/wget_1.10.2-3_arm.deb /tmp/wget_1.10.2-3em1_arm.deb -rw-r--r-- 1 neil neil 602K 2007-08-14 17:23 /opt/working/dpkg-cross/test/wget_1.10.2-3_arm.deb -rw-r--r-- 1 neil neil 109K 2008-10-20 21:44 /tmp/wget_1.10.2-3em1_arm.deb (That figure is only slightly misleading - the locale files would be processed as TDebs but then any one install would only install one or at most half a dozen TDebs instead of being forced to install all 35 translation files (at an average 30kb each).) There are *no* dependency changes so it would be difficult to use busybox in this environment without changes to the current coreutils package in Debian. There are no changes to the maintainer scripts either, so perl is going to be needed during installation of the gripped .debs. This makes Emdebian Grip quite a bit bigger than Emdebian Crush but also quite a bit smaller than Debian. No precise figures at this stage but on this amd64 box, /usr/share/doc/ is over 600Mb, /usr/share/man is 41Mb and /usr/share/locale is over 500Mb. Emdebian Grip would drop the total of all those to just a few megabytes in /usr/share/doc/ for copyright.gz files. (/usr/share/doc/*/copyright on this box is 17Mb, uncompressed), saving over 1Gb, with virtually no other changes except smaller files in /var/lib/dpkg/* and /var/cache/apt/archives. The appeal for Eee PC and similar devices is obvious. One of my tests will be to create an Emdebian Grip local mirror for i386 containing things like xfce and iceweasel, suitable for my Acer Aspire1 (I'll use the list of packages usually installed on the Aspire as a baseline for the test). These Gripped packages would need to be in a separate repository from the Crushed packages currently available at http://buildd.emdebian.org/emdebian unstable main Possibly http://buildd.emdebian.org/grip unstable main ? Comments? -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
signature.asc
Description: This is a digitally signed message part