Bug 1347878 (rr_xorsearch)

Summary: Review Request: xorsearch - Search for a given string in an XOR, ROL, ROT or SHIFT encoded binary file
Product: [Fedora] Fedora Reporter: Michal Ambroz <rebus>
Component: Package ReviewAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fszymanski, package-review, rebus, zbyszek
Target Milestone: ---Flags: zbyszek: fedora-review+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-07 13:20:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 563471    

Description Michal Ambroz 2016-06-17 23:48:51 UTC
Spec URL: https://rebus.fedorapeople.org/SPECS/xorsearch.spec
SRPM URL: https://rebus.fedorapeople.org/SRPMS/xorsearch-1.11.1-1.fc23.src.rpm

Description:
XORSearch is a program to search for a given string in an XOR, ROL, ROT or SHIFT
encoded binary file. An XOR encoded binary file is a file where some (or all)
bytes have been XORed with a constant value (the key). A ROL (or ROR) encoded
file has its bytes rotated by a certain number of bits (the key). A ROT encoded
file has its alphabetic characters (A-Z and a-z) rotated by a certain number
of positions. A SHIFT encoded file has its bytes shifted left by a certain
number of bits (the key): all bits of the first byte shift left, the MSB
of the second byte becomes the LSB of the first byte, all bits of the second
byte shift left, … XOR and ROL/ROR encoding is used by malware programmers
to obfuscate strings like URLs.

Comment 1 Michal Ambroz 2016-06-17 23:52:48 UTC
Koji build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=14537712

Comment 2 fszymanski 2016-07-07 13:33:09 UTC
Hi,

I have a few suggestions.

1) You need to list a BuildRequires against gcc in your spec file.
See: https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B

2) This is enough:
%setup -q -c

3) The -trigraphs option converts ??) to ] and this is not what you want here.
Instead use -Wno-trigraphs to suppress the trigraph warnings.
See: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html
Consider also using the optimization flags.
Example:

%build
gcc $RPM_OPT_FLAGS -Wno-trigraphs XORSearch.c -o %{name}

4) You don't need this:
rm -rf $RPM_BUILD_ROOT

5) And finally for the convenience you could define a %{pkgver} macro.
This way you are changing only the version.
Example:

%define pkgver %(echo %{version} | sed 's/\\./_/g')

Source0:  http://didierstevens.com/files/software/XORSearch_V%{pkgver}.zip

Filip

Comment 3 Michal Ambroz 2016-08-02 05:10:42 UTC
Hello Filip,
thanks for the valuable comments. Here are updated SPEC/SRPMS

Spec URL: https://rebus.fedorapeople.org/SPECS/xorsearch.spec
SRPM URL: https://rebus.fedorapeople.org/SRPMS/xorsearch-1.11.1-3.fc23.src.rpm

Thank you
Michal Ambroz

Comment 4 Zbigniew Jędrzejewski-Szmek 2016-11-13 01:04:22 UTC
Group → not necessary
BuildRoot → should not be used
[https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections,
https://fedoraproject.org/wiki/EPEL:Packaging#Previously_required_boilerplate]

%setup -q -c
%patch0 -p 1 -b .cosmetics
→ %autosetup -p1
(unless you needs the backup file...)

+ license is acceptable (PD)
+ license is specified correctly
+ package name is OK
+ builds and installs
+ provides/requires look OK
+ latest version

Package is APPROVED.

Comment 5 Gwyn Ciesla 2016-11-21 22:16:41 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/xorsearch

Comment 6 Fedora Update System 2016-11-22 05:40:00 UTC
xorsearch-1.11.1-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3507bc8eea

Comment 7 Fedora Update System 2016-11-22 05:40:08 UTC
xorsearch-1.11.1-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b043636f33

Comment 8 Fedora Update System 2016-11-23 20:32:07 UTC
xorsearch-1.11.1-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b043636f33

Comment 9 Fedora Update System 2016-11-23 23:07:02 UTC
xorsearch-1.11.1-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3507bc8eea

Comment 10 Fedora Update System 2017-03-07 13:20:55 UTC
xorsearch-1.11.1-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-03-08 13:21:58 UTC
xorsearch-1.11.1-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.