[Nix-commits] SVN commit: nix - r34182 - configurations/trunk/tud

2012-05-19 Thread Rob Vermaas
Author: rob
Date: Sat May 19 10:51:52 2012
New Revision: 34182
URL: https://nixos.org/websvn/nix/?rev=34182sc=1

Log:
remove webdata backups using sitecopy, replaced by backups to fileserver using 
duplicity

Modified:
   configurations/trunk/tud/cartman.nix

Modified: configurations/trunk/tud/cartman.nix
==
--- configurations/trunk/tud/cartman.nixSat May 19 02:52:36 2012
(r34181)
+++ configurations/trunk/tud/cartman.nixSat May 19 10:51:52 2012
(r34182)
@@ -3,6 +3,16 @@
 with pkgs.lib;
 
 let 
+  duplicityBackup = pkgs.writeScript backup-duplicity ''
+#! /bin/sh
+export PATH=$PATH:/var/run/current-system/sw/bin
+time duplicity --no-encryption /data/pt-wiki file:///backup/cartman/pt-wiki
+time duplicity --no-encryption /data/nixos-mediawiki-upload 
file:///backup/cartman/nixos-mediawiki-upload
+time duplicity --no-encryption /data/subversion 
file:///backup/cartman/subversion
+time duplicity --no-encryption /data/subversion-nix 
file:///backup/cartman/subversion-nix
+time duplicity --no-encryption /data/subversion-ptg 
file:///backup/cartman/subversion-ptg
+time duplicity --no-encryption /data/subversion-strategoxt 
file:///backup/cartman/subversion-strategoxt
+  '';
 
   machines = import ./machines.nix pkgs.lib;
 
@@ -111,6 +121,10 @@
 fsType = nfs;
 options = soft;
   }
+  { mountPoint = /backup;
+device = 130.161.158.5:/dxs/users4/group/buildfarm;
+fsType = nfs;
+  }
 ];
 
   swapDevices = [
@@ -218,6 +232,7 @@
   #15 0 * * *  root  (TZ=CET date; ${pkgs.rsync}/bin/rsync -razv 
--numeric-ids --delete /data/postgresql /data/webserver/tarballs 
unixhome.st.ewi.tudelft.nl::bfarm/)  /var/log/backup.log 21
   0 3 * * * root nix-store --gc --max-freed \$((50 * 1024**3 - 1024 
* $(df /nix/store | tail -n 1 | awk '{ print $4 }')))\  /var/log/gc.log 21
   *  *  * * * root ${pkgs.python}/bin/python ${ZabbixApacheUpdater} 
-z 192.168.1.5 -c cartman
+  40 * * * *  ${duplicityBackup}  /var/log/backup-duplicity.log
 
   # Force the sixxs tunnel to stay alive by periodically
   # pinging the other side.  This is necessary to remain
@@ -568,50 +583,6 @@
   ];
 };
 
-sitecopy = {
-  enable = true;
-  backups =
-let genericBackup = { server = webdata.tudelft.nl;
-  protocol = webdav;
-  https = true;
-  symlinks = ignore; 
-};
-in [
-  ( genericBackup // { name   = subversion;
-   local  = /data/subversion;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/subversion/subversion; 
- } )
-  ( genericBackup // { name   = subversion-nix;
-   local  = /data/subversion-nix;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/subversion/subversion-nix; 
- } )
-  ( genericBackup // { name   = subversion-ptg;
-   local  = /data/subversion-ptg;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/subversion/subversion-ptg; 
- } )
-  ( genericBackup // { name   = subversion-strategoxt; 
-   local  = /data/subversion-strategoxt;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/subversion/subversion-strategoxt; 
- } )
-  ( genericBackup // { name   = webserver-dist-nix; 
-   local  = /data/webserver/dist/nix;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/webserver-dist-nix; 
- } )
-#  ( genericBackup // { name   = webserver-tarballs; 
-#   local  = /data/webserver/tarballs;
-#   remote = 
/staff-groups/ewi/st/strategoxt/backup/webserver-tarballs; 
-# } )
-  ( genericBackup // { name   = pt-wiki; 
-   local  = /data/pt-wiki;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/pt-wiki; 
- } )
-  ( genericBackup // { name   = nixos-mediawiki-upload; 
-   local  = /data/nixos-mediawiki-upload;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/nixos-mediawiki-upload; 
- } )
-];
-  };
-
 zabbixAgent.enable = true;
 
 zabbixServer.enable = true;
