Bug 1534137 - Review Request: fluxcapacitor - run programs without blocking on syscalls
Summary: Review Request: fluxcapacitor - run programs without blocking on syscalls
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-13 12:38 UTC by Artur Iwicki
Modified: 2018-02-14 17:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-30 17:31:01 UTC
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Artur Iwicki 2018-01-13 12:38:52 UTC
spec: https://svgames.pl/fedora/fluxcapacitor-0-1.spec
srpm: https://svgames.pl/fedora/fluxcapacitor-0-1.src.rpm
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=24171084

Description: fluxcapacitor is a tool for making your program run without blocking on timeouts, on functions like poll() and select(), by spoofing POSIX time functions. It will make your program run faster and be 100% CPU constrained. It does that by "speeding up" blocking syscalls. Faking time is a necessary side effect.

Fedora Account System Username: suve

Comment 1 Artur Iwicki 2018-01-14 17:21:59 UTC
Upstream accepted two of my patches, so I went ahead and updated the spec to use the new git snapshot.

spec: https://svgames.pl/fedora/fluxcapacitor-0-3.spec
srpm: https://svgames.pl/fedora/fluxcapacitor-0-3.src.rpm
koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=24197934

Comment 2 Robert-André Mauchin 2018-01-15 13:36:12 UTC
 - Quite curious to install the *.so int /usr/share:

fluxcapacitor.x86_64: E: arch-dependent-file-in-usr-share /usr/share/fluxcapacitor/fluxcapacitor_preload.so
fluxcapacitor.x86_64: E: arch-dependent-file-in-usr-share /usr/share/fluxcapacitor/fluxcapacitor_test.so

Shouldn't you instead install them in %{_libdir}/%{name} as they are arch dependant? /usr/share is reserved for architecture-independent data. I modified your patch this way:

fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/src/misc.c
--- fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/src/misc.c.fix_libdir	2018-01-14 17:43:01.000000000 +0100
+++ fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/src/misc.c	2018-01-15 14:20:23.825681581 +0100
@@ -118,6 +118,12 @@ void ensure_libpath(const char *argv_0)
 	if (!options.libpath) {
 		char *path = NULL;
 		do {
+			path = "/usr/lib/fluxcapacitor";
+			if (dl_checkpath(path, TEST_LIBNAME)) break;
+            
+			path = "/usr/lib64/fluxcapacitor";
+			if (dl_checkpath(path, TEST_LIBNAME)) break;
+            
 			// 1. Relative to executable, useful for development
 			char tmp[PATH_MAX];
 			if (!realpath(argv_0, tmp)) {



 - Patches shouldn't be applied within %ifarch, they need to be applied to all arches identically. If you need to restrict it to a certain arch, do it within the patch itself.

fluxcapacitor.src: W: %ifarch-applied-patch Patch1: %{name}-disable-wraparound-test.patch

I modified your patch this way:

diff -up fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/tests/tests_basic.py.fix_wraparound fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/tests/tests_basic.py
--- fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/tests/tests_basic.py.fix_wraparound	2018-01-14 17:43:01.000000000 +0100
+++ fluxcapacitor-0b6a11b729d1f5461b49fd0b0b4e2142175aa6ff/tests/tests_basic.py	2018-01-15 14:26:00.260915110 +0100
@@ -205,12 +205,12 @@ class SingleProcess(tests.TestCase):
         after_fork_fds = len(stdout.split('\n'))
         assert normal_fds == after_fork_fds
 
-
-    @at_most(seconds=4)
-    def test_2546_wraparound(self):
-        stdout = self.system("bash -c 'for i in `seq 1 55`; do sleep 315360000; done; date +%Y'",
-                             capture_stdout=True)
-        assert int(stdout) > 2500
+    if os.uname()[4] == "x86_64":
+        @at_most(seconds=4)
+        def test_2546_wraparound(self):
+            stdout = self.system("bash -c 'for i in `seq 1 55`; do sleep 315360000; done; date +%Y'",
+                                capture_stdout=True)
+            assert int(stdout) > 2500
 
 
 if __name__ == '__main__':


Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "MIT/X11 (BSD like)", "Unknown or generated". 28 files have
     unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/fluxcapacitor/review-
     fluxcapacitor/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[x]: Macros in Summary, %description expandable at SRPM build time.
     Note: Macros in: fluxcapacitor (description)
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[!]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[-]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: There are rpmlint messages (see attachment).
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: fluxcapacitor-0-3.20180114git0b6a11b.fc28.x86_64.rpm
          fluxcapacitor-debuginfo-0-3.20180114git0b6a11b.fc28.x86_64.rpm
          fluxcapacitor-debugsource-0-3.20180114git0b6a11b.fc28.x86_64.rpm
          fluxcapacitor-0-3.20180114git0b6a11b.fc28.src.rpm
fluxcapacitor.x86_64: W: spelling-error Summary(en_US) syscalls -> miscalls
fluxcapacitor.x86_64: W: spelling-error %description -l en_US syscalls -> miscalls
fluxcapacitor.x86_64: E: arch-dependent-file-in-usr-share /usr/share/fluxcapacitor/fluxcapacitor_preload.so
fluxcapacitor.x86_64: E: arch-dependent-file-in-usr-share /usr/share/fluxcapacitor/fluxcapacitor_test.so
fluxcapacitor.x86_64: W: only-non-binary-in-usr-lib
fluxcapacitor-debugsource.x86_64: W: no-documentation
fluxcapacitor.src: W: spelling-error Summary(en_US) syscalls -> miscalls
fluxcapacitor.src: W: spelling-error %description -l en_US syscalls -> miscalls
fluxcapacitor.src: W: %ifarch-applied-patch Patch1: %{name}-disable-wraparound-test.patch
4 packages and 0 specfiles checked; 2 errors, 7 warnings.

Comment 3 Artur Iwicki 2018-01-15 13:41:53 UTC
I put the .so in /usr/share, since it's something that, by design, should only be loaded by the fluxcapacitor binary and not really linked to anything else (there's no "libfluxcapacitor-devel" package that other programs can link against). Still, if it's preferred to put it in %{_libdir} either way, I can change the spec.

Thanks for the test case patch! I wanted to do something like this, but my Python knowledge is rather limited. :)

Comment 4 Robert-André Mauchin 2018-01-15 13:49:05 UTC
(In reply to Iwicki Artur from comment #3)
> I put the .so in /usr/share, since it's something that, by design, should
> only be loaded by the fluxcapacitor binary and not really linked to anything
> else (there's no "libfluxcapacitor-devel" package that other programs can
> link against). Still, if it's preferred to put it in %{_libdir} either way,
> I can change the spec.

It is, there shouldn't be any platform dependent code in /usr/share

Comment 5 Artur Iwicki 2018-01-15 14:45:37 UTC
Should it go in %{_libdir}/%{name}, then? I think that's most other packages do with their modules and such.

Comment 6 Robert-André Mauchin 2018-01-15 15:12:51 UTC
Yes.

Comment 8 Robert-André Mauchin 2018-01-15 16:02:09 UTC
Seems good, package approved.

Comment 9 Gwyn Ciesla 2018-01-15 22:18:11 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/fluxcapacitor

Comment 10 Fedora Update System 2018-01-16 13:18:14 UTC
fluxcapacitor-0-4.20180114git0b6a11b.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d0f1fbeefa

Comment 11 Fedora Update System 2018-01-16 13:18:42 UTC
fluxcapacitor-0-4.20180114git0b6a11b.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-6e00da4e2e

Comment 12 Fedora Update System 2018-01-16 13:19:10 UTC
fluxcapacitor-0-4.20180114git0b6a11b.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-ebba71276e

Comment 13 Fedora Update System 2018-01-16 18:11:09 UTC
fluxcapacitor-0-4.20180114git0b6a11b.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2018-ebba71276e

Comment 14 Fedora Update System 2018-01-17 06:48:50 UTC
fluxcapacitor-0-4.20180114git0b6a11b.fc27 has been pushed to the Fedora 27 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-2018-d0f1fbeefa

Comment 15 Fedora Update System 2018-01-17 06:57:20 UTC
fluxcapacitor-0-4.20180114git0b6a11b.fc26 has been pushed to the Fedora 26 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-2018-6e00da4e2e

Comment 16 Fedora Update System 2018-01-17 13:29:11 UTC
fluxcapacitor-0-4.20180114git0b6a11b.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-ea3af33607

Comment 17 Fedora Update System 2018-01-18 00:32:27 UTC
fluxcapacitor-0-4.20180114git0b6a11b.el6 has been pushed to the Fedora EPEL 6 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-EPEL-2018-ea3af33607

Comment 18 Fedora Update System 2018-01-30 17:31:01 UTC
fluxcapacitor-0-4.20180114git0b6a11b.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2018-01-30 18:02:24 UTC
fluxcapacitor-0-4.20180114git0b6a11b.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2018-02-14 16:59:22 UTC
fluxcapacitor-0-4.20180114git0b6a11b.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2018-02-14 17:01:48 UTC
fluxcapacitor-0-4.20180114git0b6a11b.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.