• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H25-Aug-2021-7465

.tito/H25-Aug-2021-108

acceptancetests/H25-Aug-2021-11186

cmake/Modules/H25-Aug-2021-409319

doc/H03-May-2022-3,2082,311

examples/H25-Aug-2021-1,268878

librepo/H03-May-2022-23,58715,605

tests/H03-May-2022-9,3347,633

utils/H25-Aug-2021-194143

.git-commit-templateH A D25-Aug-2021426 1711

.gitignoreH A D25-Aug-2021145 1312

.valgrindrcH A D25-Aug-202158 32

AUTHORSH A D25-Aug-2021639 1817

COPYINGH A D25-Aug-202125.9 KiB503418

README.mdH A D25-Aug-20214 KiB12479

VERSION.cmakeH A D25-Aug-202170 43

librepo.specH A D25-Aug-20212.2 KiB9977

still_reachable.suppH A D25-Aug-202130.6 KiB1,5361,535

valgrind.suppH A D25-Aug-20211.5 KiB7371

README.md

1# librepo
2
3librepo - A library providing C and Python (libcURL like) API for downloading
4linux repository metadata and packages
5
6## Building
7
8### Build requires:
9
10Fedora/Ubuntu name
11
12* check (http://check.sourceforge.net/) - check-devel/check
13* cmake (http://www.cmake.org/) - cmake/cmake
14* gcc (http://gcc.gnu.org/) - gcc/gcc
15* glib2 (http://developer.gnome.org/glib/) - glib2-devel/libglib2.0-dev
16* gpgme (http://www.gnupg.org/) - gpgme-devel/libgpgme11-dev
17* libattr (http://www.bestbits.at/acl/) - libattr-devel/libattr1-dev
18* libcurl (http://curl.haxx.se/libcurl/) - libcurl-devel/libcurl4-openssl-dev
19* openssl (http://www.openssl.org/) - openssl-devel/libssl-dev
20* python (http://python.org/) - python3-devel/libpython3-dev
21* **Test requires:** pygpgme (https://pypi.python.org/pypi/pygpgme/0.1) - python3-pygpgme/python3-gpgme
22* **Test requires:** python3-pyxattr (https://github.com/xattr/xattr) - python3-pyxattr/python3-pyxattr
23
24### Build from your checkout dir:
25
26    mkdir build
27    cd build/
28    cmake ..
29    make
30
31### Build with debug flags:
32
33    mkdir build
34    cd build/
35    cmake -DCMAKE_BUILD_TYPE="DEBUG" ..
36    make
37
38## Documentation
39
40### Build:
41
42    cd build/
43    make doc
44
45* C documentation: `build/doc/c/html/index.html`
46* Python documentation: `build/doc/python/index.html`
47
48### Online python bindings documentation:
49
50https://rpm-software-management.github.io/librepo/
51
52## Testing
53
54All unit tests run from librepo checkout dir
55
56### Run both (C & Python) tests via makefile:
57    make test
58
59### Run (from your checkout dir) - C unittests:
60
61    build/tests/test_main tests/test_data/
62
63Available params:
64
65* ``-v`` Run tests verbosely (Show Librepo debug messages)
66* ``-d`` Run download tests (This tests need internet connection)
67
68To check memoryleaks:
69
70Add this line to your ``~/.bashrc`` file
71
72    alias gvalgrind='G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind'
73
74And then run:
75
76    CK_FORK=no gvalgrind --leak-check=full build/tests/test_main tests/test_data/
77
78Suppress known still_reachable memory:
79
80    CK_FORK=no gvalgrind --leak-check=full --suppressions=still_reachable.supp build/tests/test_main tests/test_data/
81
82Note: .valgrindrc file is present in checkoutdir, this file contains the settings:
83`--memcheck:leak-check=full --suppressions=./valgrind.supp`
84
85### Run (from your checkout dir) - Python 3 unittests:
86
87    PYTHONPATH=`readlink -f ./build/librepo/python/` python3 -m unittest discover -b -s tests/python
88
89## Contribution
90
91Here's the most direct way to get your work merged into the project.
92
931. Fork the project
941. Clone down your fork
951. Implement your feature or bug fix and commit changes
961. If the change fixes a bug at [Red Hat bugzilla](https://bugzilla.redhat.com/), or if it is important to the end user, add the following block to the commit message:
97
98       = changelog =
99       msg:           message to be included in the changelog
100       type:          one of: bugfix/enhancement/security (this field is required when message is present)
101       resolves:      URLs to bugs or issues resolved by this commit (can be specified multiple times)
102       related:       URLs to any related bugs or issues (can be specified multiple times)
103
104   * For example::
105
106         = changelog =
107         msg: Decode package URL when using for local filename
108         type: bugfix
109         resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1817130
110
111   * For your convenience, you can also use git commit template by running the following command in the top-level directory of this project:
112
113         git config commit.template ./.git-commit-template
114
1151. In a separate commit, add your name into the [authors file](https://github.com/rpm-software-management/librepo/blob/master/AUTHORS) as a reward for your generosity
1161. Push the branch to your fork
1171. Send a pull request for your branch
118
119## Links
120
121* [Red Hat Bugzilla](https://bugzilla.redhat.com/buglist.cgi?query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=VERIFIED&component=librepo)
122
123* [Fedora spec file](http://pkgs.fedoraproject.org/cgit/librepo.git/tree/librepo.spec)
124