public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* About the spec of cygwin's setup.ini file.
@ 2008-12-23  9:19 Hongyi Zhao
  2008-12-23 13:04 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Hongyi Zhao @ 2008-12-23  9:19 UTC (permalink / raw)
  To: cygwin

Hi all,

I find that there're many duplicate lines in the cygwin's setup.ini
file, e.g.:

---------------------
@ GConf2-devel
sdesc: "GNOME configuration database system (development)"
ldesc: "GConf is a configuration database system, functionally similar
to the
Windows registry but lots better. It's being written for the GNOME
desktop but does not require GNOME; configure should notice if GNOME
is not installed and compile the basic GConf library anyway."
category: Gnome
requires: cygwin ORBit2-devel glib2-devel
version: 2.14.0-2
install:
release/GNOME/GConf2/GConf2-devel/GConf2-devel-2.14.0-2.tar.bz2 24084
1c2e24f6d1844cc4e7c4dd237e42f7a8
source: release/GNOME/GConf2/GConf2-2.14.0-2-src.tar.bz2 1909270
578ce94b6bdb2ce9a49dd7c90ede47ea

@ GConf2-doc
sdesc: "GNOME configuration database system (API documentation)"
ldesc: "GConf is a configuration database system, functionally similar
to the
Windows registry but lots better. It's being written for the GNOME
desktop but does not require GNOME; configure should notice if GNOME
is not installed and compile the basic GConf library anyway."
category: Gnome Doc
version: 2.14.0-2
install: release/GNOME/GConf2/GConf2-doc/GConf2-doc-2.14.0-2.tar.bz2
42867 0917edf071036bd8be29fec5dec17930
source: release/GNOME/GConf2/GConf2-2.14.0-2-src.tar.bz2 1909270
578ce94b6bdb2ce9a49dd7c90ede47ea
-----------------------

I've the following issues on the above description:

1- The above two entries in the setup.ini actually point to the same
source file: GConf2-2.14.0-2-src.tar.bz2,  while they have different
other filelds, such as: install.  Who can give me some hints on the
spec of cygwin's setup.ini file? 

2- Furthermore, if I want make a local repository based on the
setup.ini file, where should I put these pakcages?  More specifically,
should I use the  field value of _install:_ or the field value of
_source:_ to construct the local directory tree for my cygwin's
repository?

Regards,

-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.


--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About the spec of cygwin's setup.ini file.
  2008-12-23  9:19 About the spec of cygwin's setup.ini file Hongyi Zhao
@ 2008-12-23 13:04 ` Eric Blake
  2008-12-23 14:21   ` Hongyi Zhao
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2008-12-23 13:04 UTC (permalink / raw)
  To: cygwin, hongyi.zhao

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Hongyi Zhao on 12/23/2008 2:18 AM:
> 
> 1- The above two entries in the setup.ini actually point to the same
> source file: GConf2-2.14.0-2-src.tar.bz2,  while they have different
> other filelds, such as: install.

That's because there are a number of packages where the same source
tarball produces multiple binary tarballs.

>  Who can give me some hints on the
> spec of cygwin's setup.ini file? 

The source code of setup.exe is freely available:
http://sourceware.org/cygwin-apps/setup.html
That provides the definitive reference for how it is parsed.  But there is
also the genini reference page,
http://sources.redhat.com/cygwin-apps/package-server.html

> 
> 2- Furthermore, if I want make a local repository based on the
> setup.ini file, where should I put these pakcages?  More specifically,
> should I use the  field value of _install:_ or the field value of
> _source:_ to construct the local directory tree for my cygwin's
> repository?

Depends on whether you want to install the binaries or the sources used to
generate those binaries.  But why not use setup.exe, and let it do the
work for you?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklQ4Z4ACgkQ84KuGfSFAYCZpACeKq5GUH1rYzVMVfneWHfVtwD1
uWEAoIegFh+O5VOh8Sxa7lImtVzqNlA7
=HuKL
-----END PGP SIGNATURE-----

--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About the spec of cygwin's setup.ini file.
  2008-12-23 13:04 ` Eric Blake
@ 2008-12-23 14:21   ` Hongyi Zhao
  0 siblings, 0 replies; 3+ messages in thread
