Search Results: "dpk"

2 July 2007

Mike Hommey: svk vs. git for xulrunner maintenance

I’ve been using svk for xulrunner maintenance since the first test packages. And I’ve been thinking about switching to git for a while now. I did some testing in march, which led to my post about diffing. I went a bit further today by actually trying to convert my svk repository. And I got both interesting and surprising results. The repository is (only) about 250 revisions in svk, and includes 15 upstream releases (or CVS pulls). I had to reorganize the svk repository so that git-svnimport could do its work properly. [ Note: these tests have been done on a 5 years old laptop ] The first surprise is the time it took for the conversion : almost half an hour. Dumping (svnadmin dump) and reloading (svnadmin load) the svk repository takes a bit more than 3 minutes, in comparison… I guess git-svnimport is very ineffective. The second surprise is that the svk repository is actually almost twice as small as the git equivalent: 116MB for svk vs. 224MB for git. On the other hand, git is amazingly fast. One of the most common things I do on this repository is a diff between the upstream branch and the trunk. I create the .diff.gz file I give pbuilder this way. It’s much quicker than doing a real dpkg-source, especially considering pbuilder does one itself. After dropping caches (echo 3 > /proc/vm/sys/drop_caches), such a diff takes about 50 seconds with svk and… a little more 2 seconds with git. Without dropping caches, it gets down to 38 seconds with svk and… 0.05s with git. That is pretty damn fast ! Update: after a git repack -d, the git repository is down to 61MB.

Neil Williams: deb-gview remote .deb viewer

This isn't new, I just thought it was worth noting because it is useful to show an example of a packaging principle when sponsoring new maintainers etc.

deb-gview has been extended via GnomeVFS to view the contents of any .deb in the archive without having to install the package and without having to separately download the .deb itself. Either copy the link address and load the .deb on the command line or configure your browser to use deb-gview as a helper for .deb files (right click a .deb and select open with... or similar). Then just double click on any text file within the .deb to view it. Also works with manpages and images inside the .deb, other filetypes can be supported via a config file. Supports viewing a .deb for any architecture, not just your own (useful to see if the autobuilders have really done what you expected with generated files).

e.g. when advising on using README.Debian, it was useful to give a simple URL to allow the user to easily see the format:

$ sudo apt-get install deb-gview
$ deb-gview http://ftp.uk.debian.org/debian/pool/main/g/gpe-shield/gpe-shield_0.9-1_amd64.deb

The URL itself comes from viewing the package on packages.debian.org, clicking any architecture and right clicking the name of whichever mirror you want to use (or configure the browser as above).

Also supports .changes files so you can view all .deb files within a build or view the packages in the incoming queue direct from a d.d.p.o page.

The advantages over debc / dpkg -c dpkg -I are:


Using GnomeVFS means using a few Gnome libraries but even for non-Gnome users, this shouldn't be too much of a burden.

1 July 2007

Russell Coker: Committing Data to Disk

