Bug 62349 - Replace with fgetty
Replace with fgetty
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: mingetty (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Florian La Roche
Brock Organ
http://www.fefe.de/fgetty/
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-29 20:52 EST by Enrico Scholz
Modified: 2007-04-18 12:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-03 16:49:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2002-03-29 20:52:27 EST
When looking at the output of 'ps axu' the reasons for a change are
obviously:

| root     15469  0.0  0.0    20   20 vc/5     S    01:31   0:00 /local/sbin/fgetty vc/5
| root     15496  0.0  0.3  1440  440 vc/6     S    01:31   0:00 /sbin/mingetty vc/6
                            ~~~~~~~~~

fgetty (http://www.fefe.de/fgetty/) provides similar features (expansion
of \X sequences in /etc/issue) and works perfectly[1] with the other Red
Hat tools (e.g. /bin/login).

Therefore, you gain a significantly less memory-footprint at null
costs.



Footnotes: 
[1] In fact, I had to comment out '-DTEST' in the Makefile and the
    final 'echo_off();' in fgetty.c
Comment 1 Bill Nottingham 2002-04-01 15:51:50 EST
Generally, we do not want to head down the path of diet-izing the entire
distribution.
Comment 2 Enrico Scholz 2002-04-01 16:09:21 EST
Generally, this might be right.

But in the fgetty-case it is wrong... fgetty has the same behavior as mingetty,
because it IS mingetty (without stdio-stuff).

Do you see any drawbacks when using fgetty instead of mingetty?
Comment 3 Florian La Roche 2002-04-03 08:49:09 EST
The memory savings come from then linking against diet0libc and not just from
removing stdio, right? It does not make sense to start linking against that.
If the memory footprint can be reduced by changing how error messages are
output, please reopen again and I'll consider this for future mingetty versions.

Thanks,

Florian La Roche
Comment 4 Enrico Scholz 2002-04-03 16:49:30 EST
I do not understand why linking against dietlibc does not make
sense. Linking happens static so there are no runtime-dependencies
on dietlibc.



Not using stdio saves 16KB which are 80% of the memory needed by the
diet-libc compiled fgetty:

| root      1173  0.0  0.0    20   20 vc/5     S    22:53   0:00 /sbin/fgetty vc/5
| root      1663  0.4  0.0    36   36 vc/7     S    23:41   0:00 /sbin/mingetty.diet vc/7
| root      1666  2.0  0.3  1440  440 vc/8     S    23:41   0:00 /sbin/mingetty.glibc vc/8
| root      1667  7.0  0.1   444  160 vc/9     S    23:41   0:00 /sbin/mingetty.glibcs vc/9

| $ ls -l /sbin/fgetty /sbin/mingetty.*	## files are stripped
| -rwx------    1 root     root         5908 Mar 30 04:20 /sbin/fgetty
| -rwxr-xr-x    1 root     root        20172 Apr  3 23:36 /sbin/mingetty.diet
| -rwxr-xr-x    1 root     root         8136 Apr  3 23:40 /sbin/mingetty.glibc
| -rwxr-xr-x    1 root     root       435432 Apr  3 23:40 /sbin/mingetty.glibcs


/sbin/fgetty          is fgetty-0.5[1]      static  linked with dietlibc
/sbin/mingetty.diet   is mingetty-1.00-1[2] static  linked with dietlibc
/sbin/mingetty.glibc  is mingetty-1.00-1[2] dynamic linked with glibc
/sbin/mingetty.glibcs is mingetty-1.00-1[2] static  linked with glibc

Compilerflags were '-Os -D_GNU_SOURCE'.


Footnotes: 
[1]  plus '--long-hostname' patch; should be now in 0.6 also
[2]  without the nologin-patch and with s!sys_errlist!strerror!

Comment 5 Florian La Roche 2002-08-02 04:10:31 EDT
mingetty stays in Red Hat Linux.

Sorry,

Florian La Roche

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