From: Hongyi Zhao @ 2008-12-23 14:21 UTC (permalink / raw)
  To: cygwin

On Tue, 23 Dec 2008 06:03:26 -0700, Eric Blake <ebb9@byu.net> wrote:
>> 2- Furthermore, if I want make a local repository based on the
>> setup.ini file, where should I put these pakcages?  More specifically,
>> should I use the  field value of _install:_ or the field value of
>> _source:_ to construct the local directory tree for my cygwin's
>> repository?
>
>Depends on whether you want to install the binaries or the sources used to
>generate those binaries.  But why not use setup.exe, and let it do the
>work for you?

Let me describe the things in my case and the things I've done in more
detail:

1-  If I use the setup.exe to install the cygwin directly from a
remote mirror, it will take me more time to do this thing.
Furthermore, due to the  poor quality of my internet connection speed,
the installation process mabe be interrupted. 

2- In light of the actual situation of my case, I write some bash
scripts to extract the partial content of the _source_ field in the
setup.ini file, than I incombinate it with a cygwin mirror to get the
real url addresses list for all of the cygwin packages like this:  

------------------
#! /bin/sh
# This script. use to generate a download script. for cygwin !
#
# Usage : ./cyg_scratch.sh setup.ini
DEFAULT_SETUP_INI=setup.ini
BASE_MIRROR_SITE=http://cygwin.internet.bs/

## If the setup.ini specified ?
if [ -z $1 ] ; then
    SETUP_INI=$DEFAULT_SETUP_INI
else
    SETUP_INI=$1
fi

## If the SETUP_INI exists ?
if [ ! -f $SETUP_INI ] ; then
    echo "$SETUP_INI does not exists !"
    exit 0
fi

## Scratch the package file names in the setup.ini
for fname in `gawk '/^install:|^source:/ {print $2}' $SETUP_INI`
do
  echo $BASE_MIRROR_SITE$fname
#    wget -P `dirname $fname` $BASE_MIRROR_SITE$fname
## You can change to any statements to download the file you want.
#  `dirname $fname` : the directory prefix
#  
done
------------------

3- Based on the above script, I'll get all of the cygwin's packges
list into a file, say, file.lst files.  But considering that the
duplicate issues I've posted here, I must then delete the duplicate
lines in this file firstly in order for the furer use of it to build
my own repository.

4- Then I use other multi-thread downloading tool to load the file.lst
in order to obtain all of the packages quickly and safely.

5- Once the above step completed successfully, I then the other script
to re-put these packages into the right directories as they are like
this:

---------------------
#!/bin/sh
if [ $# -ne 1 ]
then
cat << EOF
Usage: `basename $0` Path/to/packages/of/cygwin
Path/to/packages/of/cygwin: Is the path of the Cygwin's packages
downloaded by multithread tools, such as thunder.
An example: `basename $0` /cygdrive/e/OS_and_Manage/cygwin/downoaded
EOF
exit 1
fi

DOWNLOAD_DIR=$1
chmod +r ./files.lst
if [ -f ./move-packages.lst ];then  rm -f ./move-packages.lst; fi
cp ./files.lst ./move-packages.lst
sed -i 's/^.*\/release\///g' ./move-packages.lst

if [ -f ./move-packages.lst.temp ];then  rm -f
./move-packages.lst.temp; fi
sort -k2n ./move-packages.lst | uniq >> ./move-packages.lst.temp
mv -f ./move-packages.lst.temp ./move-packages.lst

FILELIST=`cat move-packages.lst`
for thefile in $FILELIST; do
	PACKAGE_DIR="release/"`dirname $thefile`
	mkdir -p $PACKAGE_DIR
	chmod +rw $DOWNLOAD_DIR"/"`basename $thefile`
	cp -f $DOWNLOAD_DIR"/"`basename $thefile` $PACKAGE_DIR
done
---------------------- 

These are the case of mine.

-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.


--
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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-23 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-23  9:19 About the spec of cygwin's setup.ini file Hongyi Zhao
2008-12-23 13:04 ` Eric Blake
2008-12-23 14:21   ` Hongyi Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).