Subject: [alpine-devel] [PATCH 1/2] create new package for librsync

From: Jeremy Thomerson <[email-masked]>
Date: Thu, 21 Oct 2010 05:08:38 +0000

this package was created because I wanted rdiff-backup, and it
requires librsync
---
 testing/librsync/APKBUILD |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 testing/librsync/APKBUILD

diff --git a/testing/librsync/APKBUILD b/testing/librsync/APKBUILD
new file mode 100644
index 0000000..965a274
--- /dev/null
+++ b/testing/librsync/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Jeremy Thomerson <[email-masked]>
+# Maintainer: Jeremy Thomerson <[email-masked]>
+pkgname=librsync
+pkgver=0.9.7
+pkgrel=0
+pkgdesc="librsync implements the rolling-checksum algorithm of rsync"
+url="http://sourceforge.net/projects/librsync/"
+license="LGPL 2.1"
+depends=""
+makedepends=""
+install=
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+	cd "$_builddir"
+
+	./configure --prefix=/usr --mandir=/usr/share/man --enable-shared
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="24cdb6b78f45e0e83766903fd4f6bc84  librsync-0.9.7.tar.gz"
-- 
1.7.3.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Jeremy Thomerson <[email-masked]>
Date: Thu, 21 Oct 2010 05:08:39 +0000

---
 testing/rdiff-backup/APKBUILD |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 testing/rdiff-backup/APKBUILD

diff --git a/testing/rdiff-backup/APKBUILD b/testing/rdiff-backup/APKBUILD
new file mode 100644
index 0000000..6ffd197
--- /dev/null
+++ b/testing/rdiff-backup/APKBUILD
@@ -0,0 +1,26 @@
+# Contributor: Jeremy Thomerson <[email-masked]>
+# Maintainer: Jeremy Thomerson <[email-masked]>
+pkgname=rdiff-backup
+pkgver=1.2.8
+pkgrel=0
+pkgdesc="A backup utility that maintains extra reverse diffs so that files can be restored from previous backups."
+url="http://www.gnu.org/savannah-checkouts/non-gnu/rdiff-backup/"
+license="GPL"
+depends="python"
+makedepends="librsync-dev"
+subpackages="$pkgname-doc"
+source="http://savannah.nongnu.org/download/rdiff-backup/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+        cd "$_builddir"
+        python setup.py build || return 1
+}
+
+package() {
+        cd "$_builddir"
+        python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="1a94dc537fcf74d6a3a80bd27808e77b  rdiff-backup-1.2.8.tar.gz"
-- 
1.7.3.1

---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 25 Oct 2010 10:39:36 +0200

>  testing/rdiff-backup/APKBUILD |   26 ++++++++++++++++++++++++++

This looks like an interesting project. Talked the other day with Timo
(fabled) about simplifying updating CF installs with Alpine Linux.
Currently you need to download the iso image, mount it, copy the files
to CF and reboot. This can be done with the setup-bootable tool, but
still, its not efficient. So we talked about alternatives.

rdiff-backup might be worth look at for that purpose.

>  create mode 100644 testing/rdiff-backup/APKBUILD

It fails to build:
...
copying rdiff_backup/rpath.py -> build/lib.linux-i686-2.6/rdiff_backup
copying rdiff_backup/log.py -> build/lib.linux-i686-2.6/rdiff_backup
running build_ext
error: invalid Python installation: unable to
open /usr/include/python2.6/pyconfig.h (No such file or directory)
...

> +++ b/testing/rdiff-backup/APKBUILD
                ^^^
It needs python-dev in makedepends

Care to resend?

Thanks!
-nc

---

---

From: Jeremy Thomerson <[email-masked]>
Date: Mon, 25 Oct 2010 09:35:56 -0500

> rdiff-backup might be worth look at for that purpose.

I've used rdiff-backup for several years to backup my home fileserver to an
offsite location.  The save-a-diff functionality has saved me several times
where rsync overwriting the previous file would have killed me.  For
instance, you accidentally echo "" > some-important-file, but don't realize
it until a day or two later.  rsync would have blown away my remote backup,
too.  With rdiff, I can restore from a previous point in time (like version
control for backups).

> It needs python-dev in makedepends
Sure, I have some questions that I'm hoping you can help me with to get
better at this.

It built for me, which must mean that I installed python-dev at some point
during my trial-and-error approach to creating these aports.  Is there some
way to know "hey, this thing is dependent on something that I already have
installed on my system"?  Do you just build on a box with absolutely nothing
installed (only alpine-sdk for instance)?

Jeremy

---

From: Natanael Copa <[email-masked]>
Date: Mon, 25 Oct 2010 08:23:19 +0200

> this package was created because I wanted rdiff-backup, and it

nice! I didn't know there was a lib for the rsync algorithm.

> +++ b/testing/librsync/APKBUILD

I should write a doc on what is expected from maintainers on the wiki...

Anyways, the librsync was applied.

Thanks!
-nc

---