@@ -625,7 +596,7 @@
   # Needed for the Nixpkgs mirror script.
   environment.pathsToLink = [ /libexec ];
 
-  environment.systemPackages = [ pkgs.dnsmasq ];

[Nix-commits] SVN commit: nix - r34183 - configurations/trunk/tud

2012-05-19 Thread Rob Vermaas
Author: rob
Date: Sat May 19 11:18:05 2012
New Revision: 34183
URL: https://nixos.org/websvn/nix/?rev=34183sc=1

Log:
add nfs mount to backup server, add cronjob to copy db backups

Modified:
   configurations/trunk/tud/wendy.nix

Modified: configurations/trunk/tud/wendy.nix
==
--- configurations/trunk/tud/wendy.nix  Sat May 19 10:51:52 2012(r34182)
+++ configurations/trunk/tud/wendy.nix  Sat May 19 11:18:05 2012(r34183)
@@ -12,6 +12,14 @@
   UseCanonicalName On
 '';
 
+  fileSystems =
+[ { mountPoint = /backup;
+device = 130.161.158.5:/dxs/users4/group/buildfarm;
+fsType = nfs;
+  }
+];
+
+
   jobs.mturk_webserver_production =
 { name = mturk-webserver-production;
   startOn = started network-interfaces;
@@ -93,19 +101,10 @@
 UserParameter=hydra.builds,${pkgs.postgresql}/bin/psql hydra -At -c 
'select count(*) from Builds'
   '';
 
-  services.sitecopy = {
-  enable = true;
-  backups =
-let genericBackup = { server = webdata.tudelft.nl;
-  protocol = webdav;
-  https = true ;
-  symlinks = ignore ;
-};
-in [
-  ( genericBackup // { name   = postgresql;
-   local  = 
config.services.postgresqlBackup.location;
-   remote = 
/staff-groups/ewi/st/strategoxt/backup/postgresql-webdsl.org;
- })
+  services.cron = {
+  systemCronJobs =
+[
+  15 4 * * *  cp -v /var/backup/postgresql/* 
/backup/wendy/postgresql/   /var/log/backup-db.log
 ];
 };
 
___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits


[Nix-commits] SVN commit: nix - r34184 - in nixpkgs/trunk/pkgs: development/python-modules top-level

2012-05-19 Thread Cillian de Roiste
Author: cillian
Date: Sat May 19 23:15:50 2012
New Revision: 34184
URL: https://nixos.org/websvn/nix/?rev=34184sc=1

Log:
Patching python-virtualenv so that it doesn't fail if the python version is 
specified, e.g. --python=python2.7, and now iff the python version is specified 
it successfully also installs additional libs such as readline into the 
virtualenv

Added:
   nixpkgs/trunk/pkgs/development/python-modules/virtualenv-change-prefix.patch
Modified:
   nixpkgs/trunk/pkgs/top-level/python-packages.nix

Added: 
nixpkgs/trunk/pkgs/development/python-modules/virtualenv-change-prefix.patch
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 
nixpkgs/trunk/pkgs/development/python-modules/virtualenv-change-prefix.patch
Sat May 19 23:15:50 2012(r34184)
@@ -0,0 +1,29 @@
+Without this patch `virtualenv --python=python2.7 .` fails with an error 
because it notices that the python readline.so is not in the same path as 
python2.7. I assume this is to avoid copying the wrong file on systems where it 
is possible to find incompatible libraries by accident. Adding /nix/store to 
the prefix fixes this problem. Unfortunately readline is still not available if 
you just run `virtualenv .`.
+
+
+--- virtualenv-1.6.4/virtualenv.py 2012-05-20 00:40:38.070649647 +0200
 virtualenv-1.6.4/virtualenv.py 2012-05-20 00:45:10.596242604 +0200
+@@ -951,13 +951,7 @@
+ 
+ 
+ def change_prefix(filename, dst_prefix):
+-prefixes = [sys.prefix]
+-
+-if sys.platform == darwin:
+-prefixes.extend((
+-os.path.join(/Library/Python, sys.version[:3], site-packages),
+-os.path.join(sys.prefix, Extras, lib, python),
+-os.path.join(~, Library, Python, sys.version[:3], 
site-packages)))
++prefixes = [/nix/store, sys.prefix]
+ 
+ if hasattr(sys, 'real_prefix'):
+ prefixes.append(sys.real_prefix)
+@@ -968,6 +962,8 @@
+ _, relpath = filename.split(src_prefix, 1)
+ assert relpath[0] == os.sep
+ relpath = relpath[1:]
++if src_prefix == /nix/store:
++relpath = /.join(relpath.split(/)[1:])
+ return join(dst_prefix, relpath)
+ assert False, Filename %s does not start with any of these prefixes: %s 
% \
+ (filename, prefixes)

Modified: nixpkgs/trunk/pkgs/top-level/python-packages.nix
==
--- nixpkgs/trunk/pkgs/top-level/python-packages.nixSat May 19 11:18:05 
2012(r34183)
+++ nixpkgs/trunk/pkgs/top-level/python-packages.nixSat May 19 23:15:50 
2012(r34184)
@@ -2266,6 +2266,8 @@
   md5 = 1072b66d53c24e019a8f1304ac9d9fc5;
 };
 
+patches = [ ../development/python-modules/virtualenv-change-prefix.patch ];
+
 doCheck = false;
 
 meta = with stdenv.lib; {
___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits


[Nix-commits] SVN commit: nix - r34185 - nixpkgs/trunk/pkgs/applications/audio/audacious

2012-05-19 Thread Eelco Dolstra
Author: eelco
Date: Sun May 20 03:23:31 2012
New Revision: 34185
URL: https://nixos.org/websvn/nix/?rev=34185sc=1

Log:
* Audacious updated to 3.2.2.

Modified:
   nixpkgs/trunk/pkgs/applications/audio/audacious/default.nix

Modified: nixpkgs/trunk/pkgs/applications/audio/audacious/default.nix
==
--- nixpkgs/trunk/pkgs/applications/audio/audacious/default.nix Sat May 19 
23:15:50 2012(r34184)
+++ nixpkgs/trunk/pkgs/applications/audio/audacious/default.nix Sun May 20 
03:23:31 2012(r34185)
@@ -4,19 +4,19 @@
 }:
 
 let
-  version = 3.2.1;
+  version = 3.2.2;
 in
 stdenv.mkDerivation {
   name = audacious-${version};
 
   src = fetchurl {
 url = 
http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2;;
-sha256 = 
064a8d2887a0f92a1637df9d71b8eefa8064199c04eccfaac725f840cff6eac3;
+sha256 = 1vj2f3jq67r9wc3s8p51w8338cjhidj3lpxmzyh31lrfikj21766;
   };
 
   pluginsSrc = fetchurl {
 url = 
http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2;;
-sha256 = 
5b7d3e52f6b8903bc01ae15651817e990d3348ae6b9734767f354eb2dbfc8c2d;
+sha256 = 1z5p4ny0kzszaki4f1fgrvcr0q1j6i19847jhplc07nl1rvycdy6;
   };
 
   # `--enable-amidiplug' is to prevent configure from looking in /proc/asound.
___
nix-commits mailing list
nix-comm...@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-commits


[Nix-dev] Git conversion of NixOS and Nixpkgs

2012-05-19 Thread Eelco Dolstra
Hi all,

I've uploaded Git repositories of NixOS and Nixpkgs to GitHub for testing:

  https://github.com/edolstra/nixos
  https://github.com/edolstra/nixpkgs

These should have the complete history from the Subversion repository, including
all branches and tags.  They were generated using svn2git-kde.  Many thanks to
Rob for making the svn2git configuration file.  It can be found here:

  http://nixos.org/~eelco/nix-svn2git.conf

Please let me know if you see anything wrong with these repositories (e.g.
missing history).  If there are no problems, I'll move them to the NixOS
organisation on GitHub soon.  (Until then the SVN repository is still the One
True Repository, so please continue to commit there.)

-- 
Eelco Dolstra | LogicBlox, Inc. | http://www.st.ewi.tudelft.nl/~dolstra/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Git conversion of NixOS and Nixpkgs

2012-05-19 Thread Michael Raskin
Hi all,

I've uploaded Git repositories of NixOS and Nixpkgs to GitHub for testing:

  https://github.com/edolstra/nixos
  https://github.com/edolstra/nixpkgs

These should have the complete history from the Subversion repository, 
including
all branches and tags.  They were generated using svn2git-kde.  Many thanks to
Rob for making the svn2git configuration file.  It can be found here:

  http://nixos.org/~eelco/nix-svn2git.conf

Please let me know if you see anything wrong with these repositories (e.g.
missing history).  If there are no problems, I'll move them to the NixOS
organisation on GitHub soon.  (Until then the SVN repository is still the One
True Repository, so please continue to commit there.)

Random checks turn out OK.

BTW, SVN branch names are stored just as parts of commit messages?



___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev