Search Results: "Dmitrijs Ledkovs"

17 November 2013

Dmitrijs Ledkovs: libnih (upstart dependency) ported to kFreeBSD/eglibc


Back in September at the Linux Plumbers Conference in New Orleans, James Hunt and I presented Upstart roadmap, which included porting Upstart to kFreeBSD/glibc. The first milestone is now complete.

Libnih is ported to kFreeBSD/eglibc. During the course to get there the following has happened:

  • Later libnih test-suite gets a test case failure, which is then reported to FreeBSD.org. Turns out some syscalls on FreeBSD returned bogus siginfo_t.si_status information in some cases. Luckily there is now a full test-case and kernel patch posted by Jilles Tjoelker. Once that's committed upstream, I'll push for uploads to the affected kernels in Debian.


  • A few small patches applied to libnih, mostly adding POSIX compliant header includes and the like.
So with a patched libc and patched kernel one can compile libnih & run its test-suite. There are however some caveats feature miss-partiy:

  • nih_watch / inotify support is disabled. This is TODO on my list to port nih_watch to use kevent/kqueue EVFILT_VNODE.
  • FreeBSD kernel doesn't have abstract namespace domain sockets, so at the moment I have disabled some abstract namespace test-cases & changed dbus-connection tests to use pathname sockets instead. This is still a TODO because unlink before bind is not done, and the socket is not cleaned up after servers close it at the moment.




With all caveats above, here are the test-suite results:

================================================
libnih 1.0.4: nih-dbus-tool/test-suite.log
================================================

# TOTAL: 2492
# PASS: 2492
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

===========================================
libnih 1.0.4: nih-dbus/test-suite.log
===========================================

# TOTAL: 110
# PASS: 110
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

======================================
libnih 1.0.4: nih/test-suite.log
======================================

# TOTAL: 788
# PASS: 787
# SKIP: 0
# XFAIL: 1
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

PASS: test_watch
================

not ok 1 - nih_watch not supprted yet # TODO
XFAIL: test_watch 1 - nih_watch not supprted yet # TODO

at tests/test_watch.c:1594 (main).
1..1

3 November 2013

Gregor Herrmann: RC bugs 2013/44

I'm getting the hang of the more or less daily RC bug fixing again. below you find what I did this week. as a side note: as you can see, quite a few of the patches are taken from ubuntu; it's great that someone over there already took the time to come up with a fix; thanks! not so great is that only one of them was in the BTS. guys, you have already been better at forwarding your patches to the debian BTS, please try to get back into this good habit :)

2 September 2013

Dmitrijs Ledkovs: My Debian Activities: Multiarch & upstart on kFreeBSD hacking

Looks like there is a recent trend to publicize one's debian activities, so I thought I should join in =) Not so sure if MDA acronym would work for these types of posts...
MultiarchI have been working on multi-arching additional libraries. In particular I am working on multiarching boost libraries. At the moment boost1.53 multiarched libraries are uploaded in the experimental, and I am still working out the quirks with those. At the same time I have submitted a patch to multiarch libicu-dev, which has been accepted by the maintainer and is currently waiting in new queue. This brings us closer to multiarching all of boost libraries. But as it has been pointed out at the Multiarch BOF at Debconf'13, one doesn't have to wait for dependencies (be it libs or lib-devs) to be Multiarched before multi-arching your own library. If you do it right (put all or arch-specifi headers in multiarch location, and place libraries in multiarch location, split utilities into a separate package), you can go and multiarch your libraries ahead of time. Maybe it's time to default to debhelper 9 in dh-make, and default to multiarch locations for all libraries?

Boost also has libraries which depend on mpi, and at the moment that's not multiarched. I'm not sure if there are additional considerations there given the support for alternative mpi implementations in Debian.

Boost also depends on libpython. At the moment it's shipping libboost_python-py2.7.so & libbost-py3.3.so, with a libboost_python.so symlink to libbost_python-py2.7.so. I do wonder if it's a sensible approach, or should the boosty_python library be simply shipped in arch specific & python implementation specific paths e.g. /usr/lib/pythonX.Y/config-X.Y$(abi_tag)-$(DEB_HOST_MULTIARCH)/ that way we'll be able to support python debug interpreter in python_boost. I guess I should seek expert opinion on other multiarch wizards.

In addition to boost, I've now started looking at qmake and how it handles multiarch. At the moment, it doesn't handle it much. All paths are statically copied around and hard-coded in each module qmake provides. I have now been working at abusing qmake's $$system to call into dpkg-architecture, and actually choose native or cross compiler & adjust settings and paths to Qt libraries. There are a couple of bugs to fix, but I should be able to propose a "debian-multiarch" qmake spec soon. Such that in calls dpkg-architecture & properly adjust compilers & locations for the DEB_HOST. qmake by the way has its quirks. For example all variable assignments seemed to default to be "by value" & not "by reference" (i.e. upon assignment all variables on the right hand side get expanded and the literal string is stored, instead of storing $(prefix)/lib/$(arch), and evaluating that later.) Hence my current qmakespec is less elegant than I hoped.
upstart on kFreeBSDFreeBSD 9.2 and up have implemented the wait6 and with it waitid is also exposed. At the moment there are some differences between glibc and FreeBSD waitid usage. I am not well versed in glibc, FreeBSD and POSIX, but the bug at hand & POSIX reference lead me to believe that POSIX is slightly ambiguous about it.

Why is waitid support is interesting? Well, kFreeBSD/libc maintainer in Debian is working on exposing it with/after (e)glibc2.18 is in Debian, which will remove one more blocker from porting Upstart to kFreeBSD. To this extend, I have in the mean time setup FreeBSD & kFreeBSD virtual machines and got libnih to compile on both (sans waitid on kFreeBSD). One of the optional upstart's features is to use inotify to spot & reload configuration files, at the moment I haven't ported that functionality to use native kevent/kqueues (EVFILT_AIO) instead I have cheated and packaged for Debian the Google Summer of Code 2011 project libinotify-kevent which provides inotify compatible API, implemented with kevent. Which is kind of the reverse strategy of libkqueue and/or libevent. It would be interesting to see kernels and/or those libraries to unify/standartise on common APIs. Unfortunately, it still seems like using native API for each kernel is best to avoid dependencies and leverage all features and semantics. Nonetheless I did package it for now. To further progress with actually porting upstart, I'd like to get my hands at (e)glibc 2.18 compiled for kFreeBSD with waitid patches. I got pointers to the patches, but I haven't yet succeeded at compiling (e)glibc with those applied. So no upstart booting kFreeBSD VM yet, but rather work in progress. It's quite fun. It's been years since I have touched a FreeBSD boxes and it's first time me using kFreeBSD. The semantics, differences and benefits of each do shine and it's a promising platform.
Multiarch on kFreeBSD?
Given the excellent multiarch implementation on Debian and sophisticated Linux Emulation Layer on FreeBSD kernel, I was half expecting the following to work:
  • on kFreeBSD enable linux i386/amd64 repository
  • apt-get install hello:i386
  • $ hello
But unfortunately this confused kFreeBSD, since it didn't find ELF tags and linker didn't seem to load the right libraries any more =( Not sure if this issue has been raised before, but I think it would be awesome if FreeBSD Linux Emulation Layer worked transparently on Debian/kFreeBSD multiarch system.

22 April 2013

Dmitrijs Ledkovs: abi-compliance-checker & dh / cdbs integration

dh-autoreconf is an amazing addon for running autoreconf, I just love it.
abi-compliance-checker is an amazing tool for tracking API/ABI.
Wouldn't it be great to glue abi-compliance-checker into dh / cdbs packaging?!
abi-compliance-checker (1.98.8-1~exp1) experimental; urgency=low
.
* New upstream release
* Add dh_acc to generate and compare library dumps at build time,
together with addons for dh(7) and cdbs.
* Bump standards version, bump debhelper to 9, use 3.0 (quilt) format,
update Vcs-Svn field to canonical form, remove obsolete
DM-Upload-Allowed.
* Apply a patch to allow suffixes on a-c-c abi dumps.
Horay! So how does one use it?

  • build-depend on dh-acc
  • In your debian/rules
    • call dh_acc somewhere appropriate
    • dh $@ --with acc
    • include /usr/share/cdbs/1/rules/acc.mk
  • In your debian/libpackage-dev.acc
    • Write a abi-compliance-checker descriptor (no need to include version)
  • Build your package
  • Copy the generated /usr/lib/$(multiarch)/dh-acc/*.abi.tar.gz as ./debian/lib-package-dev.abi.tar.gz.ARCH
  • Now at each build ABI/API checks will be executed and compat reports will be generated
An example xml descriptor for libapt-pkg-dev is:
<?xml version="1.0" encoding="utf-8"?>
<descriptor>
<headers>
./build/include/apt-pkg/
</headers>
<libs>
./build/bin/
</libs>
<skip_types>
SubstVar
</skip_types>
</descriptor>
I wonder if things can be improved, for example:
  • For trivial packages, don't require .acc at all & simply point abi-compiance-checker at ./debian/tmp/
  • I think logs currently pollute the unpacked source package
  • Multiple "base" ABI need checking. E.g. given versions A, B, C one can introduce a new symbol in B and drop it in C. Both B & C are compatible with A, but C is not compatible with B, thus an API/ABI break got introduced into the distribution if all A,B,C were ever published in the archive.
  • Maybe run these as DEP-8 autopkgtests as well?
On a wider scope of things abi-compliance-checker allows to create "system" abi dumps & also check applications for ABI/API compliance. For example, one could scan deb packages to see if they are still compatible between major Debian Releases for some known install type (e.g. a default full Gnome Desktop), or we could scan proprietary packages to see if they are compatible (e.g. games delivered via Steam by Valve to multiple Ubuntu releases), and we can continuously monitor OS ABI to make sure we don't unknowingly break it with security and bugfix updates.

Please, play around with dh-acc and let me know what you think =)

20 April 2013

Dmitrijs Ledkovs: FTBFS fixes and other patches available for your package!

Wheeze is planned to release very soon! There is still a fair amount of work to push the release out, but it does mean that a lot of fun can begin for jessie.

Over the past cycle in Ubuntu, many packages where synced from experimental, many fixes were applied and many packages were upgraded ahead of debian version strings.

If one goes to your package PTS page at:

packages.qa.debian.org/$SCRPACKAGENAME

One can find the following box titled "ubuntu" in it:


Please click on "patches for VERSION STRING" to find:
  • Useless irrelevant changes =) oh well, it happens
  • FTBFS fixes due to GCC 4.8 (*)
  • FTBFS fixes due to new GlibC
  • FTBFS fixes due to multiarched Python2.7 and Python3.3
  • FTBFS fixes due to multiarched Tcl/Tk
  • FTBFS fixes due to Python hash randomisation enabled
  • FTBFS fixes due to Boost 1.53 (*)
  • Fixes to minimise dependencies when bootstrapping packages
  • Fixes to multiarch more and more libraries
  • Fixes to enable package cross-building
  • Updates to new upstream releases
  • Usage of pybuild
  • Completed migration away from guile1.6
(*) more of those will be available after S-series opens in ubuntu, from April the 29th onwards

Some of the above patches were submitted to debian, with majority of submitted patches have not been applied, simply because none of them were appropriate during freeze and could have been disruptive to Wheezy release.

Please check useful patches available on your PTS!

Please take those patches!

Not taking Ubuntu patches results in more duplicate work in Ubuntu (i.e. rebasing those patches), thus reducing total dev-time available to work to fix other issues.

I myself uploaded a few of those patches into Ubuntu. And in the beginning I was filing BTS bugs with a patch against relevant packages in Debian. Very quickly I realised that since Debian is frozen a lot of those patches would just bitrot in BTS. I of course wished that they would all be instantly applied and uploaded into Experimental, but that did not happen. At the moment there are still 8 bugs open with patches I submitted, with oldest one opened on 6th of July 2012. So that's the reason why I stopped pushing patches to BTS, because well they are not reviewed nor applied in a timely manner =) where my expectation of timely manner is less than 6 months to be uploaded into Experimental or reviewed/rejected/commented on. Not uploading patches because they don't apply to Debian yet, is silly as they will apply to Debian eventually. Unapplied patches continue to generate more work on a more universal scope (e.g. requiring those patches to be rebased in ubuntu, thus many developers spending their time doing that, instead of writting fixes for new issues).

25 March 2013

Dmitrijs Ledkovs: avahi + apt-cacher-ng + sbuild ?!

Laptop enters the WiFi network and decides that it wants to build some packages using sbuild.
At the same time, on this network there is apt-cacher-ng operating with most of packages cached.
On the other hand, there is a project squid-deb-proxy which provides yet another apt proxy, but with the added bonus of avahi discovery.

Can we throw all of this stuff together and make it work? Well let's try =)

On ubuntu:

$ sudo apt-get install apt-cacher-ng squid-deb-proxy-client

On debian:

Squid-deb-proxy-client is not packaged just fetch and install it. It's really just one python script & one conffile. Or I have published the python script and the config as part of this posts gist.

Next all of the avahi magic, really is just publishing a service file &amp; letting the python-script from the squid-deb-proxy-client package find it, and adding apt-conf.d snippet which calls the above mentioned script and generate correct proxy line.

But we are running apt-cacher-ng! So on the server where apt-cacher-ng is running drop this:

/etc/avahi/services/apt-cacher-ng.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">apt-cacher-ng proxy on %h</name>
<service protocol="ipv4">
<type>_apt_proxy._tcp</type>
<port>3142</port>
</service>
</service-group>

Now on any host that you want automatic apt-proxy discovery, simply install squid-deb-proxy-client & your apt-cacher-ng will be auto-discovered.

What about sbuild? Well, you don't really want to install avahi-daemon and start it inside the chroot, so we can cheat with creating an executable hook:

/etc/schroot/setup.d/51aptproxy
#!/bin/sh
set -e

. "$SETUP_DATA_DIR/common-data"
. "$SETUP_DATA_DIR/common-functions"
. "$SETUP_DATA_DIR/common-config"

APT_AVAHI_DISCOVER=/usr/share/squid-deb-proxy-client/apt-avahi-discover

if [ $STAGE = "setup-start" ] [ $STAGE = "setup-recover" ]; then
if type apt-avahi-discover 1>/dev/null; then
APT_AVAHI_DISCOVER=apt-avahi-discover
fi
APT_PROXY= $APT_AVAHI_DISCOVER
if [ -n "$APT_PROXY" ]; then
info "Setting apt-proxy to avahi proxy at $ APT_PROXY "
printf 'Acquire::http Proxy "%s"; ;\n' $ APT_PROXY > "$ CHROOT_PATH /etc/apt/apt.conf.d/30schrootautoproxy"
fi
fi

Tadah. Now I'm using my apt-cacher-ng whenever I'm on my home WiFi =)

Please advertise your apt-cache proxies!

Now to integrate this properly:
  • apt-cacher-ng should auto-create avahi service file in it's init script
  • apt-get or some other package should ship apt-avahi-discover script (there is also a C implementation available)
  • apt-get or some other package should ship the apt.conf.d snippet
  • sbuild / pbuilder / cowbuilder / mk-sbuild / [p cow]builder-dist should have hooks to retrieve hosts' apt proxy settings and use them in the chroots
For full sources see lp:squid-deb-proxy and my gist with all other config snippets.

27 January 2013

Dmitrijs Ledkovs: Thoughts on Debian package policies

configure, Makefile.in, config.guess & config.sub
Are static, included copies of code that should always be rebuild during build. If they are not rebuild at build time, it should be documented/automated the relevant helpers that are needed to rebuild the package. If they are failing to rebuild it's RC since source code is provided that is effectively cannot be modified in the preferred form. They also should not be modified in patch form, as editing generated code is not preferred form of modification. Also it constantly hurts us when bringing up new kernels and architectures (recently kfreebsd, armhf, aarch64). dh_autoreconf is a great tool to achieve thiis s.

no native packages
Generally if software is useful in Debian Project it can be useful for other debian-like and unlike projects. In particular native packages do not offer the same patching flexibility as 3.0 (quilt), thus forcing downstream distributions to inline modify packages without DEP-3 headers. This hurts us, when trying to merge useful stuff from derivatives back into Debian, as changes are not split into individual patches.

shared maintainership
I'd like to put all my packages under "Debian Developers <debian-devel d.o="">" maintainership. There is no need for NMU, QA, TEAM upload. If you have a patch, I don't want a bug in BTS nor commits, I'd like you to simply upload it into the archive. Especially blanket changes must be welcomed across the whole archive: translations, unit tests, porting to new debhelper versions, FTBFS fixes against next versions of compilers and interpreters, multiarch & cross-building fixes, porting to latest best packaging practices.</debian-devel>

ps. comments are turned off. All further discussion is redirected to your choice of: debian-devel or my personal email.

19 January 2013

Dmitrijs Ledkovs: #takethestage


#stagetaken
I have now permanently settled in the UK.



<iframe allowfullscreen="allowfullscreen" frameborder="0" height="480" src="https://www.youtube-nocookie.com/embed/Ke1Ilm6joO0" width="853"></iframe>

8 June 2012

Dmitrijs Ledkovs: Hello Debian, Planet and Debconf12

I am going to Debconf12
I'm going to Debconf12
Hello Debian Planet!

I have recently became a Debian Developer. One of the first things I did, was fix some RC bugs in my packages due to an ABI break from upstream in a point release. Then I fixed some bugs in offlineimap... Little did I know, that I broke it for many Debian developers including my ex boss and the Debian Project Leader all at the same time.

Speaking of which, any help will be appreciated in hunting down a memory leak in offlineimap.

I am going to Debconf12, thanks to my employer. I am interested in Python/dh_python[2-3], dh, 3.0 (quilt) with a DVCS, lvm2, mdadm, btrfs-tools, autofs, e2fsprogs, dm-crypt, debian-installer, init-systems & friends, OpenERP, offlineimap... if you are as well, find me and talk to me =)))

Regards,
xnox

27 March 2010

Clint Adams: DPL Campaign Questions 003

Dmitrijs Ledkovs:
Sometimes technical Debian discussions (mailing lists, bug reports, blog posts, etc.) become personal flame-wars. Do you think current frequency/amount of heated discussions is acceptable for the Debian project? What would you do to reduce those?
I do think that the current frequency/amount of heated discussion, as I perceive it, is acceptable for the project. I think that it is acceptable because it demonstrates that we have problems, and we should not be trying to hide problems. A code of conduct, or CoC, is something that treats symptoms but not causes. As DPL I would encourage the identification and resolution of the root causes. Why are people so angry? Why is there lack of respect? Why are people not asking these questions? In any healthy, functional organization, there are shared goals. Shared goals, obviously, contribute to a feeling of unity of purpose, and perhaps a vague and general direction to follow. Another thing is the spirit of cooperation and teamwork, and perhaps this is most important. Such spirit does not flourish when there are power inequalities or hierarchical structures. Such spirit does not flourish when you say that it is reasonable to make someone ask for permission to do things that anyone should be able to do. Such spirit does not flourish when things like ego and greed get in the way. Anyone can claim to be a team player, but it is rare that I actually encounter one. Paul Wise:
Which project and external Debian-related communications media do you follow? and contribute to? As well as a general list I'm interested in specific lists (for eg #debian, #debian-devel, debian-devel@l.d.o, debian-project@l.d.o, the Hardware forum on forums.d.n etc). How do you see those two lists changing if you become DPL? Which of these communications media do you feel is important for the DPL to read?
I am subscribed to over 50 Debian mailing lists. I do not follow them all. I am currently on #debian-glibc, #debian-devel, #debian-women, #spi, #alioth, #debian.de, #debian-devel.de, #debian-devel-fr, #debian-release, #debian-kernel, #debian-private, #debian-dak, #debian-devel-changes, #debian-ftp, #debian-buildd, #debian-games, #debian-dpkg, and #debian-bugs. I do not follow them all. I joined #debian-admin after a misunderstanding which led me to believe that it had become open and transparent, and was kicked out after about a week. I do not read any web forums, as I find them to be unbearable. As for external media, I occasionally read LWN. The only specific change I would anticipate after becoming DPL is the addition of leader@debian.org. I feel that it is important for the DPL to have a grasp of what is going on in the project, but I would not cite anything other than debian-devel-announce@lists.debian.org to be required reading. As for tones and perceptions on these various communications channels, I cannot say that external perception is entirely unimportant. However, if Debian is made the best it can be, I think external perception will become positive or not matter very much. So unless there are specific public relations needs arising out of a particular incident, I imagine that I would prefer to focus on improving Debian rather than improving Debian's external image.

Clint Adams: DPL Campaign Questions 002

Raphael Hertzog:
Imagine a DD contacts you, she wants to setup an infrastructure to finance Debian related projects (i.e. paying people to enable them to work on the projects that they'd like to do for Debian) but she wants to avoid the main mistakes made during Dunc-Tank; in her project: - everybody can propose projects to be financed - the projects to be financed are selected by the Debian developers and by the donors - eligible projects can only concern new developements and not recurring tasks
I am imagining that this contact took place in public. I see very few legitimate and good reasons to approach the DPL privately, and as DPL I would encourage people to to work toward transparency unless there were very good reasons to do otherwise. I would begin by telling her about the beauty of Debian as a gift economy community, and point out how great it is that I do not need to pay people to respond to my bug reports, apply my patches, release new versions, or develop any code not funded by corporate sponsors. I would recount my recent experience with a different free software community, where there was much talk of the motivational power of money, and how best to link PayPal to bug tracking systems and write a boilerplate email response template suggesting a donation of $5,000 to help facilitate the development of any feature requests. I would confess my suspicion that if this trend continues, any goodness in that community will be driven elsewhere, and the gift economy, which I believe to be a very important basis for free software, will be severely undermined. When I have completed my feeble attempt at political persuasion, if she is still firm and stubborn in her desire to proceed (and when monetary greed is involved, I expect this kind of stubbornness), I would suggest the following points: Then I would ask her once again not to do anything like this. Dmitrijs Ledkovs:
Please finish "In ten years I'd like Debian...."
In ten years I'd like Debian to still be my favorite operating system. In ten years I'd like Debian to be egalitarian and cooperative. In ten years I'd like Debian to be completely free software, without a non-free section.