Skip to content

Commit 155d0c7

Browse files
committed
Merge branch 'dev'
2 parents a686b94 + ed85f48 commit 155d0c7

File tree

38 files changed

+1036
-277
lines changed

38 files changed

+1036
-277
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- 'CHANGELOG.md'
1313
- '.github/workflows/release.yml'
1414
- '.github/workflows/docs.yml'
15+
- 'docs'
1516

1617
jobs:
1718
matrix:

.pylintrc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[MAIN]
2+
ignore=src/repopulator/rpmfile
3+
4+
[MESSAGES CONTROL]
5+
6+
disable=protected-access,
7+
wrong-import-order,
8+
trailing-whitespace,
9+
trailing-newlines,
10+
line-too-long,
11+
multiple-statements,
12+
consider-using-enumerate,
13+
too-few-public-methods,
14+
too-many-locals,
15+
too-many-branches,
16+
too-many-return-statements,
17+
too-many-instance-attributes,
18+
too-many-arguments,
19+
too-many-statements,
20+
R0801 #Similar lines in 2 files

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55

66
## Unreleased
77

8+
### Added
9+
- CRUD for all repo-related objects
10+
11+
### Fixed
12+
- PgpSigner now respects home directory parameter
13+
- Project is now Stable
14+
815
## [0.7] - 2024-06-05
916

1017
### Changed

README.md

+27-32
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ Currently repositories are required to be signed and you need to provide signing
5555

5656
```python
5757
from repopulator import AptRepo, PgpSigner
58-
from pathlib import Path
5958

6059
repo = AptRepo()
6160

62-
package1 = repo.add_package(Path('/path/to/awesome_3.14_amd64.deb'))
63-
package2 = repo.add_package(Path('/path/to/awesome_3.14_arm64.deb'))
61+
package1 = repo.add_package('/path/to/awesome_3.14_amd64.deb')
62+
package2 = repo.add_package('/path/to/awesome_3.14_arm64.deb')
6463

6564
dist = repo.add_distribution('jammy',
6665
origin='my packages',
@@ -69,80 +68,76 @@ dist = repo.add_distribution('jammy',
6968
version='1.2',
7069
description='my awesome repo')
7170

72-
dist.add_package(component='main', package=package1)
73-
dist.add_package(component='main', package=package2)
71+
repo.assign_package(package1, dist, component='main')
72+
repo.assign_package(package2, dist, component='main')
7473

75-
signer = PgpSigner(Path.home() / '.gnupg', 'name_of_key_to_use', 'password_of_that_key')
74+
signer = PgpSigner('name_of_key_to_use', 'password_of_that_key')
7675

77-
repo.export(Path('/path/of/new/repo'), signer)
76+
repo.export('/path/of/new/repo', signer)
7877

7978
```
8079

81-
#### YUM/DNF
80+
#### RPM
8281

8382
```python
8483
from repopulator import RpmRepo, PgpSigner
85-
from pathlib import Path
8684

8785
repo = RpmRepo()
88-
repo.add_package(Path('/path/to/awesome-3.14-1.el9.x86_64.rpm'))
89-
repo.add_package(Path('/path/to/awesome-3.14-1.el9.aarch64.rpm'))
86+
repo.add_package('/path/to/awesome-3.14-1.el9.x86_64.rpm')
87+
repo.add_package('/path/to/awesome-3.14-1.el9.aarch64.rpm')
9088

91-
signer = PgpSigner(Path.home() / '.gnupg', 'name_of_key_to_use', 'password_of_that_key')
89+
signer = PgpSigner('name_of_key_to_use', 'password_of_that_key')
9290

93-
repo.export(Path('/path/of/new/repo'), signer)
91+
repo.export('/path/of/new/repo', signer)
9492

9593
```
9694

9795
#### Pacman
9896

9997
```python
10098
from repopulator import PacmanRepo, PgpSigner
101-
from pathlib import Path
10299

103100
repo = PacmanRepo('myrepo')
104101
# if .sig file is present next to the .zst file it will be used for signature
105102
# otherwise new signature will be generated at export time
106-
repo.add_package(Path('/path/to/awesome-3.14-1-x86_64.pkg.tar.zst'))
103+
repo.add_package('/path/to/awesome-3.14-1-x86_64.pkg.tar.zst')
104+
repo.add_package('/path/to/another-1.2-1-x86_64.pkg.tar.zst')
107105

108-
signer = PgpSigner(Path.home() / '.gnupg', 'name_of_key_to_use', 'password_of_that_key')
106+
signer = PgpSigner('name_of_key_to_use', 'password_of_that_key')
109107

110-
repo.export(Path('/path/of/new/repo'), signer)
108+
repo.export('/path/of/new/repo', signer)
111109

112110
```
113111

114112
#### Alpine apk
115113

116114
```python
117-
from repopulator import PacmanRepo, PkiSigner
118-
from pathlib import Path
115+
from repopulator import AlpineRepo, PkiSigner
119116

120-
repo = PacmanRepo('my repo description')
121-
repo.add_package(Path('/path/to/awesome-3.14-r0.apk'))
122-
repo.add_package(Path('/path/to/another-1.23-r0.apk'))
117+
repo = AlpineRepo('my repo description')
118+
repo.add_package('/path/to/awesome-3.14-r0.apk')
119+
repo.add_package('/path/to/another-1.23-r0.apk')
123120

124-
signer = PkiSigner(Path('/path/to/private/key'), 'password_or_None')
121+
signer = PkiSigner('/path/to/private/key', 'password_or_None')
125122

126-
# The last argument is the 'name' of the signer to use
127-
# Unlike `pkg` tool we do not parse it out of private key filename
128-
# and do not require you to name key files in certain way
129-
repo.export(Path('/path/of/new/repo'), signer, '[email protected]')
123+
# Unlike `pkg` tool we do not parse signer name out of private key filename
124+
# so you can name your key files whatever you wish
125+
repo.export('/path/of/new/repo', signer, signer_name = '[email protected]')
130126

131127
```
132128

133129
#### FreeBSD pkg
134130

135131
```python
136132
from repopulator import FreeBSDRepo, PkiSigner
137-
from pathlib import Path
138133

139134
repo = FreeBSDRepo()
140-
repo.add_package(Path('/path/to/awesome-3.14.pkg'))
141-
repo.add_package(Path('/path/to/another-1.2.pkg'))
135+
repo.add_package('/path/to/awesome-3.14.pkg')
136+
repo.add_package('/path/to/another-1.2.pkg')
142137

143-
signer = PkiSigner(Path('/path/to/private/key'), 'password_or_None')
138+
signer = PkiSigner('/path/to/private/key', 'password_or_None')
144139

145-
repo.export(Path('/path/of/new/repo'), signer)
140+
repo.export('/path/of/new/repo', signer)
146141

147142
```
148143

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ plugins:
1818
default_handler: python
1919
handlers:
2020
python:
21+
import:
22+
- https://docs.python.org/3/objects.inv
2123
options:
2224
paths: [src]
2325
docstring_style: google

pyproject.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ where = ["src"]
1313
[project]
1414
name = "repopulator"
1515
dynamic = ["version"]
16-
description="Portably create software repositories for different operating systems"
16+
description="A portable library to generate binary software repositories"
1717
readme="README.md"
1818
authors= [
1919
{ name = 'Eugene Gershnik', email='[email protected]'}
@@ -31,14 +31,12 @@ keywords = [
3131
]
3232
license = {text = "BSD-3-Clause"}
3333
classifiers = [
34-
"Development Status :: 4 - Beta",
34+
"Development Status :: 5 - Production/Stable",
3535

3636
"License :: OSI Approved :: BSD License",
3737

3838
"Operating System :: OS Independent",
3939

40-
"Environment :: Console",
41-
4240
"Intended Audience :: Developers",
4341
"Intended Audience :: System Administrators",
4442

requirements.txt requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ build
44
twine
55
pytest
66
python-dotenv
7-
7+
pylint

0 commit comments

Comments
 (0)