]> rtime.felk.cvut.cz Git - l4.git/blobdiff - repomgr
Merge branch 'master' of rtime.felk.cvut.cz:l4
[l4.git] / repomgr
diff --git a/repomgr b/repomgr
index 76a0829bce761f816dbd706f64a91f7a5dac1dfc..e004cc635a4bf1fa599c2827cd03c0b42a4e56bc 100755 (executable)
--- a/repomgr
+++ b/repomgr
@@ -21,34 +21,57 @@ my %modules =
                           l4/tool/vim
                           l4/tool/lib
                           l4/tool/elf-patcher
+                          l4/tool/gen_dopecode
                          ) ]
           },
 
    toolbin => { paths => [ map { "l4/tool/bin/$_" }
                            qw(isocreator qemu-x86-launch ux-launch
                               gengrub1iso gengrub2iso entry-selector
-                              mkspafs
+                              mkspafs genexportpack gen_kconfig
                              ) ]
               },
 
    l4re => { paths => [ map { "l4/pkg/$_" } qw(
-                         boehm_gc bootstrap crtn cxx cxx_libc_io cxx_thread
-                         drivers hello
-                         ldscripts
-                         l4re l4re_c l4re_kernel l4re_vfs l4sys l4util
-                         ldscripts ldso
-                         libc_backends libkproxy libloader
-                         libsigma0
-                         libstdc++-headers libstdc++-v3 libstdc++-v3_r
-                         libsupc++ libsupc++_r
-                         libvbus loader log lua moe ned sigma0
-                         uclibc uclibc_r
+                         bootstrap l4re-core/libgcc
+                         l4re-core/libgcc-pure
+                         l4re-core/crtn l4re-core/cxx l4re-core/cxx_libc_io
+                         l4re-core/ldscripts
+                         l4re-core/l4re/ l4re-core/l4re_c/
+                         l4re-core/l4re_kernel/ l4re-core/l4re_vfs/
+                         l4re-core/l4sys/ l4re-core/l4util/
+                         l4re-core/ldso/
+                         l4re-core/libc_backends l4re-core/libkproxy/
+                         l4re-core/libloader/
+                         l4re-core/libsigma0/
+                         l4re-core/libstdc++-headers/ l4re-core/libstdc++-v3/
+                         l4re-core/libstdc++-v3-minimal
+                         l4re-core/libsupc++ l4re-core/libsupc++-minimal
+                         l4re-core/prj-config
+                         l4re-core/moe l4re-core/ned/ l4re-core/sigma0/
+                         l4re-core/uclibc l4re-core/uclibc-minimal/
+                         l4re-core/uclibc-headers/
+                         l4re-core/lua/
+                         io
+                         cxx_thread drivers-frst hello
+                         acpica libvcpu loader log
                         ) ],
              pub_module => 1,
              modules => [ qw(bid toolbin) ],
            },
 
