feat: release v2.0.0 with tab completion, package filtering, db health checks, flatpak and logrotate
Build and Publish Release / Build Packages and Publish (push) Successful in 27s
Build and Publish Release / Build Packages and Publish (push) Successful in 27s
This commit is contained in:
1 parent
8d4157b42d
commit
8bec4ed932
27 files changed
+1053
-69
No files matched your search
@@ -67,7 +67,7 @@ class PackageBuilder:
|
||||
self,
|
||||
source_root: Optional[Path] = None,
|
||||
output_dir: Optional[Path] = None,
|
||||
version: str = "1.3.0",
|
||||
version: str = "2.0.0",
|
||||
) -> None:
|
||||
self.source_root = source_root or Path(__file__).resolve().parent.parent
|
||||
self.output_dir = output_dir or (self.source_root / "dist")
|
||||
@@ -105,6 +105,16 @@ class PackageBuilder:
|
||||
if (self.source_root / "man").exists():
|
||||
shutil.copytree(str(self.source_root / "man"), str(tmp_root / "man"))
|
||||
|
||||
# Copy shell completions
|
||||
if (self.source_root / "completions").exists():
|
||||
shutil.copytree(str(self.source_root / "completions"), str(tmp_root / "completions"))
|
||||
|
||||
# Copy packaging extras (logrotate)
|
||||
if (self.source_root / "packaging" / "logrotate").exists():
|
||||
pkg_dest = tmp_root / "packaging" / "logrotate"
|
||||
pkg_dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copytree(str(self.source_root / "packaging" / "logrotate"), str(pkg_dest))
|
||||
|
||||
# Archive the tree
|
||||
with tarfile.open(str(out_path), "w:gz") as tar:
|
||||
tar.add(str(tmp_root), arcname=f"linux-updater-{self.version}")
|
||||
@@ -151,6 +161,28 @@ class PackageBuilder:
|
||||
man_dir.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(str(self.source_root / "man" / "linux-updater.8"), str(man_dir / "linux-updater.8"))
|
||||
|
||||
if (self.source_root / "completions" / "bash" / "linux-updater").exists():
|
||||
bash_comp_dir = data_dir / "usr" / "share" / "bash-completion" / "completions"
|
||||
bash_comp_dir.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(
|
||||
str(self.source_root / "completions" / "bash" / "linux-updater"),
|
||||
str(bash_comp_dir / "linux-updater"),
|
||||
)
|
||||
if (self.source_root / "completions" / "zsh" / "_linux-updater").exists():
|
||||
zsh_comp_dir = data_dir / "usr" / "share" / "zsh" / "vendor-completions"
|
||||
zsh_comp_dir.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(
|
||||
str(self.source_root / "completions" / "zsh" / "_linux-updater"),
|
||||
str(zsh_comp_dir / "_linux-updater"),
|
||||
)
|
||||
if (self.source_root / "packaging" / "logrotate" / "linux-updater").exists():
|
||||
logrotate_dir = data_dir / "etc" / "logrotate.d"
|
||||
logrotate_dir.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copy2(
|
||||
str(self.source_root / "packaging" / "logrotate" / "linux-updater"),
|
||||
str(logrotate_dir / "linux-updater"),
|
||||
)
|
||||
|
||||
# If dpkg-deb is available, use it; otherwise build native .deb
|
||||
if shutil.which("dpkg-deb"):
|
||||
pkg_tree = root / "deb_tree"
|
||||
@@ -211,6 +243,12 @@ class PackageBuilder:
|
||||
)
|
||||
if (self.source_root / "man").exists():
|
||||
shutil.copytree(str(self.source_root / "man"), str(tmp_root / "man"))
|
||||
if (self.source_root / "completions").exists():
|
||||
shutil.copytree(str(self.source_root / "completions"), str(tmp_root / "completions"))
|
||||
if (self.source_root / "packaging" / "logrotate").exists():
|
||||
pkg_dest = tmp_root / "packaging" / "logrotate"
|
||||
pkg_dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copytree(str(self.source_root / "packaging" / "logrotate"), str(pkg_dest))
|
||||
with tarfile.open(str(tarball_path), "w:gz") as tar:
|
||||
tar.add(str(tmp_root), arcname=f"linux-updater-{self.version}")
|
||||
|
||||
|
||||
@@ -39,4 +39,23 @@ if [ -f "${SCRIPT_DIR}/man/linux-updater.8" ]; then
|
||||
install -m 644 "${SCRIPT_DIR}/man/linux-updater.8" "${PREFIX}/share/man/man8/linux-updater.8"
|
||||
fi
|
||||
|
||||
# Install shell completions
|
||||
if [ -f "${SCRIPT_DIR}/completions/bash/linux-updater" ]; then
|
||||
mkdir -p "${PREFIX}/share/bash-completion/completions"
|
||||
install -m 644 "${SCRIPT_DIR}/completions/bash/linux-updater" "${PREFIX}/share/bash-completion/completions/linux-updater"
|
||||
fi
|
||||
if [ -f "${SCRIPT_DIR}/completions/zsh/_linux-updater" ]; then
|
||||
mkdir -p "${PREFIX}/share/zsh/site-functions"
|
||||
install -m 644 "${SCRIPT_DIR}/completions/zsh/_linux-updater" "${PREFIX}/share/zsh/site-functions/_linux-updater"
|
||||
fi
|
||||
|
||||
# Install logrotate configuration
|
||||
if [ -f "${SCRIPT_DIR}/packaging/logrotate/linux-updater" ]; then
|
||||
mkdir -p "${SYSCONFDIR}/logrotate.d"
|
||||
install -m 644 "${SCRIPT_DIR}/packaging/logrotate/linux-updater" "${SYSCONFDIR}/logrotate.d/linux-updater"
|
||||
elif [ -f "${SCRIPT_DIR}/logrotate/linux-updater" ]; then
|
||||
mkdir -p "${SYSCONFDIR}/logrotate.d"
|
||||
install -m 644 "${SCRIPT_DIR}/logrotate/linux-updater" "${SYSCONFDIR}/logrotate.d/linux-updater"
|
||||
fi
|
||||
|
||||
echo "Installation complete! Run 'linux-updater --help' to verify."
|
||||
@@ -0,0 +1,8 @@
|
||||
/var/log/linux-updater/*.log {
|
||||
weekly
|
||||
rotate 4
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
create 0640 root root
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: linux-updater
|
||||
Version: 1.3.0
|
||||
Version: 2.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Unified, safe multi-distribution Linux system updater
|
||||
|
||||
@@ -32,20 +32,42 @@ mkdir -p $RPM_BUILD_ROOT/var/log/linux-updater
|
||||
cp -r linux_updater $RPM_BUILD_ROOT/usr/lib/linux-updater/
|
||||
install -m 755 bin/linux-updater $RPM_BUILD_ROOT/usr/bin/linux-updater
|
||||
install -m 644 linux-updater.json.example $RPM_BUILD_ROOT/etc/linux-updater.json
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
||||
if [ -f packaging/logrotate/linux-updater ]; then
|
||||
install -m 644 packaging/logrotate/linux-updater $RPM_BUILD_ROOT/etc/logrotate.d/linux-updater
|
||||
fi
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
||||
if [ -f man/linux-updater.8 ]; then
|
||||
install -m 644 man/linux-updater.8 $RPM_BUILD_ROOT%{_mandir}/man8/linux-updater.8
|
||||
fi
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
|
||||
if [ -f completions/bash/linux-updater ]; then
|
||||
install -m 644 completions/bash/linux-updater $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/linux-updater
|
||||
fi
|
||||
if [ -f completions/zsh/_linux-updater ]; then
|
||||
install -m 644 completions/zsh/_linux-updater $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_linux-updater
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%attr(0755, root, root) /usr/bin/linux-updater
|
||||
/usr/lib/linux-updater
|
||||
%config(noreplace) /etc/linux-updater.json
|
||||
%config(noreplace) /etc/logrotate.d/linux-updater
|
||||
%dir %attr(0750, root, root) /var/log/linux-updater
|
||||
%{_mandir}/man8/linux-updater.8*
|
||||
%{_datadir}/bash-completion/completions/linux-updater
|
||||
%{_datadir}/zsh/site-functions/_linux-updater
|
||||
|
||||
%changelog
|
||||
* Sat Oct 03 2026 Test Factory <admin@localhost> - 2.0.0-1
|
||||
- Shell tab autocompletion for Bash and Zsh (completion subcommand and packaging integration).
|
||||
- Selective package filtering with --exclude (patterns/globs) and --security updates.
|
||||
- Pre-flight package database consistency inspection (check_package_db) with auto-remediation (repair_package_db).
|
||||
- Optional Flatpak integration (--flatpak and update_flatpak config).
|
||||
- Dedicated logrotate configuration (/etc/logrotate.d/linux-updater).
|
||||
|
||||
* Fri Oct 02 2026 Test Factory <admin@localhost> - 1.3.0-1
|
||||
- Add Gitea Actions automated CI/CD pipeline for building RPM, DEB, and tarball packages.
|
||||
- Automated publication to Gitea Package Registry and Gitea Release Assets.
|
||||
|
||||
Reference in new issue
Block a user