Hello community,
here is the log from the commit of package linuxrc
checked in at Mon Nov 6 22:22:45 CET 2006.
--------
--- linuxrc/linuxrc.changes 2006-10-24 17:08:04.000000000 +0200
+++ /mounts/work_src_done/STABLE/linuxrc/linuxrc.changes 2006-11-06 17:09:45.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Nov 6 17:09:42 CET 2006 - snwint@suse.de
+
+- more large file fixes
+- info file via network, first step
+
+-------------------------------------------------------------------
Old:
----
linuxrc-2.1.10.tar.bz2
New:
----
linuxrc-2.1.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.wRfytE/_old 2006-11-06 22:21:59.000000000 +0100
+++ /var/tmp/diff_new_pack.wRfytE/_new 2006-11-06 22:21:59.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package linuxrc (Version 2.1.10)
+# spec file for package linuxrc (Version 2.1.11)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -16,9 +16,9 @@
Group: System/Boot
Autoreqprov: on
Summary: SUSE Installation Program
-Version: 2.1.10
+Version: 2.1.11
Release: 1
-Source: linuxrc-2.1.10.tar.bz2
+Source: linuxrc-2.1.11.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -53,6 +53,9 @@
%doc linuxrc.html
%changelog -n linuxrc
+* Mon Nov 06 2006 - snwint@suse.de
+- more large file fixes
+- info file via network, first step
* Tue Oct 24 2006 - snwint@suse.de
- use stat64 when checking for files (#184448)
- info file can be on any local media (#56845)
++++++ linuxrc-2.1.10.tar.bz2 -> linuxrc-2.1.11.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.10/Changelog new/linuxrc-2.1.11/Changelog
--- old/linuxrc-2.1.10/Changelog 2006-10-24 17:00:31.000000000 +0200
+++ new/linuxrc-2.1.11/Changelog 2006-11-06 17:02:33.000000000 +0100
@@ -1,3 +1,7 @@
+6/11/2006: v2.1.11
+ - more large file fixes
+ - info file via network, first step
+
24/10/2006: v2.1.10
- use stat64 when checking for files (#184448)
- info file can be on any local media (#56845)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.10/VERSION new/linuxrc-2.1.11/VERSION
--- old/linuxrc-2.1.10/VERSION 2006-10-23 17:59:18.000000000 +0200
+++ new/linuxrc-2.1.11/VERSION 2006-11-06 16:27:32.000000000 +0100
@@ -1 +1 @@
-2.1.10
+2.1.11
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.10/fstype.c new/linuxrc-2.1.11/fstype.c
--- old/linuxrc-2.1.10/fstype.c 2006-03-21 15:25:54.000000000 +0100
+++ new/linuxrc-2.1.11/fstype.c 2006-11-06 16:47:29.000000000 +0100
@@ -30,6 +30,8 @@
*
*/
+#define _GNU_SOURCE /* stat64 */
+
#include
#include
#include
@@ -180,15 +182,15 @@
struct adfs_super_block adfssb;
struct sysv_super_block svsb;
#endif
- struct stat statbuf;
+ struct stat64 statbuf;
/* opening and reading an arbitrary unknown path can have
undesired side effects - first check that `device' refers
to a block device */
- if (stat (device, &statbuf) || !(S_ISBLK(statbuf.st_mode) || S_ISREG(statbuf.st_mode)))
+ if (stat64 (device, &statbuf) || !(S_ISBLK(statbuf.st_mode) || S_ISREG(statbuf.st_mode)))
return 0;
- fd = open(device, O_RDONLY);
+ fd = open(device, O_RDONLY | O_LARGEFILE);
if (fd < 0)
return 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.10/install.c new/linuxrc-2.1.11/install.c
--- old/linuxrc-2.1.10/install.c 2006-10-24 16:46:23.000000000 +0200
+++ new/linuxrc-2.1.11/install.c 2006-11-06 16:21:45.000000000 +0100
@@ -715,7 +715,7 @@
util_do_driver_updates();
strprintf(&buf, "%s%s", config.mountpoint.instdata, config.installdir);
- if(config.rescue || !util_is_dir(buf)) {
+ if(config.rescue || util_check_exist(buf) != 'd') {
strprintf(&buf, "%s%s",
config.mountpoint.instdata,
config.demo ? config.live.image : config.rescue ? config.rescueimage : config.rootimage
@@ -724,7 +724,7 @@
if(
(config.rescue || force_ri_ig || !util_is_mountable(buf)) &&
- !util_is_dir(buf)
+ util_check_exist(buf) != 'd'
) {
config.use_ramdisk = 1;
}
@@ -821,7 +821,7 @@
}
}
}
- else if(!util_is_dir(inst_rootimage_tm)) {
+ else if(util_check_exist(inst_rootimage_tm) != 'd') {
rc = util_mount_ro(inst_rootimage_tm, config.mountpoint.instsys);
if(rc) return rc;
str_copy(&config.instsys, config.mountpoint.instsys);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.10/util.c new/linuxrc-2.1.11/util.c
--- old/linuxrc-2.1.10/util.c 2006-10-24 16:51:56.000000000 +0200
+++ new/linuxrc-2.1.11/util.c 2006-11-06 17:00:48.000000000 +0100
@@ -2334,7 +2334,7 @@
char *src;
int i;
char buf[0x100], c, *s, *t;
- struct stat sbuf;
+ struct stat64 sbuf;
struct dirent *de;
DIR *d;
@@ -2360,7 +2360,7 @@
while((de = readdir(d))) {
if(full) {
sprintf(buf, "%s/%s", src, de->d_name);
- i = lstat(buf, &sbuf);
+ i = lstat64(buf, &sbuf);
if(i) {
printf("????????? %s\n", de->d_name);
}
@@ -2407,12 +2407,12 @@
s += 4; s[12] = 0;
}
- printf("%s %4d %-8d %-8d %8ld %s %s",
+ printf("%s %4d %-8d %-8d %8lld %s %s",
buf,
(int) sbuf.st_nlink,
(int) sbuf.st_uid,
(int) sbuf.st_gid,
- (long) sbuf.st_size,
+ (long long) sbuf.st_size,
s,
de->d_name
);
@@ -3563,14 +3563,14 @@
int fd, rc, i, device;
static char buf[32];
- if((fd = open(file, ro ? O_RDONLY : O_RDWR)) < 0) {
+ if((fd = open(file, (ro ? O_RDONLY : O_RDWR) | O_LARGEFILE)) < 0) {
perror(file);
return NULL;
}
for(i = 0; i < 8; i++) {
sprintf(buf, "/dev/loop%d", i);
- if((device = open(buf, ro ? O_RDONLY : O_RDWR)) >= 0) {
+ if((device = open(buf, (ro ? O_RDONLY : O_RDWR) | O_LARGEFILE)) >= 0) {
memset(&loopinfo, 0, sizeof loopinfo);
strcpy(loopinfo.lo_name, file);
rc = ioctl(device, LOOP_SET_FD, fd);
@@ -3590,7 +3590,7 @@
{
int i, fd;
- if((fd = open(dev, O_RDONLY)) < 0) {
+ if((fd = open(dev, O_RDONLY | O_LARGEFILE)) < 0) {
if(config.debug) perror(dev);
return -1;
}
@@ -3609,15 +3609,15 @@
{
char *type, *loop_dev;
int err = -1;
- struct stat sbuf;
+ struct stat64 sbuf;
if(!dev || !dir) return -1;
- if(strstr(dir, "/mounts/") == dir && stat(dir, &sbuf)) {
+ if(strstr(dir, "/mounts/") == dir && stat64(dir, &sbuf)) {
mkdir(dir, 0755);
}
- if(stat(dev, &sbuf)) {
+ if(stat64(dev, &sbuf)) {
fprintf(stderr, "mount: %s: %s\n", dev, strerror(errno));
return -1;
}
@@ -3831,16 +3831,6 @@
}
-int util_is_dir(char *dir)
-{
- struct stat sbuf;
-
- if(stat(dir, &sbuf)) return 0;
-
- return S_ISDIR(sbuf.st_mode) ? 1 : 0;
-}
-
-
int util_is_mountable(char *file)
{
int i, compressed = 0;
@@ -4661,12 +4651,14 @@
int get_url(char *src_url, char *dst)
{
url_t *url;
- int err = 1, i;
+ int err = 1, i, j, win_old, fd_in, fd_out;
hd_data_t *hd_data;
hd_t *hd;
char *dir = NULL;
+ char buf[0x1000];
hd_hw_item_t hw_item;
char *dev, *module, *type;
+ instmode_t instmode_save;
if(!src_url || !dst) return err;
@@ -4756,6 +4748,72 @@
}
break;
+ case inst_ftp:
+ case inst_tftp:
+ case inst_http:
+ case inst_nfs:
+ case inst_smb:
+ if(config.net.configured == nc_none) {
+ if((net_config_mask() & 3) == 3) { /* we have ip & netmask */
+ config.net.configured = nc_static;
+ /* looks a bit weird, but we need it here for net_activate_ns() */
+ if(!config.net.device) {
+ util_update_netdevice_list(NULL, 1);
+ if(config.net.devices) str_copy(&config.net.device, config.net.devices->key);
+ }
+ if(net_activate_ns()) {
+ fprintf(stderr, "%s: net activation failed\n", config.net.device);
+ config.net.configured = nc_none;
+ }
+ }
+
+ if(config.net.configured == nc_none) {
+ if(!(win_old = config.win)) util_disp_init();
+ net_config();
+ if(!win_old) util_disp_done();
+ }
+ }
+
+ if(config.net.configured == nc_none) {
+ fprintf(stderr, "no configured network interface\n");
+ break;
+ }
+
+ fprintf(stderr, "using %s\n", config.net.device);
+
+ instmode_save = config.instmode;
+
+ config.instmode = url->scheme;
+
+ str_copy(&dir, url->dir ?: "");
+ fd_in = net_open(dir);
+ if(fd_in >= 0) {
+ fprintf(stderr, "net_open: \"%s\" ok\n", dir);
+ fd_out = open("/xxx.tmp", O_WRONLY | O_CREAT | O_TRUNC, 0644);
+ if(fd_out >= 0) {
+ do {
+ i = net_read(fd_in, buf, sizeof buf);
+ j = 0;
+ if(i > 0) j = write(fd_out, buf, i);
+ }
+ while(i > 0 && j > 0);
+ close(fd_out);
+ if(!(i < 0 || j < 0)) {
+ unlink(dst);
+ rename("/xxx.tmp", dst);
+ err = 0;
+ }
+ }
+ net_close(fd_in);
+ }
+ else {
+ fprintf(stderr, "net_open: \"%s\": %s\n", dir, config.net.error);
+ }
+
+ config.instmode = instmode_save;
+
+ break;
+
default:
break;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-2.1.10/util.h new/linuxrc-2.1.11/util.h
--- old/linuxrc-2.1.10/util.h 2006-10-23 17:40:21.000000000 +0200
+++ new/linuxrc-2.1.11/util.h 2006-11-06 16:22:00.000000000 +0100
@@ -113,7 +113,6 @@
int util_update_disk_list(char *module, int add);
void util_update_cdrom_list(void);
void util_update_swap_list(void);
-int util_is_dir(char *dir);
int util_is_mountable(char *file);
void util_debugwait(char *msg);
void util_set_serial_console(char *str);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org