Skip to content

Commit af5e836

Browse files
committed
add packaging
Signed-off-by: Pavel Hrdina <[email protected]>
1 parent 54bc376 commit af5e836

13 files changed

+1043
-4
lines changed

.gitignore

+17-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1-
/libvirt-dbus
1+
/AUTHORS
2+
/INSTALL
3+
/Makefile
4+
/Makefile.in
5+
/aclocal.m4
6+
/autom4te.cache/
7+
/build-aux/
8+
/config.h
9+
/config.h.in
10+
/config.log
11+
/config.status
12+
/configure
13+
/libvirt-dbus.spec
14+
/src/.deps/
15+
/src/Makefile
16+
/src/Makefile.in
17+
/stamp-h1

AUTHORS.in

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
libvirt-dbus Authors
2+
====================
3+
4+
The primary maintainers of libvirt-dbus are:
5+
6+
Lars Karlitski <[email protected]>
7+
Pavel Hrdina <[email protected]>
8+
9+
Patches have been received from:
10+
11+
#authorslist#
12+
13+
... send patches to get your name added ...

COPYING

+502
Large diffs are not rendered by default.

HACKING

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
Tips for hacking on libvirt-dbus
2+
================================
3+
4+
5+
Coding style rules
6+
7+
- Opening & closing braces for functions should be at start of line
8+
9+
int
10+
foo(int bar)
11+
{
12+
...
13+
}
14+
15+
Not
16+
17+
int
18+
foo(int bar) {
19+
...
20+
}
21+
22+
23+
24+
- Opening brace for if/while/for loops should be at the end of line
25+
26+
if (foo) {
27+
bar;
28+
wizz;
29+
}
30+
31+
Not
32+
33+
if (foo)
34+
{
35+
bar;
36+
wizz;
37+
}
38+
39+
Rationale: putting every if/while/for opening brace on a new line
40+
expands function length too much
41+
42+
43+
44+
- If a brace needs to be used for one clause in an if/else statement,
45+
it should be used for both clauses, even if the other clauses are
46+
only single statements. eg
47+
48+
if (foo) {
49+
bar;
50+
wizz;
51+
} else {
52+
eek;
53+
}
54+
55+
Not
56+
57+
if (foo) {
58+
bar;
59+
wizz;
60+
} else
61+
eek;
62+
63+
64+
65+
- Function parameter attribute annotations should follow the parameter
66+
name, eg
67+
68+
int
69+
foo(int bar G_GNUC_UNUSED)
70+
{
71+
}
72+
73+
Not
74+
75+
int
76+
foo(G_GNUC_UNUSED int bar)
77+
{
78+
}
79+
80+
Rationale: Adding / removing G_GNUC_UNUSED should not cause the
81+
rest of the line to move around since that obscures diffs.
82+
83+
84+
85+
- There should be no space between function names & open brackets eg
86+
87+
int
88+
foo(int bar)
89+
{
90+
}
91+
92+
Not
93+
94+
int
95+
foo (int bar)
96+
{
97+
}
98+
99+
100+
101+
- To keep lines under 80 characters (where practical), multiple parameters
102+
should be on new lines. Do not attempt to line up parameters vertically
103+
eg
104+
105+
int
106+
foo(int bar,
107+
unsigned long wizz)
108+
{
109+
}
110+
111+
Not
112+
113+
int
114+
foo(int bar, unsigned long wizz)
115+
{
116+
}
117+
118+
Not
119+
120+
int
121+
foo(int bar,
122+
unsigned long wizz)
123+
{
124+
}
125+
126+
Rationale: attempting vertical alignment causes bigger diffs when
127+
modifying code if type names change causing whitespace re-alignment.
128+
129+
130+
- Usage of goto should follow one of the following patterns, and
131+
label naming conventions. In particular any exit path jumps should
132+
obay the 'cleanup' vs 'error' label naming
133+
134+
* Interrupted system calls:
135+
136+
retry:
137+
err = func()
138+
if (err < 0 && errno == EINTR)
139+
goto retry;
140+
141+
Alternate label name: retry_func:
142+
143+
144+
* Shared cleanup paths:
145+
146+
int
147+
foo(int bar)
148+
{
149+
int ret = -1;
150+
151+
152+
if (something goes wrong)
153+
goto cleanup;
154+
155+
ret = 0;
156+
cleanup:
157+
...shared cleanup code...
158+
return ret;
159+
}
160+
161+
162+
* Separate error exit paths:
163+
164+
int
165+
foo(int bar)
166+
{
167+
if (something goes wrong)
168+
goto error;
169+
170+
return 0;
171+
172+
error:
173+
...error cleanup code...
174+
return -1;
175+
}
176+
177+
178+
* Separate and shared error exit paths:
179+
180+
int
181+
foo(int bar)
182+
{
183+
int ret = -1;
184+
185+
if (something very bad goes wrong)
186+
goto error;
187+
188+
if (something goes wrong)
189+
goto cleanup;
190+
191+
ret = 0;
192+
cleanup:
193+
...shared cleanup code...
194+
return 0;
195+
196+
error:
197+
...error cleanup code...
198+
return -1;
199+
}

Makefile

-3
This file was deleted.

Makefile.am

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
SUBDIRS = src
3+
4+
EXTRA_DIST = \
5+
$(PACKAGE).spec \
6+
$(PACKAGE).spec.in \
7+
AUTHORS.in \
8+
$(NULL)
9+
10+
DISTCLEAN_FILES = $(PACKAGE).spec
11+
12+
rpm: clean
13+
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
14+
15+
dist-hook: gen-AUTHORS
16+
17+
# Generate the AUTHORS file (with all entries since the switch to git)
18+
# and insert it into the directory we're about to use to create a tarball.
19+
.PHONY: gen-AUTHORS
20+
gen-AUTHORS:
21+
$(AM_V_GEN)if test -d $(srcdir)/.git; then \
22+
out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
23+
perl -p -e "s/#authorslist#// and print '$$out'" \
24+
< $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \
25+
mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \
26+
fi

NEWS

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
libvirt-dbus News
2+
=================
3+
4+
0.0.1 - Jun 28, 2017
5+
====================
6+
7+
First beta release.

README

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
libvirt-dbus
2+
============
3+
4+
libvirt is a C toolkit to interact with the virtualization capabilities
5+
of recent versions of Linux (and other OSes). It is free software
6+
available under the GNU Lesser General Public License. Virtualization on
7+
the Linux Operating System means the ability to run multiple instances of
8+
Operating Systems concurrently on a single hardware system where the basic
9+
resources are driven by a Linux instance. The library aim at providing
10+
long term stable C API initially for the Xen paravirtualization but
11+
should be able to integrate other virtualization mechanisms if needed.
12+
13+
libvirt-dbus wraps libvirt to provide a high-level object-oriented API better
14+
suited for dbus-based applications
15+
16+
libvirt-dbus is Free Software and licenced under LGPLv2+.
17+
18+
The latest official releases can be found at:
19+
20+
ftp://libvirt.org/libvirt/dbus/
21+
22+
NB: at this time, libvirt-dbus is *NOT* considered API/ABI stable. Future
23+
releases may still include API/ABI incompatible changes.
24+
25+
Dependencies / supported platforms
26+
==================================
27+
28+
The libvirt-dbus projects attempts to be moderately conservative
29+
about updating the minimum required versions of external package
30+
dependencies, to strike a balance between enabling use of new
31+
features while minimizing inconvenience for downstream developers
32+
on distro platforms with specific shipped versions.
33+
34+
There are roughly two classes of Linux distro - short lifetime
35+
(Fedora, Ubuntu non-LTS, etc) and extended lifetime (RHEL, CentOS,
36+
Debian, Ubuntu LTS). Based on this classification, the libvirt-dbus
37+
project will generally aim to ensure build support for
38+
39+
- Most recent 2 releases of short lifetime distros
40+
- Most recent major release of extended lifetime distros,
41+
with most recent 2 minor updates
42+
43+
The project will consider RHEL, Fedora, Debian, Ubuntu LTS, Ubuntu,
44+
OpenSUSE and SUSE (SLES/SLED) distros to be a representative subset
45+
of distros when determining min required versions of external deps
46+
that is reasonable to target. Other distros of similar release vintage
47+
will typically have similar versions to at least one of these distros.
48+
In the case of Debian, the project may at times choose to require use
49+
of an update from the backports repository.
50+
51+
At any time, it may be possible to build on versions of distros
52+
that are older than those implied by this policy, but the project
53+
will not guarantee this remains the case in future releases. The
54+
min required package versions of external dependencies may be
55+
raised in future releases based on this distro build target policy.
56+
57+
The packages required to build libvirt-dbus are
58+
59+
- systemd-211
60+
- libvirt
61+
62+
Patches submissions
63+
===================
64+
65+
Patch submissions are welcomed from any interested contributor. Please
66+
send them to the main libvir-list mailing list
67+
68+
69+
70+
Questions about usage / deployment can be send to the end users mailing
71+
list
72+
73+
74+
75+
For further information about mailing lists & contacting the developers,
76+
please consult
77+
78+
http://libvirt.org/contact.html
79+
80+
--End

0 commit comments

Comments
 (0)