I’ve just watched the video of Stewart Smith’s LCA talk Eat My Data about writing applications to store data reliably and not lose it. The reason I watched it was not to learn about how to correctly write such programs, but so that I could recommend it to other people. Recently I have had problems with a system (that I won’t name) which used fwrite() to write data to disk and then used fflush() to commit it! Below is a section from the fflush(3) man page:
NOTES
Note that fflush() only flushes the user space buffers provided by the
C library. To ensure that the data is physically stored on disk the
kernel buffers must be flushed too, e.g. with sync(2) or fsync(2).
Does no-one read the man pages for library calls that they use? Then recently I discovered (after losing some data) that both dpkg and rpm do not call fsync() after writing package files to disk. The vast majority of Linux systems use either dpkg or rpm to manage their packages. All those systems are vulnerable to data loss if the power fails, a cluster STONITH event occurs, or any other unexpected reboot happens shortly after a package is installed. This means that you can use the distribution defined interface for installing a package, be told that the package was successfully installed, have a crash or power failure, and then find that only some parts of the package were installed. So far I have agreement from Jeff Johnson that RPM 5 will use fsync(), no agreement from Debian people that this would be a good idea, and I have not yet reported it as a bug in SUSE and Red Hat (I’d rather get it fixed upstream first). During his talk Stewart says sarcastically “everyone uses the same filesystem because it’s the one true way“. Unfortunately I’m getting this reaction from many people when reporting data consistency issues that arise on XFS. The fact that Ext3 by default will delay writes by up to 5 seconds for performance (which can be changed by a mount option) and that XFS will default to delaying up to 30 seconds means that some race conditions will be more likely to occur on XFS than in the default configuration of Ext3. This doesn’t mean that they won’t occur on Ext3, and certainly doesn’t mean that you can rely on such programs working on Ext3. Ext3 does however have the data=ordered mount option (which seems to be the default configuration on Debian and on Red Hat systems), this means that meta-data is committed to disk after the data blocks that it referrs to. This means that an operation of writing to a temporary file and then renaming it should give the desired result. Of course it’s bad luck for dpkg and rpm users who use Ext3 but decided to use data=writeback as they get better performance but significantly less reliability. Also we have to consider the range of filesystems that may be used. Debian supports Linux and HURD kernels as main projects and there are less supported sub-projects for the NetBSD, FreeBSD, and OpenBSD kernels as well as Solaris. Each of these kernels has different implementations of the filesystems that are in common and some have native filesystems that are not supported on Linux at all. It is not reasonable to assume that all of these filesystems have the same caching algorithms as Ext3 or that they are unlike XFS. The RPM tool is mainly known for being used on Red Hat distributions (Fedora and RHEL) and on SuSE - these distributions include support for Ext2/3, ReiserFS, and XFS as root filesystems. RPM is also used on BSD Unix and on other platforms that have different filesystems and different caching algorithms. One objection that was made to using fsync() was the fact that cheap and nasty hard drives have write-back caches that are volatile (their contents dissappear on power loss). As with such drives reliable operation will be impossible so why not just give up! Pity about the people with good hard drives that don’t do such foolishness, maybe they are expected to lose data as an expression of solidarity with people who buy the cheap and nasty hardware. Package installation would be expected to be slower if all files are sync’d. One method of mitigating this is to write a large number of files (EG up to a maximum of 900) and then call fsync() on each of them in a loop. After the last file has been written the first file may have been entirely committed to disk, and calling fsync() on one file may result in other files being synchronised too. Another issue is that the only time package installation speed really matters is during an initial OS install. It should not be difficult to provide an option to not call fsync() for use during the OS install (where any error would result in aborting the install anyway).

29 June 2007

Lucas Nussbaum: How old are our packages?

Debian’s binary packages are only built when they are uploaded (or when a binNMU is requested, but that doesn’t happen frequently). They are never rebuilt later. This means that some binary packages in etch weren’t build in an up-to-date etch environment, but possibly in a much older environment. Is this a problem? It depends. Old packages don’t benefit from the improvements introduced in Debian after they were built. Like new compiler optimizations, or other changes in the toolchain that could induce changes in binary packages. For example, some files used to be at some place, but are now put at another place. Also, some parts of maintainers scripts are automatically generated, and would be different if the package was rebuilt today. But is it really a problem? Are our packages _that_ old? Also, when a big change is made in the way we generate our binary packages (like Raphael Hertzog’s new dpkg-shlibdeps), when can we expect that the change will be effective in all packages? I went through all binary packages in unstable (as on 24/06/2007) (both main, contrib and non-free packages) on i386. Using dpkg-deb –contents, I extracted the most recent date of each package (which can reasonably be taken as the date of the package’s creation). And here are the results. Most packages are actually quite recent. 9008 packages (43%) were built after the release of etch. And 19857 packages (94%) were built after the release of sarge. But that still leaves us with 1265 packages that were built before sarge was released, and even one package (exim-doc-html) that was built before the release of woody! (the removal of this package has been requested, so we will soon be woody-clean :-) Now, what could we do with this data? We could review the older packages, to determine if: Here is the full sorted list of packages.

25 June 2007

Miriam Ruiz: Newer packages for Gnash

I’ve just built a newer version of Gnash for Debian, which I want to push into experimental. I’ve created some binary packages for i386, powerpc (thanks, nueces), and amd64 (thanks, bencer), precompiled for sid, so that people might test them while the package waits in the NEW queue. You can also download the source package, but it might make more sense to create the latest one, getting Gnash from their CVS server, and the package building system from our subversion server: svn co svn://svn.debian.org/svn/pkg-flash/packages/gnash/trunk/ latest-gnash
cd latest-gnash
fakeroot debian/rules get-orig-source
cd gnash-0.8.0+cvs*.????
dpkg-buildpackage -rfakeroot

20 June 2007

Neil Williams: dpkg filtering

This started as an Emdebian idea but it is growing into a more all-purpose option. The requirement is to be able to filter packages during installation or cross-building so that manpages, infopages, documentation (including changelogs, copyright and readme etc.) and translation files for unsupported locales are omitted. When installing, the files would simply not appear on the filesystem or in the dpkg status information. When building, the files would disappear from the package completely (hence the role of filtering in Emdebian). The intention is that embedded systems can have empty /usr/share/man/ /usr/share/info/ and /usr/share/doc directories and a much reduced number of translation files in /usr/share/locale - the default would be only the translation files for languages that are supported on that machine, via 'dpkg-reconfigure locales'. Initially, only the narrow filters needed by Emdebian were considered - discussions at DebConf7 have shown how this can be easily extended to support arbitrary filters - necessarily the risks of using such optional filters would be made clear to the users in the manpage etc. - so that any file in any package could be omitted from the install process and the package file lists as well as during the preparation of packages for embedded devices.

Filters would be glob patterns held in a file in /etc/ (possibly /etc/dpkg/filters.d/) and would include the option to exclude files en-masse and specifically include some files that may otherwise be excluded in specific circumstances. The same filters could be used when building packages for embedded usage as well as installing Debian packages on systems where space is a problem. The main benefit of this filtering for Emdebian is that it makes it much easier to isolate the package changes needed to make the package cross-compilable from the changes needed to remove stuff that embedded devices don't need but which Debian Policy requires. This in turn makes Emdebian patches more useful to Debian maintainers when bugs are filed on their packages about a failed cross-build.

So far, it's taken up most of my hacking time in DebConf. Ian Jackson, Enrico Zini and Wookey have all helped improve the original ideas during that time. Prototype code is mostly complete but the extended filtering support will now have to wait until after DebConf. I'm hopeful that the patch will be accepted, once it is ready.

If this seems strange or unnecessary, just compare the disc usage of /usr/share/doc (which you can control) with /usr/share/locale/ (which you cannot currently control) or view the baobab images from my current laptop installation.

19 June 2007

Anthony Towns: Chatting about the CDDL

Just prior to the “State of the Coffee Cup” talk on Sunday, Tom Marble sent a quick invitation to Steve Langasek, Sam Hocevar and myself to have a chat with Simon Phipps about the CDDL and some of the concerns that have been raised on the debian-legal list lately – particularly about choice of venue. Unfortunately in the ten or fifteen minutes between the mail and the meeting, we couldn’t find Sam, but we managed to grab Don Armstrong to join in instead. It’s a couple of days later, and I’m going from memory, not notes, so this is paraphrasing. Simon’s primary concern was one of predictability – Debian accepted the Mozilla Public License back when it was released (and prior to Mozilla and other software tending to get dual licensed under the GPLv2) which is what the CDDL was based on and contains almost the exact same terms. Simon’s comment was that if you’ve accepted that then, reviewing new licenses from scratch and coming up with different results really makes it hard to work with you, and worse makes it look like you’re basing your conclusions more on who proposed the license rather than what the license actually says. Don and Steve seemed to mostly appreciate that point, but still thought that choice of venue was harmful and unnecessary, and that it’d be nice if Sun – as pretty much the primary organisation currently behind any of these licenses – would take some steps to reduce that harm: limiting choice of venue to when both parties in a dispute are multinational, for example. Simon’s concern there was that updating the CDDL would require a lot of effort internally – getting buy in from all the groups in Sun using the CDDL, as well as getting the wording changes approved from the appropriate legal advisors, and convincing the lawyers of Sun’s commercial partners that the changes weren’t going to be a problem later; and committing to all that work when a new versions of the GPL is about to be released and it might be a better thing to work on getting the relevant software available under that, or even the GPLv2. On the other hand, Simon thought that making (binding) statements about Sun’s interpretation of the license seemed to (eventually) work reasonably well for the DLJ, so might be something that can be done again for this issue. And while that only counts for Sun, we can fairly easily ask if other authors of CDDLed stuff agree with Sun’s interpretation for their software, and only worry about possible problems if it turns out they don’t. That’s pretty much where we ended up I think, with Simon suggesting that we work out what exactly needs to be clarified with Tom, and then get it passed back up to Simon to get signed-off on. And hopefully that’s what’ll happen over the next little while. :) (The somewhat more interesting question of whether we can combine CDDL’ed OpenSolaris (in particular Solaris libc) with GPLed userspace tools such as dpkg to produce a Debian OpenSolaris distro is still up in the air – Sam’s currently waiting on a response from the FSF legal team on one of the questions that concerns Debian, aiui; but they’re currently flat out working on GPLv3 as you might imagine. Oh well – in the meantime, there’s always Nexenta!)

17 June 2007

Bernd Zeimetz: hacking at debconf

hacking at debconf Zenoss Stefano reported about the work on the Zenoss packages yesterday, now I m proud to be able to present the first screenshot from Zenoss, freshly installed by using dpkg -i. There s still a lot of work waiting for Fabio, Stefano and me, but it s great to see the first results. It s really great to work together with them, here on the Debconf. I m really happy that I can be here. At the moment we re waiting for Sean Finney no arrive, as we have some questions about dbconfig-common. hacklab pano 3 Again, here s another pano from the hacklab 1, taken yesterday evening. Sorry for the bad stitching, didn t have the time to fix it, but I hope it ll still give am impression of the great atmosphere here in the Teviot.

15 June 2007

Eddy Petrișor: libgnome-dev + libsvn-dev = problems

On Debian Etch systems it is impossible to install out of the box both libglade-gnome0-dev and libsvn-dev due to a conflict between depended upon libraries.

In order to install them side by side you will have to modify an existing libdb4.4-dev deb package to add "libdb3-dev" to the Provides: field of the package. You can do this by editing DEBIAN/control after running:

deb-reversion -k /bin/sh libdb4.4-dev_*.deb

When done, exit and install the newly created libdb4.4-dev package:

dpkg -i libdb4.4-dev*LOCAL*.deb


I managed to find this solution thanks to mrvn and other people on IRC. Thanks.

14 June 2007

Joachim Breitner: screen-message uploaded to Debian

By popular request (if you consider Lunar to be a pupil) I have packaged my old hack vlshow as screen-message to Debian. The small program (called sm on when installed) starts and displays a given text as large as possible, in big bulky black letters on white background. You can change the text while the program is running. This might be useful to quickly send a message across the room, say something to people who think they are reading your screen unnoticed, for make-shift signs, to marvel at nice unicode characters and all kinds of other funny purposes.
I used this as a chance to try out darcs-buildpackage, which is very nice, especially as it makes the separation of upstream sources and Debian changes possible in a non-troublesome way. I attended Enrico s tutorial on autotools and autotoolized the package during that talk, which meant that I could use cdbs for building the package nice experience as well. Darcs s dist feature is very nice when using autotools, although it makes darcs-buildpackage slightly inconvenient. (While dpkg-buildpackage uses darcs dist on the upstream sources to build the orig.tar.gz, it does not check the predist command in _darcs/pref/pref when building the debian package, which fails then. It works fine if I run that command, in my case predist autoreconf -i && rm -rf autom4te.cache/, before running dpkg-buildpackage.)The package is currently in the NEW-queue, until it was accepted, you can find packages on people.debian.org. Thanks to Lunar for some patches. I m keen to hear interesting stories about how and where you used the program.

