LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


View Poll Results: Have you ever modified the source code of an open source application?
Yes 352 58.37%
No 224 37.15%
Not sure 27 4.48%
Voters: 603. You may not vote on this poll

Reply
  Search this Thread
Old 04-22-2020, 08:13 AM   #61
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284

Modified quite a lot of downloaded code, unfortunately not FOSS. I’ll have to pick my sources more carefully in the future so I can give back. I’ve contributed to Arch’s AUR. Not sure if either of those count, so answered “not sure”
 
Old 04-27-2020, 06:49 PM   #62
RonaldLabonte
LQ Newbie
 
Registered: Apr 2020
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by Medievalist View Post
If you use any of the big standard distributions in a large heterogeneous corporate environment, you will find the process of getting bugs fixed in the distro is so tedious and slow that you frequently have to patch locally now rather than send the patch upstream and wait for updates. (This contrasts strongly with using FOSS software direct from author(s) instead of through a distro.)

For example RHEL8 has an selinux policy that prevents systemd from loading iptables - pretty disastrous, right? And might even be pretty simple to fix since it looks like a regression to a known Fedora bug, right?
https://edubirdie.com/nursing-papers-for-sale

Red Hat: Well, it'll get fixed in the next quarterly update set, yawn yawn.

Not meaning to pick solely on Red Hat, just using a current and pertinent example.

The bug in RHEL8 is but I can't find the old Fedora bug any more.
Thank you!

Last edited by RonaldLabonte; 05-02-2020 at 03:45 PM.
 
Old 04-28-2020, 01:34 PM   #63
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,265

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I've answered yes, despite being no programmer. There was a thing with some OSS Radeon driver on my box, which had a really early vintage 2007 radeon gpu. The ttys were blanking to white. After posting the bug, I had to join the LKML & roll the latest kernel to try it, and confirmed the bug. The dev wrote the patch (in 5 seconds apparently) and sent it for trying. He simply added an extra if statement in the same chain bracket which was ignored. I fixed the syntax error by shifting punctuation around and changing if -->elseif (courtesy of the elementary C coding we did on a Hardware course programming PICs). That meant 2 more (LONG) kernel compiles. The dev was mighty aggrieved that I patched his patch and I got roasted. But mine worked and his didn't. He kind of left it then.

Last edited by business_kid; 04-28-2020 at 01:37 PM.
 
2 members found this post helpful.
Old 04-28-2020, 06:24 PM   #64
TheTKS
Member
 
Registered: Sep 2017
Location: Ontario, Canada
Distribution: Slackware, X/ubuntu, OpenBSD, OpenWRT
Posts: 361

Rep: Reputation: 243Reputation: 243Reputation: 243
Not yet, so voted no.

The closest I’ve come is: modifying Arduino code; and modifying a Slackware build script for Arduino IDE for x86 and x86_64 to build a newer version of the package, for ARM, and linking to a different library in SlackwareARM -current.

If those count, then I should have voted yes.

TKS

Last edited by TheTKS; 04-28-2020 at 06:26 PM.
 
Old 10-01-2020, 05:17 PM   #65
michael@actrix
Member
 
Registered: Jul 2003
Location: New Zealand
Distribution: OpenSUSE Tumbleweed
Posts: 68
Blog Entries: 1

Rep: Reputation: 20
I think the first open source I did anything much to was nethack in 1992. At that time Linux did not have X11 (or in-kernel networking), but our PC had a serial port, so by hooking up a terminal (Digital Equipment Corporation vt-320) I was able to add another user. But I needed a compelling reason for another user to login and use the system, so I made a few mod's to the nethack source to get it to build and run, and then uploaded the result to banjo.concert.net. Here's my first posting concerning the mod's from October 1989:

Quote:
I recently ported nethack (I wanted to provide an incentive for someone
other than myself to login and make an entry in /etc/wtmp :-)
In doing this I encountered problems with the following (f/s)scanf statement
(in topten.c):

if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",

I had problems with both the [] specs, the results are unpredictable.

I'm using 0.12 with the abc release, and have applied almost all the
patches/enhancements around (nonblobking, curses, poe-IGL, ...). Is
there a better implementation of scanf available (or in the wind)? I
eventually gave up on scanf and wrote a simple parser using the str*()
routines. I built nethack 3 patch level 6 (I think pl10 has a workaround
for systems that have bad scanf's).

Apart from this problem, there are only a few minor porting problems.

In a handful of places Linux prototypes differed from ones declared in
the game.

Nethack runs fine on my console, and also on a vt320 connected to
/dev/tty64. I had to change the vt320 entry in inittab to vt100 (the
original /etc/termcap entries look OK - problem with termcap
routines?).

There seems to be a minor problem with rip.c, it doesn't print the
proper details (maybe a curses problem). Also curses sometimes gets
the updates wrong, eg zap, throw.

In case anyone wants them, here are my diffs (I can make the binaries
available if anyones interested):

*** unixmain.c.ori Tue Oct 17 20:09:47 1989
--- unixmain.c Thu Mar 5 23:24:10 1992
***************
*** 19,23 ****
--- 19,26 ----
#endif

+ #ifndef linux
extern struct passwd *getpwuid();
+ #endif
+
#ifdef CHDIR
static void chdirx();
*** makedefs.c.ori Wed Nov 22 19:29:43 1989
--- makedefs.c Fri Mar 6 00:36:55 1992
***************
*** 31,36 ****
--- 31,38 ----
#endif
#if defined(SYSV) || defined(GENIX) || defined(UNIXDEBUG)
+ #ifndef linux
void rename();
#endif
+ #endif
#ifdef AMIGA
# undef freopen
***************
*** 488,491 ****
--- 490,494 ----

#if defined(SYSV) || defined(GENIX) || defined(UNIXDEBUG)
+ #ifndef linux
void
rename(oldname, newname)
***************
*** 499,502 ****
--- 502,506 ----
return;
}
+ #endif
#endif

*** topten.c.orig Sat Mar 7 12:11:10 1992
--- topten.c Sat Mar 7 15:39:56 1992
***************
*** 42,45 ****
--- 42,81 ----
static int FDECL(outentry, (int,struct toptenentry *,int));

