Skip to content

Update for modern Linux and add Fedora .spec file#6

Open
drepper wants to merge 10 commits intoapplied-optics:masterfrom
drepper:master
Open

Update for modern Linux and add Fedora .spec file#6
drepper wants to merge 10 commits intoapplied-optics:masterfrom
drepper:master

Conversation

@drepper
Copy link

@drepper drepper commented Apr 13, 2021

Hello Steve,

I have no idea whether you're still interested in this. If not, let me know and I'll just carry on in my cloned repository.

I've been using a hacky build of your vxi11 for a while and only in the last days finally took the steps to update the code for a modern system and create the configuration to create RPM packages. The result works on my Fedora 33 system.

In the process I've fixed potential out-of-bound reads and string truncations.

drepper added 10 commits April 13, 2021 07:37
The vxi11_open_device function keeps a list of known clients which
includes the address.  This is a string which can be an IP address
(of fixed length) but could also be host names.  Change the structure
to use a zero-length array for the address and allocate memory
according to the address string's length.
The code ignored fgets failures which might lead to undefined behavior
and potentially out-of-bound reads.  Actually return the error of the
loop as the program's exit status
Simplify argument handling in vxi11_send and in the process fix
unnecessary truncation of the command and potential out-of-bounds
read
This was missing from 'make install'
With this .spec file the package is compiled and packaged in four
different RPM files (plus the debug information).  The library,
header, utilities, and the Python code can be installed separately.
The library is a dependency for the other packages, though.

Because Fedora (and upstream) for some time has deprecated Python 2
the code is only packaged for Python 3.
Instead of using LIB_SUFFIX simply get the entire directory name from
a variable.  This matches the variable _lib in RPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant