ソースを参照

remove path fiddling until I have a complete solution; add sources.list file template; fix lib directory path

Ralf S. Engelschall 22 年 前
コミット
fb14e9a29a
4 ファイル変更17 行追加122 行削除
  1. 5 0
      apt/apt.conf
  2. 0 119
      apt/apt.patch
  3. 5 3
      apt/apt.spec
  4. 7 0
      apt/sources.list

+ 5 - 0
apt/apt.conf

@@ -1 +1,6 @@
+//
+//  apt.conf -- APT configuration
+//
+
 apt::system "rpm interface";
+

+ 0 - 119
apt/apt.patch

@@ -76,74 +76,6 @@ Index: apt-pkg/rpm/rpmhandler.h
  #include <rpm/rpmlib.h>
  #include <rpm/rpmmacro.h>
  
-Index: apt-pkg/rpm/rpmindexfile.cc
---- apt-pkg/rpm/rpmindexfile.cc.orig	2003-11-24 17:58:58.000000000 +0100
-+++ apt-pkg/rpm/rpmindexfile.cc	2003-11-28 23:01:52.000000000 +0100
-@@ -58,7 +58,7 @@
- 	 Res = URI;
-    }
-    else
--      Res = URI + Dist + "/base/";
-+      Res = URI + Dist + "/";
- 
-    Res += Type;
-    
-@@ -145,7 +145,7 @@
- 	 Res = URI;
-    }
-    else
--      Res = URI + Dist + "/base/";
-+      Res = URI + Dist + "/";
-    
-    Res += Type + '.' + Section;
- 
-@@ -277,8 +277,8 @@
-    if (Repository->IsAuthenticated() == true && 
-        Repository->HasRelease() == false)
-       return true;
--   new pkgAcqIndex(Owner,Repository,IndexURI("srclist"),Info("srclist"),
--		   "srclist");
-+   new pkgAcqIndex(Owner,Repository,IndexURI("00INDEX.apt-srclist"),Info("00INDEX.apt-srclist"),
-+		   "00INDEX.apt-srclist");
-    return true;
- }
- 									/*}}}*/
-@@ -347,10 +347,10 @@
-    if (Repository->IsAuthenticated() == true && 
-        Repository->HasRelease() == false)
-       return true;
--   new pkgAcqIndex(Owner,Repository,IndexURI("pkglist"),Info("pkglist"),
--		   "pkglist");
--   new pkgAcqIndexRel(Owner,Repository,IndexURI("release"),Info("release"),
--		      "release");
-+   new pkgAcqIndex(Owner,Repository,IndexURI("00INDEX.apt-pkglist"),Info("00INDEX.apt-pkglist"),
-+		   "00INDEX.apt-pkglist");
-+   new pkgAcqIndexRel(Owner,Repository,IndexURI("00INDEX.apt-release"),Info("00INDEX.apt-release"),
-+		      "00INDEX.apt-release");
-    return true;
- }
- 									/*}}}*/
-@@ -424,7 +424,7 @@
-       return _error->Error(_("Problem opening %s"),PackageFile.c_str());
-    }
-    // We call SubProgress with Size(), since we won't call SelectFile() here.
--   Prog.SubProgress(Size(),Info("pkglist"));
-+   Prog.SubProgress(Size(),Info("00INDEX.apt-pkglist"));
-    if (Gen.MergeFileProvides(Parser) == false)
-       return _error->Error(_("Problem with MergeFileProvides %s"),
- 			   PackageFile.c_str());
-Index: apt-pkg/rpm/rpmindexfile.h
---- apt-pkg/rpm/rpmindexfile.h.orig	2003-11-24 17:58:58.000000000 +0100
-+++ apt-pkg/rpm/rpmindexfile.h	2003-11-28 23:01:52.000000000 +0100
-@@ -140,7 +140,7 @@
- {
-    protected:
- 
--   virtual string MainType() const {return "srclist";}
-+   virtual string MainType() const {return "00INDEX.apt-srclist";}
- 
-    public:
- 
 Index: apt-pkg/rpm/rpmpackagedata.cc
 --- apt-pkg/rpm/rpmpackagedata.cc.orig	2003-11-24 17:58:55.000000000 +0100
 +++ apt-pkg/rpm/rpmpackagedata.cc	2003-11-28 23:01:52.000000000 +0100
@@ -473,32 +405,6 @@ Index: tools/genpkglist.cc
          int (* cmp)(const void *, const void *))
  
  {
-@@ -544,10 +544,10 @@
- 	 rpmsdir = string(op_dir);
-       }
-    }
--   pkglist_path = string(rpmsdir);
--   rpmsdir = rpmsdir + "/RPMS." + string(op_suf);
-+   pkglist_path = rpmsdir + "/" + string(op_suf);
-+   rpmsdir = rpmsdir + "/" + string(op_suf);
- 
--   string dirtag = "RPMS." + string(op_suf);
-+   string dirtag = string(op_suf);
- 
-    entry_no = scandir(rpmsdir.c_str(), &dirEntries, selectDirent, alphasort);
-    if (entry_no < 0) {
-@@ -559,9 +559,9 @@
-    chdir(rpmsdir.c_str());
-    
-    if (pkgListSuffix != NULL)
--	   pkglist_path = pkglist_path + "/base/pkglist." + pkgListSuffix;
-+	   pkglist_path = pkglist_path + "/00INDEX.apt-pkglist." + pkgListSuffix;
-    else
--	   pkglist_path = pkglist_path + "/base/pkglist." + op_suf;
-+	   pkglist_path = pkglist_path + "/00INDEX.apt-pkglist." + op_suf;
-    
-    
-    if (pkgListAppend == true && FileExists(pkglist_path)) {
 Index: tools/gensrclist.cc
 --- tools/gensrclist.cc.orig	2003-11-24 17:58:34.000000000 +0100
 +++ tools/gensrclist.cc	2003-11-28 23:01:52.000000000 +0100
@@ -605,28 +511,3 @@ Index: tools/gensrclist.cc
  int main(int argc, char ** argv) 
  {
     char buf[300];
-@@ -199,10 +282,10 @@
-    } else
-        strcpy(buf, arg_dir);
-    
--   strcat(buf, "/SRPMS.");
-+   strcat(buf, "/");
-    strcat(buf, arg_suffix);
-    
--   srpmdir = "SRPMS." + string(arg_suffix);
-+   srpmdir = string(arg_suffix);
- #ifdef OLD_FLATSCHEME
-    if (flatStructure) {
-       // add the last component of the directory to srpmdir
-@@ -234,9 +317,9 @@
-    chdir(buf);
-    
-    if (srcListSuffix != NULL)
--      sprintf(buf, "%s/srclist.%s", cwd, srcListSuffix);
-+      sprintf(buf, "00INDEX.apt-srclist.%s", srcListSuffix);
-    else
--      sprintf(buf, "%s/srclist.%s", cwd, arg_suffix);
-+      sprintf(buf, "00INDEX.apt-srclist.%s", arg_suffix);
-    
-    if (srcListAppend == true && FileExists(buf)) {
-       outfd = fdOpen(buf, O_WRONLY|O_APPEND, 0644);

+ 5 - 3
apt/apt.spec

@@ -43,6 +43,7 @@ Release:      20031128
 Source0:      http://moin.conectiva.com.br/files/AptRpm/attachments/apt-%{V_base}cnc%{V_rev}.tar.bz2
 Source1:      apt.conf
 Source2:      rpmpriorities
+Source3:      sources.list
 Patch0:       apt.patch
 
 #   build information
@@ -91,7 +92,7 @@ AutoReqProv:  no
     LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/rpm-config --ldflags`" \
     ./configure \
         --prefix=%{l_prefix} \
-        --libdir=%{l_prefix}/lib/apt \
+        --libdir=%{l_prefix}/lib \
         --localstatedir=%{l_prefix}/var/apt \
         --disable-shared \
         --enable-static \
@@ -126,9 +127,10 @@ AutoReqProv:  no
 
     #   install default (blank) configuration files
     %{l_shtool} mkdir -p -m 755 \
-        $RPM_BUILD_ROOT%{l_prefix}/etc/apt
+        $RPM_BUILD_ROOT%{l_prefix}/etc/apt/apt \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/apt/apt.conf.d
     %{l_shtool} install -c -m 644 %{l_value -s -a} \
-        %{SOURCE apt.conf} %{SOURCE rpmpriorities} \
+        %{SOURCE apt.conf} %{SOURCE rpmpriorities} %{SOURCE sources.list} \
         $RPM_BUILD_ROOT%{l_prefix}/etc/apt/
 
     #   strip down installation

+ 7 - 0
apt/sources.list

@@ -0,0 +1,7 @@
+##  
+##  sources.list -- APT package source list
+##
+
+rpm     ftp://ftp.openpkg.org/ private/apt current
+rpm-src ftp://ftp.openpkg.org/ private/apt current
+