- *
+ *
* Total length is padded to multiple of 512bytes. All reserved bytes should be zero when
* written, ignored on read.
*/
@@ -323,7 +321,7 @@
/**
* Create a new entry
- *
+ *
* @param plainRoutingKey
* @param header
* @param data
@@ -446,7 +444,7 @@
/**
* Verify and decrypt this entry
- *
+ *
* @param routingKey
* @return true if the routeKey match and the entry is decrypted.
*/
@@ -533,7 +531,7 @@
/**
* Open all store files
- *
+ *
* @param baseDir
* @param name
* @throws IOException
@@ -572,7 +570,7 @@
/**
* Read entry from disk.
- *
+ *
* Before calling this function, you should acquire all required locks.
*/
private Entry readEntry(long offset, byte[] routingKey) throws IOException {
@@ -601,7 +599,7 @@
/**
* Write entry to disk.
- *
+ *
* Before calling this function, you should:
*
*
acquire all required locks
@@ -620,13 +618,13 @@
if (status == -1)
throw new EOFException();
} while (bf.hasRemaining());
-
+
entry.curOffset = offset;
}
/**
* Free an entry by zeroing the header
- *
+ *
* @param offset
* @throws IOException
*/
@@ -634,7 +632,7 @@
int split = (int) (offset % FILE_SPLIT);
long rawOffset = (offset / FILE_SPLIT) * entryTotalLength;
- ByteBuffer bf = ByteBuffer.allocate((int) 0x200); // 512 bytes, one physical disk block
+ ByteBuffer bf = ByteBuffer.allocate(0x200); // 512 bytes, one physical disk block
do {
int status = storeFC[split].write(bf, rawOffset + bf.position());
if (status == -1)
@@ -649,7 +647,7 @@
int split = (int) (offset % FILE_SPLIT);
long rawOffset = (offset / FILE_SPLIT) * entryTotalLength + 0x38;
- ByteBuffer bf = ByteBuffer.allocate((int) 0x8);
+ ByteBuffer bf = ByteBuffer.allocate(0x8);
do {
int status = storeFC[split].read(bf, rawOffset + bf.position());
@@ -662,7 +660,7 @@
/**
* Check if a block is free
- *
+ *
* @param offset
* @throws IOException
*/
@@ -670,7 +668,7 @@
int split = (int) (offset % FILE_SPLIT);
long rawOffset = (offset / FILE_SPLIT) * entryTotalLength + 0x30;
- ByteBuffer bf = ByteBuffer.allocate((int) 0x8);
+ ByteBuffer bf = ByteBuffer.allocate(0x8);
do {
int status = storeFC[split].read(bf, rawOffset + bf.position());
@@ -694,7 +692,7 @@
/**
* Change on disk store file size
- *
+ *
* @param storeFileSize
*/
private void setStoreFileSize(long storeFileSize) {
@@ -710,7 +708,7 @@
// ------------- Configuration
/**
* Configuration File
- *
+ *
*
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* |0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|
@@ -791,7 +789,7 @@
setDaemon(true);
}
- public void run() {
+ public void run() {
while (!shutdown) {
synchronized (cleanerLock) {
if (prevStoreSize != 0)
@@ -912,7 +910,7 @@
if (shutdown)
return;
- if (!lockEntry(offset)) //lock
+ if (!lockEntry(offset)) //lock
continue LOOP_ENTRIES;
try {
if (isFree(offset)) {
@@ -939,7 +937,7 @@
// Check if I can keep my current offset
for (int i = 0; i < newOffset.length; i++) {
- if (newOffset[i] == offset) { // lucky!
+ if (newOffset[i] == offset) { // lucky!
writeEntry(entry, offset); // write back entry storeSize
resolvedEntries++;
@@ -1038,7 +1036,7 @@
/**
* Put back oldItems with best effort
- *
+ *
* @throws IOException
*/
private void putBackOldItems(FileChannel oldItems) throws IOException {
@@ -1147,7 +1145,7 @@
unlockGlobal();
}
}
-
+
// ------------- Locking
private boolean shutdown = false;
private boolean lockedGlobal = false;
@@ -1156,7 +1154,7 @@
/**
* Lock the entry
- *
+ *
* This lock is not reentrance. No threads except Cleaner should hold more then
* one lock at a time (or deadlock may occur).
*/
@@ -1205,9 +1203,9 @@
/**
* Lock all entries.
- *
+ *
* Use this method to stop all read / write before database shutdown.
- *
+ *
* @param timeout
* the maximum time to wait in milliseconds.
*/
@@ -1274,7 +1272,7 @@
/**
* Get hashed routing key
- *
+ *
* @param routingKey
* @return
*/
@@ -1296,7 +1294,7 @@
/**
* Get offset in the hash table, given a plain routing key.
- *
+ *
* @param plainKey
* @param storeSize
* @return
@@ -1307,7 +1305,7 @@
/**
* Get offset in the hash table, given a digested routing key.
- *
+ *
* @param digestedKey
* @param storeSize
* @return
@@ -1315,12 +1313,12 @@
public long[] getOffsetFromDigestedKey(byte[] digestedKey, long storeSize) {
long keyValue = Fields.bytesToLong(digestedKey);
long[] offsets = new long[OPTION_MAX_PROBE];
-
+
for (int i = 0 ; i < OPTION_MAX_PROBE ; i++) {
// h + 141 i^2 + 13 i
offsets[i] = ((keyValue + 141 * (i * i) + 13 * i) & Long.MAX_VALUE) % storeSize;
}
-
+
return offsets;
}
@@ -1370,7 +1368,7 @@
writes++;
}
}
-
+
private void incKeyCount() {
synchronized (statLock) {
keyCount++;
@@ -1406,7 +1404,7 @@
RandomAccessFile storeRAF = new RandomAccessFile(storeFile, "r");
RandomAccessFile keyRAF = keyFile.exists() ? new RandomAccessFile(keyFile, "r") : null;
-
+
byte[] header = new byte[headerBlockLength];
byte[] data = new byte[dataBlockLength];
byte[] key = new byte[fullKeyLength];
@@ -1415,7 +1413,7 @@
for (int l = 0; true; l++) {
if (l % 1024 == 0)
System.out.println(" key " + l + "/" + maxKey);
-
+
boolean keyRead = false;
storeRAF.readFully(header);
storeRAF.readFully(data);
@@ -1426,7 +1424,7 @@
}
} catch (IOException e) {
}
-
+
try {
StorableBlock b = callback.construct(data, header, null, keyRead ? key : null);
put(b, b.getRoutingKey(), b.getFullKey(), data, header, true);
From j16sdiz at freenetproject.org Mon Jun 2 13:58:19 2008
From: j16sdiz at freenetproject.org (j16sdiz at freenetproject.org)
Date: Mon, 2 Jun 2008 13:58:19 +0000 (UTC)
Subject: [freenet-cvs] r20181 -
branches/saltedhashstore/freenet/src/freenet/store
Message-ID: <20080602135819.548C247956B@freenetproject.org>
Author: j16sdiz
Date: 2008-06-02 13:58:19 +0000 (Mon, 02 Jun 2008)
New Revision: 20181
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
use java.util.concurrent.locks.*
Modified: branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-02 13:57:55 UTC (rev 20180)
+++ branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-02 13:58:19 UTC (rev 20181)
@@ -15,6 +15,12 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
import freenet.crypt.BlockCipher;
import freenet.crypt.PCFBMode;
@@ -107,6 +113,8 @@
if (logMINOR)
Logger.minor(this, "Fetch " + HexUtil.bytesToHex(routingKey) + " for " + callback);
+ configLock.readLock().lock();
+ try {
Entry entry = probeEntry(routingKey);
if (entry == null) {
@@ -127,6 +135,9 @@
incMisses();
return null;
}
+ } finally {
+ configLock.readLock().unlock();
+ }
}
/**
@@ -185,6 +196,8 @@
if (logMINOR)
Logger.minor(this, "Putting " + HexUtil.bytesToHex(routingKey) + " for " + callback);
+ configLock.readLock().lock();
+ try {
// don't use fetch(), as fetch() would do a miss++/hit++
Entry oldEntry = probeEntry(routingKey);
if (oldEntry != null) {
@@ -256,6 +269,9 @@
} finally {
unlockEntry(offset[0]);
}
+ } finally {
+ configLock.readLock().unlock();
+ }
}
// ------------- Entry I/O
@@ -757,6 +773,8 @@
* Write config file
*/
private void writeConfigFile() throws IOException {
+ configLock.writeLock().lock();
+ try {
File tempConfig = new File(configFile.getPath() + ".tmp");
RandomAccessFile raf = new RandomAccessFile(tempConfig, "rw");
raf.seek(0);
@@ -770,6 +788,9 @@
raf.close();
FileUtil.renameTo(tempConfig, configFile);
+ } finally {
+ configLock.writeLock().unlock();
+ }
}
// ------------- Store resizing
@@ -789,11 +810,17 @@
setDaemon(true);
}
+ @Override
public void run() {
while (!shutdown) {
synchronized (cleanerLock) {
+ configLock.readLock().lock();
+ try {
if (prevStoreSize != 0)
resizeStore();
+ } finally {
+ configLock.readLock().unlock();
+ }
cleanerLock.notifyAll();
try {
@@ -1094,19 +1121,6 @@
bf.flip();
return new Entry(bf);
}
-
- /**
- * Samples to take on key count estimation
- */
- private static final double SAMPLE_RATE = 0.05; // 5%
- /**
- * Minimum samples to take on key count estimation
- */
- private static final int MIN_SAMPLE = 10000;
- /**
- * Last sample position
- */
- private long samplePos = 0;
}
public void setMaxKeys(long newStoreSize, boolean shrinkNow) throws IOException {
@@ -1115,7 +1129,8 @@
assert newStoreSize > 0;
// TODO assert newStoreSize > (141 * (3 * 3) + 13 * 3) * 2; // store size too small
- synchronized (cleanerLock) {
+ configLock.writeLock().lock();
+ try {
if (newStoreSize == this.storeSize)
return;
@@ -1131,49 +1146,56 @@
prevStoreSize = storeSize;
storeSize = newStoreSize;
writeConfigFile();
+ synchronized (cleanerLock) {
cleanerLock.notifyAll();
+ }
if (shrinkNow) {
// TODO shrink now
}
+ } finally {
+ configLock.writeLock().unlock();
}
}
public void setBloomSync(boolean sync) {
- if (lockGlobal(Integer.MAX_VALUE)) {
+ configLock.writeLock().lock();
this.syncBloom = sync;
- unlockGlobal();
- }
+ configLock.writeLock().unlock();
}
// ------------- Locking
private boolean shutdown = false;
- private boolean lockedGlobal = false;
- private int lockingGlobal = 0;
- private Map lockMap = new HashMap();
+ private ReadWriteLock configLock = new ReentrantReadWriteLock();
+ private Lock entryLock = new ReentrantLock();
+ private Map lockMap = new HashMap ();
/**
* Lock the entry
*
- * This lock is not reentrance. No threads except Cleaner should hold more then
- * one lock at a time (or deadlock may occur).
+ * This lock is not re-entrance. No threads except Cleaner should hold more
+ * then one lock at a time (or deadlock may occur).
*/
private boolean lockEntry(long offset) {
if (logDEBUG && logLOCK)
Logger.debug(this, "try locking " + offset, new Exception());
- Long lxr = new Long(offset);
-
try {
- synchronized (lockMap) {
- while (lockMap.containsKey(lxr) || lockedGlobal || lockingGlobal != 0) { // while someone hold the lock
+ entryLock.lock();
+ try {
+ do {
if (shutdown)
return false;
- lockMap.wait();
- }
-
- lockMap.put(lxr, Thread.currentThread());
+ Condition lockCond = lockMap.get(offset);
+ if (lockCond != null)
+ lockCond.await(10, TimeUnit.SECONDS); // 10s for checking shutdown
+ else
+ break;
+ } while (true);
+ lockMap.put(offset, entryLock.newCondition());
+ } finally {
+ entryLock.unlock();
}
} catch (InterruptedException e) {
Logger.error(this, "lock interrupted", e);
@@ -1191,57 +1213,16 @@
private void unlockEntry(long offset) {
if (logDEBUG && logLOCK)
Logger.debug(this, "unlocking " + offset);
- Long lxr = new Long(offset);
- synchronized (lockMap) {
- Object o = lockMap.remove(lxr);
- assert o == Thread.currentThread();
-
- lockMap.notifyAll();
- }
- }
-
- /**
- * Lock all entries.
- *
- * Use this method to stop all read / write before database shutdown.
- *
- * @param timeout
- * the maximum time to wait in milliseconds.
- */
- private boolean lockGlobal(long timeout) {
- synchronized (lockMap) {
+ entryLock.lock();
try {
- long startTime = System.currentTimeMillis();
- lockingGlobal++;
-
- while (!lockMap.isEmpty() || lockedGlobal) {
- lockMap.wait(timeout);
-
- if (System.currentTimeMillis() - startTime > timeout)
- return false;
- }
-
- lockedGlobal = true;
- return true;
- } catch (InterruptedException e) {
- return false;
+ Condition cond = lockMap.remove(offset);
+ cond.signal();
} finally {
- lockingGlobal--;
- }
+ entryLock.unlock();
}
}
- /**
- * Unlock the global lock
- */
- private void unlockGlobal() {
- synchronized (lockMap) {
- lockedGlobal = false;
- lockMap.notifyAll();
- }
- }
-
public class ShutdownDB implements Runnable {
public void run() {
shutdown = true;
@@ -1250,8 +1231,8 @@
cleanerLock.notifyAll();
}
- lockGlobal(10 * 1000); // 10 seconds
-
+ configLock.writeLock().lock();
+ try {
cleanerThread.interrupt();
flushAndClose();
@@ -1261,6 +1242,9 @@
} catch (IOException e) {
Logger.error(this, "error writing store config", e);
}
+ } finally {
+ configLock.writeLock().unlock();
+ }
}
}
From j16sdiz at freenetproject.org Mon Jun 2 13:58:46 2008
From: j16sdiz at freenetproject.org (j16sdiz at freenetproject.org)
Date: Mon, 2 Jun 2008 13:58:46 +0000 (UTC)
Subject: [freenet-cvs] r20182 -
branches/saltedhashstore/freenet/src/freenet/store
Message-ID: <20080602135846.941EC47956B@freenetproject.org>
Author: j16sdiz
Date: 2008-06-02 13:58:46 +0000 (Mon, 02 Jun 2008)
New Revision: 20182
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
indent
Modified: branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-02 13:58:19 UTC (rev 20181)
+++ branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-02 13:58:46 UTC (rev 20182)
@@ -115,26 +115,26 @@
configLock.readLock().lock();
try {
- Entry entry = probeEntry(routingKey);
+ Entry entry = probeEntry(routingKey);
- if (entry == null) {
- incMisses();
- return null;
- }
+ if (entry == null) {
+ incMisses();
+ return null;
+ }
- unlockEntry(entry.curOffset);
+ unlockEntry(entry.curOffset);
- try {
- StorableBlock block = entry.getStorableBlock(routingKey, fullKey);
- incHits();
- if (updateBloom && !checkBloom)
- bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), false);
- return block;
- } catch (KeyVerifyException e) {
- Logger.minor(this, "key verification exception", e);
- incMisses();
- return null;
- }
+ try {
+ StorableBlock block = entry.getStorableBlock(routingKey, fullKey);
+ incHits();
+ if (updateBloom && !checkBloom)
+ bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), false);
+ return block;
+ } catch (KeyVerifyException e) {
+ Logger.minor(this, "key verification exception", e);
+ incMisses();
+ return null;
+ }
} finally {
configLock.readLock().unlock();
}
@@ -198,78 +198,78 @@
configLock.readLock().lock();
try {
- // don't use fetch(), as fetch() would do a miss++/hit++
- Entry oldEntry = probeEntry(routingKey);
- if (oldEntry != null) {
- long oldOffset = oldEntry.curOffset;
- try {
+ // don't use fetch(), as fetch() would do a miss++/hit++
+ Entry oldEntry = probeEntry(routingKey);
+ if (oldEntry != null) {
+ long oldOffset = oldEntry.curOffset;
try {
- StorableBlock oldBlock = oldEntry.getStorableBlock(routingKey, fullKey);
- if (!collisionPossible)
+ try {
+ StorableBlock oldBlock = oldEntry.getStorableBlock(routingKey, fullKey);
+ if (!collisionPossible)
+ return;
+ if (block.equals(oldBlock)) {
+ return; // already in store
+ } else {
+ if (!overwrite)
+ throw new KeyCollisionException();
+ }
+ } catch (KeyVerifyException e) {
+ // ignore
+ }
+
+ // Overwrite old offset
+ if (updateBloom)
+ bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
+ Entry entry = new Entry(routingKey, header, data);
+ writeEntry(entry, oldOffset);
+ incWrites();
+ return;
+ } finally {
+ unlockEntry(oldOffset);
+ }
+ }
+
+ Entry entry = new Entry(routingKey, header, data);
+ long[] offset = entry.getOffset();
+
+ for (int i = 0; i < offset.length; i++) {
+ if (!lockEntry(offset[i])) {
+ Logger.error(this, "can't lock entry: " + offset[i]);
+ return;
+ }
+ try {
+ if (isFree(offset[i])) {
+ // write to free block
+ if (logDEBUG)
+ Logger.debug(this, "probing, write to i=" + i + ", offset=" + offset[i]);
+ if (updateBloom)
+ bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
+ writeEntry(entry, offset[i]);
+ incWrites();
+ incKeyCount();
return;
- if (block.equals(oldBlock)) {
- return; // already in store
- } else {
- if (!overwrite)
- throw new KeyCollisionException();
}
- } catch (KeyVerifyException e) {
- // ignore
+ } finally {
+ unlockEntry(offset[i]);
}
-
- // Overwrite old offset
- if (updateBloom)
- bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
- Entry entry = new Entry(routingKey, header, data);
- writeEntry(entry, oldOffset);
- incWrites();
- return;
- } finally {
- unlockEntry(oldOffset);
}
- }
- Entry entry = new Entry(routingKey, header, data);
- long[] offset = entry.getOffset();
-
- for (int i = 0; i < offset.length; i++) {
- if (!lockEntry(offset[i])) {
- Logger.error(this, "can't lock entry: " + offset[i]);
+ // no free blocks, overwrite the first one
+ if (!lockEntry(offset[0])) {
+ Logger.error(this, "can't lock entry: " + offset[0]);
return;
}
try {
- if (isFree(offset[i])) {
- // write to free block
- if (logDEBUG)
- Logger.debug(this, "probing, write to i=" + i + ", offset=" + offset[i]);
- if (updateBloom)
- bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
- writeEntry(entry, offset[i]);
- incWrites();
- incKeyCount();
- return;
- }
+ if (logDEBUG)
+ Logger.debug(this, "collision, write to i=0, offset=" + offset[0]);
+ if (updateBloom)
+ bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
+ writeEntry(entry, offset[0]);
+ incWrites();
} finally {
- unlockEntry(offset[i]);
+ unlockEntry(offset[0]);
}
- }
-
- // no free blocks, overwrite the first one
- if (!lockEntry(offset[0])) {
- Logger.error(this, "can't lock entry: " + offset[0]);
- return;
- }
- try {
- if (logDEBUG)
- Logger.debug(this, "collision, write to i=0, offset=" + offset[0]);
- if (updateBloom)
- bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
- writeEntry(entry, offset[0]);
- incWrites();
} finally {
- unlockEntry(offset[0]);
- }
- } finally {
configLock.readLock().unlock();
}
}
@@ -775,19 +775,19 @@
private void writeConfigFile() throws IOException {
configLock.writeLock().lock();
try {
- File tempConfig = new File(configFile.getPath() + ".tmp");
- RandomAccessFile raf = new RandomAccessFile(tempConfig, "rw");
- raf.seek(0);
- raf.write(salt);
+ File tempConfig = new File(configFile.getPath() + ".tmp");
+ RandomAccessFile raf = new RandomAccessFile(tempConfig, "rw");
+ raf.seek(0);
+ raf.write(salt);
- raf.writeLong(storeSize);
- raf.writeLong(prevStoreSize);
- raf.writeLong(keyCount);
- raf.writeLong(0);
+ raf.writeLong(storeSize);
+ raf.writeLong(prevStoreSize);
+ raf.writeLong(keyCount);
+ raf.writeLong(0);
- raf.close();
+ raf.close();
- FileUtil.renameTo(tempConfig, configFile);
+ FileUtil.renameTo(tempConfig, configFile);
} finally {
configLock.writeLock().unlock();
}
@@ -816,8 +816,8 @@
synchronized (cleanerLock) {
configLock.readLock().lock();
try {
- if (prevStoreSize != 0)
- resizeStore();
+ if (prevStoreSize != 0)
+ resizeStore();
} finally {
configLock.readLock().unlock();
}
@@ -1147,7 +1147,7 @@
storeSize = newStoreSize;
writeConfigFile();
synchronized (cleanerLock) {
- cleanerLock.notifyAll();
+ cleanerLock.notifyAll();
}
if (shrinkNow) {
@@ -1160,7 +1160,7 @@
public void setBloomSync(boolean sync) {
configLock.writeLock().lock();
- this.syncBloom = sync;
+ this.syncBloom = sync;
configLock.writeLock().unlock();
}
@@ -1172,7 +1172,7 @@
/**
* Lock the entry
- *
+ *
* This lock is not re-entrance. No threads except Cleaner should hold more
* then one lock at a time (or deadlock may occur).
*/
@@ -1215,10 +1215,10 @@
Logger.debug(this, "unlocking " + offset);
entryLock.lock();
- try {
+ try {
Condition cond = lockMap.remove(offset);
cond.signal();
- } finally {
+ } finally {
entryLock.unlock();
}
}
@@ -1233,15 +1233,15 @@
configLock.writeLock().lock();
try {
- cleanerThread.interrupt();
+ cleanerThread.interrupt();
- flushAndClose();
+ flushAndClose();
- try {
- writeConfigFile();
- } catch (IOException e) {
- Logger.error(this, "error writing store config", e);
- }
+ try {
+ writeConfigFile();
+ } catch (IOException e) {
+ Logger.error(this, "error writing store config", e);
+ }
} finally {
configLock.writeLock().unlock();
}
From nextgens at freenetproject.org Mon Jun 2 14:06:17 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Mon, 2 Jun 2008 14:06:17 +0000 (UTC)
Subject: [freenet-cvs] r20183 - in trunk/apps/new_installer: res/unix/bin
scripts
Message-ID: <20080602140617.E8D8947960B@freenetproject.org>
Author: nextgens
Date: 2008-06-02 14:06:17 +0000 (Mon, 02 Jun 2008)
New Revision: 20183
Modified:
trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
trunk/apps/new_installer/scripts/1run.sh
Log:
new_installer: a thought for idiots who don't have a loopback interface configured
Modified: trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh 2008-06-02 13:58:46 UTC (rev 20182)
+++ trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh 2008-06-02 14:06:17 UTC (rev 20183)
@@ -15,7 +15,16 @@
if test $? -ne 0
then
FPROXY_PORT=9999
- echo "Can not bind fproxy to 8889: force it to $FPROXY_PORT instead."
+ java -jar bin/bindtest.jar $FPROXY_PORT
+ if test $? -ne 0
+ then
+ echo "Can not bind any socket on 127.0.0.1:"
+ echo " IT SHOULDN'T HAPPEN\!"
+ echo ""
+ echo "Make sure your loopback interface is properly configured. Delete Freenet\'s directory and retry."
+ touch .isInstalled
+ exit 1
+ fi
fi
cat bin/browse.sh | sed "s/8888/$FPROXY_PORT/g" > browse.sh
Modified: trunk/apps/new_installer/scripts/1run.sh
===================================================================
--- trunk/apps/new_installer/scripts/1run.sh 2008-06-02 13:58:46 UTC (rev 20182)
+++ trunk/apps/new_installer/scripts/1run.sh 2008-06-02 14:06:17 UTC (rev 20183)
@@ -39,7 +39,16 @@
if test $? -ne 0
then
FPROXY_PORT=9999
- echo "Can not bind fproxy to 8889: force it to $FPROXY_PORT instead."
+ java -jar bin/bindtest.jar $FPROXY_PORT
+ if test $? -ne 0
+ then
+ echo "Can not bind any socket on 127.0.0.1:"
+ echo " IT SHOULDN'T HAPPEN\!"
+ echo ""
+ echo "Make sure your loopback interface is properly configured. Delete Freenet\'s directory and retry."
+ touch .isInstalled
+ exit 1
+ fi
fi
cat welcome.html | sed "s/8888/$FPROXY_PORT/g" >welcome2.html
mv welcome2.html welcome.html
From nextgens at freenetproject.org Mon Jun 2 14:40:36 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Mon, 2 Jun 2008 14:40:36 +0000 (UTC)
Subject: [freenet-cvs] r20184 - in trunk/apps/new_installer: . res/unix/bin
res/windows/bin
Message-ID: <20080602144036.9B0074795F3@freenetproject.org>
Author: nextgens
Date: 2008-06-02 14:40:36 +0000 (Mon, 02 Jun 2008)
New Revision: 20184
Removed:
trunk/apps/new_installer/res/unix/bin/install_frost.sh
trunk/apps/new_installer/res/unix/bin/install_jSite.sh
trunk/apps/new_installer/res/unix/bin/install_thaw.sh
trunk/apps/new_installer/res/unix/bin/install_thingamablog.sh
trunk/apps/new_installer/res/windows/bin/install_frost.cmd
trunk/apps/new_installer/res/windows/bin/install_jsite.cmd
trunk/apps/new_installer/res/windows/bin/install_thaw.cmd
trunk/apps/new_installer/res/windows/bin/install_thingamablog.cmd
Modified:
trunk/apps/new_installer/ProcessPanel.Spec.xml
trunk/apps/new_installer/Unix_shortcutSpec.xml
trunk/apps/new_installer/Win_shortcutSpec.xml
trunk/apps/new_installer/install.xml
Log:
new_installer: unbundle all 3rd party apps
Modified: trunk/apps/new_installer/ProcessPanel.Spec.xml
===================================================================
--- trunk/apps/new_installer/ProcessPanel.Spec.xml 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/ProcessPanel.Spec.xml 2008-06-02 14:40:36 UTC (rev 20184)
@@ -102,44 +102,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Modified: trunk/apps/new_installer/Unix_shortcutSpec.xml
===================================================================
--- trunk/apps/new_installer/Unix_shortcutSpec.xml 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/Unix_shortcutSpec.xml 2008-06-02 14:40:36 UTC (rev 20184)
@@ -109,70 +109,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Modified: trunk/apps/new_installer/Win_shortcutSpec.xml
===================================================================
--- trunk/apps/new_installer/Win_shortcutSpec.xml 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/Win_shortcutSpec.xml 2008-06-02 14:40:36 UTC (rev 20184)
@@ -38,63 +38,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A set of 3rd party tools for freenet
-
-
-
- A tool to upload websites to freenet
-
-
-
-
- Thingamablog is a cross-platform, standalone blogging application that makes authoring and publishing your flogs (freenet blogs) almost effortless.
-
-
-
-
-
-
- A powerful filesharing tool designed for freenet
-
-
-
-
Deleted: trunk/apps/new_installer/res/unix/bin/install_frost.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/install_frost.sh 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/unix/bin/install_frost.sh 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-. "$HOME/_install_toSource.sh"|| exit 0
-cd "$INSTALL_PATH"
-
-if test -e frost.install
-then
- rm -f frost.install
- if test ! -e offline
- then
- echo "Downloading frost"
- java $JOPTS -jar bin/sha1test.jar frost.zip ./ >/dev/null 2>&1 || exit 1
- fi
- echo "Unzipping frost"
- mkdir frost
- java $JOPTS -jar bin/uncompress.jar frost.zip frost "$CAFILE" >/dev/null 2>&1
-fi
Deleted: trunk/apps/new_installer/res/unix/bin/install_jSite.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/install_jSite.sh 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/unix/bin/install_jSite.sh 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-. "$HOME/_install_toSource.sh"|| exit 0
-cd "$INSTALL_PATH"
-
-if test -e jsite.install
-then
- rm -f jsite.install
- if test ! -e offline
- then
- echo "Downloading jSite"
- mkdir jSite
- java $JOPTS -jar bin/sha1test.jar jSite.jar jSite "$CAFILE" >/dev/null 2>&1 || exit 1
- fi
-fi
Deleted: trunk/apps/new_installer/res/unix/bin/install_thaw.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/install_thaw.sh 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/unix/bin/install_thaw.sh 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-. "$HOME/_install_toSource.sh"|| exit 0
-cd "$INSTALL_PATH"
-
-if test -e thaw.install
-then
- rm -f thaw.install
- if test ! -e offline
- then
- echo "Downloading Thaw"
- mkdir Thaw
- java $JOPTS -jar bin/sha1test.jar Thaw.jar Thaw "$CAFILE" >/dev/null 2>&1 || exit 1
- fi
-fi
Deleted: trunk/apps/new_installer/res/unix/bin/install_thingamablog.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/install_thingamablog.sh 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/unix/bin/install_thingamablog.sh 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-. "$HOME/_install_toSource.sh"|| exit 0
-cd "$INSTALL_PATH"
-
-if test -e thingamablog.install
-then
- rm -f thingamablog.install
- if test ! -e offline
- then
- echo "Downloading thingamablog"
- java $JOPTS -jar bin/sha1test.jar thingamablog.zip ./ "$CAFILE" >/dev/null 2>&1 || exit 1
- fi
- echo "Unzipping thingamablog"
- java $JOPTS -jar bin/uncompress.jar thingamablog.zip . >/dev/null 2>&1
-fi
Deleted: trunk/apps/new_installer/res/windows/bin/install_frost.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_frost.cmd 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/windows/bin/install_frost.cmd 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,18 +0,0 @@
- at set PATH=%SYSTEMROOT%\System32\;%PATH%
- at set INSTALL_PATH=$INSTALL_PATH
- at set JAVA_HOME=$JAVA_HOME
- at set CAFILE=startssl.pem
- at cd /D %INSTALL_PATH%
- at if exist .isInstalled goto end
-
- at if not exist frost.install goto nofrost
- at del /F frost.install > NUL
- at if exist offline goto end
- at echo Downloading Frost
- at java -jar bin\sha1test.jar frost.zip . %CAFILE% > NUL
-:end
- at echo Setting Frost up
- at mkdir frost
- at java -jar bin\uncompress.jar frost.zip frost > NUL
-:nofrost
-:end
Deleted: trunk/apps/new_installer/res/windows/bin/install_jsite.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_jsite.cmd 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/windows/bin/install_jsite.cmd 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,18 +0,0 @@
- at set PATH=%SYSTEMROOT%\System32\;%PATH%
- at set INSTALL_PATH=$INSTALL_PATH
- at set JAVA_HOME=$JAVA_HOME
- at set CAFILE=startssl.pem
- at cd /D %INSTALL_PATH%
- at if exist .isInstalled goto end
-
- at if not exist jsite.install goto nojsite
- at del /F jsite.install > NUL
- at if exist offline goto end
- at echo Downloading jSite
- at mkdir jSite
- at java -jar bin\sha1test.jar jSite.jar jSite %CAFILE% > NUL
-:end
- at echo @cd jSite > jsite.cmd
- at echo @start javaw -jar jSite.jar >> jsite.cmd
-:nojsite
-:end
Deleted: trunk/apps/new_installer/res/windows/bin/install_thaw.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_thaw.cmd 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/windows/bin/install_thaw.cmd 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,19 +0,0 @@
- at set PATH=%SYSTEMROOT%\System32\;%PATH%
- at set INSTALL_PATH=$INSTALL_PATH
- at set JAVA_HOME=$JAVA_HOME
- at set CAFILE=startssl.pem
- at cd /D %INSTALL_PATH%
- at if exist .isInstalled goto end
-
- at if not exist thaw.install goto nothaw
- at del /F thaw.install > NUL
- at echo Downloading Thaw
- at if exist offline goto end
- at mkdir Thaw
- at java -jar bin\sha1test.jar Thaw.jar Thaw %CAFILE% > NUL
-:end
- at echo Setting Thaw up
- at echo @cd Thaw >thaw.cmd
- at echo @start javaw -jar Thaw.jar >> thaw.cmd
-:nothaw
-:end
Deleted: trunk/apps/new_installer/res/windows/bin/install_thingamablog.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/install_thingamablog.cmd 2008-06-02 14:06:17 UTC (rev 20183)
+++ trunk/apps/new_installer/res/windows/bin/install_thingamablog.cmd 2008-06-02 14:40:36 UTC (rev 20184)
@@ -1,19 +0,0 @@
- at set PATH=%SYSTEMROOT%\System32\;%PATH%
- at set INSTALL_PATH=$INSTALL_PATH
- at set JAVA_HOME=$JAVA_HOME
- at set CAFILE=startssl.pem
- at cd /D %INSTALL_PATH%
- at if exist .isInstalled goto end
-
- at if not exist thingamablog.install goto nothingamablog
- at del /F thingamablog.install > NUL
- at if exist offline goto end
- at echo Downloading Thingamablog
- at java -jar bin\sha1test.jar thingamablog.zip . %CAFILE% > NUL
-:end
- at echo Setting Thingamablog up
- at java -jar bin\uncompress.jar thingamablog.zip . > NUL
- at echo @cd thingamablog-testing > thingamablog.cmd
- at echo @start javaw -jar thingamablog.jar >> thingamablog.cmd
-:nothingamablog
-:end
From nextgens at freenetproject.org Mon Jun 2 14:45:24 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Mon, 2 Jun 2008 14:45:24 +0000 (UTC)
Subject: [freenet-cvs] r20185 - trunk/apps/new_installer
Message-ID: <20080602144524.D763B479614@freenetproject.org>
Author: nextgens
Date: 2008-06-02 14:45:24 +0000 (Mon, 02 Jun 2008)
New Revision: 20185
Modified:
trunk/apps/new_installer/install.xml
Log:
doh
Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml 2008-06-02 14:40:36 UTC (rev 20184)
+++ trunk/apps/new_installer/install.xml 2008-06-02 14:45:24 UTC (rev 20185)
@@ -257,6 +257,7 @@
A plugin allowing you to search the freenet.
+
From toad at freenetproject.org Mon Jun 2 15:29:08 2008
From: toad at freenetproject.org (toad at freenetproject.org)
Date: Mon, 2 Jun 2008 15:29:08 +0000 (UTC)
Subject: [freenet-cvs] r20186 - trunk/freenet/src/freenet/node
Message-ID: <20080602152908.A9DF14795F3@freenetproject.org>
Author: toad
Date: 2008-06-02 15:29:08 +0000 (Mon, 02 Jun 2008)
New Revision: 20186
Modified:
trunk/freenet/src/freenet/node/RequestStarter.java
Log:
Wait until we have 3 peers before starting requests (if we have opennet). This should prevent the activelinks from timing out and improve security marginally.
Modified: trunk/freenet/src/freenet/node/RequestStarter.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestStarter.java 2008-06-02 14:45:24 UTC (rev 20185)
+++ trunk/freenet/src/freenet/node/RequestStarter.java 2008-06-02 15:29:08 UTC (rev 20186)
@@ -98,7 +98,7 @@
while(true) {
// Allow 5 minutes before we start killing requests due to not connecting.
OpennetManager om;
- if(core.node.peers.countConnectedPeers() == 0 && (om = core.node.getOpennet()) != null &&
+ if(core.node.peers.countConnectedPeers() < 3 && (om = core.node.getOpennet()) != null &&
System.currentTimeMillis() - om.getCreationTime() < 5*60*1000) {
try {
synchronized(this) {
From toad at freenetproject.org Mon Jun 2 15:48:47 2008
From: toad at freenetproject.org (toad at freenetproject.org)
Date: Mon, 2 Jun 2008 15:48:47 +0000 (UTC)
Subject: [freenet-cvs] r20187 - trunk/apps/new_installer
Message-ID: <20080602154847.198AC4795EF@freenetproject.org>
Author: toad
Date: 2008-06-02 15:48:46 +0000 (Mon, 02 Jun 2008)
New Revision: 20187
Modified:
trunk/apps/new_installer/install.xml
Log:
Remove parsables for old bundled stuff
Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml 2008-06-02 15:29:08 UTC (rev 20186)
+++ trunk/apps/new_installer/install.xml 2008-06-02 15:48:46 UTC (rev 20187)
@@ -152,11 +152,7 @@
-
-
-
-
From nextgens at freenetproject.org Mon Jun 2 15:53:32 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Mon, 2 Jun 2008 15:53:32 +0000 (UTC)
Subject: [freenet-cvs] r20188 - trunk/apps/new_installer/res/windows/bin
Message-ID: <20080602155332.4900F47961D@freenetproject.org>
Author: nextgens
Date: 2008-06-02 15:53:31 +0000 (Mon, 02 Jun 2008)
New Revision: 20188
Modified:
trunk/apps/new_installer/res/windows/bin/cleanup.cmd
Log:
second part of last commit
Modified: trunk/apps/new_installer/res/windows/bin/cleanup.cmd
===================================================================
--- trunk/apps/new_installer/res/windows/bin/cleanup.cmd 2008-06-02 15:48:46 UTC (rev 20187)
+++ trunk/apps/new_installer/res/windows/bin/cleanup.cmd 2008-06-02 15:53:31 UTC (rev 20188)
@@ -7,7 +7,7 @@
:: Keep application installers in case users want to perform updates
@cd bin
- at del /F 1run.cmd setup.cmd detect_port_availability.cmd install_freenet-ext.cmd install_freenet-stable-latest.cmd install_plugins.cmd install_updater.cmd install_wrapper.cmd setup.cmd opennet.install offline install_frost.cmd 2> NUL > NUL
+ at del /F 1run.cmd setup.cmd detect_port_availability.cmd install_freenet-ext.cmd install_freenet-stable-latest.cmd install_plugins.cmd install_updater.cmd install_wrapper.cmd setup.cmd opennet.install offline 2> NUL > NUL
@echo DONE> .isInstalled
@echo All done, please click Next
From nextgens at freenetproject.org Wed Jun 4 08:30:29 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Wed, 4 Jun 2008 08:30:29 +0000 (UTC)
Subject: [freenet-cvs] r20190 -
trunk/apps/new_installer/res/firefox_profile/chrome
Message-ID: <20080604083029.2A959479552@freenetproject.org>
Author: nextgens
Date: 2008-06-04 08:30:28 +0000 (Wed, 04 Jun 2008)
New Revision: 20190
Modified:
trunk/apps/new_installer/res/firefox_profile/chrome/userChrome.css
Log:
new_installer: hide more bookmark-links on the firefox profile
Modified: trunk/apps/new_installer/res/firefox_profile/chrome/userChrome.css
===================================================================
--- trunk/apps/new_installer/res/firefox_profile/chrome/userChrome.css 2008-06-03 20:49:20 UTC (rev 20189)
+++ trunk/apps/new_installer/res/firefox_profile/chrome/userChrome.css 2008-06-04 08:30:28 UTC (rev 20190)
@@ -1,4 +1,6 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
-#navigator-toolbox menu[label="Tools"], #view-menu menuitem[label="Status Bar"], #view-menumenu[label="Sidebar"], #view-menu menu[label="Toolbars"], #bookmarks-menu { display: none!important; }
+#navigator-toolbox menu[label="Tools"], #view-menu menuitem[label="Status Bar"], #view-menumenu[label="Sidebar"], #view-menu menu[label="Toolbars"], #bookmarks-menu, #helpMenu, #file-menu menuitem[label="Work Offline"], #navigator-toolbox menu[label="Tools"],#view-menu menuitem[label="Status Bar"], #view-menu menu[label="Sidebar"], #view-menumenu[label="Toolbars"], #bookmarks-menu { display: none!important; }
-#helpMenu, #file-menu menuitem[label="Work Offline"], #navigator-toolbox menu[label="Tools"],#view-menu menuitem[label="Status Bar"], #view-menu menu[label="Sidebar"], #view-menumenu[label="Toolbars"], #bookmarks-menu, #enableJavaRow, #enableJavaScriptRow, #cookiesGroup,#connectionGroup, #encryptionTab { display: none !important; }
+#enableJavaRow, #enableJavaScriptRow, #cookiesGroup,#connectionGroup, #encryptionTab { display: none !important; }
+
+#toolbar-context-menu, #bookmarks-context-menu, #context-bookmarklink, #context-bookmarkpage, #miAddBookmark, #BookmarkAllTabs { display: none!important; }
From nextgens at freenetproject.org Wed Jun 4 08:37:34 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Wed, 4 Jun 2008 08:37:34 +0000 (UTC)
Subject: [freenet-cvs] r20191 - trunk/website
Message-ID: <20080604083734.328A8479549@freenetproject.org>
Author: nextgens
Date: 2008-06-04 08:37:33 +0000 (Wed, 04 Jun 2008)
New Revision: 20191
Modified:
trunk/website/style.css
Log:
website: revert r19832 and add a comment so that it looks better in IE
Modified: trunk/website/style.css
===================================================================
--- trunk/website/style.css 2008-06-04 08:30:28 UTC (rev 20190)
+++ trunk/website/style.css 2008-06-04 08:37:33 UTC (rev 20191)
@@ -5,7 +5,8 @@
div#menu {
font-family: Sans-serif, Arial, "Times New Roman", Georgia, Times, serif;
float:left;
- /* width: 150px; */
+ /* fixed width is needed for IE: see http://archives.freenetproject.org/message/20080604.081350.896d3fc2.en.html */
+ width: 150px;
font-style: normal;
font-weight: normal;
text-align: left;
From j16sdiz at freenetproject.org Wed Jun 4 08:53:46 2008
From: j16sdiz at freenetproject.org (j16sdiz at freenetproject.org)
Date: Wed, 4 Jun 2008 08:53:46 +0000 (UTC)
Subject: [freenet-cvs] r20192 -
branches/saltedhashstore/freenet/src/freenet/store
Message-ID: <20080604085346.5D1B747972D@freenetproject.org>
Author: j16sdiz
Date: 2008-06-04 08:53:46 +0000 (Wed, 04 Jun 2008)
New Revision: 20192
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
use java.util.concurrent.atomic.*
Modified: branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:37:33 UTC (rev 20191)
+++ branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:53:46 UTC (rev 20192)
@@ -16,6 +16,7 @@
import java.util.Map;
import java.util.Random;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
@@ -118,7 +119,7 @@
Entry entry = probeEntry(routingKey);
if (entry == null) {
- incMisses();
+ misses.incrementAndGet();
return null;
}
@@ -126,13 +127,13 @@
try {
StorableBlock block = entry.getStorableBlock(routingKey, fullKey);
- incHits();
+ hits.incrementAndGet();
if (updateBloom && !checkBloom)
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), false);
return block;
} catch (KeyVerifyException e) {
Logger.minor(this, "key verification exception", e);
- incMisses();
+ misses.incrementAndGet();
return null;
}
} finally {
@@ -158,7 +159,7 @@
if (entry == null && prevStoreSize != 0)
entry = probeEntry0(routingKey, prevStoreSize);
if (checkBloom && entry == null)
- incBloomFalsePos();
+ bloomFalsePos.incrementAndGet();
return entry;
}
@@ -222,7 +223,7 @@
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
Entry entry = new Entry(routingKey, header, data);
writeEntry(entry, oldOffset);
- incWrites();
+ writes.incrementAndGet();
return;
} finally {
unlockEntry(oldOffset);
@@ -245,8 +246,8 @@
if (updateBloom)
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
writeEntry(entry, offset[i]);
- incWrites();
- incKeyCount();
+ writes.incrementAndGet();
+ keyCount.incrementAndGet();
return;
}
} finally {
@@ -265,7 +266,7 @@
if (updateBloom)
bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), syncBloom);
writeEntry(entry, offset[0]);
- incWrites();
+ writes.incrementAndGet();
} finally {
unlockEntry(offset[0]);
}
@@ -750,8 +751,6 @@
salt = new byte[0x10];
random.nextBytes(salt);
- keyCount = 0;
-
writeConfigFile();
} else {
// try to load
@@ -761,7 +760,7 @@
storeSize = raf.readLong();
prevStoreSize = raf.readLong();
- keyCount = raf.readLong();
+ keyCount.set(raf.readLong());
raf.readLong();
raf.close();
@@ -782,7 +781,7 @@
raf.writeLong(storeSize);
raf.writeLong(prevStoreSize);
- raf.writeLong(keyCount);
+ raf.writeLong(keyCount.get());
raf.writeLong(0);
raf.close();
@@ -1012,7 +1011,7 @@
if (Arrays.equals(digestedRoutingKey, digestedRoutingKey2)) {
// assume same routing key, drop this as duplicate
freeOffset(offset);
- decKeyCount();
+ keyCount.decrementAndGet();
droppedEntries++;
if (logDEBUG)
@@ -1029,7 +1028,7 @@
+ " queued");
writeOldItem(oldItemsFC, entry);
freeOffset(offset);
- decKeyCount();
+ keyCount.decrementAndGet();
}
} finally {
// unlock all entries
@@ -1086,7 +1085,7 @@
.debug(this, "Put back old item: "
+ HexUtil.bytesToHex(entry.digestedRoutingKey));
writeEntry(entry, newOffset[i]);
- incKeyCount();
+ keyCount.incrementAndGet();
resolvedEntries++;
continue LOOP_ITEMS;
}
@@ -1307,78 +1306,35 @@
}
// ------------- Statistics (a.k.a. lies)
- private final Object statLock = new Object();
- private long hits;
- private long misses;
- private long writes;
- private long keyCount;
- private long bloomFalsePos;
+ private AtomicLong hits = new AtomicLong();
+ private AtomicLong misses = new AtomicLong();
+ private AtomicLong writes = new AtomicLong();
+ private AtomicLong keyCount = new AtomicLong();
+ private AtomicLong bloomFalsePos = new AtomicLong();
public long hits() {
- synchronized (statLock) {
- return hits;
- }
+ return hits.get();
}
- private void incHits() {
- Logger.debug(this, "hit");
- synchronized (statLock) {
- hits++;
- }
- }
-
public long misses() {
- synchronized (statLock) {
- return misses;
- }
+ return misses.get();
}
- private void incMisses() {
- Logger.debug(this, "miss");
- synchronized (statLock) {
- misses++;
- }
- }
-
public long writes() {
- synchronized (statLock) {
- return writes;
- }
+ return writes.get();
}
- private void incWrites() {
- Logger.debug(this, "write");
- synchronized (statLock) {
- writes++;
- }
- }
-
- private void incKeyCount() {
- synchronized (statLock) {
- keyCount++;
- }
- }
-
- private void decKeyCount() {
- synchronized (statLock) {
- keyCount--;
- }
- }
-
public long keyCount() {
- return keyCount;
+ return keyCount.get();
}
public long getMaxKeys() {
- return storeSize;
+ configLock.readLock().lock();
+ long _storeSize = storeSize;
+ configLock.readLock().unlock();
+ return _storeSize;
}
- private void incBloomFalsePos() {
- synchronized (statLock) {
- bloomFalsePos++;
- }
- }
-
// ------------- Migration
public void migrationFrom(File storeFile, File keyFile) {
setBloomSync(false); // don't sync the bloom filter
From j16sdiz at freenetproject.org Wed Jun 4 08:54:13 2008
From: j16sdiz at freenetproject.org (j16sdiz at freenetproject.org)
Date: Wed, 4 Jun 2008 08:54:13 +0000 (UTC)
Subject: [freenet-cvs] r20193 -
branches/saltedhashstore/freenet/src/freenet/store
Message-ID: <20080604085413.14D4947960D@freenetproject.org>
Author: j16sdiz
Date: 2008-06-04 08:54:12 +0000 (Wed, 04 Jun 2008)
New Revision: 20193
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
fix shutdown while resizing
Modified: branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:53:46 UTC (rev 20192)
+++ branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:54:12 UTC (rev 20193)
@@ -1228,12 +1228,11 @@
synchronized (cleanerLock) {
cleanerLock.notifyAll();
+ cleanerThread.interrupt();
}
configLock.writeLock().lock();
try {
- cleanerThread.interrupt();
-
flushAndClose();
try {
From j16sdiz at freenetproject.org Wed Jun 4 08:54:39 2008
From: j16sdiz at freenetproject.org (j16sdiz at freenetproject.org)
Date: Wed, 4 Jun 2008 08:54:39 +0000 (UTC)
Subject: [freenet-cvs] r20194 -
branches/saltedhashstore/freenet/src/freenet/store
Message-ID: <20080604085439.F065C47960D@freenetproject.org>
Author: j16sdiz
Date: 2008-06-04 08:54:39 +0000 (Wed, 04 Jun 2008)
New Revision: 20194
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
lock all offset of an entry atomically
(resize would deadlock, will fix in later commit)
Modified: branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:54:12 UTC (rev 20193)
+++ branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:54:39 UTC (rev 20194)
@@ -15,6 +15,9 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Condition;
@@ -50,7 +53,7 @@
private boolean syncBloom = true;
private BloomFilter bloomFilter;
- private static final boolean logLOCK = false;
+ private static final boolean logLOCK = true;
private static boolean logMINOR;
private static boolean logDEBUG;
@@ -116,6 +119,13 @@
configLock.readLock().lock();
try {
+ boolean locked = lockPlainKey(routingKey);
+ if (!locked) {
+ if (logDEBUG)
+ Logger.debug(this, "cannot lock key: " + HexUtil.bytesToHex(routingKey) + ", shutting down?");
+ return null;
+ }
+ try {
Entry entry = probeEntry(routingKey);
if (entry == null) {
@@ -123,8 +133,6 @@
return null;
}
- unlockEntry(entry.curOffset);
-
try {
StorableBlock block = entry.getStorableBlock(routingKey, fullKey);
hits.incrementAndGet();
@@ -137,13 +145,16 @@
return null;
}
} finally {
+ unlockPlainKey(routingKey);
+ }
+ } finally {
configLock.readLock().unlock();
}
}
/**
- * Find and lock an entry with a specific routing key. You have to unlock the entry
- * explicitly yourself!
+ * Find and lock an entry with a specific routing key. This function would not
+ * lock the entries.
*
* @param routingKey
* @return Entry object
@@ -172,10 +183,6 @@
if (logDEBUG)
Logger.debug(this, "probing for i=" + i + ", offset=" + offset[i]);
- if (!lockEntry(offset[i])) {
- Logger.error(this, "can't lock entry: " + offset[i]);
- continue;
- }
try {
entry = readEntry(offset[i], routingKey);
if (entry != null)
@@ -184,9 +191,6 @@
// may occur on resize, silent it a bit
Logger.error(this, "EOFException on probeEntry", e);
continue;
- } finally {
- if (entry == null)
- unlockEntry(offset[i]);
}
}
return null;
@@ -199,12 +203,18 @@
configLock.readLock().lock();
try {
+ boolean locked = lockPlainKey(routingKey);
+ if (!locked) {
+ if (logDEBUG)
+ Logger.debug(this, "cannot lock key: " + HexUtil.bytesToHex(routingKey) + ", shutting down?");
+ return;
+ }
+ try {
// don't use fetch(), as fetch() would do a miss++/hit++
Entry oldEntry = probeEntry(routingKey);
if (oldEntry != null) {
long oldOffset = oldEntry.curOffset;
try {
- try {
StorableBlock oldBlock = oldEntry.getStorableBlock(routingKey, fullKey);
if (!collisionPossible)
return;
@@ -225,20 +235,12 @@
writeEntry(entry, oldOffset);
writes.incrementAndGet();
return;
- } finally {
- unlockEntry(oldOffset);
- }
}
Entry entry = new Entry(routingKey, header, data);
long[] offset = entry.getOffset();
for (int i = 0; i < offset.length; i++) {
- if (!lockEntry(offset[i])) {
- Logger.error(this, "can't lock entry: " + offset[i]);
- return;
- }
- try {
if (isFree(offset[i])) {
// write to free block
if (logDEBUG)
@@ -250,17 +252,9 @@
keyCount.incrementAndGet();
return;
}
- } finally {
- unlockEntry(offset[i]);
- }
}
// no free blocks, overwrite the first one
- if (!lockEntry(offset[0])) {
- Logger.error(this, "can't lock entry: " + offset[0]);
- return;
- }
- try {
if (logDEBUG)
Logger.debug(this, "collision, write to i=0, offset=" + offset[0]);
if (updateBloom)
@@ -268,7 +262,7 @@
writeEntry(entry, offset[0]);
writes.incrementAndGet();
} finally {
- unlockEntry(offset[0]);
+ unlockPlainKey(routingKey);
}
} finally {
configLock.readLock().unlock();
@@ -1211,17 +1205,88 @@
*/
private void unlockEntry(long offset) {
if (logDEBUG && logLOCK)
- Logger.debug(this, "unlocking " + offset);
+ Logger.debug(this, "unlocking " + offset, new Exception("debug"));
entryLock.lock();
try {
Condition cond = lockMap.remove(offset);
+ assert cond != null;
cond.signal();
} finally {
entryLock.unlock();
}
}
+ /**
+ * Lock all possible offsets of a key. This method would release the locks if any locking
+ * operation failed.
+ *
+ * @param plainKey
+ * @return true if all the offsets are locked.
+ */
+ private boolean lockPlainKey(byte[] plainKey) {
+ return lockDigestedKey(getDigestedRoutingKey(plainKey));
+ }
+
+ private void unlockPlainKey(byte[] plainKey) {
+ unlockDigestedKey(getDigestedRoutingKey(plainKey));
+ }
+
+ /**
+ * Lock all possible offsets of a key. This method would release the locks if any locking
+ * operation failed.
+ *
+ * @param digestedKey
+ * @return true if all the offsets are locked.
+ */
+ private boolean lockDigestedKey(byte[] digestedKey) {
+ // use a set to prevent duplicated offsets,
+ // a sorted set to prevent deadlocks
+ SortedSet offsets = new TreeSet();
+ long[] offsetArray = getOffsetFromDigestedKey(digestedKey, storeSize);
+ for (long offset : offsetArray)
+ offsets.add(offset);
+ if (prevStoreSize != 0) {
+ offsetArray = getOffsetFromDigestedKey(digestedKey, prevStoreSize);
+ for (long offset : offsetArray)
+ offsets.add(offset);
+ }
+
+ Set locked = new TreeSet();
+ for (long offset : offsets) {
+ boolean status = lockEntry(offset);
+ if (!status)
+ break;
+ locked.add(offset);
+ }
+
+ if (locked.size() == offsets.size()) {
+ return true;
+ } else {
+ // failed, remove the locks
+ for (long offset : offsets)
+ unlockEntry(offset);
+ return false;
+ }
+ }
+
+ private void unlockDigestedKey(byte[] digestedKey) {
+ // use a set to prevent duplicated offsets
+ SortedSet offsets = new TreeSet();
+ long[] offsetArray = getOffsetFromDigestedKey(digestedKey, storeSize);
+ for (long offset : offsetArray)
+ offsets.add(offset);
+ if (prevStoreSize != 0) {
+ offsetArray = getOffsetFromDigestedKey(digestedKey, prevStoreSize);
+ for (long offset : offsetArray)
+ offsets.add(offset);
+ }
+
+ for (long offset : offsets) {
+ unlockEntry(offset);
+ }
+ }
+
public class ShutdownDB implements Runnable {
public void run() {
shutdown = true;
From j16sdiz at freenetproject.org Wed Jun 4 08:55:07 2008
From: j16sdiz at freenetproject.org (j16sdiz at freenetproject.org)
Date: Wed, 4 Jun 2008 08:55:07 +0000 (UTC)
Subject: [freenet-cvs] r20195 -
branches/saltedhashstore/freenet/src/freenet/store
Message-ID: <20080604085507.77E7D479630@freenetproject.org>
Author: j16sdiz
Date: 2008-06-04 08:55:07 +0000 (Wed, 04 Jun 2008)
New Revision: 20195
Modified:
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
indent
Modified: branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:54:39 UTC (rev 20194)
+++ branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java 2008-06-04 08:55:07 UTC (rev 20195)
@@ -69,12 +69,12 @@
private long storeSize;
public static SaltedHashFreenetStore construct(File baseDir, String name, StoreCallback callback, Random random,
- long maxKeys, SemiOrderedShutdownHook shutdownHook) throws IOException {
+ long maxKeys, SemiOrderedShutdownHook shutdownHook) throws IOException {
return new SaltedHashFreenetStore(baseDir, name, callback, random, maxKeys, shutdownHook);
}
private SaltedHashFreenetStore(File baseDir, String name, StoreCallback callback, Random random, long maxKeys,
- SemiOrderedShutdownHook shutdownHook) throws IOException {
+ SemiOrderedShutdownHook shutdownHook) throws IOException {
logMINOR = Logger.shouldLog(Logger.MINOR, this);
logDEBUG = Logger.shouldLog(Logger.DEBUG, this);
@@ -126,25 +126,25 @@
return null;
}
try {
- Entry entry = probeEntry(routingKey);
+ Entry entry = probeEntry(routingKey);
- if (entry == null) {
- misses.incrementAndGet();
- return null;
- }
+ if (entry == null) {
+ misses.incrementAndGet();
+ return null;
+ }
- try {
- StorableBlock block = entry.getStorableBlock(routingKey, fullKey);
- hits.incrementAndGet();
- if (updateBloom && !checkBloom)
- bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), false);
- return block;
- } catch (KeyVerifyException e) {
- Logger.minor(this, "key verification exception", e);
- misses.incrementAndGet();
- return null;
- }
- } finally {
+ try {
+ StorableBlock block = entry.getStorableBlock(routingKey, fullKey);
+ hits.incrementAndGet();
+ if (updateBloom && !checkBloom)
+ bloomFilter.updateFilter(getDigestedRoutingKey(routingKey), false);
+ return block;
+ } catch (KeyVerifyException e) {
+ Logger.minor(this, "key verification exception", e);
+ misses.incrementAndGet();
+ return null;
+ }
+ } finally {
unlockPlainKey(routingKey);
}
} finally {
@@ -155,7 +155,7 @@
/**
* Find and lock an entry with a specific routing key. This function would not
* lock the entries.
- *
+ *
* @param routingKey
* @return Entry object
* @throws IOException
@@ -170,7 +170,7 @@
if (entry == null && prevStoreSize != 0)
entry = probeEntry0(routingKey, prevStoreSize);
if (checkBloom && entry == null)
- bloomFalsePos.incrementAndGet();
+ bloomFalsePos.incrementAndGet();
return entry;
}
@@ -197,7 +197,7 @@
}
public void put(StorableBlock block, byte[] routingKey, byte[] fullKey, byte[] data, byte[] header,
- boolean overwrite) throws IOException, KeyCollisionException {
+ boolean overwrite) throws IOException, KeyCollisionException {
if (logMINOR)
Logger.minor(this, "Putting " + HexUtil.bytesToHex(routingKey) + " for " + callback);
@@ -210,11 +210,11 @@
return;
}
try {
- // don't use fetch(), as fetch() would do a miss++/hit++
- Entry oldEntry = probeEntry(routingKey);
- if (oldEntry != null) {
- long oldOffset = oldEntry.curOffset;
- try {
+ // don't use fetch(), as fetch() would do a miss++/hit++
+ Entry oldEntry = probeEntry(routingKey);
+ if (oldEntry != null) {
+ long oldOffset = oldEntry.curOffset;
+ try {
StorableBlock oldBlock = oldEntry.getStorableBlock(routingKey, fullKey);
if (!collisionPossible)
return;
@@ -235,12 +235,12 @@
writeEntry(entry, oldOffset);
writes.incrementAndGet();
return;
- }
+ }
- Entry entry = new Entry(routingKey, header, data);
- long[] offset = entry.getOffset();
+ Entry entry = new Entry(routingKey, header, data);
+ long[] offset = entry.getOffset();
- for (int i = 0; i < offset.length; i++) {
+ for (int i = 0; i < offset.length; i++) {
if (isFree(offset[i])) {
// write to free block
if (logDEBUG)
@@ -252,9 +252,9 @@
keyCount.incrementAndGet();
return;
}
- }
+ }
- // no free blocks, overwrite the first one
+ // no free blocks, overwrite the first one
if (logDEBUG)
Logger.debug(this, "collision, write to i=0, offset=" + offset[0]);
if (updateBloom)
@@ -1159,7 +1159,7 @@
// ------------- Locking
private boolean shutdown = false;
- private ReadWriteLock configLock = new ReentrantReadWriteLock();
+ private ReadWriteLock configLock = new ReentrantReadWriteLock();
private Lock entryLock = new ReentrantLock();
private Map lockMap = new HashMap ();
@@ -1396,7 +1396,7 @@
configLock.readLock().lock();
long _storeSize = storeSize;
configLock.readLock().unlock();
- return _storeSize;
+ return _storeSize;
}
// ------------- Migration
From nextgens at freenetproject.org Wed Jun 4 11:31:45 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Wed, 4 Jun 2008 11:31:45 +0000 (UTC)
Subject: [freenet-cvs] r20196 - trunk/apps/new_installer/scripts
Message-ID: <20080604113145.295D6478F76@freenetproject.org>
Author: nextgens
Date: 2008-06-04 11:31:44 +0000 (Wed, 04 Jun 2008)
New Revision: 20196
Modified:
trunk/apps/new_installer/scripts/1run.sh
Log:
new_installer: make the headless installer download plugins securely before the node starts up
Modified: trunk/apps/new_installer/scripts/1run.sh
===================================================================
--- trunk/apps/new_installer/scripts/1run.sh 2008-06-04 08:55:07 UTC (rev 20195)
+++ trunk/apps/new_installer/scripts/1run.sh 2008-06-04 11:31:44 UTC (rev 20196)
@@ -15,6 +15,7 @@
CAFILE="startssl.pem"
+JOPTS="-Djava.net.preferIPv4Stack=true"
# We need the exec flag on /bin
chmod a+rx bin/* lib/* &>/dev/null
@@ -24,9 +25,6 @@
echo "Enabling the auto-update feature"
echo "node.updater.autoupdate=true" >> freenet.ini
-# Register plugins
-echo "pluginmanager.loadplugin=JSTUN;UPnP" >> freenet.ini
-
echo "Detecting tcp-ports availability..."
# Try to auto-detect the first available port for fproxy
FPROXY_PORT=8888
@@ -50,8 +48,6 @@
exit 1
fi
fi
- cat welcome.html | sed "s/8888/$FPROXY_PORT/g" >welcome2.html
- mv welcome2.html welcome.html
fi
echo "fproxy.enabled=true" >> freenet.ini
echo "fproxy.port=$FPROXY_PORT" >> freenet.ini
@@ -68,15 +64,24 @@
echo "fcp.port=$FCP_PORT" >> freenet.ini
echo "Downloading freenet-stable-latest.jar"
-java -jar bin/sha1test.jar freenet-stable-latest.jar "." $CAFILE >/dev/null || exit 1
+java $JOPTS -jar bin/sha1test.jar freenet-stable-latest.jar "." $CAFILE >/dev/null || exit 1
ln -s freenet-stable-latest.jar freenet.jar
echo "Downloading freenet-ext.jar"
-java -jar bin/sha1test.jar freenet-ext.jar "." $CAFILE >/dev/null || exit 1
+java $JOPTS -jar bin/sha1test.jar freenet-ext.jar "." $CAFILE >/dev/null || exit 1
echo "Downloading update.sh"
-java -jar bin/sha1test.jar update.sh "." $CAFILE >/dev/null || exit 1
+java $JOPTS -jar bin/sha1test.jar update.sh "." $CAFILE >/dev/null || exit 1
chmod a+rx "./update.sh"
+
+# Register plugins
+mkdir -p plugins
+echo "pluginmanager.loadplugin=JSTUN;UPnP" >> freenet.ini
+echo "Downloading the JSTUN plugin"
+java $JOPTS -jar bin/sha1test.jar JSTUN.jar plugins "$CAFILE" >/dev/null 2>&1
+echo "Downloading the UPnP plugin"
+java $JOPTS -jar bin/sha1test.jar UPnP.jar plugins "$CAFILE" >/dev/null 2>&1
+
echo "Downloading seednodes.fref"
-java -jar bin/sha1test.jar seednodes.fref "." $CAFILE >/dev/null || exit 1
+java $JOPTS -jar bin/sha1test.jar seednodes.fref "." $CAFILE >/dev/null || exit 1
if test -x `which crontab`
then
@@ -99,7 +104,7 @@
# Starting the node up
./run.sh start
-echo "Please visit file://$PWD/welcome.html to configure your node"
+echo "Please visit http://127.0.0.1:$FPROXY_PORT/wizard/ to configure your node"
echo "Finished"
rm -f bin/1run.sh
From toad at freenetproject.org Wed Jun 4 12:04:36 2008
From: toad at freenetproject.org (toad at freenetproject.org)
Date: Wed, 4 Jun 2008 12:04:36 +0000 (UTC)
Subject: [freenet-cvs] r20197 -
trunk/freenet/src/freenet/clients/http/staticfiles
Message-ID: <20080604120436.0B2A7478F13@freenetproject.org>
Author: toad
Date: 2008-06-04 12:04:35 +0000 (Wed, 04 Jun 2008)
New Revision: 20197
Modified:
trunk/freenet/src/freenet/clients/http/staticfiles/defaultbookmarks.dat
Log:
Update bookmark editions
Modified: trunk/freenet/src/freenet/clients/http/staticfiles/defaultbookmarks.dat
===================================================================
--- trunk/freenet/src/freenet/clients/http/staticfiles/defaultbookmarks.dat 2008-06-04 11:31:44 UTC (rev 20196)
+++ trunk/freenet/src/freenet/clients/http/staticfiles/defaultbookmarks.dat 2008-06-04 12:04:35 UTC (rev 20197)
@@ -15,11 +15,11 @@
BookmarkCategory0.Content.Bookmark2.Name=Freenet Activelink Index (SLOW: graphical index, preloads all the sites, so takes *ages* to load)
BookmarkCategory0.Content.Bookmark2.hasAnActivelink=true
BookmarkCategory0.Content.Bookmark2.Description=A graphical freenet index (this will take a long time to load as it preloads the sites)
-BookmarkCategory0.Content.Bookmark2.URI=USK at qd-hk0vHYg7YvK2BQsJMcUD5QSF0tDkgnnF6lnWUH0g,xTFOV9ddCQQk6vQ6G~jfL6IzRUgmfMcZJ6nuySu~NUc,AQACAAE/activelink-index/57/
+BookmarkCategory0.Content.Bookmark2.URI=USK at qd-hk0vHYg7YvK2BQsJMcUD5QSF0tDkgnnF6lnWUH0g,xTFOV9ddCQQk6vQ6G~jfL6IzRUgmfMcZJ6nuySu~NUc,AQACAAE/activelink-index/60/
BookmarkCategory0.Content.Bookmark1.Name=Freenet Activelink Index Text Version (a quick-loading non-graphical index site, no porn)
BookmarkCategory0.Content.Bookmark1.hasAnActivelink=true
BookmarkCategory0.Content.Bookmark1.Description=Text version of the Activelink Index
-BookmarkCategory0.Content.Bookmark1.URI=USK at qd-hk0vHYg7YvK2BQsJMcUD5QSF0tDkgnnF6lnWUH0g,xTFOV9ddCQQk6vQ6G~jfL6IzRUgmfMcZJ6nuySu~NUc,AQACAAE/activelink-index-text/21/
+BookmarkCategory0.Content.Bookmark1.URI=USK at qd-hk0vHYg7YvK2BQsJMcUD5QSF0tDkgnnF6lnWUH0g,xTFOV9ddCQQk6vQ6G~jfL6IzRUgmfMcZJ6nuySu~NUc,AQACAAE/activelink-index-text/23/
BookmarkCategory1.Name=Freenet devel's flogs
BookmarkCategory1.Content.BookmarkCategory=0
BookmarkCategory1.Content.Bookmark=5
@@ -49,7 +49,7 @@
BookmarkCategory2.Content.Bookmark0.Name=Freenet Message System
BookmarkCategory2.Content.Bookmark0.Description=The official freesite of FMS, a spam resistant message board system for Freenet
BookmarkCategory2.Content.Bookmark0.hasAnActivelink=true
-BookmarkCategory2.Content.Bookmark0.URI=USK at 0npnMrqZNKRCRoGojZV93UNHCMN-6UU3rRSAmP6jNLE,~BG-edFtdCC1cSH4O3BWdeIYa8Sw5DfyrSV-TKdO5ec,AQACAAE/fms/52/
+BookmarkCategory2.Content.Bookmark0.URI=USK at 0npnMrqZNKRCRoGojZV93UNHCMN-6UU3rRSAmP6jNLE,~BG-edFtdCC1cSH4O3BWdeIYa8Sw5DfyrSV-TKdO5ec,AQACAAE/fms/55/
BookmarkCategory2.Content.Bookmark1.Name=Freemail
BookmarkCategory2.Content.Bookmark1.Description=The official site for Freemail - email over Freenet
BookmarkCategory2.Content.Bookmark1.hasAnActivelink=true
@@ -62,7 +62,7 @@
BookmarkCategory2.Content.Bookmark3.Name=Freesite HOWTO
BookmarkCategory2.Content.Bookmark3.Description=A more detailed explanation of publishing freesites
BookmarkCategory2.Content.Bookmark3.hasAnActivelink=true
-BookmarkCategory2.Content.Bookmark4.URI=USK at F-BKUq9vNTrvp7D90r5edQ4MfZCrx3pP7TofdDlCRoU,YFUeosm79Z3KZxC62qQCteCCUI3D-LYyRk6P9auVpPA,AQACAAE/freenetapps/18/
+BookmarkCategory2.Content.Bookmark4.URI=USK at F-BKUq9vNTrvp7D90r5edQ4MfZCrx3pP7TofdDlCRoU,YFUeosm79Z3KZxC62qQCteCCUI3D-LYyRk6P9auVpPA,AQACAAE/freenetapps/21/
BookmarkCategory2.Content.Bookmark4.hasAnActivelink=true
BookmarkCategory2.Content.Bookmark4.Name=The Freenet Applications Freesite
BookmarkCategory2.Content.Bookmark4.Description=Various links to Freenet applications, and instructions for using them
From nextgens at freenetproject.org Wed Jun 4 13:20:29 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Wed, 4 Jun 2008 13:20:29 +0000 (UTC)
Subject: [freenet-cvs] r20198 - trunk/website
Message-ID: <20080604132029.EE40A47956A@freenetproject.org>
Author: nextgens
Date: 2008-06-04 13:20:29 +0000 (Wed, 04 Jun 2008)
New Revision: 20198
Modified:
trunk/website/style.css
Log:
website: new update to the CSS
Modified: trunk/website/style.css
===================================================================
--- trunk/website/style.css 2008-06-04 12:04:35 UTC (rev 20197)
+++ trunk/website/style.css 2008-06-04 13:20:29 UTC (rev 20198)
@@ -6,7 +6,7 @@
font-family: Sans-serif, Arial, "Times New Roman", Georgia, Times, serif;
float:left;
/* fixed width is needed for IE: see http://archives.freenetproject.org/message/20080604.081350.896d3fc2.en.html */
- width: 150px;
+ width: 10.5em;
font-style: normal;
font-weight: normal;
text-align: left;
From nextgens at freenetproject.org Wed Jun 4 15:46:56 2008
From: nextgens at freenetproject.org (nextgens at freenetproject.org)
Date: Wed, 4 Jun 2008 15:46:56 +0000 (UTC)
Subject: [freenet-cvs] r20199 - in trunk/apps/new_installer: . res
res/unix/bin res/windows res/windows/bin
Message-ID: <20080604154656.70F99479558@freenetproject.org>
Author: nextgens
Date: 2008-06-04 15:46:56 +0000 (Wed, 04 Jun 2008)
New Revision: 20199
Removed:
trunk/apps/new_installer/res/welcome.chn.html
trunk/apps/new_installer/res/welcome.deu.html
trunk/apps/new_installer/res/welcome.fra.html
trunk/apps/new_installer/res/welcome.html
Modified:
trunk/apps/new_installer/install.xml
trunk/apps/new_installer/res/unix/bin/1run.sh
trunk/apps/new_installer/res/unix/bin/browse.sh
trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
trunk/apps/new_installer/res/windows/bin/install_wrapper.cmd
trunk/apps/new_installer/res/windows/browse.cmd
Log:
new_installer: do not open the browser until the install process is over
Modified: trunk/apps/new_installer/install.xml
===================================================================
--- trunk/apps/new_installer/install.xml 2008-06-04 13:20:29 UTC (rev 20198)
+++ trunk/apps/new_installer/install.xml 2008-06-04 15:46:56 UTC (rev 20199)
@@ -64,6 +64,7 @@
+
@@ -117,8 +118,6 @@
-
-
Modified: trunk/apps/new_installer/res/unix/bin/1run.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/1run.sh 2008-06-04 13:20:29 UTC (rev 20198)
+++ trunk/apps/new_installer/res/unix/bin/1run.sh 2008-06-04 15:46:56 UTC (rev 20199)
@@ -10,5 +10,4 @@
echo "Starting Freenet 0.7..."
nohup sh ./run.sh start 2>&1 >wrapper.log &
-echo "Starting up a browser"
-sh ./bin/browse.sh "file://$INSTALL_PATH/welcome.html"
+sh ./bin/browse.sh &
Modified: trunk/apps/new_installer/res/unix/bin/browse.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/browse.sh 2008-06-04 13:20:29 UTC (rev 20198)
+++ trunk/apps/new_installer/res/unix/bin/browse.sh 2008-06-04 15:46:56 UTC (rev 20199)
@@ -10,6 +10,13 @@
URL="$1"
fi
+# Wait until the installer has finished
+while test ! -f Uninstaller/install.log
+do
+ URL="http://127.0.0.1:8888/wizard/"
+ sleep 1
+done
+
browseURL()
{
"`cat firefox.location`" -no-remote -P freenet "$1" &
Modified: trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh
===================================================================
--- trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh 2008-06-04 13:20:29 UTC (rev 20198)
+++ trunk/apps/new_installer/res/unix/bin/detect_port_availability.sh 2008-06-04 15:46:56 UTC (rev 20199)
@@ -48,16 +48,6 @@
echo "fproxy.port=$FPROXY_PORT" >> freenet.ini
# Translate if needed
-FILE="welcome.html"
-if test -e welcome.$ISO3_LANG.html
-then
- FILE="welcome.$ISO3_LANG.html"
-fi
-cat "$FILE" | sed "s/8888/$FPROXY_PORT/g" >_welcome.html
-rm -f welcome.*html
-mv _welcome.html welcome.html
-
-# Translate if needed
FILE="dont-close-me.html"
if test -e dont-close-me.$ISO3_LANG.html
then
Deleted: trunk/apps/new_installer/res/welcome.chn.html
===================================================================
--- trunk/apps/new_installer/res/welcome.chn.html 2008-06-04 13:20:29 UTC (rev 20198)
+++ trunk/apps/new_installer/res/welcome.chn.html 2008-06-04 15:46:56 UTC (rev 20199)
@@ -1,127 +0,0 @@
-
-
-
-
- Successful installation of Freenet 0.7!
-
-
-
-
-
N?chster Schritt: konfigurieren Sie Ihren Knoten und verbinden Sie ihn mit dem Netzwerk.
-
Der n?chste Schritt ist, den Einrichtungs-Assistenten aufzurufen. Von dort aus k?nnen Sie den Status Ihres Knotens sehen und Einstellungen machen, einschlie?lich eines menschen-lesbaren Namen f?r Ihren Knoten.
-
Wenn Sie Ihren Knoten konfigurieren sich automatisch mit nicht vertrauensw?rdigen Knoten (Fremden) zu verbinden, dann sollte er sich innerhalb weniger Minuten automatisch mit dem Netzwerk verbinden.
-
Wenn Sie Leute kennen, die Freenet benutzen, fragen Sie sie nach ihren Knoten-Referenzen: Wenn Sie sich nur mit Ihren Freunden verbinden wird dies die Sicherheit deutlich erh?hen.
- Um eine Verbindung mit einem anderen Knoten herzustellen, senden Sie ihm Ihre Knoten-Referenz und f?gen Sie seine auf der Freunde-Seite hinzu. Wenn beide Seiten die Knoten-Referenz des anderen hinzugef?gt haben, sollten sie sich verbinden. Wenn Sie Schwierigkeiten haben, wenden Sie sich an die Freenet Connections-Seite im Freenet-Projekt-Wiki.
Sie k?nnen beginnen Freesites anzusehen, indem Sie eines der Lezezeichen auf der Startseite verwenden. Von dort aus k?nnen Sie eine gro?e Anzahl der Inhalte im Freenet ansehen.
-
Sie k?nnen auch in der anonymen Nachrichten-Anwendung Frost st?bern und Nachrichten schreiben. Diese ist ?ber das "Frost"-Desktop-Symbol erreichbar, wenn Sie ausgew?hlt haben es zu installieren.
-
Sobald Sie ein paar der Inhalte, die sich schon im Freenet befinden, gesehen haben, k?nnen Sie versuchen JSite zu benutzen um Ihre eigenen Freesites zu erstellen, die andere ansehen k?nnen!
-
-
-
-
Wir danken Ihnen noch ein Mal, dass Sie Freenet benutzen!
-
Denken Sie daran, Im Freenet geht es um die Freie (Meinungs-)?u?erung. Sie werden vielleicht Inhalte im Freenet finden, die Sie f?r absto?end oder inakzeptabel halten. Wenn Ihnen dies ein Anliegen ist, dann w?hlen Sie sorgf?ltig welchen Links Sie vertrauen und welche Indizes und Freesites Sie herunterladen.
-
Das Freenet-Projekt besch?ftigt einen Vollzeit-Entwickler. Wenn Sie k?nnen, w?ren wir Ihnen sehr dankbar wenn Sie dem Projekt etwas spenden, sodass wir ihn weiterhin besch?ftigen und unsere Software verbessern lassen k?nnen.
-
Wir w?nschen Ihnen ein angenehmes Erlebnis in der freien Welt!