summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mizrahi <alan+crux@mizrahi.com.ve>2013-04-19 11:25:42 +0900
committerAlan Mizrahi <alan+crux@mizrahi.com.ve>2013-04-19 11:25:42 +0900
commitd7745f117789ac649c3a30fbb5761c71cc4e43db (patch)
tree0ac4fd6f272baf8c1173d41e2bc9bbf490e61a9b
parentcda635d75d38c07676c6471f01379c17c1f88724 (diff)
downloadcontrib-d7745f117789ac649c3a30fbb5761c71cc4e43db.tar.gz
contrib-d7745f117789ac649c3a30fbb5761c71cc4e43db.tar.xz
fgetty: Updated to 0.7
-rw-r--r--fgetty/.footprint3
-rw-r--r--fgetty/.md5sum3
-rw-r--r--fgetty/Pkgfile13
-rw-r--r--fgetty/fgetty-0.6.patch104
4 files changed, 10 insertions, 113 deletions
diff --git a/fgetty/.footprint b/fgetty/.footprint
index 80f8ec433..724948fd1 100644
--- a/fgetty/.footprint
+++ b/fgetty/.footprint
@@ -1,4 +1,7 @@
drwxr-xr-x root/root bin/
+-rwxr-xr-x root/root bin/checkpassword.login
+-rwxr-xr-x root/root bin/login1
+-rwxr-xr-x root/root bin/login2
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/fgetty
drwxr-xr-x root/root usr/
diff --git a/fgetty/.md5sum b/fgetty/.md5sum
index 83245ce53..a47ec8e26 100644
--- a/fgetty/.md5sum
+++ b/fgetty/.md5sum
@@ -1,2 +1 @@
-4cf5326af47b835354c6fac97c361d2e fgetty-0.6.patch
-399dd207805b75ea99ed814943d71c60 fgetty-0.6.tar.bz2
+1ecb286ffe3a87ef160eefc38e9038a5 fgetty-0.7.tar.bz2
diff --git a/fgetty/Pkgfile b/fgetty/Pkgfile
index b11b47d7b..b67d65d6d 100644
--- a/fgetty/Pkgfile
+++ b/fgetty/Pkgfile
@@ -1,18 +1,17 @@
-# Description: Small getty for Linux
-# URL: http://www.fefe.de/fgetty/
+# Description: Small getty for Linux
+# URL: http://www.fefe.de/fgetty/
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
-# Depends on: dietlibc
+# Depends on: dietlibc
name=fgetty
-version=0.6
+version=0.7
release=1
-source=(http://www.fefe.de/$name/$name-$version.tar.bz2 $name-$version.patch)
+source=(http://www.fefe.de/$name/$name-$version.tar.bz2)
build() {
cd $name-$version
- patch -p1 < ../$name-$version.patch
make DIET="/usr/dietlibc/bin/diet"
mkdir -p $PKG/usr/man/man8
make DESTDIR=$PKG install
- rm -f $PKG/bin/{login1,login2,checkpassword.login}
+ # rm -f $PKG/bin/{login1,login2,checkpassword.login}
}
diff --git a/fgetty/fgetty-0.6.patch b/fgetty/fgetty-0.6.patch
deleted file mode 100644
index 7d64d0d18..000000000
--- a/fgetty/fgetty-0.6.patch
+++ /dev/null
@@ -1,104 +0,0 @@
---- fgetty-0.6/fgetty.c.orig 2005-11-25 12:35:04.000000000 -0400
-+++ fgetty-0.6/fgetty.c 2005-11-25 12:35:47.000000000 -0400
-@@ -10,9 +10,13 @@
- #include <sys/ioctl.h>
- #include <errno.h>
- #include <termios.h>
-+#include <stdlib.h>
-
- #include "fmt.h"
-
-+#undef TEST
-+#undef DEBUG
-+
- static struct utsname uts;
- static char hn[MAXHOSTNAMELEN + 6]="HOST=";
- static int hn_len=5;
-@@ -21,8 +25,12 @@
-
- static int noclear=0;
-
--void error(char *message,int exitcode) {
-+void whine(const char* message) {
- write(2,message,strlen(message));
-+}
-+
-+void error(char *message,int exitcode) {
-+ whine(message);
- exit(exitcode);
- }
-
-@@ -77,22 +85,26 @@
- struct sigaction sa;
- int fd;
- if (chown(tty,0,0) || chmod(tty,0600))
-- error("could not chown/chmod tty device\n",1);
-+ error("fgetty: could not chown/chmod tty device\n",1);
- sa.sa_handler=SIG_IGN;
- sa.sa_flags=0;
- sigemptyset(&sa.sa_mask);
- sigaction(SIGHUP,&sa,NULL);
- sa.sa_handler=sigquit_handler;
- sigaction(SIGQUIT,&sa,NULL);
-- if ((fd=open(tty, O_RDWR, 0))<0 || ioctl (fd, TIOCSCTTY, (void *)1)==-1)
-- error("could not open tty device\n",3);
-+ setsid();
-+ if ((fd=open(tty, O_RDWR, 0))<0)
-+ error("fgetty: could not open tty device\n",3);
- if (!isatty(fd))
-- error("\"not a typewriter\" ;-)\n",4);
-- if (vhangup()) /* linux specific */
-- error("vhangup failed\n",5);
-+ error("fgetty: \"not a typewriter\" ;-)\n",4);
-+ if (ioctl (fd, TIOCSCTTY, (void *)1)==0) {
-+ if (vhangup()) /* linux specific */
-+ error("fgetty: vhangup failed\n",5);
-+ } else
-+ whine("fgetty: warning: could not set controlling tty!\n");
- close(2); close(1); close(0); close(fd);
- if (open(tty,O_RDWR,0) != 0)
-- error("could not open tty\n",6);
-+ error("fgetty: could not open tty\n",6);
- if (dup(0) != 1 || dup(0) != 2)
- error("could not dup stdout and stderr\n",7);
- if (!noclear)
-@@ -211,7 +223,7 @@
- write(1," login: ",8);
- }
-
--static inline int isprint(char c) {
-+static inline int _isprint(char c) {
- return ((c>='A' && c<='Z') ||
- (c>='a' && c<='z') ||
- (c>='0' && c<='9') ||
-@@ -233,7 +245,7 @@
- if (*c == '\n' || *c == '\r') {
- *c=0;
- break;
-- } else if (!isprint(*c))
-+ } else if (!_isprint(*c))
- error("unprintable character in login name\n",10);
- else if (c-logname >= sizeof(logname)-1)
- error("login name too long\n",11);
-@@ -260,9 +272,20 @@
- int i;
- char hostname_end='.';
- tty=argv[1];
-+ if (!tty)
-+ error("usage: fgetty 1\n"
-+ " fgetty vc/1\n"
-+ " fgetty /dev/tty1\n",111);
- if (tty[0]=='/')
- strncpy(ttybuf,tty,15);
-- else
-+ else if (isdigit(tty[0])) {
-+ struct stat ss;
-+ /* try prepending /dev/vc/1 and /dev/tty1 */
-+ strcpy(ttybuf,"/dev/vc/"); strncpy(ttybuf+8,tty,3);
-+ if (stat(ttybuf,&ss) && errno==ENOENT) {
-+ ttybuf[5]=ttybuf[6]='t'; ttybuf[7]='y';
-+ }
-+ } else
- strncpy(ttybuf+5,tty,10);
- tty=ttybuf;
- strcpy(ttybuf2+4,ttybuf);

Generated by cgit