10 June 2007

Christoph Berg: Postpone

I just finished implementing postpone, a wrapper that is intended to take an arbitrary command, fork into the background, wait until some lockfile is freed, and then run the command. Of course the idea is that the lockfile is /var/lib/dpkg/lock, and that postpone is used in maintainer scripts. (Update-menus already does that, and I've basically grabbed that code and generalized it as a separate program.) As a test implementation, I modified the post inst,rm templates in the tex-common package and rebuilt texlive-lang-* using that. dpkg -i texlive-lang-*.deb takes over 4 minutes in the old version, but only a total of 60s with postpone used (35s for dpkg -i plus 25s for the background jobs). A Debian package is currently sitting in NEW, let's hope it will actually get used in maintainer scripts.

5 June 2007

Martin-Éric Racine: Tip of the day: fetching all Debian source packages

A few weeks ago, the Linutop team received a request for its source code. We had already anticipated the GPL source offer clause in our development plan, so it was just a matter of myself getting around producing a source code ISO image. Piece of cake, right? Almost. You see, Linutop includes a custom kernel package and several separate wireless module packages, so the the following command would not work as expected:
apt-get --download-only --ignore-missing source $(dpkg --get-selections   cut -f 1)
Why is that? Because APT ignores the --ignore-missing option whenever executing the source command. Instead, Roland Mas suggested that I used this simple Bourne loop:
for p in $(dpkg --get-selections   cut -f 1) ; do apt-get --download-only source $p ; done
Done this way, the source code of each package is fetched individually and, if any package's source is not available, APT exits but the Bourne loop moves on to the next package in the list. Nifty, isn't it?

29 May 2007

Cameron Dale: May-28-2007: Start of Coding / New Release

The start has finally arrived, today is officially the first day of coding for the 2007 Google Summer of Code. To commemorate this occasion, I have prepared the next release (the second so far) of the software package I am writing for it, DebTorrent. You can download it from the Alioth project. Some of the changes in this release are: You can read detailed instructions for how to download using it in the README file, but the basic idea for using DebTorrent as part of an update is to: This is still an alpha release, but at least it has some more functionality than the previous one. Feel free to test it, but keep in mind that at this early stage most of the torrents will be unseeded.

26 May 2007

Remi Vanicat: git and etc

I’ve recently seen an interesting google video of Linus speaking about git, an one of its advantage : it is a powerful merger, that remember of the merge already done. I’m using git as an archiver/version tracker for the /etc/ of my debian box. As I’m using sid, I often upgrade it, and then one need to merge the modified config files with the new ones of the package. So I wonder How to use git for it. My idea would be to have two branch: one containing the unmodified config files from the Debian packages, the other containing my version of it. Then when I upgrade, first the unmodified branch would be update, and then one could try to merge with the modified one. A simple way to do it would be :
  1. checkout the unmodified branch
  2. update
  3. checkout the modified branch
  4. merge
This method as for me several problem: May be there is a better, like answering no to all question about replacing a config file, then using the .dpkg-new/.dpkg-dist file to update the uncheckout branch, and then merge. But for this I have to go well outside the different porcelain I know and use, and enter the use of some internal git tools. I could try to think about it, or hope someone already did it, or find my idea interesting, and try to do it. Is someone still reading this ?

Remi Vanicat: git and etc

I’ve recently seen an interesting google video of Linus speaking about git, an one of its advantage : it is a powerful merger, that remember of the merge already done. I’m using git as an archiver/version tracker for the /etc/ of my debian box. As I’m using sid, I often upgrade it, and then one need to merge the modified config files with the new ones of the package. So I wonder How to use git for it. My idea would be to have two branch: one containing the unmodified config files from the Debian packages, the other containing my version of it. Then when I upgrade, first the unmodified branch would be update, and then one could try to merge with the modified one. A simple way to do it would be :
  1. checkout the unmodified branch
  2. update
  3. checkout the modified branch
  4. merge
This method as for me several problem: May be there is a better, like answering no to all question about replacing a config file, then using the .dpkg-new/.dpkg-dist file to update the uncheckout branch, and then merge. But for this I have to go well outside the different porcelain I know and use, and enter the use of some internal git tools. I could try to think about it, or hope someone already did it, or find my idea interesting, and try to do it. Is someone still reading this ?

22 May 2007

Jan Wagner: recent eGroupware for debian

Since one week eGroupware 1.4RC1 is available. Peter did upload it into experimental and I did repackage it for etch, for a smarty integration (dpkg -i for > 15 packages sucks).
You can download it by using the following line in sources.list:

deb ftp://ftp.cyconet.org/debian etch-backports main non-free contrib Please note that you also need installed egroupware-egw-pear.
If you experience troubles, report your bugs upstream. , , , ,

15 May 2007

Bastian Blank: Bootstrapping Ubuntu feisty

Hmm. Debian fixed this problems, but Ubuntu manages to get them also:
P: Configuring package volumeid
O: cp:
O: cannot stat  /etc/fstab'
O: : No such file or directory
O:
O: dpkg: error processing volumeid (--configure):
O:  subprocess post-installation script returned error exit status 1

9 May 2007

Simon Richter: Whee, it works.

The dirty work is done, and I have successfully built a busybox that links against uClibc. what is so special about that, you ask? Well, the toolchain I used is the emdebian ARM cross compiler, and the uClibc was built with dpkg-buildpackage, converted to a cross -dev package using dpkg-cross and then installed with dpkg. So the final step, providing a compiler alias, is a two line shell script away. You can use uClibc by either passing the -uclibc command line option to the compiler (in all stages), or by invoking the compiler using the arm-linux-uclibc-gcc alias. I am thinking about uClibc++ as well, however that will require additional tuning.

4 May 2007

Simon Richter: Live from the uClibc front

/usr/arm-linux-gnu/arm-linux-uclibc/include is the place where the party is at, it seems. Time to hack dpkg-cross. Also, preferences for the name schema for MMUless systems are solicited. My favourite is "armelnommu" & co.

26 April 2007

Miriam Ruiz: Debian packages for Gnash

As it’s quite predictable that we’ll have a newer version of Gnash in one or two months, I’ve created a newer experimental set of packages from the CVS, so that everything is ready when the release comes out. There is really much more to do before they’re in a decent state, mainly making them work out-of-the box for Konqueror, and decide how to handle the shared objects that are being built right now. The plugin for iceweasel works out-of-the-box for me. Do not expect a stable program for the moment anyway, it’s still under heavy development. I’ve been reported some more bugs about these packages anyway, so be careful with them. Chipi has built the packages for amd64 for me, so if you want them, they’re available online. According to one of the developers: “gnash should not have shared objects, they have been enabled again recently to allow builds on Darwin, altought I think we should disable them again”, so I think that matter about shared objects is likely to be solved soon. As it is right now, I’m pretty sure it wouldn’t be compliant with The Policy. As there’s no API for gnash yet, it doesn’t really make sense to create a -dev package for the moment, even though there seem to be some demand for it. Somewhere in the future we will likely have one. For those who want to experiment with later versions, I’m using SVN for handling the packaging, so it’s quite easy to create some really extreme latest version of the packages: svn co svn://svn.debian.org/svn/pkg-flash/packages/gnash/trunk/ latest-gnash
cd latest-gnash
fakeroot debian/rules get-orig-source
cd gnash-0.7.2+cvs*.????
dpkg-buildpackage -rfakeroot

Next.

Previous.