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

Bug#156575: Optimising size for dhcp-client-udeb



Package: dhcp-client
Tags: patch

I've looked a bit at the dhcp-client-udeb building process, and noticed
that /sbin/dhclient is build with -g.

If we use -Os instead, we can save alot of space:

lexx:/tmp/dhcp-2.0pl5/debian% ls -l dhcp-client*/sbin/dhclient
-rwxr-xr-x    1 root     root        84744 Aug 13 22:04 dhcp-client-udeb/sbin/dhclient
-rwxr-xr-x    1 root     root       109320 Aug 13 22:04 dhcp-client/sbin/dhclient

The following very simple patch shows how to achieve this.

It is certainly not perfect, but I'd like to leave it up the the maintainer
of dhcp-client to decide how to really do it.

--- debian/rules  Tue Aug 13 22:11:10 2002
+++ /tmp/rules    Tue Aug 13 22:10:50 2002
@@ -81,6 +81,13 @@
        mv $(DESTDIR)/usr/share/man/man5/dhcp-options.5 \
                $(DESTDIR)/usr/share/man/man5/dhcp-options-dhcpd.5

+       dh_movefiles
+
+       cd common && $(MAKE) clean && $(MAKE) DEBUG=-Os
+       cd client && $(MAKE) clean && $(MAKE) DEBUG=-Os
+
+       $(MAKE) install $(IVARS)
+
        # install the udeb binary
        install -m 755 $(DESTDIR)/sbin/dhclient \
                `pwd`/debian/dhcp-client-udeb/sbin/dhclient
@@ -89,10 +96,9 @@
        cp `pwd`/debian/tmp/etc/dhclient-script \
                `pwd`/debian/dhcp-client-udeb/etc/

-       dh_movefiles

        # Remove unwanted directories that dh_movefiles should delete IMHO
-       rmdir $(DESTDIR)/sbin/
+       #rmdir $(DESTDIR)/sbin/

        touch install-stamp

-- 
CYa,
  Mario




Reply to: