Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- first steps handling snapshot info files
- Loading branch information
Showing
28 changed files
with
2,242 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
BUILD | ||
Makefile.in | ||
Makefile | ||
.deps | ||
.libs | ||
aclocal.m4 | ||
autom4te.cache | ||
config.* | ||
configure | ||
depcomp | ||
install-sh | ||
libtool | ||
ltmain.sh | ||
missing | ||
stamp-h1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Arvin Schnell <aschnell@suse.de> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Makefile.am for snapper | ||
# | ||
|
||
SUBDIRS = snapper examples | ||
|
||
AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip | ||
|
||
doc_DATA = AUTHORS COPYING | ||
|
||
EXTRA_DIST = $(doc_DATA) VERSION | ||
|
||
|
||
snapper-$(VERSION).tar.bz2: dist-bzip2 | ||
|
||
package-local: snapper-$(VERSION).tar.bz2 | ||
rm -f package/snapper-*.tar.bz2 | ||
rm -f package/*~ | ||
rm -f package/*.bak | ||
mv snapper-$(VERSION).tar.bz2 package/ | ||
|
||
package: package-local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Makefile.repo for libsnapper | ||
# | ||
|
||
configure: all | ||
./configure | ||
|
||
all: | ||
aclocal | ||
autoconf | ||
autoheader | ||
autoreconf --force --install | ||
|
||
install: configure | ||
make | ||
make install | ||
|
||
reconf: all | ||
./config.status --recheck | ||
./config.status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
AC_INIT(snapper/Snapper.h) | ||
|
||
VERSION=`cat ./VERSION` | ||
|
||
AM_INIT_AUTOMAKE(snapper, $VERSION) | ||
AM_CONFIG_HEADER(config.h) | ||
|
||
AC_DISABLE_STATIC | ||
|
||
AC_PROG_CXX | ||
AC_PROG_LIBTOOL | ||
AM_PROG_LIBTOOL | ||
|
||
AC_PREFIX_DEFAULT(/usr) | ||
|
||
dnl Automake 1.11 enables silent compilation | ||
dnl Disable it by "configure --disable-silent-rules" or "make V=1" | ||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
|
||
CFLAGS="${CFLAGS} -Wall -Wformat=2 -Wmissing-prototypes" | ||
CXXFLAGS="${CXXFLAGS} -std=c++0x -DHAVE_CXX0X -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter" | ||
|
||
docdir=\${prefix}/share/doc/packages/snapper | ||
fillupdir=/var/adm/fillup-templates | ||
|
||
AC_SUBST(VERSION) | ||
AC_SUBST(docdir) | ||
AC_SUBST(fillupdir) | ||
|
||
AC_OUTPUT( | ||
Makefile | ||
snapper/Makefile | ||
examples/Makefile | ||
package/snapper.spec:snapper.spec.in | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
List.o | ||
List | ||
Create.o | ||
Create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
#include <stdlib.h> | ||
#include <iostream> | ||
|
||
#include <snapper/Snapper.h> | ||
|
||
using namespace snapper; | ||
using namespace std; | ||
|
||
int | ||
main(int argc, char** argv) | ||
{ | ||
createSingleSnapshot("test"); | ||
|
||
unsigned int pre_id = createPreSnapshot("test undo"); | ||
|
||
createPostSnapshot(pre_id); | ||
|
||
listSnapshots(); | ||
|
||
exit(EXIT_SUCCESS); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
#include <stdlib.h> | ||
#include <iostream> | ||
|
||
#include <snapper/Snapper.h> | ||
|
||
using namespace snapper; | ||
using namespace std; | ||
|
||
int | ||
main(int argc, char** argv) | ||
{ | ||
listSnapshots(); | ||
|
||
exit(EXIT_SUCCESS); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Makefile.am for libsnapper/examples | ||
# | ||
|
||
INCLUDES = -I$(top_srcdir) | ||
|
||
LDADD = ../snapper/libsnapper.la | ||
|
||
noinst_PROGRAMS = List Create | ||
|
||
List_SOURCES = List.cc | ||
|
||
Create_SOURCES = Create.cc | ||
|
||
exampledir = $(docdir)/examples | ||
|
||
example_DATA = List.cc Create.cc | ||
|
||
EXTRA_DIST = $(example_DATA) Makefile.example | ||
|
||
install-data-local: | ||
/usr/bin/install -d -p -m 755 $(DESTDIR)$(exampledir) | ||
/usr/bin/install -p -m 644 Makefile.example $(DESTDIR)$(exampledir)/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
PROGRAMS = TestDisk TestDiskLog TestProbing TestLvm TestMd TestLoop \ | ||
SaveGraph ShowBytes | ||
|
||
all: $(PROGRAMS) | ||
|
||
TestDisk: TestDisk.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
TestDiskLog: TestDiskLog.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
TestProbing: TestProbing.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
TestLvm: TestLvm.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
TestMd: TestMd.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
TestLoop: TestLoop.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
SaveGraph: SaveGraph.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
ShowBytes: ShowBytes.cc | ||
g++ $< -o $@ -Wall -O2 -lstorage | ||
|
||
clean: | ||
rm $(PROGRAMS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
snapper-*.tar.bz2 | ||
snapper.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
------------------------------------------------------------------- | ||
Mon Jan 10 14:55:25 CET 2011 - aschnell@suse.de | ||
|
||
- started development | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# | ||
# spec file for package snapper (Version 0.0.1) | ||
# | ||
# norootforbuild | ||
|
||
Name: snapper | ||
Version: 0.0.1 | ||
Release: 0 | ||
License: GPL | ||
Group: System/Libraries | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-build | ||
Source: snapper-%{version}.tar.bz2 | ||
Source1: snapper-rpmlintrc | ||
|
||
prefix: /usr | ||
|
||
BuildRequires: gcc-c++ boost-devel blocxx-devel doxygen dejagnu libxml2-devel | ||
|
||
Requires: btrfs-progs | ||
|
||
PreReq: %fillup_prereq | ||
Summary: Library for snapper management | ||
|
||
%description | ||
This package contains snapper, a library for filesystem snapshot management. | ||
|
||
Authors: | ||
-------- | ||
Arvin Schnell <aschnell@suse.de> | ||
|
||
%prep | ||
%setup -n snapper-%{version} | ||
|
||
%build | ||
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" | ||
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" | ||
|
||
aclocal | ||
libtoolize --force --automake --copy | ||
autoheader | ||
automake --add-missing --copy | ||
autoconf | ||
|
||
%{?suse_update_config:%{suse_update_config -f}} | ||
./configure --libdir=%{_libdir} --prefix=%{prefix} --mandir=%{_mandir} --disable-silent-rules | ||
make %{?jobs:-j%jobs} | ||
|
||
%check | ||
LOCALEDIR=$RPM_BUILD_ROOT/usr/share/locale make check | ||
|
||
%install | ||
make install DESTDIR="$RPM_BUILD_ROOT" | ||
|
||
install -d -m 755 $RPM_BUILD_ROOT/var/lock/snapper | ||
|
||
%{find_lang} snapper | ||
|
||
%clean | ||
rm -rf "$RPM_BUILD_ROOT" | ||
|
||
%files -f snapper.lang | ||
%defattr(-,root,root) | ||
%{_libdir}/libsnapper.so.* | ||
%dir /var/lock/libsnapper | ||
/var/adm/fillup-templates/sysconfig.snapper-libsnapper | ||
%doc %dir %{prefix}/share/doc/packages/libsnapper | ||
%doc %{prefix}/share/doc/packages/snapper/AUTHORS | ||
%doc %{prefix}/share/doc/packages/snapper/COPYING | ||
|
||
%post | ||
/sbin/ldconfig | ||
%{fillup_only -an snapper} | ||
|
||
%postun | ||
/sbin/ldconfig | ||
|
||
%package devel | ||
Requires: libsnapper = %version | ||
Requires: gcc-c++ libstdc++-devel boost-devel blocxx-devel libxml2-devel | ||
Summary: Header files and documentation for libsnapper | ||
Group: Development/Languages/C and C++ | ||
|
||
%description devel | ||
This package contains header files and documentation for developing with | ||
libsnapper. | ||
|
||
Authors: | ||
-------- | ||
Arvin Schnell <aschnell@suse.de> | ||
|
||
%files devel | ||
%defattr(-,root,root) | ||
%{_libdir}/libsnapper.la | ||
%{_libdir}/libsnapper.so | ||
%{prefix}/include/snapper | ||
%doc %{prefix}/share/doc/packages/libsnapper/autodocs | ||
%doc %{prefix}/share/doc/packages/libsnapper/examples | ||
|
Oops, something went wrong.