Mandriva 2011.0
[rolf@localhost ~]$ cat /etc/mandriva-release
Mandriva Linux release 2011.0 (Official) for x86_64
[rolf@localhost ~]$ rpm -q rpm
rpm-5.3.12-0.20110712.2-mdv2011.0.x86_64

This is my first exposure to rpm-5 and I couldn't understand why I couldn't rpm -qip [--changelog] URL or rpm -U --oldpackage URL, some rpm functionalities I've come to use often, after 11 years of Mandrake|iva. This thread is the first suggestion of the reason I've found, after some fruitless google searching and devising some testing to eliminate local corruption: https://qa.mandriva.com/show_bug.cgi?id=64914

Is "network access was disabled in rpm-5.0.0" why I am seeing this? If so, can the functionalities be restored?
Thanks,
Rolf

On Jan 24, 2008, at 11:57 AM, Stefan Westmeier wrote:

 Hi again,

 here with some more information about the topic.

 Using rpm 4.1 fetching packages directly via ftp works nicely. The
 command below works fine.

 Exactly the same commands fails for rpm 5.0.0:

 $ rpm --ignoreos --dbpath /cygdrive/d/home/rpmroot/rpmdb -- relocate
 /if=/cygdrive/d/home/rpmroot/if --relocate /sys=/cy
 gdrive/d/home/rpmroot/sys -i ftp://user:[email protected]:2666/
 CoC_sys/Most/Trunk/rpms/most_if-1.0-1.i686.rpm ftp:
 //user:[email protected]:2666/CoC_sys/Most/Trunk/rpms/most-
 bin-1.0-1.i686.rpm error: open of
 ftp://user:[email protected]:2666/CoC_sys/Most/
 Trunk/rpms/most_if-1.0-1.i686.rpm failed: No such fil e or directory

 Is this a bug or feature?


rpm5.org decided to do network access through external curl
rather than internal rpmio (as in rpm-4.1).

So network access was disabled in rpm-5.0.0.

I've added a patch in cvs already to permit opt-in re-enabling,
patch attached below.

Then "opt-in" to network access by doing

     echo "%_rpmgio        %{nil}" >> /etc/rpm/macros

The patch will be in rpm-5.0.1 Real Soon Now.

Note there may be a few more cases where Fopen needs the
same "opt-in" change, but the 3 cases in lib/rpmgi.c are the
most important because that is the most common case for
queries.

73 de Jeff

Index: rpmgi.c
===================================================================
RCS file: /v/rpm/cvs/rpm/lib/rpmgi.c,v
retrieving revision 2.47
retrieving revision 2.48
diff -u -b -B -w -p -r2.47 -r2.48
--- rpmgi.c     1 Dec 2007 17:54:30 -0000       2.47
+++ rpmgi.c     11 Jan 2008 23:05:33 -0000      2.48
@@ -115,7 +115,7 @@ static rpmRC rpmgiLoadManifest(rpmgi gi,
         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
         /*@modifies gi, rpmGlobalMacroContext, h_errno,
internalState @*/
  {
-    FD_t fd = rpmgiOpen(path, "r.fdio");
+    FD_t fd = rpmgiOpen(path, "r%{?_rpmgio}");
      rpmRC rpmrc = RPMRC_FAIL;

      if (fd != NULL) {
@@ -136,7 +136,7 @@ static Header rpmgiReadHeader(rpmgi gi,
         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
         /*@modifies gi, rpmGlobalMacroContext, h_errno,
internalState @*/
  {
-    FD_t fd = rpmgiOpen(path, "r.fdio");
+    FD_t fd = rpmgiOpen(path, "r%{?_rpmgio}");
      Header h = NULL;

      if (fd != NULL) {
@@ -665,7 +665,7 @@ nextkey:
                 path = _free(path);
                 path = rpmExpand(_query_hdlist_path, NULL);
             }
-           gi->fd = rpmgiOpen(path, "rm.fdio");
+           gi->fd = rpmgiOpen(path, "rm%{?_rpmgio}");
             gi->active = 1;
             path = _free(path);
         }

Received on Thu Jan 24 18:12:57 2008

Reply via email to