+ static int parse_top_ten (FILE *rfile,
+ char *s1,
+ int *d1, int *d2, int *d3, int *d4, int *d5, int *d6,
+ char *c1, char *c2,
+ char *s2, char *s3 )
+ {
+ char input[501] ;
+ if (fgets(input,500,rfile)) {
+ char *ptr = input, *comma_ptr = NULL ;
+
+ strncpy ( s1, ptr, 6 ) ;
+ s1[6] = '\0' ;
+ ptr += 7 ;
+ *d1 = atoi (ptr) ; ptr = strchr (ptr+1, ' ') ;
+ *d2 = atoi (ptr) ; ptr = strchr (ptr+1, ' ') ;
+ *d3 = atoi (ptr) ; ptr = strchr (ptr+1, ' ') ;
+ *d4 = atoi (ptr) ; ptr = strchr (ptr+1, ' ') ;
+ *d5 = atoi (ptr) ; ptr = strchr (ptr+1, ' ') ;
+ *d6 = atoi (ptr) ; ptr = strchr (ptr+1, ' ') ;
+ *c1 = *(++ptr) ;
+ *c2 = *(++ptr) ; ptr += 2 ;
+ comma_ptr = strchr ( ptr, ',' ) ;
+ strncpy ( s2, ptr, comma_ptr - ptr ) ;
+ s2[comma_ptr - ptr] = '\0' ;
+ ptr = comma_ptr + 1 ;
+ strcpy ( s3, ptr ) ;
+ s3[ strlen(s3) - 1 ] = '\0' ;
+ /* printf("%s\n", s2) ; */
+ return 11 ;
+ }
+ else {
+ return 0 ;
+ }
+ }
+
+
void
topten(){
***************
*** 231,236 ****
--- 267,276 ----
if(fscanf(rfile, "%6s %d %d %d %d %d %ld %1s%1s %s %s]",
#else
+ #ifdef linux
+ if(parse_top_ten(rfile,
+ #else
if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
#endif
+ #endif
t1->date, &t1->uid,
&t1->level, &t1->maxlvl,
***************
*** 592,596 ****
if(fscanf(rfile, "%6s %d %d %d %d %d %ld %1s%1s %s %s]",
#else
! if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
#endif
t1->date, &t1->uid,
--- 632,640 ----
if(fscanf(rfile, "%6s %d %d %d %d %d %ld %1s%1s %s %s]",
#else
! #ifdef linux
! if(parse_top_ten(rfile,
! #else
! if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
! #endif
#endif
t1->date, &t1->uid,
***************
*** 745,749 ****
if(fscanf(rfile, "%6s %d %d %d %d %d %ld %1s%1s %s %s]",
#else
! if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
#endif
tt->date, &tt->uid,
--- 789,797 ----
if(fscanf(rfile, "%6s %d %d %d %d %d %ld %1s%1s %s %s]",
#else
! #ifdef linux
! if(parse_top_ten(rfile,
! #else
! if(fscanf(rfile, "%6s %d %d %d %d %d %ld %c%c %[^,],%[^\n]",
! #endif
#endif
tt->date, &tt->uid,
*** Makefile.orig Wed Nov 22 19:29:06 1989
--- Makefile Thu Mar 5 22:47:29 1992
***************
*** 33,37 ****
# a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
# -traditional in CFLAGS
! # CC = gcc

# flags may have to be changed as required
--- 33,37 ----
# a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
# -traditional in CFLAGS
! CC = gcc

# flags may have to be changed as required
***************
*** 52,64 ****
# Sysatt uses shared library in lieu of this option
# TERMLIB = -ltermcap
! # TERMLIB = -lcurses
! TERMLIB = -ltermlib

# yacc/lex programs to use to generate lev_comp.c, lev_comp.h, and lev_lex.c.
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
! YACC = yacc
! LEX = lex
! # YACC = bison -y
! # LEX = flex

# make NetHack
--- 52,64 ----
# Sysatt uses shared library in lieu of this option
# TERMLIB = -ltermcap
! TERMLIB = -lcurses
! # TERMLIB = -ltermlib

# yacc/lex programs to use to generate lev_comp.c, lev_comp.h, and lev_lex.c.
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
! # YACC = yacc
! # LEX = lex
! YACC = bison -y
! LEX = flex

# make NetHack
***************
*** 68,73 ****
# with a reasonable random number generator -- also remember to get random.c
# into the src directory
! # RANDOBJ = random.o
! RANDOBJ =

# nothing below this line should have to be changed
--- 68,73 ----
# with a reasonable random number generator -- also remember to get random.c
# into the src directory
! RANDOBJ = random.o
! # RANDOBJ =

# nothing below this line should have to be changed
*** ../include/config.h.origi Thu Mar 5 22:33:32 1992
--- ../include/config.h Thu Mar 5 22:53:25 1992
***************
*** 62,69 ****
#ifndef WIZARD /* allow for compile-time or Makefile changes */
# ifndef KR1ED
! #define WIZARD "izchak" /* the person allowed to use the -D option */
# else
#define WIZARD 1
! #define WIZARD_NAME "johnny"
# endif
#endif
--- 62,69 ----
#ifndef WIZARD /* allow for compile-time or Makefile changes */
# ifndef KR1ED
! #define WIZARD "michael" /* the person allowed to use the -D option */
# else
#define WIZARD 1
! #define WIZARD_NAME "michael"
# endif
#endif
***************
*** 79,83 ****
*/

! #define COMPRESS "/usr/local/compress" /* path name for 'compress' */
#ifndef COMPRESS
#define ZEROCOMP /* Use only if COMPRESS is not used -- Olaf Seibert */
--- 79,83 ----
*/

! #define COMPRESS "/usr/bin/compress" /* path name for 'compress' */
#ifndef COMPRESS
#define ZEROCOMP /* Use only if COMPRESS is not used -- Olaf Seibert */
*** ../include/unixconf.h.ori Thu Mar 5 22:33:55 1992
--- ../include/unixconf.h Thu Mar 5 22:53:15 1992
***************
*** 22,29 ****
/* #define BSD /* define for 4.n BSD */
/* also for relatives like SunOS */
! #define ULTRIX /* define for Ultrix v3.0 or higher (but not lower) */
/* Use BSD for < v3.0 */
/* "ULTRIX" not to be confused with "ultrix" */
! /* #define SYSV /* define for System V */
/* #define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
--- 22,29 ----
/* #define BSD /* define for 4.n BSD */
/* also for relatives like SunOS */
! /* #define ULTRIX /* define for Ultrix v3.0 or higher (but not lower) */
/* Use BSD for < v3.0 */
/* "ULTRIX" not to be confused with "ultrix" */
! #define SYSV /* define for System V */
/* #define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
***************
*** 42,46 ****
By Jay Maynard */

! /* #define RANDOM /* if neither random/srandom nor lrand48/srand48
is available from your system */
/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
--- 42,46 ----
By Jay Maynard */

! #define RANDOM /* if neither random/srandom nor lrand48/srand48
is available from your system */
/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
***************
*** 64,69 ****
* Hack will use its internal pager if DEF_PAGER is not defined.
* (This might be preferable for security reasons.)
- * #define DEF_PAGER ".../mydir/mypager"
*/

/*
--- 64,69 ----
* Hack will use its internal pager if DEF_PAGER is not defined.
* (This might be preferable for security reasons.)
*/
+ #define DEF_PAGER "/usr/bin/less"

/*
***************
*** 73,79 ****
* variable MAILREADER; otherwise an internal pager will be used.
* A stat system call is done on the mailbox every MAILCKFREQ moves.
*/

- #define MAIL /* Deliver mail during the game */
#ifdef MAIL

--- 73,79 ----
* variable MAILREADER; otherwise an internal pager will be used.
* A stat system call is done on the mailbox every MAILCKFREQ moves.
+ * #define MAIL /* Deliver mail during the game
*/

#ifdef MAIL

 
Old 10-01-2020, 05:56 PM   #66
rrsurfer1
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
Quite often. The Linux source is often the target and I can be found in the depths of some device driver (fixing bugs on newer products not yet mature) or at times adding custom sysfs hooks to debug a board-level issue on a piece of custom hardware. And I've several times had to back-port fixes from a newer kernel version to continue to support old hardware.
 
Old 10-01-2020, 06:34 PM   #67
cdjc
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
Nope. I left software development before I had an opportunity to do this. Got burned out on the hectic schedules and tight deadlines ... consumed too much of my life back then.
 
Old 10-01-2020, 08:06 PM   #68
doctorwho8
Member
 
Registered: Nov 2013
Posts: 30

Rep: Reputation: Disabled
Have you ever modified the source code of an open source application?


Actually yes! I did examine and correct the spelling for a module for a webcam. It seems that the spelling was not correct for the Slackware supplied GCC build to create the module. Surprisingly enough it worked. And I've attempted to maintain the Slackware stuff for OWFS, it's a file system for the One-Wire parts from MAXIM, originally Dallas Semiconductor.

And of course helping Slackware build its custom kernels for Slackware-11.0 and even earlier.
 
Old 10-01-2020, 08:08 PM   #69
doctorwho8
Member
 
Registered: Nov 2013
Posts: 30

Rep: Reputation: Disabled
Quote:
Originally Posted by michael@actrix View Post
I think the first open source I did anything much to was nethack in 1992. At that time Linux did not have X11 (or in-kernel networking), but our PC had a serial port, so by hooking up a terminal (Digital Equipment Corporation vt-320) I was able to add another user. But I needed a compelling reason for another user to login and use the system, so I made a few mod's to the nethack source to get it to build and run, and then uploaded the result to banjo.concert.net. Here's my first posting concerning the mod's from October 1989:
Wow!
I am impressed. I've been working like crazy to get Slackware to properly grok an external terminal. And now we've got X11 running and the networking methods.
 
Old 10-01-2020, 08:18 PM   #70
kingjim1954
LQ Newbie
 
Registered: Mar 2014
Location: Massachusetts
Distribution: slackware
Posts: 5

Rep: Reputation: Disabled
There has often been too much anarchy in GNU libs. On building a package you get errors that a certain variable is not defined in such and such's header file. The data was needed, and too often someone didn't like the structure it was defined in. It's not hard to track down it or it's equivalent and patch the code so it would compile and run correctly.
 
Old 10-01-2020, 08:27 PM   #71
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Rep: Reputation: Disabled
I have on occasion modified code for my own use. If I think it's something others may find useful I'll suggest it to the dev. Once in a while they'll accept and use it.
 
Old 10-01-2020, 09:49 PM   #72
Pierre Thibault
LQ Newbie
 
Registered: Dec 2019
Location: Lévis, Québec, Canada
Distribution: Pop_OS
Posts: 2

Rep: Reputation: Disabled
Cool I made a one byte contribution

I investigated a bug with wxWindows and file names with accented characters. I made a fix in the code to use the unicode version of a function by adding a "u" in front of its name. So I made a fix in one byte. Quite efficient, no?
 
Old 10-02-2020, 12:28 AM   #73
xhosa
LQ Newbie
 
Registered: Feb 2020
Posts: 5

Rep: Reputation: Disabled
In my Gentoo days in the nineties

Normally, after installing this and that after my Gentoo was up, dependencies were shot t. h. and the 'fun' began. Success rate was max 5%, the rest of the time I either continued using a limping system or reinstalled it which, then at least, was a royal pain in the neck.
I was using a laptop and compiling kde... whew!
Normally: compile, goto bed, get up in the morning, find the error, recompile. Loop until success.

At work I used Windows and Gentoo in a wmware setup up 2000-2002 when I went all Gentoo. In 2004 I switched to Ubuntu 4.10, Warty Warthog. Very little editing sources since then. As "cdjc" says: "[hacking sources] consumed too much of my life back then".
 
Old 10-02-2020, 04:36 AM   #74
bodqhrohro
Member
 
Registered: Apr 2018
Location: Ukraine
Distribution: Debian GNU/Linux 12
Posts: 62

Rep: Reputation: Disabled
Who are those 12 persons who are not sure? Were you drunk when possibly doing this? ;D
 
Old 10-02-2020, 05:24 AM   #75
FACamargo
LQ Newbie
 
Registered: Sep 2018
Posts: 2

Rep: Reputation: Disabled
Sure, but only back in the 80s, when SIMTEL was the only source for free and open software, and even then I did it mostly for experimentation and/or minor bug fixing, always for my own use.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I modified the AODV code part of NS2.31 for selecting a node which have minumamenergy lakshmanarao.k Programming 1 03-11-2015 04:51 PM
LXer: If You've Ever Sold a Used iPod, You May Have Violated Copyright Law LXer Syndicated Linux News 0 06-14-2012 03:10 AM
LXer: "What's this 'DEEE-bee-en' you write about?" Or will Linux ever (ever?) make its move on the d LXer Syndicated Linux News 5 12-21-2010 08:09 PM
i think that i will never ever ever ever switch to mac teamstatic84 General 11 01-03-2004 12:25 PM
Have you ever made a donation or a purchase to an open source organisation/project ? dukeinlondon Linux - General 8 11-14-2003 05:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration