Commit c72b3ecf authored by Jondy Zhao's avatar Jondy Zhao

Use API to get/set ipv6 route later Windows Vista, otherwise ipv6 route

couldn't work in the Non-English platforms.
parent 2506b328
...@@ -19,7 +19,12 @@ ifneq "$(WINVER)" "" ...@@ -19,7 +19,12 @@ ifneq "$(WINVER)" ""
SRCS += cyginet.c SRCS += cyginet.c
OBJS += cyginet.o OBJS += cyginet.o
LDLIBS += -liphlpapi -lws2_32 -lwlanapi -lole32 -lsetupapi LDLIBS += -liphlpapi -lws2_32 -lwlanapi -lole32 -lsetupapi
ifeq "$(WINVER)" "XP"
CFLAGS += -D_WIN32_WINNT=0x0503 CFLAGS += -D_WIN32_WINNT=0x0503
else
CFLAGS += -D_WIN32_WINNT=0x0600
endif
endif endif
......
...@@ -31,12 +31,14 @@ Later Windows Vista, ...@@ -31,12 +31,14 @@ Later Windows Vista,
$ WINVER=VISTA make $ WINVER=VISTA make
WINVER could be XP, VISTA, WIN7, WIN8.
It will generate babeld.exe in the current directory. It will generate babeld.exe in the current directory.
Build testc.exe, it's used to verify the functions in the cyginet.c Build test.exe, it's used to verify the functions in the cyginet.c
$ WINVER=XP make testc.exe $ WINVER=XP make test.exe
$ ./testc.exe $ ./test.exe
Interface Names Interface Names
=============== ===============
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* /*
Reference List in the MSDN. Reference List in the MSDN.
NDIS 6.0 Interfaces for Window Vista later NDIS 6.0 Interfaces for Window Vista later
http://msdn.microsoft.com/en-us/library/windows/hardware/ff565740(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff565740(v=vs.85).aspx
NDIS Versions in Network Drivers (Windows Drivers) NDIS Versions in Network Drivers (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff567893(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff567893(v=vs.85).aspx
For Windows XP, NDIS 5.0 For Windows XP, NDIS 5.0
http://msdn.microsoft.com/en-us/library/windows/hardware/ff565849(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff565849(v=vs.85).aspx
NDIS General-use Interfaces (NDIS 5.1) (Windows Drivers) NDIS General-use Interfaces (NDIS 5.1) (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff556983(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff556983(v=vs.85).aspx
Routing Protocol Interface Functions (Windows) Routing Protocol Interface Functions (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/aa446772(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa446772(v=vs.85).aspx
Networking (Windows) Networking (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/ee663286(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ee663286(v=vs.85).aspx
NDIS Protocol Drivers (NDIS 5.1) (Windows Drivers) NDIS Protocol Drivers (NDIS 5.1) (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff557149(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff557149(v=vs.85).aspx
Winsock IOCTLs (Windows) Winsock IOCTLs (Windows)
http://msdn.microsoft.com/zh-cn/library/windows/desktop/bb736550(v=vs.85).aspx http://msdn.microsoft.com/zh-cn/library/windows/desktop/bb736550(v=vs.85).aspx
Creating a Basic IP Helper Application (Windows) Creating a Basic IP Helper Application (Windows)
http://msdn.microsoft.com/zh-cn/library/windows/desktop/aa365872(v=vs.85).aspx http://msdn.microsoft.com/zh-cn/library/windows/desktop/aa365872(v=vs.85).aspx
Network Awareness in Windows XP Network Awareness in Windows XP
http://msdn.microsoft.com/en-us/library/ms700657(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ms700657(v=vs.85).aspx
System-Defined Device Setup Classes (Windows Drivers) System-Defined Device Setup Classes (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff553419(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff553419(v=vs.85).aspx
Device Information Sets (Windows Drivers) Device Information Sets (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff541247(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff541247(v=vs.85).aspx
Accessing Device Instance SPDRP_Xxx Properties (Windows Drivers) Accessing Device Instance SPDRP_Xxx Properties (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff537737(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff537737(v=vs.85).aspx
IOCTL_NDIS_QUERY_GLOBAL_STATS (Windows Drivers) IOCTL_NDIS_QUERY_GLOBAL_STATS (Windows Drivers)
http://msdn.microsoft.com/en-us/library/windows/hardware/ff548975(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/hardware/ff548975(v=vs.85).aspx
IPv6 RFCs and Standards Working Groups IPv6 RFCs and Standards Working Groups
http://www.ipv6now.com.au/RFC.php http://www.ipv6now.com.au/RFC.php
Routing Table Manager Version 2 Routing Table Manager Version 2
http://msdn.microsoft.com/en-us/library/windows/desktop/bb404201(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/bb404201(v=vs.85).aspx
Using Routing Table Manager Version 2, this section contains sample Using Routing Table Manager Version 2, this section contains sample
code that can be used when developing clients such as routing code that can be used when developing clients such as routing
protocols. protocols.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa382335(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa382335(v=vs.85).aspx
An introduction to the IPv6 protocol along with overviews on An introduction to the IPv6 protocol along with overviews on
deployment and IPv6 transitioning technologies is available on deployment and IPv6 transitioning technologies is available on
Technet at Microsoft Internet Protocol Version 6 (IPv6). Technet at Microsoft Internet Protocol Version 6 (IPv6).
http://go.microsoft.com/fwlink/p/?linkid=194338 http://go.microsoft.com/fwlink/p/?linkid=194338
http://technet.microsoft.com/en-us/network/bb530961.aspx http://technet.microsoft.com/en-us/network/bb530961.aspx
Internet Protocol Version 6 (IPv6) Internet Protocol Version 6 (IPv6)
http://msdn.microsoft.com/en-us//library/windows/desktop/ms738570(v=vs.85).aspx http://msdn.microsoft.com/en-us//library/windows/desktop/ms738570(v=vs.85).aspx
IPv6 Link-local and Site-local Addresses IPv6 Link-local and Site-local Addresses
http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms739166(v=vs.85).aspx http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms739166(v=vs.85).aspx
Recommended Configurations for IPv6 Recommended Configurations for IPv6
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740117(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms740117(v=vs.85).aspx
IPv6 Support in Home Routers, It looks like a windows re6stnet. IPv6 Support in Home Routers, It looks like a windows re6stnet.
http://msdn.microsoft.com/en-us/windows/hardware/gg463251.aspx http://msdn.microsoft.com/en-us/windows/hardware/gg463251.aspx
Neighbor Discovery in IPv6 Neighbor Discovery in IPv6
http://tools.ietf.org/html/rfc4861 http://tools.ietf.org/html/rfc4861
Default Address Selection for Internet Protocol version 6 (IPv6) Default Address Selection for Internet Protocol version 6 (IPv6)
http://tools.ietf.org/html/rfc3484 http://tools.ietf.org/html/rfc3484
Path MTU Discovery Path MTU Discovery
http://tools.ietf.org/html/rfc1191 http://tools.ietf.org/html/rfc1191
IPv6 Traffic Between Nodes on Different Subnets of an IPv4 Internetwork (6to4) IPv6 Traffic Between Nodes on Different Subnets of an IPv4 Internetwork (6to4)
http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms737598(v=vs.85).aspx http://msdn.microsoft.com/zh-cn/library/windows/desktop/ms737598(v=vs.85).aspx
Multicast Listener Discovery (MLD) Multicast Listener Discovery (MLD)
http://msdn.microsoft.com/en-us/library/aa916334.aspx http://msdn.microsoft.com/en-us/library/aa916334.aspx
IPv6 Addresses, it explains the relation between link-local address IPv6 Addresses, it explains the relation between link-local address
and interface id and interface id
http://msdn.microsoft.com/en-us/library/aa921042.aspx http://msdn.microsoft.com/en-us/library/aa921042.aspx
TCP/IP (v4 and v6) Technical Reference, it shows ipv4 and ipv6 how TCP/IP (v4 and v6) Technical Reference, it shows ipv4 and ipv6 how
to work in the windows. (Recommended) to work in the windows. (Recommended)
http://technet.microsoft.com/en-us/library/dd379473(v=ws.10).aspx http://technet.microsoft.com/en-us/library/dd379473(v=ws.10).aspx
*/ */
#ifndef __CYGIFNET_H__ #ifndef __CYGIFNET_H__
#define __CYGIFNET_H__ #define __CYGIFNET_H__
#ifndef IN_LOOPBACK #ifndef IN_LOOPBACK
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
#endif #endif
/* Missing defines in the Cygwin */ /* Missing defines in the Cygwin */
#define RTM_ADD 0x1 /* Add Route */ #define RTM_ADD 0x1 /* Add Route */
#define RTM_DELETE 0x2 /* Delete Route */ #define RTM_DELETE 0x2 /* Delete Route */
#define RTM_CHANGE 0x3 /* Change Metrics or flags */ #define RTM_CHANGE 0x3 /* Change Metrics or flags */
#define RTM_GET 0x4 /* Report Metrics */ #define RTM_GET 0x4 /* Report Metrics */
#define IFF_RUNNING 0x40 #define IFF_RUNNING 0x40
/* /*
* Structure of a Link-Level sockaddr: * Structure of a Link-Level sockaddr:
*/ */
struct sockaddr_dl { struct sockaddr_dl {
u_char sdl_len; /* Total length of sockaddr */ u_char sdl_len; /* Total length of sockaddr */
u_char sdl_family; /* AF_LINK */ u_char sdl_family; /* AF_LINK */
u_short sdl_index; /* if != 0, system given index for interface */ u_short sdl_index; /* if != 0, system given index for interface */
u_char sdl_type; /* interface type */ u_char sdl_type; /* interface type */
u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */ u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
u_char sdl_alen; /* link level address length */ u_char sdl_alen; /* link level address length */
u_char sdl_slen; /* link layer selector length */ u_char sdl_slen; /* link layer selector length */
char sdl_data[46]; /* minimum work area, can be larger; char sdl_data[46]; /* minimum work area, can be larger;
contains both if name and ll address */ contains both if name and ll address */
}; };
struct cyginet_route { struct cyginet_route {
struct sockaddr_storage prefix; struct sockaddr_storage prefix;
int plen; int plen;
int metric; int metric;
unsigned int ifindex; unsigned int ifindex;
int proto; int proto;
struct sockaddr_storage gateway; struct sockaddr_storage gateway;
}; };
#if defined(INSIDE_BABELD_CYGINET) #if defined(INSIDE_BABELD_CYGINET)
struct ifaddrs { struct ifaddrs {
struct ifaddrs *ifa_next; struct ifaddrs *ifa_next;
char *ifa_name; char *ifa_name;
unsigned int ifa_flags; unsigned int ifa_flags;
struct sockaddr *ifa_addr; struct sockaddr *ifa_addr;
union { union {
struct sockaddr *ifa_netmask; struct sockaddr *ifa_netmask;
struct sockaddr *ifa_dstaddr; struct sockaddr *ifa_dstaddr;
}; };
void *ifa_data; void *ifa_data;
}; };
struct if_nameindex { struct if_nameindex {
unsigned if_index; unsigned if_index;
char *if_name; char *if_name;
}; };
typedef struct _LIBWINET_INTERFACE_MAP_TABLE { typedef struct _LIBWINET_INTERFACE_MAP_TABLE {
PCHAR FriendlyName; PCHAR FriendlyName;
PCHAR AdapterName; PCHAR AdapterName;
BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH]; BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
DWORD PhysicalAddressLength; DWORD PhysicalAddressLength;
DWORD IfType; DWORD IfType;
int RouteFlags; int RouteFlags;
DWORD IfIndex; DWORD IfIndex;
DWORD Ipv6IfIndex; DWORD Ipv6IfIndex;
VOID *next; VOID *next;
} LIBWINET_INTERFACE_MAP_TABLE, *PLIBWINET_INTERFACE_MAP_TABLE; } LIBWINET_INTERFACE_MAP_TABLE, *PLIBWINET_INTERFACE_MAP_TABLE;
typedef struct _LIBWINET_INTERFACE { typedef struct _LIBWINET_INTERFACE {
DWORD IfType; DWORD IfType;
IF_OPER_STATUS OperStatus; IF_OPER_STATUS OperStatus;
DWORD Mtu; DWORD Mtu;
SOCKADDR Address; SOCKADDR Address;
} LIBWINET_INTERFACE, *PLIBWINET_INTERFACE; } LIBWINET_INTERFACE, *PLIBWINET_INTERFACE;
extern unsigned if_nametoindex (const char *); #if _WIN32_WINNT < _WIN32_WINNT_VISTA
extern char *if_indextoname (unsigned, char *); extern unsigned if_nametoindex (const char *);
extern struct if_nameindex *if_nameindex (void); extern char *if_indextoname (unsigned, char *);
extern void if_freenameindex (struct if_nameindex *); extern const char *inet_ntop (int, const void *, char *, socklen_t);
extern const char *inet_ntop (int, const void *, char *, socklen_t); extern int inet_pton (int, const char *, void *);
extern int inet_pton (int, const char *, void *); #else
extern int getifaddrs(struct ifaddrs **); WINSOCK_API_LINKAGE u_long WSAAPI ntohl(u_long netlong);
extern void freeifaddrs(struct ifaddrs *); #endif
#define MALLOC(x) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,x) extern struct if_nameindex *if_nameindex (void);
#define FREE(p) \ extern void if_freenameindex (struct if_nameindex *);
if(NULL != p) {HeapFree(GetProcessHeap(),0,p); p = NULL;} extern int getifaddrs(struct ifaddrs **);
#define CLOSESOCKET(s) \ extern void freeifaddrs(struct ifaddrs *);
if(INVALID_SOCKET != s) {closesocket(s); s = INVALID_SOCKET;}
#define CLOSESOCKEVENT(h) \ #define MALLOC(x) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,x)
if(WSA_INVALID_EVENT != h) {WSACloseEvent(h); h = WSA_INVALID_EVENT;} #define FREE(p) \
#define SOCKETERR(e) \ if(NULL != p) {HeapFree(GetProcessHeap(),0,p); p = NULL;}
{ \ #define CLOSESOCKET(s) \
printf("%s:%s failed: %d [%s@%d]\n", \ if(INVALID_SOCKET != s) {closesocket(s); s = INVALID_SOCKET;}
__FUNCTION__, \ #define CLOSESOCKEVENT(h) \
e, \ if(WSA_INVALID_EVENT != h) {WSACloseEvent(h); h = WSA_INVALID_EVENT;}
WSAGetLastError(), \ #define SOCKETERR(e) \
__FILE__, \ { \
__LINE__ \ printf("%s:%s failed: %d [%s@%d]\n", \
); \ __FUNCTION__, \
} e, \
WSAGetLastError(), \
#endif /* INSIDE_BABELD_CYGINET */ __FILE__, \
__LINE__ \
/* Export functions from cyginet */ ); \
int cyginet_startup(); }
void cyginet_cleanup();
#endif /* INSIDE_BABELD_CYGINET */
int cyginet_start_monitor_route_changes(int);
int cyginet_stop_monitor_route_changes(); /* Export functions from cyginet */
int cyginet_set_icmp6_redirect_accept(int); int cyginet_startup();
int cyginet_set_interface_forwards(const char * ifname, int value); void cyginet_cleanup();
int cyginet_interface_sdl(struct sockaddr_dl *, char *); int cyginet_start_monitor_route_changes(int);
int cyginet_interface_wireless(const char *, int); int cyginet_stop_monitor_route_changes();
int cyginet_interface_mtu(const char *, int); int cyginet_set_icmp6_redirect_accept(int);
int cyginet_interface_operational(const char *, int); int cyginet_set_interface_forwards(const char * ifname, int value);
int cyginet_interface_ipv4(const char *, int, unsigned char *);
int cyginet_interface_sdl(struct sockaddr_dl *, char *);
int cyginet_dump_route_table(struct cyginet_route *, int); int cyginet_interface_wireless(const char *, int);
int cyginet_loopback_index(int); int cyginet_interface_mtu(const char *, int);
int cyginet_interface_operational(const char *, int);
int cyginet_add_route_entry(const struct sockaddr *, unsigned short, int cyginet_interface_ipv4(const char *, int, unsigned char *);
const struct sockaddr *, int , unsigned int);
int cyginet_delete_route_entry(const struct sockaddr *, unsigned short, int cyginet_dump_route_table(struct cyginet_route *, int);
const struct sockaddr *, int , unsigned int); int cyginet_loopback_index(int);
int cyginet_update_route_entry(const struct sockaddr *, unsigned short,
const struct sockaddr *, int , unsigned int); int cyginet_add_route_entry(const struct sockaddr *, unsigned short,
const struct sockaddr *, int , unsigned int);
char * cyginet_ifname(const char *); int cyginet_delete_route_entry(const struct sockaddr *, unsigned short,
char * cyginet_guidname(const char *); const struct sockaddr *, int , unsigned int);
int cyginet_refresh_interface_table(); int cyginet_update_route_entry(const struct sockaddr *, unsigned short,
int cyginet_getifaddresses(char *, struct cyginet_route *, int); const struct sockaddr *, int , unsigned int);
#endif /* __CYGIFNET_H__ */ char * cyginet_ifname(const char *);
char * cyginet_guidname(const char *);
int cyginet_refresh_interface_table();
int cyginet_getifaddresses(char *, struct cyginet_route *, int);
#endif /* __CYGIFNET_H__ */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE book SYSTEM "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd"> <!DOCTYPE book SYSTEM "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd">
<book> <book>
<title>Using SlapOS in the Windows</title> <title>Using SlapOS in the Windows</title>
<bookinfo> <bookinfo>
<author> <author>
<firstname>Jondy</firstname> <firstname>Jondy</firstname>
<surname>Zhao</surname> <surname>Zhao</surname>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<chapter id="ch_install_slapos"><title>Installing SlapOS node in the Windows</title> <chapter id="ch_install_slapos"><title>Installing SlapOS node in the Windows</title>
<para>At first, we need to sign up in VIFIB community Cloud by clicking here <ulink url="https://www.slapos.org/login_form"/></para> <para>At first, we need to sign up in VIFIB community Cloud by clicking here <ulink url="https://www.slapos.org/login_form"/></para>
<para>Then download the latest slapos windows installer from <ulink url="http://www.erp5.org/dists/installer"></ulink>, the filename of windows installer look like slapos-XXX-windows-YYY-all-in-one.exe or slapos-XXX-windows-YYY.exe, XXX stands for version-release information. YYY could be X86 or x64, the former means 32-bit, the latter 64-bit windows. The all-in-one installer include all the files required by slapos node, so it can run in the computer which doesn't access internat; the later will download most of packages from internet and build, so it need more time than all-in-one installer. It's recommanded to use the former installer in case of slow or unstable internet even if the size of all-in-one installer is more than 100MB, compare of the latter which size is about 2MB.</para> <para>Then download the latest slapos windows installer from <ulink url="http://www.erp5.org/dists/installer"></ulink>, the filename of windows installer look like slapos-XXX-windows-YYY-all-in-one.exe or slapos-XXX-windows-YYY.exe, XXX stands for version-release information. YYY could be X86 or x64, the former means 32-bit, the latter 64-bit windows. The all-in-one installer include all the files required by slapos node, so it can run in the computer which doesn't access internat; the later will download most of packages from internet and build, so it need more time than all-in-one installer. It's recommanded to use the former installer in case of slow or unstable internet even if the size of all-in-one installer is more than 100MB, compare of the latter which size is about 2MB.</para>
<para>Double click the installer, click Next, Next ... <para>Double click the installer, click Next, Next ...
<note><para>If the current user isn't Administrator, you need run it as Administrator. Right click the installer, then click Run As Administrator.</para></note> <note><para>If the current user isn't Administrator, you need run it as Administrator. Right click the installer, then click Run As Administrator.</para></note>
</para> </para>
<para>At the final wizard page, click Install.</para> <para>At the final wizard page, click Install.</para>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<para>If you prefer to install slapos node from sources, refer to the chapter <xref linkend="ch_run_slapos_from_sources"/>.</para> <para>If you prefer to install slapos node from sources, refer to the chapter <xref linkend="ch_run_slapos_from_sources"/>.</para>
</chapter> </chapter>
<chapter><title>Using Slapos in the Windows</title> <chapter><title>Using Slapos in the Windows</title>
<para>After SlapOS has been installed successfully, you will find program group "SlapOS" which include the following entries: <para>After SlapOS has been installed successfully, you will find program group "SlapOS" which include the following entries:
<itemizedlist> <itemizedlist>
<listitem><para>Configure SlapOS</para></listitem> <listitem><para>Configure SlapOS</para></listitem>
...@@ -248,7 +248,7 @@ echo "[buildout] ...@@ -248,7 +248,7 @@ echo "[buildout]
extends = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/cygwin-share:/component/slapos/buildout.cfg extends = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/cygwin-share:/component/slapos/buildout.cfg
download-cache = /opt/download-cache download-cache = /opt/download-cache
prefix = ${buildout:directory} prefix = ${buildout:directory}
" > buildout.cfg " > buildout.cfg
python -S -c 'import urllib2;print urllib2.urlopen("http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/bootstrap.py").read()' > bootstrap.py python -S -c 'import urllib2;print urllib2.urlopen("http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/bootstrap.py").read()' > bootstrap.py
python -S bootstrap.py python -S bootstrap.py
bin/buildout bin/buildout
...@@ -261,7 +261,7 @@ tar xzf slapos-patches.tar.gz --no-same-owner ...@@ -261,7 +261,7 @@ tar xzf slapos-patches.tar.gz --no-same-owner
cd /opt/slapos/eggs/slapos.core-0.35-py2.7.egg cd /opt/slapos/eggs/slapos.core-0.35-py2.7.egg
patch -f --dry-run -p1 &lt; /opt/patches/slapos-core-format.patch &gt; /dev/null &amp;&amp; patch -p1 &lt; /opt/patches/slapos-core-format.patch patch -f --dry-run -p1 &lt; /opt/patches/slapos-core-format.patch &gt; /dev/null &amp;&amp; patch -p1 &lt; /opt/patches/slapos-core-format.patch
</programlisting> </programlisting>
It seems netifaces.dll need to rebase, It seems netifaces.dll need to rebase,
<programlisting> <programlisting>
cp /etc/postinstall/autorebase.bat.done /autorebase.bat cp /etc/postinstall/autorebase.bat.done /autorebase.bat
echo Pause >> /autorebase.bat echo Pause >> /autorebase.bat
...@@ -285,7 +285,8 @@ mv slapos.tar.gz slapos/ ...@@ -285,7 +285,8 @@ mv slapos.tar.gz slapos/
Then build babeld and openvpn for cygwin, we need use the sources in the slapos.package.git, they are patched for cygwin: Then build babeld and openvpn for cygwin, we need use the sources in the slapos.package.git, they are patched for cygwin:
<programlisting> <programlisting>
cd /opt/git/slapos.package/windows/babeld cd /opt/git/slapos.package/windows/babeld
make WINVER=XP # WINVER could be XP, VISTA, WIN7, WIN8
WINVER=XP make
cp babeld.exe /usr/bin cp babeld.exe /usr/bin
cd /opt/git/slapos.package/windows/openvpn cd /opt/git/slapos.package/windows/openvpn
...@@ -315,7 +316,7 @@ cd /opt/git/slapos.package/windows/docs ...@@ -315,7 +316,7 @@ cd /opt/git/slapos.package/windows/docs
# Then replace the old file name with this one in the ./Makefile, then run make # Then replace the old file name with this one in the ./Makefile, then run make
make make
</programlisting> </programlisting>
Download pyOpenSSL-0.13.tar.gz, miniupnpc-1.8.tar.gz, Download pyOpenSSL-0.13.tar.gz, miniupnpc-1.8.tar.gz,
<programlisting> <programlisting>
mkdir -p /opt/downloads mkdir -p /opt/downloads
cd /opt/downloads cd /opt/downloads
...@@ -418,13 +419,13 @@ In the slapos.package.git, add branch 'cygwin', it includes most of sources for ...@@ -418,13 +419,13 @@ In the slapos.package.git, add branch 'cygwin', it includes most of sources for
<para>Update sources in the slapos.core.git, then push it</para> <para>Update sources in the slapos.core.git, then push it</para>
<para>Update sources in the re6stnet.git, then push it</para> <para>Update sources in the re6stnet.git, then push it</para>
<para>Update sources in the slapos.package.git, then push it.</para> <para>Update sources in the slapos.package.git, then push it.</para>
<para>Update egg psutil, for example, upgrade from 0.6.1 to 1.0.0, <para>Update egg psutil, for example, upgrade from 0.6.1 to 1.0.0,
<programlisting> <programlisting>
wget http://psutil.googlecode.com/files/psutil-1.0.0.tar.gz wget http://psutil.googlecode.com/files/psutil-1.0.0.tar.gz
tar xzf psutil-1.0.0.tar.gz tar xzf psutil-1.0.0.tar.gz
cd psutil-1.0.0 cd psutil-1.0.0
patch -p1 &lt; /opt/git/slapos.package/windows/patches/psutil-0.6.2.patch patch -p1 &lt; /opt/git/slapos.package/windows/patches/psutil-0.6.2.patch
# change the version to 1.0.1 in the psutil/__init__.py # change the version to 1.0.1 in the psutil/__init__.py
python setup.py sdist python setup.py sdist
</programlisting> </programlisting>
Then upload the source packages dist/psutil-1.0.1.tar.gz to http://www.nexedi.org/static/packages/source/slapos.buildout/ Then upload the source packages dist/psutil-1.0.1.tar.gz to http://www.nexedi.org/static/packages/source/slapos.buildout/
...@@ -507,7 +508,7 @@ Then upload the source packages dist/psutil-1.0.1.tar.gz to http://www.nexedi.or ...@@ -507,7 +508,7 @@ Then upload the source packages dist/psutil-1.0.1.tar.gz to http://www.nexedi.or
<note id="package-docbook-utils"><para> <note id="package-docbook-utils"><para>
There is another package: Text/docbook-utils, it only used to generate user-guide.html from source file. But this package will increase required disk size remarkable, because many dependent packages are installed by Cygwin, so it recommand not to check this package when building slapos source or the installer. Only you really need to build the document, then install this package from cygwin setup gui interface by double clicking setup.exe downloaded from cygwin.com</para></note> There is another package: Text/docbook-utils, it only used to generate user-guide.html from source file. But this package will increase required disk size remarkable, because many dependent packages are installed by Cygwin, so it recommand not to check this package when building slapos source or the installer. Only you really need to build the document, then install this package from cygwin setup gui interface by double clicking setup.exe downloaded from cygwin.com</para></note>
</para> </para>
<!-- <!--
<para> <para>
The following packages are requied by re6stnet The following packages are requied by re6stnet
<itemizedlist> <itemizedlist>
...@@ -544,4 +545,3 @@ The following packages are requied by re6stnet ...@@ -544,4 +545,3 @@ The following packages are requied by re6stnet
--> -->
</appendix> </appendix>
</book> </book>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment