ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/01/27/11:36:48

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
X-Authentication-Warning: vivaldi.cpe.ku.ac.th: ans owned process doing -bs
Date: Sat, 27 Jan 2001 23:42:57 +0700 (ICT)
From: Anon Sricharoenchai <ans AT beethoven DOT cpe DOT ku DOT ac DOT th>
X-Sender: ans AT vivaldi DOT cpe DOT ku DOT ac DOT th
To: cygwin-apps AT cygwin DOT com, rebum AT cygwin DOT cjb DOT net,
Michael Ring <m DOT ring AT ndh DOT net>
Subject: Patch for rpm, 1. Hanging up in the "Finding Provides:" step (bug
in win9x), 2. The "-V, --verify" option, and 3. Touching (utime) a read-only
file.
Message-ID: <Pine.LNX.4.21.0101272328480.17259-400000@vivaldi.cpe.ku.ac.th>
MIME-Version: 1.0

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime AT docserver DOT cac DOT washington DOT edu for more info.

--1822327841-680511764-980613777=:17259
Content-Type: TEXT/PLAIN; charset=US-ASCII


I have attached 3 patches on rpm-3.0.5 for cygwin-win9x.

1. The patch for for the bug in cygwin-win9x, that it hangs
up at the finding provides step during building a package,

   Finding  Provides: (using /usr/lib/rpm/find-provides)...

, as discussed in the following forum.

   http://pub30.ezboard.com/fcygwinfrm1.showMessage?topicID=2.topic

This is because rpm will wait for EOF of the output piped from the
"find-provides" program, but win9x can't detect an EOF on that
non-blocking pipe.

2. The next patch is a fix for the problem that cygwin interprete the
path, such as "//usr/bin/abc", as a samba path, so that it can't
access the file "/usr/bin/abc".  This problem has been fixed by
Michael Ring <m DOT ring AT ndh DOT net>, but with -V or --verity option, it
hasn't been fixed.  When rpm is invoked like,

   $ rpm -V <package-name>

, rpm always report every files in the package as a "missing" file.

3. Next, I have fixed calling utime() on a read-only file.  The
problem is that cygwin can't touch a read-only file.  Michael Ring has
fixed this by ignore any error return from utime(), but this will
cause the files with read-only permission been installed with an
incorrect timestamp.  So, I fixed this problem by first chmod u+w
every files before calling utime(), after utime()-ing I set the file
permission back to what it should be.



I have built my own rpm package with my patch base on
"rpm-3.0.5-27mdk.src.rpm" from Mandrake 7.2.  My package also includes
some patch about BUFSIZ, find-provides and find-requires from Michael
Ring.

The .tgz binary version is available at,

   http://naist.cpe.ku.ac.th/~ans/release/cygwin/tar/

The .rpm binary versions are available at,

   http://naist.cpe.ku.ac.th/~ans/release/cygwin/RPMS/

The .src.rpm version is available at,

   http://naist.cpe.ku.ac.th/~ans/release/cygwin/SRPMS/

--1822327841-680511764-980613777=:17259
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="rpm-3.0.5-cygwin-win9x-nonblocking_pipe_EOF.ans.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT LNX DOT 4 DOT 21 DOT 0101272342570 DOT 17259 AT vivaldi DOT cpe DOT ku DOT ac DOT th>
Content-Description: 
Content-Disposition: attachment; filename="rpm-3.0.5-cygwin-win9x-nonblocking_pipe_EOF.ans.patch"

LS0tIHJwbS0zLjAuNS5vcmlnL2J1aWxkL2ZpbGVzLmMJTW9uIEp1bCAxMCAw
NDozMzo1MCAyMDAwDQorKysgcnBtLTMuMC41LmRldmVsb3BlZC9idWlsZC9m
aWxlcy5jCVdlZCBKYW4gMjQgMjA6NTQ6MDggMjAwMQ0KQEAgLTE1MjksNiAr
MTUyOSwyNCBAQCBpbnQgcHJvY2Vzc1NvdXJjZUZpbGVzKFNwZWMgc3BlYykN
CiAgICAgcmV0dXJuIG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IgYnVmW0JVRlNJWisxXTsNCisgICAgICAgICAgICAg
ICB3aGlsZSAoKG5iciA9IHJlYWQoZnJvbVByb2dbMF0sIGJ1Ziwgc2l6ZW9m
KGJ1ZiktMSkpID4gMCkgew0KKyAgICAgICAgICAgICAgICAgICBidWZbbmJy
XSA9ICdcMCc7DQorICAgICAgICAgICAgICAgICAgIGFwcGVuZFN0cmluZ0J1
ZihyZWFkQnVmZiwgYnVmKTsNCisgICAgICAgICAgICAgICB9DQorICAgICAg
ICAgICB9DQorICAgICAgICAgICBoYXNfd2FpdGVkID0gMTsNCisgICAgICAg
ICAgIGRvbmUgPSAxOw0KKyAgICAgICAgfTsNCisjZW5kaWYNCiANCiAgICAg
fSB3aGlsZSAoIWRvbmUpOw0KIA0KQEAgLTE2NDksNiArMTY5MSw5IEBAIHRv
cDoNCiAgICAgKHZvaWQpc2lnbmFsKFNJR1BJUEUsIG9sZGhhbmRsZXIpOw0K
IA0KICAgICAvKiBDb2xsZWN0IHN0YXR1cyBmcm9tIHByb2cgKi8NCisjaWYg
ZGVmaW5lZChfV0lOOVgpICYmIGRlZmluZWQoX19DWUdXSU5fXykNCisgICAg
aWYgKCFoYXNfd2FpdGVkKQ0KKyNlbmRpZg0KICAgICAodm9pZCl3YWl0cGlk
KHByb2dQSUQsICZzdGF0dXMsIDApOw0KICAgICBpZiAoZmFpbE5vblplcm8g
JiYgKCFXSUZFWElURUQoc3RhdHVzKSB8fCBXRVhJVFNUQVRVUyhzdGF0dXMp
KSkgew0KIAlycG1FcnJvcihSUE1FUlJfRVhFQywgXygiJXMgZmFpbGVkIiks
IGFyZ3ZbMF0pOw0K
--1822327841-680511764-980613777=:17259
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="rpm-3.0.5-cygwin-network_path.ans.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT LNX DOT 4 DOT 21 DOT 0101272342571 DOT 17259 AT vivaldi DOT cpe DOT ku DOT ac DOT th>
Content-Description: 
Content-Disposition: att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wcmludGYo
ZmlsZXNwZWMsICIlcy8lcyVzIiwgcHJlZml4LCBkaXJOYW1lc1tkaXJJbmRl
eGVzW2ZpbGVudW1dXSwNCiAJCWJhc2VOYW1lc1tmaWxlbnVtXSk7DQorI2lm
IGRlZmluZWQoX19DWUdXSU5fXykNCisgICAgLyogZml4IGZvciB0aGUgZXJy
b3IgbWVzc2FnZSBsaWtlLA0KKyAgICAiY2Fubm90IG9wZW4gZmlsZSAvL3Zh
ci9saWIvcnBtL25hbWVpbmRleC5ycG06IE5vIHN1Y2ggaG9zdCBvciBuZXR3
b3JrIHBhdGgiDQorICAgICwgdGhhdCBjeWd3aW4gaW50ZXJwcmV0ZSAvL3Zh
ci9saWIgYXMgYSBzYW1iYSBwYXRoICovDQorICAgIHJwbUNsZWFuUGF0aChm
aWxlc3BlYyk7DQorI2VuZGlmDQogICAgIGZyZWUoYmFzZU5hbWVzKTsNCiAg
ICAgZnJlZShkaXJOYW1lcyk7DQogICAgIA0K
--1822327841-680511764-980613777=:17259
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="rpm-3.0.5-cygwin-mkfifo_and_utime.ans.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT LNX DOT 4 DOT 21 DOT 0101272342572 DOT 17259 AT vivaldi DOT cpe DOT ku DOT ac DOT th>
Content-Description: 
Content-Disposition: attachment; filename="rpm-3.0.5-cygwin-mkfifo_and_utime.ans.patch"

LS0tIHJwbS0zLjAuNS5vcmlnL2xpYi9jcGlvLmMJTW9uIEp1bCAxNyAwNzow
NDo1NiAyMDAwDQorKysgcnBtLTMuMC41LmRldmVsb3BlZC9saWIvY3Bpby5j
CUZyaSBKYW4gMjYgMDI6MDg6NTAgMjAwMQ0KQEAgLTI2OSwxMCArMjY5LDE5
IEBAIHN0YXRpYyBpbnQgc2V0SW5mbyhzdHJ1Y3QgY3Bpb0hlYWRlciAqIGgN
CiAgICAgaWYgKCFTX0lTTE5LKGhkci0+bW9kZSkpIHsNCiAJaWYgK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zdCBjaGFyICpfcGF0aCwg
bW9kZV90IF9tb2RlLCBkZXZfdCBkZXYgKSk7DQoraW50CV9FWEZVTihta2Zp
Zm8sKCBjb25zdCBjaGFyICpfX3BhdGgsIG1vZGVfdCBfX21vZGUgKSkgew0K
KyAgIHJldHVybiBta25vZChfX3BhdGgsIF9fbW9kZSB8IFNfSUZJRk8sIDAp
Ow0KK307DQorI2VuZGlmDQogLyoqICovDQogc3RhdGljIGludCBleHBhbmRG
aWZvKCAvKkB1bnVzZWRAKi8gRkRfdCBjZmQsIGNvbnN0IHN0cnVjdCBjcGlv
SGVhZGVyICogaGRyKQ0KIHsNCg==
--1822327841-680511764-980613777=:17259--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019