-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathpackage_management.txt
65 lines (51 loc) · 1.86 KB
/
package_management.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Example: stress-ng --cpu 8 --io 4 --vm 2 --vm-bytes 128M --fork 4 --timeout 10s
-c N, --cpu N start N workers spinning on sqrt(rand())
-i N, --io N start N workers spinning on sync()
-m N, --vm N start N workers spinning on anonymous mmap
--vm-bytes N allocate N bytes per vm worker (default 256MB)
-f N, --fork N start N workers spinning on fork() and exit()
-t N, --timeout T timeout after T seconds
Generally stress-ng is used to perform different tests.
Packages required for building packages.
sudo apt-get install dh-make fakeroot build-essential
Commands used in building packages.
1) tar
Examples:
tar -cf archive.tar foo bar # Create archive.tar from files foo and bar.
tar -tvf archive.tar # List all files in archive.tar verbosely.
tar -xf archive.tar # Extract all files from archive.tar.
Use tar -xzvf and -czvf and -tvf (z for gzip).
2) dh_make
-> WORK
-> cpphelloworld-1.0/
-> dh_make -f ../cpphelloworld-1.0.tar.gz
-> cpphelloworld-1.0.tar.gz
3) dpkg-buildpackage
-> WORK
-> cpphelloworld-1.0
-> dpkg-buildpackage -uc -us
-> cpphelloworld-1.0.tar.gz
-us unsigned source package.
-uc unsigned .changes file.
4) dpkg (--contents, --install or -i, --remove or -r)
Summary:
tar -czvf cpphelloworld-1.0.tar.gz cpphelloworld-1.0/
mkdir WORK
mv cpphelloworld-1.0.tar.gz WORK/
cd WORK
tar -xzvf cpphelloworld-1.0.tar.gz
cd cpphelloworld-1.0/
dh_make -f ../cpphelloworld-1.0.tar.gz
dpkg-buildpackage -uc -us
dpkg --contents ../cpphelloworld_1.0-1_amd64.deb
sudo dpkg --install ../*.deb
dpkg --remove cpphelloworld
My Example Makefile
all:
g++ CppHelloWorld.cpp -o CppHelloWorld
install:
install -d $(DESTDIR)/usr/bin
install CppHelloWorld $(DESTDIR)/usr/bin
clean:
rm -f CppHelloWorld
~