Skip to content

Commit

Permalink
app-arch/qpress: add 20220819 version
Browse files Browse the repository at this point in the history
Switch to new upstream, fix security issue CVE-2022-45866.

Bug: https://bugs.gentoo.org/882781
Signed-off-by: Azamat H. Hackimov <[email protected]>
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
winterheart authored and juippis committed Dec 9, 2022
1 parent e50643a commit f046a0b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-arch/qpress/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST qpress-11-source.zip 26998 BLAKE2B 08dd943f248f7211e8588fbaf7a2c2eee988d33b17aebfb5f1178647d80314fde576caec9b4aab67d69689f5931d086f88fd51204c1df6d3abc2cca583830380 SHA512 986754cca8bb2cdcfc7e197f7e123c6b2da90db840642a6385f14613f49f7ec6b2c18944838405fe35d5382d71fcd5d69050a036dda4c5de2e588d144e16ea6b
DIST qpress-20220819.tar.gz 25150 BLAKE2B e19a2bca747ec48507288b1b1ad8e053cfb35558f5936dff4ff83c548a3ab613a640813fc3b793e7acb1b65f371af414635d7e469e92c014b580efce4f84ee90 SHA512 f9cf4f87c25fdaa9b8ed12bbfb8d95c3036a7c5c1a0548042ba460b79787a83d5cd2ad93f2da84e5b6715ade5e137024541a3f29e076d4236d0507e2c604113c
40 changes: 40 additions & 0 deletions app-arch/qpress/files/qpress-20220819-fix-build-system.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 1627b18fdf76e978bdd05b985eb6efb1286fa1da Mon Sep 17 00:00:00 2001
From: Davide Cavalca <[email protected]>
Date: Thu, 24 Nov 2022 16:13:30 -0800
Subject: [PATCH] Rework makefile to ease packaging

---
makefile | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/makefile b/makefile
index 4890f9d..349fbb2 100755
--- a/makefile
+++ b/makefile
@@ -1,9 +1,21 @@
-PREFIX = /usr/local
+DESTDIR ?=
+PREFIX ?= /usr/local
+CXX ?= g++
+CXXFLAGS ?= -O3
+CXXFLAGS += -Wall -Wextra -Werror
+LDFLAGS ?=

-g++: qpress.cpp aio.cpp quicklz.c utilities.cpp
- g++ -O3 -o qpress -x c quicklz.c -x c++ qpress.cpp aio.cpp utilities.cpp -lpthread -Wall -Wextra -Werror
+qpress: qpress.cpp aio.cpp quicklz.c utilities.cpp
+ $(CXX) $(CXXFLAGS) -o qpress -x c quicklz.c -x c++ qpress.cpp aio.cpp utilities.cpp -lpthread $(LDFLAGS)

install: qpress
- install -m 0755 qpress $(PREFIX)/bin
+ install -D -p -m 0755 -t $(DESTDIR)$(PREFIX)/bin qpress

-.PHONY: install g++
+clean:
+ rm -f qpress
+
+all: qpress
+
+g++: qpress
+
+.PHONY: clean install
3 changes: 3 additions & 0 deletions app-arch/qpress/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@
<email>[email protected]</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="github">PierreLvx/qpress</remote-id>
</upstream>
</pkgmetadata>
21 changes: 21 additions & 0 deletions app-arch/qpress/qpress-20220819.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="A portable file archiver using QuickLZ algorithm"
HOMEPAGE="https://github.com/PierreLvx/qpress"
SRC_URI="https://github.com/PierreLvx/qpress/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-1 GPL-2 GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"

PATCHES=(
"${FILESDIR}/${P}-fix-build-system.patch"
)

src_install() {
dobin qpress
dodoc readme.md
}

0 comments on commit f046a0b

Please sign in to comment.