Subject: Re: how to re-build Cygwin core package?
From: Gernot Hillier <[email-masked]>
To: [email-masked]
Date: Fri, 27 Aug 2004 08:22:55 +0200

Hi!

Am Mittwoch, 25. August 2004 13:07 schrieb Gernot Hillier:
> how to re-build Cygwin core package?

Just as reference for others - I now did it this way:

1.	Install Cygwin 2004-06-24, start bash

2.	Unpack the Cygwin core source package:

tar xvjf /cygdrive/e/release/cygwin/cygwin-1.5.10-3-src.tar.bz2

3.	Apply the needed patch (from 
http://www.cygwin.com/ml/cygwin-patches/2004-q3/msg00039.html):

cd cygwin-1.5.10-3/winsup/cygwin && patch -p0 < /path/to/root.diff

4.	It's necessary to build Cygwin in an extra path, so create one and change 
to it:

cd ../../.. && mkdir obj && cd obj

5.	To avoid Cygwin to overwrite the files of your make environment, an install 
prefix is used:

../cygwin-1.5.10-3/configure --prefix=/fake/usr --sysconfdir=/fake/etc \
 --libexecdir=/fake/usr/sbin --localstatedir=/fake/var \
 --datadir=/fake/usr/share --mandir=/fake/usr/share/man \
 --infodir=/fake/usr/share/info

6.	Build and install the new Cygwin to the install prefix path given above:

make && make install

7.	Remove debug symbols from all executables:

cd /fake && find . -type f -exec strip {} \;

8.	Correct some file locations:

mv  usr/i686-pc-cygwin/bin/* usr/bin/
mv  usr/i686-pc-cygwin/lib/* usr/lib/
rm -rf usr/i686-pc-cygwin/bin usr/i686-pc-cygwin/lib usr/etc
mv  usr/i686-pc-cygwin/* usr/

9.	Create the w32api package:

tar cjf w32api-20040624-1.tar.bz2 usr/include/w32api usr/lib/w32api

10.	Remove the files which belong to the w32api package from our tree:

rm -rf /fake/usr/include/w32api /fake/usr/lib/w32api

11.	Create the mingw-runtime package:

tar cjf mingw-runtime-20040624-1.tar.bz2 usr/bin/mingwm10.dll \
   usr/doc/mingw-runtime usr/include/mingw usr/lib/mingw

12.	Remove the files which belong to the w32api package from our tree:

rm -rf /fake/usr/bin/mingwm10.dll /fake/usr/doc/mingw-runtime \
   /fake/usr/include/mingw /fake/usr/lib/mingw

13.	Remove files which are distributed with other packages (but are included 
in the cygwin source package for boot-strapping) or should not be distributed 
at all:

rm -rf /fake/usr/include/iconv.h # comes also with libiconv
rm -rf /fake/usr/include/unctrl.h # comes also with libncurses-devel
rm -rf /fake/usr/share/info/configure.info-1 # auto-created by info tool
rm -rf /fake/usr/lib/libiberty.a # comes also with binutils

14.	Three files were not built and would need extra effort (i.e. compiling 
other libraries be-fore the Cygwin package). Take them from the already 
installed Cygwin distribution:

cp /usr/bin/dumper.exe usr/bin/
cp /usr/share/info/libc.info usr/share/info/
cp /usr/share/info/libm.info usr/share/info/

15.	Finally, the cygwin package itself can be created:

tar cjf cygwin-20040624-1.tar.bz2 etc/ usr/

16.	Now, the created packages can be moved to the Cygwin installation CD-ROM 
to release/cygwin/, release/mingw-runtime/ and release/w32api/ and the file 
names, sizes and md5sums in setup.ini modified accordingly so that setup.exe 
will in-stall the new core packages in the future.

HTH anyone...

-- 
Bye,

Gernot Hillier
CT SE 2
Siemens AG, Mch P

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/