diff --git a/0001-add-pie-compile-option.patch b/0001-add-pie-compile-option.patch new file mode 100644 index 0000000000000000000000000000000000000000..97870d4488f936379c9ee8efc12619d964de88e9 --- /dev/null +++ b/0001-add-pie-compile-option.patch @@ -0,0 +1,41 @@ +From d94c298552f7e9eb9ee063903ed8e14c9e42e132 Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Tue, 6 Jun 2023 14:12:44 +0800 +Subject: [PATCH] add pie compile option + +--- + Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 80c8fe5..d16c755 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,19 +3,19 @@ INSTALLDEST=/usr/local/bin/sysget + CCP=g++ + + prog: main.o packagemanager.o utils.o translation.o +- $(CCP) $(FLAGS) -o sysget main.o packagemanager.o utils.o translation.o ++ $(CCP) $(FLAGS) -pie -o sysget main.o packagemanager.o utils.o translation.o + + main.o: src/main.cpp src/main.hpp +- $(CCP) $(FLAGS) -c src/main.cpp src/main.hpp ++ $(CCP) $(FLAGS) -fPIE -c src/main.cpp src/main.hpp + + packagemanager.o: src/packagemanager.hpp src/packagemanager.cpp +- $(CCP) $(FLAGS) -c src/packagemanager.hpp src/packagemanager.cpp ++ $(CCP) $(FLAGS) -fPIE -c src/packagemanager.hpp src/packagemanager.cpp + + utils.o: src/utils.hpp src/utils.cpp +- $(CCP) $(FLAGS) -c src/utils.hpp src/utils.cpp ++ $(CCP) $(FLAGS) -fPIE -c src/utils.hpp src/utils.cpp + + translation.o: src/translation.hpp src/translation.cpp +- $(CCP) $(FLAGS) -c src/translation.hpp src/translation.cpp ++ $(CCP) $(FLAGS) -fPIE -c src/translation.hpp src/translation.cpp + + install: + cp sysget $(INSTALLDEST) +-- +2.33.0 + diff --git a/sysget.spec b/sysget.spec index ebfc8c5a20ea315243962e805d7d71663e367b2b..667421fe1ae7bee4f623e1da1f247dd7773860ba 100644 --- a/sysget.spec +++ b/sysget.spec @@ -1,11 +1,12 @@ Name: sysget Version: 2.3 -Release: 4 +Release: 5 Summary: One package manager to rule them all License: GPLv3 URL: http://sysget.emilengler.com Source0: https://github.com/emilengler/sysget/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch1: sysget-should-generate-debuginfo.patch +Patch2: 0001-add-pie-compile-option.patch BuildRequires: gcc autoconf automake make gcc-c++ @@ -17,6 +18,7 @@ The syntax is mostly same with apt so it should be easy to use. %prep %setup -q -n %{name}-%{version}/ %patch1 -p1 +%patch2 -p1 %build %make_build @@ -49,7 +51,10 @@ install -m0644 contrib/sysget.bash-completion %{buildroot}/%{_sysconfdir}/bash_c %changelog -* Thu 09 Sep 2021 sunguoshuai - 2.3.2-4 +* Tue Jun 06 2023 Ge Wang - 2.3.2-5 +- Add pie compile option + +* Thu Sep 09 2021 sunguoshuai - 2.3.2-4 - sysget should generate debuginfo * Mon May 31 2021 huanghaitao - 2.3.2-3