Skip to content

Commit 846ebea

Browse files
committed
build 2.1 for el8
1 parent 81a3f42 commit 846ebea

File tree

16 files changed

+386
-53
lines changed

16 files changed

+386
-53
lines changed

.github/workflows/build-packages.yml

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,79 @@ on:
66
tags:
77
- 'v*.*.*'
88
jobs:
9-
main:
10-
runs-on: deployinatorv1
9+
prebuild:
10+
runs-on: buildinator-group
11+
outputs:
12+
manifest: ${{ steps.prebuild.outputs.manifest }}
13+
matrix: ${{ steps.prebuild.outputs.matrix }}
14+
uuid: ${{ steps.prebuild.outputs.uuid }}
1115
steps:
1216
- name: Checkout
13-
uses: actions/checkout@v2
14-
- name: Package Binaries
15-
run: build-packages ${{github.repository}} ${{github.workspace}}
16-
- name: Set Variables
17-
if: startsWith(github.ref, 'refs/tags/')
18-
run: |
19-
echo "PRERELEASE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.prerelease')" >> $GITHUB_ENV
20-
echo "TITLE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.title')" >> $GITHUB_ENV
21-
echo "VERSION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.version')" >> $GITHUB_ENV
22-
echo "REVISION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.buildVersion')" >> $GITHUB_ENV
23-
- name: GitHub Release
24-
if: startsWith(github.ref, 'refs/tags/')
25-
uses: softprops/action-gh-release@v1
17+
uses: actions/checkout@v3
18+
19+
- id: prebuild
20+
name: Prebuild flow
21+
uses: 45drives/actions/prebuild-flow@main
2622
with:
27-
name: ${{env.TITLE}} ${{env.VERSION}}
28-
prerelease: ${{env.PRERELEASE}}
29-
body_path: ${{github.workspace}}/CHANGELOG.md
30-
files: |
31-
${{github.workspace}}/dist/packages/*/*.deb
32-
${{github.workspace}}/dist/packages/*/*.rpm
33-
env:
34-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
35-
- name: Update Repository
36-
if: startsWith(github.ref, 'refs/tags/')
37-
run: update-repositories ${{github.workspace}}
38-
- name: Publish Repository
23+
directory: ${{ github.workspace }}
24+
25+
build:
26+
needs: prebuild
27+
runs-on: buildinator-group
28+
strategy:
29+
matrix:
30+
build: ${{ fromJSON(needs.prebuild.outputs.matrix).include }}
31+
steps:
32+
- name: Build package
33+
uses: 45drives/actions/build-package@main
34+
with:
35+
manifest: ${{ needs.prebuild.outputs.manifest }}
36+
build: ${{ toJSON(matrix.build) }}
37+
uuid: ${{ needs.prebuild.outputs.uuid }}
38+
39+
sign:
40+
needs:
41+
- prebuild
42+
- build
43+
runs-on: buildinator-group
44+
steps:
45+
- name: Run sign playbook
46+
uses: 45drives/actions/ansible-playbook@main
47+
with:
48+
playbook: /root/git/auto-packaging/actions/ansible/sign.yml
49+
directory: ${{ github.workspace }}/packaging
50+
group_vars_directory: ${{ github.workspace }}/packaging/group_vars/
51+
inventory: |
52+
[ci]
53+
localhost
54+
become: true
55+
host_key_checking: true
56+
extra_vars: sign_key_name=prod
57+
58+
update_repositories:
59+
needs:
60+
- prebuild
61+
- build
62+
- sign
63+
runs-on: buildinator-group
64+
steps:
65+
- id: push_local
66+
name: Push packages into local repository
67+
uses: 45drives/actions/update-repo@main
68+
with:
69+
directory: ${{ github.workspace }}
70+
71+
sync_repositories:
72+
needs:
73+
- prebuild
74+
- build
75+
- sign
76+
- update_repositories
77+
runs-on: buildinator-group
78+
steps:
79+
- id: push_remote
80+
name: Sync local repository with remote repository
3981
if: startsWith(github.ref, 'refs/tags/')
40-
run: publish-repo
82+
uses: 45drives/actions/sync-repo@main
83+
with:
84+
directory: ${{ github.workspace }}

manifest.json

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,43 @@
11
{
2-
"__version": "45D-R2",
2+
"schema_version": "45D_AP_V2.0",
33
"name": "python3-libzfs",
44
"title": "Py-libzfs",
5-
"prerelease": false,
5+
"description": "python libzfs",
66
"version": "2.1.1",
77
"buildVersion": "2",
8-
"author": "Jordan Keough <jkeough@45drives.com>",
9-
"url": "https://github.com/45Drives/python3-libzfs",
10-
"category": "utils",
11-
"priority": "optional",
12-
"licence": "GPL-3.0+",
13-
"architecture": {
14-
"el": "x86_64"
15-
},
16-
"description": {
17-
"long": "python libzfs",
18-
"short": "python libzfs"
19-
},
8+
"stable": true,
9+
"author": "Brett Kelly <bkelly@45drives.com>",
10+
"git_url": "https://github.com/45Drives/python3-libzfs",
11+
"license": "GPL-3.0+",
2012
"defaults": {
21-
"urgency": "medium"
13+
"change_urgency": "medium"
14+
},
15+
"architecture": {
16+
"ubuntu": "amd64",
17+
"debian": "amd64",
18+
"rocky": "x86_64"
2219
},
2320
"dependencies": {
24-
"el": {
25-
"el8": [
26-
"zfs >= 2.1",
27-
"zfs < 2.2"
28-
]
29-
}
21+
"ubuntu_common": [
22+
"zfsutils (>= 2.1)",
23+
"zfsutils (<< 2.2)"
24+
],
25+
"rocky_common": [
26+
"zfs >= 2.1",
27+
"zfs < 2.2"
28+
]
3029
},
31-
"releases": [
30+
"builds": [
3231
{
33-
"image": "pylibzfs-2.1-rocky-el8-builder",
34-
"codeName": "el8",
35-
"type": "el"
32+
"group": "rocky",
33+
"os_name": "rocky-el8",
34+
"image": "ci.cr.45d.io/ci/zfs/rocky-el8:1"
3635
}
3736
],
37+
"repos": [
38+
"community",
39+
"enterprise"
40+
],
3841
"changelog": {
3942
"urgency": "medium",
4043
"version": "2.1.1",

packaging/rocky-el8/main.spec.j2

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Name: {{ name }}
2+
Version: {{ version }}
3+
Release: {{ build_number }}%{?dist}
4+
Summary: {{ description }}
5+
License: {{ license }}
6+
URL: {{ git_url }}
7+
Source0: %{name}-%{version}.tar.gz
8+
BuildArch: {{ architecture.rocky }}
9+
Requires: {{ dependencies.rocky_common | join(',') }}
10+
11+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
12+
13+
%description
14+
{{ title }}
15+
{{ description }}
16+
17+
%prep
18+
%setup -q
19+
20+
%build
21+
echo "Starting build process..."
22+
pip3 install Cython==0.29.35
23+
./configure --prefix=/usr
24+
make
25+
26+
%install
27+
echo "Starting install process..."
28+
python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
29+
30+
%clean
31+
rm -rf $RPM_BUILD_ROOT
32+
33+
%files -f INSTALLED_FILES
34+
35+
%changelog
36+
* Mon Nov 11 2024 Jordan Keough <jkeough@45drives.com> 2.2.1-5
37+
- update build deps
38+
* Mon Nov 11 2024 Jordan Keough <jkeough@45drives.com> 2.2.1-4
39+
- updated build dependencies
40+
* Mon Nov 11 2024 Jordan Keough <jkeough@45drives.com> 2.2.1-3
41+
- fix broken build version
42+
* Mon Nov 11 2024 Jordan Keough <jkeough@45drives.com> 2.2.1-2.2.1
43+
- updated package dependancies
44+
* Mon Nov 11 2024 Jordan Keough <jkeough@45drives.com> 2.2.1-1
45+
- first release for zfs-2.2 support
46+
* Mon Nov 04 2024 Jordan Keough <jkeough@45drives.com> 1.0.0-1
47+
- Stable Release
48+
* Mon Oct 21 2024 Jordan Keough <jkeough@45drives.com> 0.1.3-1
49+
- Adds trim status tracking as originally intended
50+
* Thu Jul 11 2024 Jordan Keough <jkeough@45drives.com> 0.1.2-1
51+
- Updating version number
52+
* Thu Jul 11 2024 Jordan Keough <jkeough@45drives.com> 0.1.1-2
53+
- Adds ubuntu-focal support
54+
* Thu Jul 11 2024 Jordan Keough <jkeough@45drives.com> 0.1.1-1
55+
- Packaging for focal
56+
* Fri May 24 2024 Jordan Keough <jkeough@45drives.com> 0.1.0-2
57+
- updating for jammy
58+
* Fri Mar 08 2024 Jordan Keough <jkeough@45drives.com> 0.1.0-1
59+
- initial release

packaging/rocky-el9/main.spec.j2

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Name: {{ name }}
2+
Version: {{ version }}
3+
Release: {{ build_number }}%{?dist}
4+
Summary: {{ description }}
5+
License: {{ license }}
6+
URL: {{ git_url }}
7+
Source0: %{name}-%{version}.tar.gz
8+
BuildArch: {{ architecture.rocky }}
9+
Requires: {{ dependencies.rocky_common | join(',') }}
10+
11+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
12+
13+
%description
14+
{{ title }}
15+
{{ description }}
16+
17+
%prep
18+
%setup -q
19+
20+
%build
21+
echo "Starting build process..."
22+
pip3 install Cython==0.29.35
23+
./configure --prefix=/usr
24+
make
25+
26+
%install
27+
echo "Starting install process..."
28+
python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
29+
30+
%clean
31+
rm -rf $RPM_BUILD_ROOT
32+
33+
%files -f INSTALLED_FILES
34+
35+
%changelog
36+
* Thu Feb 20 2025 Jordan Keough <jkeough@45drives.com> 2.2.1-6
37+
- build for new repos
38+
* Mon Feb 03 2025 Brett Kelly <bkelly@45drives.com> 2.2.1-1
39+
- initial releases

packaging/ubuntu-focal/changelog

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
python3-libzfs (2.1.1-1focal) focal; urgency=medium
2+
3+
* support zfs-2.1
4+
5+
-- Jordan Keough <jkeough@45drives.com> Mon, 11 Nov 2024 10:27:54 -0400
6+
7+
python3-libzfs (1.0.0-1focal) focal; urgency=medium
8+
9+
* Stable Release
10+
11+
-- Jordan Keough <jkeough@45drives.com> Mon, 04 Nov 2024 06:25:23 -0400
12+
13+
python3-libzfs (0.1.3-1focal) focal; urgency=medium
14+
15+
* Adds trim status tracking as originally intended
16+
17+
-- Jordan Keough <jkeough@45drives.com> Mon, 21 Oct 2024 12:40:09 -0300
18+
19+
python3-libzfs (0.1.2-1focal) focal; urgency=medium
20+
21+
* Updating version number
22+
23+
-- Jordan Keough <jkeough@45drives.com> Thu, 11 Jul 2024 11:31:22 -0300
24+
25+
python3-libzfs (0.1.1-2focal) focal; urgency=medium
26+
27+
* Adds ubuntu-focal support
28+
29+
-- Jordan Keough <jkeough@45drives.com> Thu, 11 Jul 2024 10:37:49 -0300
30+
31+
python3-libzfs (0.1.1-1focal) focal; urgency=medium
32+
33+
* Packaging for focal
34+
35+
-- Jordan Keough <jkeough@45drives.com> Thu, 11 Jul 2024 07:57:03 -0300
36+
37+
python3-libzfs (0.1.0-2focal) focal; urgency=medium
38+
39+
* updating for jammy
40+
41+
-- Jordan Keough <jkeough@45drives.com> Fri, 24 May 2024 07:58:43 -0300

packaging/ubuntu-focal/control.j2

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Source: {{ name }}
2+
Section: utils
3+
Priority: optional
4+
Maintainer: {{ author }}
5+
Build-Depends: debhelper-compat (= 13), python3-all, python3-setuptools, dh-python
6+
Standards-Version: 4.4.1
7+
X-Python3-Version: >= 3.6
8+
Homepage: {{ git_url }}
9+
Vcs-Git: {{ git_url }}
10+
11+
Package: {{ name }}
12+
Architecture: {{ architecture.ubuntu }}
13+
Depends: {{ dependencies.ubuntu_common | join(',') }}
14+
Description: {{ description }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: "{{ name }}"
3+
Upstream-Contact: "{{ author }}"
4+
Source: "{{ git_url }}"
5+
6+
Files: *
7+
Copyright: 2021 Your Name <email@45drives.com>
8+
License: GPL-3.0+
9+
10+
License: GPL-3.0+
11+
This program is free software: you can redistribute it and/or modify
12+
it under the terms of the GNU General Public License as published by
13+
the Free Software Foundation, either version 3 of the License, or
14+
(at your option) any later version.
15+
.
16+
This program is distributed in the hope that it will be useful,
17+
but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
GNU General Public License for more details.
20+
.
21+
You should have received a copy of the GNU General Public License
22+
along with the Onboard package. If not, please have a look at
23+
/usr/share/common-licenses or <http://www.gnu.org/licenses/>.

packaging/ubuntu-focal/pybuild

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build_ext]
2+
inplace=1

packaging/ubuntu-focal/rules

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/make -f
2+
# See debhelper(7) (uncomment to enable)
3+
# output every command that modifies files on the build system.
4+
export DH_VERBOSE = 1
5+
6+
# see FEATURE AREAS in dpkg-buildflags(1)
7+
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
8+
export PYBUILD_NAME=libzfs
9+
10+
# see ENVIRONMENT in dpkg-buildflags(1)
11+
# package maintainers to append CFLAGS
12+
# export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
13+
# package maintainers to append LDFLAGS
14+
# export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
15+
16+
%:
17+
dh $@ --with python3 --buildsystem=pybuild
18+
19+
# dh_make generated override targets
20+
# This is example for Cmake (See https://bugs.debian.org/641051 )
21+
# override_dh_auto_configure:
22+
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
23+
24+
override_dh_auto_configure:
25+
./configure --prefix=/usr
26+
dh_auto_configure
27+
28+
override_dh_install:
29+
mkdir -p debian/usr/share/py-libzfs
30+
dh_install ./libzfs.c usr/share/py-libzfs/
31+
dh_install
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (native)

0 commit comments

Comments
 (0)