-   examples => {
+
+   # ./mk/pkgdeps -A mk/aliases.d pkgdeps pkg ...
+   l4linux_requirements
+        => { paths => [ map { "l4/pkg/$_" } qw(
+                        libedid lxfuxlibc rtc shmc
+                        drivers fb-drv x86emu input libirq
+                        ) ],
+                    pub_module => 1,
+                    modules => [ qw(l4re) ],
+                  },
+
+   examples_core => {
      paths => [ qw(l4/pkg/hello),
                 map { "l4/pkg/examples/$_" }
                 qw(Makefile
@@ -57,13 +80,25 @@ my %modules =
                    clntsrv
                    misc/Makefile
                    misc/cat
-                   misc/reboot
-                   misc/eb_leds
                    misc/shared-hello
                    libs/Makefile
+                   libs/l4re
+                 ) ],
+   },
+
+
+   examples_all => {
+     modules => [ qw(examples_core) ],
+     paths => [ qw(l4/pkg/hello),
+                map { "l4/pkg/examples/$_" }
+                qw(
+                   fb/Makefile
+                   fb/spectrum
+                   misc/eb_leds
+                   misc/fortran-hello
+                   misc/reboot
                    libs/inputtst
                    libs/libc_thread_safe
-                   libs/l4re
                    libs/libgomp
                    libs/libio
                    libs/libirq
@@ -77,47 +112,51 @@ my %modules =
 
    l4re_snapshot =>  {
      paths => [ map { "l4/pkg/$_" }
-                qw(acpica
-                   ankh
-                   arm_drivers
+                qw(ankh
                    boost-lite
+                   cons
                    cunit
                    dash
                    demangle
                    dde
                    dde-libinput
                    dope
+                   drivers
                    expat2
                    fb-drv
                    fbterminal
+                   ferret
                    fuxfprov
+                   gnu-efi
                    hello
                    input
-                   io
                    l4con
+                   l4virtio
                    lib_vt100
                    libbsd
-                   libbsd-full
+                   libedid
                    libevent
                    libc_be_stdin
                    libcrypto
                    libevent
-                   libexec
                    libgfxbitmap
+                   libgfortran
                    libgomp
-                   libio
-                   libio-io
+                   libfdt
+                   libiniparser
                    libirq
                    libjpeg
                    libpng
                    libsdl
                    libsdl-image
+                   libquadmath
                    linux-26-headers
+                   lwip
                    lxfuxlibc
                    mag
                    mag-gfx
                    ocaml
-                   ocaml_toys
+                   plr
                    python
                    readline
                    rtc
@@ -130,19 +169,17 @@ my %modules =
                    sqlite
                    tlsf
                    tmpfs
+                   udis86
                    valgrind
+                   vmm
                    x86emu
                    zlib
                    ) ],
-     modules => [ qw(l4re examples doc toolbin) ] },
+     modules => [ qw(l4re examples_all doc toolbin) ] },
 
    l4re_all => { paths   => [ qw(l4/pkg l4/tool) ],
                  modules => [ qw(l4re_snapshot) ] },
 
-   preprocess => {
-      paths => [ qw(tools/preprocess) ]
-   },
-
    fiasco => {
       pub_module => 1,
       paths   => [ qw(kernel/fiasco/BENCHMARKING
@@ -153,7 +190,6 @@ my %modules =
                       kernel/fiasco/src
                       kernel/fiasco/tool
                      ) ],
-      modules => [ qw(preprocess) ],
    },
 
    kernel => {
@@ -168,18 +204,42 @@ my %modules =
       modules => [ qw(l4re_snapshot) ],
    },
 
-   remote_repo => { modules => [ qw(fiasco remote_repo_l4re) ], },
+   remote_repo => { modules => [ qw(fiasco remote_repo_l4re) ] },
 
    all => {
       modules => [ qw(remote_repo) ],
    },
+
+
+   # those are going away, we need to keep them to get the
+   # dirs updated and thus removed
+   __prev => {
+     paths => [ map { "l4/pkg/$_" }
+                qw(ferret io libio libio-io libio-direct ocaml_toys
+                  libstdc++-v3_r libsupc++_r uclibc_r
+                  
+                   boehm_gc libgcc libgcc-pure libbsd-full
+                   crtn cxx cxx_libc_io cxx_thread
+                   ldscripts
+                   l4re/ l4re_c l4re_kernel l4re_vfs l4sys l4util
+                   ldscripts ldso
+                   libc_backends libkproxy libloader
+                   libsigma0
+                   libstdc++-headers libstdc++-v3 libstdc++-v3-minimal
+                   libsupc++ libsupc++-minimal
+                   libvbus lua moe ned sigma0
+                   uclibc uclibc-minimal uclibc-headers
+                
+                 ) ],
+   },
  );
 
 my %commands;
+my $svnrev = $ENV{REPOMGR_SVN_REV} || 'HEAD';
 
 sub get_root_url()
 {
-  my $o = `svn info --xml .`;
+  my $o = `svn info -r '$svnrev' --xml .`;
   die "Failed 'svn info'." if $?;
   $o =~ /<root>(.+)<\/root>/m;
   $1;
@@ -209,6 +269,15 @@ sub merge_modules
   sort keys %paths;
 }
 
+sub show_pub_modules()
+{
+  print "Available modules:\n";
+  foreach (sort keys %modules)
+    {
+       print "  $_\n" if $modules{$_}{pub_module};
+    }
+}
+
 sub usage
 {
   my $command = shift;
@@ -237,11 +306,11 @@ sub usage
   elsif ($command eq 'checkout')
     {
       print "  'checkout' will check out the given modules.\n";
-      print "Available modules:\n";
-      foreach (sort keys %modules)
-        {
-           print "  $_\n" if $modules{$_}{pub_module};
-        }
+      show_pub_modules();
+    }
+  elsif ($command eq 'modules')
+    {
+      show_pub_modules();
     }
   else
     {
@@ -254,7 +323,7 @@ sub check_module_structure()
   # make sure the paths look ok
   foreach (merge_modules())
     {
-      die "Trailing /'s in modules structure" if /\/$/;
+      #die "Trailing /'s in modules structure" if /\/$/;
       die "Double // detected in modules structure" if /\/\//;
     }
 }
@@ -274,7 +343,7 @@ sub command_root
   my $url = shift;
   my $dirname = shift;
   die "Need to give URL" unless defined $url and defined $dirname;
-  system("svn co $url --depth empty $dirname");
+  system("svn co -r '$svnrev' $url --depth empty $dirname");
 }
 
 sub init_config($)
@@ -341,8 +410,6 @@ sub do_checkout(%)
 
   my $root_url = get_root_url();
 
-  my $rev = $ENV{REPOMGR_SVN_REV} || 'HEAD';
-
   my @paths = merge_modules(@{$args{mods}});
 
   foreach my $paths (@paths)
@@ -353,7 +420,7 @@ sub do_checkout(%)
 
       foreach my $pe (@path_elems)
         {
-          if (! -d "$path/$pe/.svn")
+          if (! -d "$path/$pe")
             {
               # if we find something from path_roots then switch to that
               my $changed_path = convert_path("$path/$pe", 0,
@@ -376,14 +443,14 @@ sub do_checkout(%)
 
               if (defined $changed_path)
                   {
-                    my $cmd = "cd $path && svn co -r $rev --depth empty $root_url/$changed_path $pe";
+                    my $cmd = "cd $path && svn co -r '$svnrev' --depth empty $root_url/$changed_path $pe";
                     #print "cmd: $cmd\n";
                     system($cmd);
                     die "svn co failed" if $?;
                   }
                 else
                   {
-                    my $cmd = "cd $path && svn update -r $rev --depth empty $pe";
+                    my $cmd = "cd $path && svn update -q -r '$svnrev' --depth empty $pe";
                     #print "cmd: $cmd\n";
                     system($cmd);
                     die "svn update failed" if $?;
@@ -394,7 +461,7 @@ sub do_checkout(%)
     }
 
   print "Getting sources\n";
-  my $c = "svn update -r $rev --set-depth infinity ".join(' ', map { s/^\/+//; $_; } @paths);
+  my $c = "svn update -r '$svnrev' --set-depth infinity ".join(' ', map { s/^\/+//; $_; } @paths);
   #print "cmd: $c\n";
   system($c);
   die "svn update failed" if $?;
@@ -407,7 +474,7 @@ sub read_file($)
   my $blob;
   if ($fn =~ /^(file|svn|ssh\+svn):\/\//)
     {
-      $blob = `svn cat $fn`;
+      $blob = `svn -r '$svnrev' cat $fn`;
       undef $blob if $?;
     }
   elsif (open(A, $fn))
@@ -468,7 +535,7 @@ sub command_init
         }
       else
         {
-          my $cmd = "svn cat $repo_root\/$repo_conf";
+          my $cmd = "svn cat -r '$svnrev' $repo_root\/$repo_conf";
           $confblob = `$cmd`;
           die "Command '$cmd' failed" if $?;
         }
@@ -479,7 +546,7 @@ sub command_init
   ($localdir = $conf{base}) =~ s/.*\/// unless defined $localdir;
   print "localdir: $localdir\n";
 
-  my $cmd = "svn co --depth empty $repo_root/$conf{base} $localdir";
+  my $cmd = "svn co -r '$svnrev' --depth empty $repo_root/$conf{base} $localdir";
   system($cmd);
   die "Command '$cmd' failed" if $?;
   chdir $localdir;