<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.zoxx.net/notes/index.php/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Ludo's notes</title>
  <link>http://www.zoxx.net/notes/index.php/</link>
  <atom:link href="http://www.zoxx.net/notes/index.php/feed/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>en</language>
  <pubDate>Thu, 09 Feb 2012 10:34:39 -0800</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>FreeBSD on EC2 Amazon Web Services</title>
    <link>http://www.zoxx.net/notes/index.php/post/2012/01/18/FreeBSD-on-EC2-Amazon-Web-Services</link>
    <guid isPermaLink="false">urn:md5:aa1a61578b6545ddefb0d9fe65c63444</guid>
    <pubDate>Wed, 18 Jan 2012 09:54:00 -0800</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>unix</category>
        <category>aws</category><category>cloud</category><category>ec2</category><category>freebsd</category>    
    <description>    &lt;p&gt;&lt;img src=&quot;http://www.zoxx.net/notes/public/.freebsd_ec2_01_m.jpg&quot; alt=&quot;AWS Console with FreeBSD instance running&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;AWS Console with FreeBSD instance running, Jan 2012&quot; /&gt;&lt;/p&gt;


&lt;p&gt;As now the only way to have FreeBSD running on Amazon is to have it running with the Windows AMIs.&lt;/p&gt;


&lt;h2&gt;Find FreeBSD instance&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-describe-images -a | grep -i freebsd | grep -iv windows
IMAGE   ami-0d08cc64    118940168514/FreeBSD/EC2 7.4b-RELEASE Cluster Compute   118940168514    available       public          x86_64  machine                             ebs     hvm     xen
IMAGE   ami-d29b6abb    118940168514/FreeBSD/EC2 8.2-RC1        118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-4a15e423    118940168514/FreeBSD/EC2 8.2-RC1.5      118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-c003f3a9    118940168514/FreeBSD/EC2 8.2-RC3        118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-423bc82b    118940168514/FreeBSD/EC2 8.2-RELEASE    118940168514    available       public          i386    machine aki-407d9529
                        ebs     paravirtual     xen
IMAGE   ami-646c9e0d    118940168514/FreeBSD/EC2 8.2a-RELEASE amd64/HVM 118940168514    available       public          x86_64  machine    ebs      hvm     xen
IMAGE   ami-290eca40    118940168514/FreeBSD/EC2 8.2b-RELEASE Cluster Compute   118940168514    available       public          x86_64  machine                             ebs     hvm     xen
IMAGE   ami-b55f99dc    118940168514/FreeBSD/EC2 8.2b-RELEASE i386/XEN  118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-c01aeca9    118940168514/FreeBSD/EC2 9.0-CURRENT 2010-12-12 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-a0fc0dc9    118940168514/FreeBSD/EC2 9.0-CURRENT 2010-12-29 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-f4db2a9d    118940168514/FreeBSD/EC2 9.0-CURRENT 2011-01-01 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-8cce3fe5    118940168514/FreeBSD/EC2 9.0-CURRENT 2011-01-04 118940168514    available       public          i386    machine aki-407d9529                        ebs     paravirtual     xen
IMAGE   ami-479f482e    118940168514/FreeBSD/EC2 9.0-RELEASE Cluster Compute    118940168514    available       public          x86_64  machine                             ebs     hvm     xen
IMAGE   ami-7a41b713    844886073610/FreeBSD-9 Base     844886073610    available       public          i386    machine aki-407d9529       ebs      paravirtual     xen
IMAGE   ami-c841b7a1    844886073610/FreeBSD-9 Python   844886073610    available       public          i386    machine aki-407d9529       ebs      paravirtual     xen
root@blackbox:~/ec2#
&lt;/pre&gt;


&lt;h2&gt;Start your FreeBSD instance&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-run-instances ami-7a41b713 -k ${EC2_KEYPAIR} -t t1.micro
RESERVATION     r-79e5d618      955701963229    default
INSTANCE        i-cec7c0ac      ami-7a41b713                    pending ec2-keypair     0               t1.micro        2012-01-18T18:17:21+0000    us-east-1a      aki-407d9529                    monitoring-disabled                                     ebs                        paravirtual      xen             sg-7ac33e12     default
root@blackbox:~/ec2# 
&lt;/pre&gt;


&lt;h2&gt;Check the instance is running&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-describe-instances i-cec7c0ac
RESERVATION     r-79e5d618      955701963229    default
INSTANCE        i-cec7c0ac      ami-7a41b713    ec2-23-20-17-21.compute-1.amazonaws.com ip-10-244-135-190.ec2.internal  running ec2-keypair0
                t1.micro        2012-01-18T18:17:21+0000        us-east-1a      aki-407d9529                    monitoring-disabled     23.20.17.21 10.244.135.190                  ebs                                     paravirtual     xen             sg-7ac33e12     default
BLOCKDEVICE     /dev/sda1       vol-094d7364    2012-01-18T18:18:05.000Z
BLOCKDEVICE     /dev/sdb        vol-0b4d7366    2012-01-18T18:18:05.000Z
root@blackbox:~/ec2# 
0*$ zsh                    
&lt;/pre&gt;


&lt;h2&gt;Wait few minutes to get the instance fully loaded and ssh&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ssh -i ec2-keypair ec2-23-20-17-21.compute-1.amazonaws.com
&lt;/pre&gt;


&lt;h2&gt;If you are not able to login check what is going on in the console&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~/ec2# ec2-get-console-output i-cec7c0ac
i-cec7c0ac
2012-01-18T18:20:55+0000
Xen Minimal OS!
  start_info: 0xa01000(VA)
    nr_pages: 0x26700
  shared_inf: 0xdf617000(MA)
     pt_base: 0xa04000(VA)
nr_pt_frames: 0x9
    mfn_list: 0x967000(VA)
   mod_start: 0x0(VA)
     mod_len: 0
       flags: 0x0
    cmd_line: root=/dev/sda1 ro 4
  stack:      0x946780-0x966780
MM: Init
      _text: 0x0(VA)
     _etext: 0x621f5(VA)
   _erodata: 0x76000(VA)
     _edata: 0x7b6d4(VA)
stack start: 0x946780(VA)
       _end: 0x966d34(VA)
  start_pfn: a10
    max_pfn: 26700
Mapping memory range 0xc00000 - 0x26700000
setting 0x0-0x76000 readonly
skipped 0x1000
MM: Initialise page allocator for b3e000(b3e000)-0(26700000)
MM: done
Demand map pfns at 26701000-36701000.
Heap resides at 36702000-76702000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x26701000.
Initialising scheduler
Thread &amp;quot;Idle&amp;quot;: pointer: 0x36702008, stack: 0xbf0000
Initialising xenbus
Thread &amp;quot;xenstore&amp;quot;: pointer: 0x36702478, stack: 0x26600000
Dummy main: start_info=0x966880
Thread &amp;quot;main&amp;quot;: pointer: 0x367028e8, stack: 0x26610000
&amp;quot;main&amp;quot; &amp;quot;root=/dev/sda1&amp;quot; &amp;quot;ro&amp;quot; &amp;quot;4&amp;quot; 
vbd 2049 is hd0
******************* BLKFRONT for device/vbd/2049 **********


backend at /local/domain/0/backend/vbd/524/2049
Failed to read /local/domain/0/backend/vbd/524/2049/feature-barrier.
Failed to read /local/domain/0/backend/vbd/524/2049/feature-flush-cache.
2097152 sectors of 0 bytes
**************************
vbd 2064 is hd1
******************* BLKFRONT for device/vbd/2064 **********


backend at /local/domain/0/backend/vbd/524/2064
Failed to read /local/domain/0/backend/vbd/524/2064/feature-barrier.
Failed to read /local/domain/0/backend/vbd/524/2064/feature-flush-cache.
18874368 sectors of 0 bytes
**************************
[H[J  Booting 'FreeBSD kernel'

root (hd0)
 Filesystem type is ext2fs, using whole disk
kernel /boot/kernel/kernel vfs.root.mountfrom=ufs:da1s1,machdep.idle_mwait=0,bo
ot_verbose=1

xc_dom_probe_bzimage_kernel: kernel is not a bzImage
close blk: backend at /local/domain/0/backend/vbd/524/2049
close blk: backend at /local/domain/0/backend/vbd/524/2064
WARNING: loader(8) metadata is missing!
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
APIC: Using the MPTable enumerator.
SMP: Added CPU 0 (BSP)
Copyright (c) 1992-2010 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #68: Sun Dec 12 03:52:29 UTC 2010
    root@chch.daemonology.net:/usr/obj/i386.i386/usr/src/sys/XEN i386
WARNING: WITNESS option enabled, expect reduced performance.
Xen reported: 2659.998 MHz processor.
Timecounter &amp;quot;ixen&amp;quot; frequency 1953125 Hz quality 0
CPU: Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz (2660.00-MHz 686-class CPU)
  Origin = &amp;quot;GenuineIntel&amp;quot;  Id = 0x1067a  Family = 6  Model = 17  Stepping = 10
  Features=0xbfe3fbff&amp;lt;FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE&amp;gt;
  Features2=0x40ce3bd&amp;lt;SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,DCA,SSE4.1,XSAVE&amp;gt;
  AMD Features=0x20100000&amp;lt;NX,LM&amp;gt;
  AMD Features2=0x1&amp;lt;LAHF&amp;gt;

Instruction TLB: 4 KB Pages, 4-way set associative, 128 entries
1st-level instruction cache: 32 KB, 8-way set associative, 64 byte line size
1st-level data cache: 32 KB, 8-way set associative, 64 byte line size
L2 cache: 6144 kbytes, 16-way associative, 64 bytes/line
real memory  = 644874240 (615 MB)
Physical memory chunk(s):
0x00000000007d0000 - 0x0000000025b4dfff, 624418816 bytes (152446 pages)
avail memory = 621105152 (592 MB)
[XEN] IPI cpu=0 irq=128 vector=RESCHEDULE_VECTOR (0)
[XEN] IPI cpu=0 irq=129 vector=CALL_FUNCTION_VECTOR (1)
Event-channel device installed.
random: &amp;lt;entropy source, Software, Yarrow&amp;gt;
io: &amp;lt;I/O&amp;gt;
mem: &amp;lt;memory&amp;gt;
Pentium Pro MTRR support enabled
null: &amp;lt;null device, zero device&amp;gt;
nfslock: pseudo-device
[XEN] xen_rtc_probe: probing Hypervisor RTC clock
rtc0: &amp;lt;Xen Hypervisor Clock&amp;gt; on motherboard
[XEN] xen_rtc_attach: attaching Hypervisor RTC clock
rtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500000000s)
xs_probe: Probe retuns 0
xenstore0: &amp;lt;XenStore&amp;gt; on motherboard
Grant table initialized
xc0: &amp;lt;Xen Console&amp;gt; on motherboard
Device configuration finished.
procfs registered
Timecounters tick every 10.000 msec
[XEN] hypervisor wallclock nudged; nudging TOD.
lo0: bpf attached
xenbusb_front0: &amp;lt;Xen Frontend Devices&amp;gt; on xenstore0
xn0: &amp;lt;Virtual Network Interface&amp;gt; at device/vif/0 on xenbusb_front0
xn0: bpf attached
xn0: Ethernet address: 12:31:3d:00:80:50
xenbusb_back0: &amp;lt;Xen Backend Devices&amp;gt; on xenstore0
xctrl0: &amp;lt;Xen Control Device&amp;gt; on xenstore0
xbd0: 1024MB &amp;lt;Virtual Block Device&amp;gt; at device/vbd/2049 on xenbusb_front0
xbd0: attaching as da0
GEOM: new disk da0
xbd1: 9216MB &amp;lt;Virtual Block Device&amp;gt; at device/vbd/2064 on xenbusb_front0
xbd1: attaching as da1
WARNING: WITNESS option enabled, expect reduced performance.
GEOM: new disk da1
command 0xc2ab1800 not in queue, flags = 0xdeadc0de, bit = 0x10
panic: command not in queue
cpuid = 0
KDB: enter: panic
[ thread pid 12 tid 100024 ]
Stopped at      kdb_enter+0x3a: movl    $0,kdb_why
db&amp;gt; 
root@blackbox:~/ec2# 
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2012/01/18/FreeBSD-on-EC2-Amazon-Web-Services#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/01/18/FreeBSD-on-EC2-Amazon-Web-Services#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/166</wfw:commentRss>
      </item>
    
  <item>
    <title>Fedora 15 Postfix SMTP relay server with MySql Authentication</title>
    <link>http://www.zoxx.net/notes/index.php/post/2012/01/10/Fedora-15-Postfix-SMTP-relay-server-with-MySql-Authentication</link>
    <guid isPermaLink="false">urn:md5:9b1c751faef77901189d8164cf1bd5bb</guid>
    <pubDate>Tue, 10 Jan 2012 08:59:00 -0800</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>unix</category>
        <category>fedora</category><category>linux</category><category>postfix</category><category>smtp</category><category>swaks</category>    
    <description>    &lt;h3&gt;Host information&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# cat /etc/redhat-release
Fedora release 15 (Lovelock)
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h3&gt;How to add a new mysql user&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql -u postfix -p
Enter password:

mysql&amp;gt; use postfix
mysql&amp;gt; INSERT INTO users VALUES ('new_user', ENCRYPT('password'));
&lt;/pre&gt;


&lt;h3&gt;MySql Setup&lt;/h3&gt;


&lt;h4&gt;Install MySql&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# yum install mysql mysql-server
&lt;/pre&gt;


&lt;h4&gt;Turn on the service&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# chkconfig mysqld on
&lt;/pre&gt;


&lt;h4&gt;Start the service (or reboot your server)&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# /etc/init.d/mysqld start
Starting mysqld (via systemctl):                           [  OK  ]
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h4&gt;Check the mysql server is working correctly&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.18 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&amp;gt; show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql&amp;gt;
&lt;/pre&gt;


&lt;h4&gt;Assign the root password&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysqladmin -u root password password
&lt;/pre&gt;


&lt;h4&gt;Try this new password&lt;/h4&gt;
&lt;pre&gt;
[root@smtp1 ~]# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.5.18 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&amp;gt; show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql&amp;gt;
&lt;/pre&gt;


&lt;h4&gt;Create a postfix database in mysql (to store our virtual users)&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysqladmin create postfix -p
Enter password:
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h4&gt;Assign the postfix user to the postfix database&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql -p

Enter password:
mysql&amp;gt; grant all on postfix.* to postfix@&amp;quot;localhost&amp;quot; identified by &amp;quot;postfix&amp;quot;;
&lt;/pre&gt;


&lt;h4&gt;Create the table dedicated to store smtp users information&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# mysql -u postfix -p
Enter password:
mysql&amp;gt; use postfix
mysql&amp;gt; CREATE TABLE users ( user varchar(255) NOT NULL, password varchar(255) NOT NULL, PRIMARY KEY (user) ) ;
Query OK, 0 rows affected (0.04 sec)

mysql&amp;gt; show tables;
+-------------------+
| Tables_in_postfix |
+-------------------+
| users             |
+-------------------+
1 row in set (0.00 sec)


mysql&amp;gt;
&lt;/pre&gt;


&lt;h3&gt;Postfix setup&lt;/h3&gt;


&lt;h4&gt;Install Postfix&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# rpm -qa | grep postfix
postfix-2.8.2-2.fc15.x86_64
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h4&gt;Check mysql is built-in in this postfix version&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# postconf -m | grep mysql
mysql
[root@smtp1 postfix]# 
&lt;/pre&gt;


&lt;h4&gt;Turn on postfix service&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# chkconfig --list | grep postfix

Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overridden by native
      systemd configuration.

postfix             0:off     1:off     2:off     3:off     4:off     5:off     6:off

[root@smtp1 ~]#

[root@smtp1 ~]# chkconfig postfix on

[root@smtp1 ~]# /etc/init.d/postfix start
Starting postfix (via systemctl):                          [  OK  ]
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h4&gt;Check the daemon is running&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 smtp1.rack.airband.net ESMTP Postfix
HELO idefix
250 smtp1.rack.airband.net
MAIL FROM: ludo@epita.fr250 2.1.0 Ok
RCPT TO: ludo@epita.fr
250 2.1.5 Ok

DATA
354 End data with &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;.&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
test
.
250 2.0.0 Ok: queued as 78F0A3841E
^]
telnet&amp;gt; close
Connection closed.
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h4&gt;Check the queue works correctly&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 log]# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
78F0A3841E      308 Mon Jan  9 15:26:34  ludo@epita.fr
(host mx-2.ig-iit.com[163.5.42.12] refused to talk to me: 450 See http://en.wikipedia.org/wiki/Greylisting - Try later)
                                         ludo@epita.fr

-- 0 Kbytes in 1 Request.
[root@smtp1 log]#
&lt;/pre&gt;


&lt;h4&gt;Send a test email&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 log]# ( echo subject: test; echo ) | sendmail -Am -v lfrancois@gmail.comMail Delivery Status Report will be mailed to &amp;lt;root&amp;gt;.
[root@smtp1 log]# mailq
Mail queue is empty

[root@smtp1 log]#
&lt;/pre&gt;


&lt;h4&gt;Create postfix configuration file defining how to pull user information from mysql&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 mysql]# pwd
/etc/postfix/mysql
[root@smtp1 mysql]# cat mysql-virtual_mailboxes.cf
user = postfix
password = postfix
dbname = postfix
table = users
select_field = CONCAT(SUBSTRING_INDEX(user,'@',-1),'/',SUBSTRING_INDEX(user,'@',1),'/')
where_field = user
hosts = 127.0.0.1
[root@smtp1 mysql]# 
&lt;/pre&gt;


&lt;h4&gt;Modify main.cf postfix configuration file&lt;/h4&gt;


&lt;h5&gt;Save a copy of the original file&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 postfix]# cp -a main.cf main.cf.$(date -I)
&lt;/pre&gt;


&lt;h5&gt;Define how to access the user accounts&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/mysql-virtual_mailboxes.cf'
&lt;/pre&gt;


&lt;h5&gt;Enable SASL Auth&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'smtpd_sasl_auth_enable = yes'
[root@smtp1 ~]# postconf -e 'broken_sasl_auth_clients = yes'
&lt;/pre&gt;


&lt;h5&gt;Make sure only authenticated clients have access to the smtp server&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination'
&lt;/pre&gt;


&lt;h5&gt;Turn on TLS and define where are the keys&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# postconf -e 'smtpd_use_tls = yes'
[root@smtp1 ~]# postconf -e 'smtpd_tls_cert_file = /etc/postfix/smtpd.cert'
[root@smtp1 ~]# postconf -e 'smtpd_tls_key_file = /etc/postfix/smtpd.key'
&lt;/pre&gt;


&lt;h5&gt;Below the final configuration file once settings applied&lt;/h5&gt;
&lt;pre&gt;
[root@smtp1 ~]# diff -u /etc/postfix/main.cf.2012-01-09 /etc/postfix/main.cf
--- /etc/postfix/main.cf.2012-01-09     2011-03-23 18:51:43.000000000 +0000
+++ /etc/postfix/main.cf        2012-01-10 00:24:11.000000000 +0000
@@ -113,7 +113,7 @@
 #inet_interfaces = all
 #inet_interfaces = $myhostname
 #inet_interfaces = $myhostname, localhost
-inet_interfaces = localhost
+inet_interfaces = all
 
 # Enable IPv4, and IPv6 if supported
 inet_protocols = all
@@ -248,7 +248,7 @@
 #
 #mynetworks_style = class
 #mynetworks_style = subnet
-#mynetworks_style = host
+mynetworks_style = host
 
 # Alternatively, you can specify the mynetworks list by hand, in
 # which case Postfix ignores the mynetworks_style setting.
@@ -674,3 +674,10 @@
 # readme_directory: The location of the Postfix README files.
 #
 readme_directory = /usr/share/doc/postfix-2.8.2/README_FILES
+virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/mysql-virtual_mailboxes.cf
+smtpd_sasl_auth_enable = yes
+broken_sasl_auth_clients = yes
+smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
+smtpd_use_tls = yes
+smtpd_tls_cert_file = /etc/postfix/smtpd.cert
+smtpd_tls_key_file = /etc/postfix/smtpd.key
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h4&gt;Modify master.cf file to enable 465 and 587 ports&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# cp -a master.cf master.cf.$(date -I)
[root@smtp1 ~]# diff -u /etc/postfix/master.cf.2012-01-09 /etc/postfix/master.cf
--- /etc/postfix/master.cf.2012-01-09   2011-03-23 18:51:42.000000000 +0000
+++ /etc/postfix/master.cf      2012-01-09 19:14:08.000000000 +0000
@@ -13,16 +13,16 @@
 #smtpd     pass  -       -       n       -       -       smtpd
 #dnsblog   unix  -       -       n       -       0       dnsblog
 #tlsproxy  unix  -       -       n       -       0       tlsproxy
-#submission inet n       -       n       -       -       smtpd
-#  -o smtpd_tls_security_level=encrypt
-#  -o smtpd_sasl_auth_enable=yes
-#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
-#  -o milter_macro_daemon_name=ORIGINATING
-#smtps     inet  n       -       n       -       -       smtpd
-#  -o smtpd_tls_wrappermode=yes
-#  -o smtpd_sasl_auth_enable=yes
-#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
-#  -o milter_macro_daemon_name=ORIGINATING
+submission inet n       -       n       -       -       smtpd
+  -o smtpd_tls_security_level=encrypt
+  -o smtpd_sasl_auth_enable=yes
+  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
+  -o milter_macro_daemon_name=ORIGINATING
+smtps     inet  n       -       n       -       -       smtpd
+  -o smtpd_tls_wrappermode=yes
+  -o smtpd_sasl_auth_enable=yes
+  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
+  -o milter_macro_daemon_name=ORIGINATING
 #628       inet  n       -       n       -       -       qmqpd
 pickup    fifo  n       -       n       60      1       pickup
 cleanup   unix  n       -       n       -       0       cleanup
[root@smtp1 ~]# 
&lt;/pre&gt;


&lt;h3&gt;ssl key generation&lt;/h3&gt;


&lt;h4&gt;Generate the key&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# openssl req -new -outform PEM -out /etc/postfix/smtpd.cert -newkey rsa:2048 -nodes -keyout /etc/postfix/smtpd.key -keyform PEM -days 3650 -x509Generating a 2048 bit RSA private key
..............................+++
......................................................+++
writing new private key to '/etc/postfix/smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:US
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:Los Angeles
Organization Name (eg, company) [Default Company Ltd]:MyCompany
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:support@zoxx.net
[root@smtp1 postfix]#
&lt;/pre&gt;


&lt;h4&gt;Make sure the files are at the correct place and change the permissions&lt;/h4&gt;
&lt;pre&gt;
[root@smtp1 postfix]# ls -altr smtpd.*
-rw-r----- 1 root postfix 1704 Jan  9 19:11 smtpd.key
-rw-r----- 1 root postfix 1281 Jan  9 19:11 smtpd.cert
[root@smtp1 postfix]# 
&lt;/pre&gt;



&lt;h3&gt;saslauthd configuration&lt;/h3&gt;


&lt;h4&gt;Install saslauthd with the sql module&lt;/h4&gt;
&lt;pre&gt;
[root@smtp1 postfix]# yum install cyrus-sasl cyrus-sasl-sql
&lt;/pre&gt;


&lt;h4&gt;Setup saslauthd&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 postfix]# cd /etc/sasl2
[root@smtp1 sasl2]# diff -u smtpd.conf.2012-01-10 smtpd.conf
--- smtpd.conf.2012-01-10       2011-03-23 18:51:44.000000000 +0000
+++ smtpd.conf  2012-01-10 00:33:18.000000000 +0000
@@ -1,2 +1,9 @@
 pwcheck_method: saslauthd
 mech_list: plain login
+allow_plaintext: true
+auxprop_plugin: mysql
+sql_hostnames: 127.0.0.1
+sql_user: postfix
+sql_passwd: postfix
+sql_database: mail
+sql_select: select password from users where user = '%u'
[root@smtp1 sasl2]# 
&lt;/pre&gt;


&lt;h4&gt;Turn on sasl&lt;/h4&gt;

&lt;pre&gt;
[root@smtp1 ~]# chkconfig saslauthd on
[root@smtp1 ~]# mkdir -p /var/run/saslauthd
[root@smtp1 ~]# /etc/init.d/saslauthd start
Starting saslauthd (via systemctl):                        [  OK  ]
[root@smtp1 ~]#
&lt;/pre&gt;


&lt;h3&gt;Configure PAM to get smtp information on MySQL&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 pam.d]# ls -altr | grep smtp
-rw-r--r--.  1 root root   76 Mar 23  2011 smtp.postfix
lrwxrwxrwx.  1 root root   25 Aug 25 13:15 smtp -&amp;gt; /etc/alternatives/mta-pam
[root@smtp1 pam.d]#

[root@smtp1 pam.d]# cat smtp
auth required pam_mysql.so user=postfix passwd=postfix host=127.0.0.1 db=postfix table=users usercolumn=user passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=postfix passwd=postfix host=127.0.0.1 db=postfix table=users usercolumn=user passwdcolumn=password crypt=1
[root@smtp1 pam.d]#
&lt;/pre&gt;


&lt;h3&gt;Restart all services a last time&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# /etc/init.d/mysql restart
[root@smtp1 ~]# /etc/init.d/saslauthd restart
[root@smtp1 ~]# /etc/init.d/postfix restart
&lt;/pre&gt;


&lt;h3&gt;How to add a new mysql user&lt;/h3&gt;

&lt;pre&gt;
[root@smtp1 ~]# mysql -u postfix -p
Enter password:

mysql&amp;gt; use postfixmysql&amp;gt; INSERT INTO users VALUES ('new_user', ENCRYPT('password'));
&lt;/pre&gt;


&lt;h3&gt;Test with Swaks the server is working correctly&lt;/h3&gt;

&lt;pre&gt;
falabala:~# swaks --from ludo@zoxx.net --to lfrancois@gmail.com --server smtp1.zoxx.net -a -au ludo -ap password -tls --port 25
=== Trying smtp1.zoxx.net:25...
=== Connected to smtp1.zoxx.net.
&amp;lt;-  220 smtp1.zoxx.net ESMTP Postfix
 -&amp;gt; EHLO falbala.dedibox.fr
&amp;lt;-  250-smtp1.zoxx.net
&amp;lt;-  250-PIPELINING
&amp;lt;-  250-SIZE 10240000
&amp;lt;-  250-VRFY
&amp;lt;-  250-ETRN
&amp;lt;-  250-STARTTLS
&amp;lt;-  250-AUTH LOGIN PLAIN
&amp;lt;-  250-AUTH=LOGIN PLAIN
&amp;lt;-  250-ENHANCEDSTATUSCODES
&amp;lt;-  250-8BITMIME
&amp;lt;-  250 DSN
 -&amp;gt; STARTTLS
&amp;lt;-  220 2.0.0 Ready to start TLS
=== TLS started w/ cipher DHE-RSA-AES256-SHA
=== TLS peer subject DN=&amp;quot;/C=US/L=Los Angeles/O=MyCompany/emailAddress=support@zoxx.net&amp;quot;
 ~&amp;gt; EHLO falbala.dedibox.fr
&amp;lt;~  250-smtp1.zoxx.net
&amp;lt;~  250-PIPELINING
&amp;lt;~  250-SIZE 10240000
&amp;lt;~  250-VRFY
&amp;lt;~  250-ETRN
&amp;lt;~  250-AUTH LOGIN PLAIN
&amp;lt;~  250-AUTH=LOGIN PLAIN
&amp;lt;~  250-ENHANCEDSTATUSCODES
&amp;lt;~  250-8BITMIME
&amp;lt;~  250 DSN
 ~&amp;gt; AUTH LOGIN
&amp;lt;~  334 VXNlcm5hbWU6
 ~&amp;gt; bHVkbw==
&amp;lt;~  334 UGFzc3dvcmQ6
 ~&amp;gt; cGFzc3dvcmQ=
&amp;lt;~  235 2.7.0 Authentication successful
 ~&amp;gt; MAIL FROM:&amp;lt;ludo@zoxx.net&amp;gt;
&amp;lt;~  250 2.1.0 Ok
 ~&amp;gt; RCPT TO:&amp;lt;lfrancois@gmail.com&amp;gt;
&amp;lt;~  250 2.1.5 Ok
 ~&amp;gt; DATA
&amp;lt;~  354 End data with &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;.&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;
 ~&amp;gt; Date: Tue, 10 Jan 2012 03:14:12 +0100
 ~&amp;gt; To: lfrancois@gmail.com
 ~&amp;gt; From: ludo@zoxx.net
 ~&amp;gt; Subject: test Tue, 10 Jan 2012 03:14:12 +0100
 ~&amp;gt; X-Mailer: swaks v20100211.0 jetmore.org/john/code/swaks/
 ~&amp;gt;
 ~&amp;gt; This is a test mailing
 ~&amp;gt;
 ~&amp;gt; .
&amp;lt;~  250 2.0.0 Ok: queued as B7ACF3841C
 ~&amp;gt; QUIT
&amp;lt;~  221 2.0.0 Bye
=== Connection closed with remote host.
falabala:~# 
&lt;/pre&gt;


&lt;h3&gt;Check the server is not in open relay and denied&lt;/h3&gt;

&lt;pre&gt;
ludo@idefix:~ % telnet smtp1.zoxx.net 25             
Trying smtp1.zoxx.net...
Connected to smtp1.zoxx.net.
Escape character is '^]'.
220 smtp1.zoxx.net ESMTP Postfix
HELO idefix
250 smtp1.zoxx.net
MAIL FROM: ludo@epita.fr
250 2.1.0 Ok
RCPT TO: lfrancois@gmail.com
554 5.7.1 &amp;lt;lfrancois@gmail.com&amp;gt;: Relay access denied
^]
telnet&amp;gt; close
Connection closed.
ludo@idefix:~ %
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2012/01/10/Fedora-15-Postfix-SMTP-relay-server-with-MySql-Authentication#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2012/01/10/Fedora-15-Postfix-SMTP-relay-server-with-MySql-Authentication#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/165</wfw:commentRss>
      </item>
    
  <item>
    <title>Why does btrfs show up twice the capacity available?</title>
    <link>http://www.zoxx.net/notes/index.php/post/2011/12/15/Why-does-btrfs-show-up-twice-the-capacity-available</link>
    <guid isPermaLink="false">urn:md5:ae5003e14a8f9dc0ad4809fab32da4bc</guid>
    <pubDate>Thu, 15 Dec 2011 20:52:00 -0800</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>btrfs</category><category>dd</category><category>debian</category><category>file system</category><category>mkfs</category><category>storage</category><category>ubuntu</category>    
    <description>    &lt;p&gt;If you decide to use the btrfs data (or/and metadata) replication, you will see the df command reports you your storage get used twice as fast as you expect. Btrfs doesn't act as for example mdadm. Each file will get striped at the block level across all devices available depending on the replication policy selected.&lt;/p&gt;


&lt;h3&gt;Create a new test file system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkfs.btrfs -m raid1 -d raid1 -L btrfs01 /dev/sdb /dev/sdc

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

adding device /dev/sdc id 2
fs created label btrfs01 on /dev/sdb
     nodesize 4096 leafsize 4096 sectorsize 4096 size 298.02GB
Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Mount it&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkdir /mnt/btrfs01

root@blackbox:~# mkdir /mnt/btrfs01
root@blackbox:~# mount /dev/sdb /mnt/btrfs01/
&lt;/pre&gt;


&lt;h3&gt;Check the capacity available&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   56K  296G   1% /mnt/btrfs01
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Create a new file (dd)&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# dd if=/dev/zero of=/mnt/btrfs01/file.10G bs=1M count=$((10*1024))
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 176.188 s, 60.9 MB/s
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Check how much space this file uses on the file system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   21G  276G   7% /mnt/btrfs01
root@blackbox:~#

root@blackbox:~# btrfs-show
Label: btrfs01  uuid: d2b77569-a8be-4ec7-862a-d0fc1e6c8511
     Total devices 2 FS bytes used 10.01GB
     devid    1 size 149.01GB used 12.03GB path /dev/sdb
     devid    2 size 149.01GB used 12.01GB path /dev/sdc

Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;Get the usage explanation from btrfs tool&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# btrfs filesystem df /mnt/btrfs01/
Data, RAID1: total=11.00GB, used=10.00GB
Data: total=8.00MB, used=0.00
System, RAID1: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=1.00GB, used=14.11MB
Metadata: total=8.00MB, used=0.00
root@blackbox:~#
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2011/12/15/Why-does-btrfs-show-up-twice-the-capacity-available#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2011/12/15/Why-does-btrfs-show-up-twice-the-capacity-available#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/164</wfw:commentRss>
      </item>
    
  <item>
    <title>Create a btrfs file system on Debian wheezy</title>
    <link>http://www.zoxx.net/notes/index.php/post/2011/12/15/Create-a-btrfs-file-system-on-Debian-wheezy</link>
    <guid isPermaLink="false">urn:md5:f5e0d6fbdbdfbfa0db14fd61a9b1e691</guid>
    <pubDate>Thu, 15 Dec 2011 18:34:00 -0800</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>unix</category>
        <category>btrfs</category><category>debian</category><category>file system</category><category>linux</category><category>mkfs</category><category>storage</category>    
    <description>    &lt;h3&gt;Debian version&lt;/h3&gt;

&lt;pre&gt;
ludo@blackbox:~ % cat /etc/debian_version          
wheezy/sid
ludo@blackbox:~ % uname -a                               
Linux blackbox 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 athlon i386 GNU/Linux
ludo@blackbox:~ %     
&lt;/pre&gt;


&lt;h3&gt;btrfs package install&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# apt-get install btrfs-tools
&lt;/pre&gt;


&lt;h3&gt;Reinitialize all LUNs in use for this new file system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# dd if=/dev/zero of=/dev/sdb bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 9.07636 s, 59.2 MB/s
root@blackbox:~# dd if=/dev/zero of=/dev/sdc bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 9.06802 s, 59.2 MB/s
root@blackbox:~# 
&lt;/pre&gt;


&lt;h3&gt;Check if any btrfs file system are already present on the system&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# btrfs-show
Btrfs Btrfs v0.19
root@blackbox:~# 
&lt;/pre&gt;


&lt;h3&gt;Create btrfs file system (metadata and data replicated)&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkfs.btrfs -m raid1 -d raid1 -L btrfs01 /dev/sdb /dev/sdc

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

adding device /dev/sdc id 2
fs created label btrfs01 on /dev/sdb
     nodesize 4096 leafsize 4096 sectorsize 4096 size 298.02GB
Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;mount btrfs01&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# mkdir /mnt/btrfs01
root@blackbox:~# mount /dev/sdb /mnt/btrfs01/
&lt;/pre&gt;


&lt;h3&gt;check the file system is mounted (it shows up twice the capacity really available)&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   56K  296G   1% /mnt/btrfs01
root@blackbox:~#
&lt;/pre&gt;


&lt;h3&gt;make a test to understand how the data are stripped across the LUNs&lt;/h3&gt;

&lt;pre&gt;
root@blackbox:~# dd if=/dev/zero of=/mnt/btrfs01/file.10G bs=1M count=$((10*1024))
10240+0 records in
10240+0 records out
10737418240 bytes (11 GB) copied, 176.188 s, 60.9 MB/s
root@blackbox:~#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~# df -h -F btrfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb              299G   21G  276G   7% /mnt/btrfs01
root@blackbox:~#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~# btrfs-show
Label: btrfs01  uuid: d2b77569-a8be-4ec7-862a-d0fc1e6c8511
     Total devices 2 FS bytes used 10.01GB
     devid    1 size 149.01GB used 12.03GB path /dev/sdb
     devid    2 size 149.01GB used 12.01GB path /dev/sdc

Btrfs Btrfs v0.19
root@blackbox:~#
&lt;/pre&gt;

&lt;pre&gt;
root@blackbox:~# btrfs filesystem df /mnt/btrfs01/
Data, RAID1: total=11.00GB, used=10.00GB
Data: total=8.00MB, used=0.00
System, RAID1: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=1.00GB, used=14.11MB
Metadata: total=8.00MB, used=0.00
root@blackbox:~#
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2011/12/15/Create-a-btrfs-file-system-on-Debian-wheezy#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2011/12/15/Create-a-btrfs-file-system-on-Debian-wheezy#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/163</wfw:commentRss>
      </item>
    
  <item>
    <title>Ubuntu 11.10 XDMCP remote access from MAC OS X (Lion)</title>
    <link>http://www.zoxx.net/notes/index.php/post/2011/12/08/Ubuntu-11.10-XDMCP-remote-access-from-MAC-OS-X-%28Lion%29</link>
    <guid isPermaLink="false">urn:md5:fb407410dbcc38a719b410312f6d5bd6</guid>
    <pubDate>Thu, 08 Dec 2011 02:31:00 -0800</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>unix</category>
        <category>linux</category><category>os x</category><category>ubuntu</category><category>xdcmp</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://www.zoxx.net/notes/public/xdcmp_session_os_x_ubuntu.png&quot; title=&quot;XDCMP Session from OS X to Ubuntu&quot;&gt;&lt;img src=&quot;http://www.zoxx.net/notes/public/.xdcmp_session_os_x_ubuntu_m.jpg&quot; alt=&quot;XDCMP Session from OS X to Ubuntu&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;XDCMP Session from OS X to Ubuntu, Dec 2011&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;Enable XDMCP on Ubuntu 11.10&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~# cp /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf.$(date -I)
root@blackbox:~# cat /etc/lightdm/lightdm.conf

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu

[XDMCPServer]
enabled=true
root@blackbox:~#
&lt;/pre&gt;


&lt;h2&gt;Restart X display manager&lt;/h2&gt;

&lt;pre&gt;
root@blackbox:~# restart lightdm
lightdm start/running, process 5684
root@blackbox:~#
&lt;/pre&gt;


&lt;h2&gt;Open X session from OS X to Ubuntu&lt;/h2&gt;

&lt;pre&gt;
ludo@idefix:~ % uname -a                                                                                                
Darwin idefix 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
ludo@idefix:~ %

ludo@idefix:~ % Xephyr :1 -screen 1024x768 -query blackbox
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2011/12/08/Ubuntu-11.10-XDMCP-remote-access-from-MAC-OS-X-%28Lion%29#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2011/12/08/Ubuntu-11.10-XDMCP-remote-access-from-MAC-OS-X-%28Lion%29#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/162</wfw:commentRss>
      </item>
    
  <item>
    <title>CherryPy help access</title>
    <link>http://www.zoxx.net/notes/index.php/post/2009/10/14/CherryPy-help-access</link>
    <guid isPermaLink="false">urn:md5:bc567629cdb5165b4583fbe6a04b6012</guid>
    <pubDate>Wed, 14 Oct 2009 22:25:00 -0700</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>languages</category>
        <category>cherrypy</category><category>python</category>    
    <description>    &lt;p&gt;I am playing in CherryPy these days, the most helpful documentation is directly from the python command line.&lt;/p&gt;

&lt;pre&gt;
[ludo@falbala ~]$ python2.6
Python 2.6.3 (r263:75183, Oct  9 2009, 13:58:37) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type &amp;quot;help&amp;quot;, &amp;quot;copyright&amp;quot;, &amp;quot;credits&amp;quot; or &amp;quot;license&amp;quot; for more information.
&amp;gt;&amp;gt;&amp;gt; import cherrypy
&amp;gt;&amp;gt;&amp;gt; help(cherrypy)
&amp;gt;&amp;gt;&amp;gt; help(cherrypy.config)
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2009/10/14/CherryPy-help-access#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2009/10/14/CherryPy-help-access#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/161</wfw:commentRss>
      </item>
    
  <item>
    <title>macbook very slow after snow leopard upgrade</title>
    <link>http://www.zoxx.net/notes/index.php/post/2009/09/29/macbook-very-slow-after-snow-leopard-upgrade</link>
    <guid isPermaLink="false">urn:md5:ab31fa9abe066fb9849db217d7d587b6</guid>
    <pubDate>Tue, 29 Sep 2009 14:51:00 -0700</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>os x</category>
        <category>cache</category><category>os x</category><category>snow leopard</category>    
    <description>    &lt;p&gt;After I decided to upgrade my macbook to snow leopard it became very slow, specially softwares like safari.&lt;/p&gt;


&lt;p&gt;To fix it I just installed &quot;snow leopard cache cleaner&quot; (slcc). Once you installed the demo version launch it:&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.zoxx.net/notes/public/slcc_start.png&quot;&gt;&lt;img src=&quot;http://www.zoxx.net/notes/public/.slcc_start_m.jpg&quot; alt=&quot;slcc started&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;slcc started, Sep 2009&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Perform a deep cleaning on your system and restart your computer:&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.zoxx.net/notes/public/slcc_deep_cleaning.png&quot;&gt;&lt;img src=&quot;http://www.zoxx.net/notes/public/.slcc_deep_cleaning_m.jpg&quot; alt=&quot;slcc cache deep cleaning&quot; style=&quot;display:block; margin:0 auto;&quot; title=&quot;slcc cache deep cleaning, Sep 2009&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2009/09/29/macbook-very-slow-after-snow-leopard-upgrade#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2009/09/29/macbook-very-slow-after-snow-leopard-upgrade#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/160</wfw:commentRss>
      </item>
    
  <item>
    <title>Configurer sendmail comme simple relai vers un autre serveur email</title>
    <link>http://www.zoxx.net/notes/index.php/post/2007/04/27/37-configurer-sendmail-comme-simple-relai-vers-un-autre-serveur-email</link>
    <guid isPermaLink="false">urn:md5:c6cfb9bfe834d4318d20a7f46a8331ce</guid>
    <pubDate>Fri, 27 Apr 2007 21:49:54 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>General</category>
            
    <description>&lt;p&gt;Configurer sendmail comme simple relai vers un autre serveur email&lt;/p&gt;    &lt;h3&gt;Configuration du relai&lt;/h3&gt;


&lt;p&gt;Editer votre sendmail.mc&lt;/p&gt;


&lt;pre&gt;MASQUERADE_AS(`your_domain.com')
MASQUERADE_DOMAIN(`your_domain.com')
MASQUERADE_DOMAIN(`localhost')
MASQUERADE_DOMAIN(`localhost.localdomain')
MASQUERADE_DOMAIN(`your_machine.your_domain.com')
FEATURE(`masquerade_entire_domain')&lt;/pre&gt;


&lt;p&gt;Faire un &quot;make&quot; pour construire votre nouveau sendmail.mc&lt;/p&gt;


&lt;h3&gt;Autoriser les emails venant de l'utilisateur root à passer à travers ce relai&lt;/h3&gt;


&lt;p&gt;Si vous êtes sur de ce que vous faites et décidez de faire ca, vous avez juste besoin de commenter cette ligne&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;dnl EXPOSED_USER(`root')&lt;/pre&gt;


&lt;h3&gt;Outil pour tester si ca marche&lt;/h3&gt;


&lt;p&gt;Pour tester si ca marche bien, sendmail offre un outil assez simple pour obtenir un affichage complet de la transaction en cours entre toi et ton daemon sendmail.&lt;/p&gt;


&lt;pre&gt;( echo subject: test; echo ) | sendmail -Am -v your_name@your_domain.com&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2007/04/27/37-configurer-sendmail-comme-simple-relai-vers-un-autre-serveur-email#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2007/04/27/37-configurer-sendmail-comme-simple-relai-vers-un-autre-serveur-email#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/154</wfw:commentRss>
      </item>
    
  <item>
    <title>Configure a simple relay-only mail transport agent with sendmail</title>
    <link>http://www.zoxx.net/notes/index.php/post/2007/04/27/36-configure-a-simple-relay-only-mail-transport-agent-with-sendmail</link>
    <guid isPermaLink="false">urn:md5:85d605ad5aa05753e882f4661644d128</guid>
    <pubDate>Fri, 27 Apr 2007 21:41:29 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>General</category>
            
    <description>&lt;p&gt;Configure a simple relay-only mail transport agent with sendmail&lt;/p&gt;    &lt;h3&gt;Relay host configuration&lt;/h3&gt;


&lt;p&gt;Edit your sendmail.mc&lt;/p&gt;


&lt;pre&gt;MASQUERADE_AS(`your_domain.com')
MASQUERADE_DOMAIN(`your_domain.com')
MASQUERADE_DOMAIN(`localhost')
MASQUERADE_DOMAIN(`localhost.localdomain')
MASQUERADE_DOMAIN(`your_machine.your_domain.com')
FEATURE(`masquerade_entire_domain')&lt;/pre&gt;


&lt;p&gt;Do a &quot;make&quot; to build your new sendmail.mc&lt;/p&gt;


&lt;h3&gt;Authorize root email to go through the gate&lt;/h3&gt;


&lt;p&gt;If you decide to do it, you need just to comment this line like this:&lt;/p&gt;


&lt;pre&gt;dnl EXPOSED_USER(`root')&lt;/pre&gt;


&lt;h3&gt;Test if it works&lt;/h3&gt;


&lt;p&gt;To test if it's working, there is a nice tool released with sendmail to get a full debug log of the transaction between you and your sendmail daemon.&lt;/p&gt;


&lt;pre&gt;( echo subject: test; echo ) | sendmail -Am -v your_name@your_domain.com&lt;/pre&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>vmware-server-console: erreur libpng sur Debian GNU/Linux</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/12/30/34-vmware-server-console-erreur-libpng-sur-debian-gnu-linux</link>
    <guid isPermaLink="false">urn:md5:81ec0ec28ef5842700a431124a38e925</guid>
    <pubDate>Sat, 30 Dec 2006 22:34:56 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>General</category>
        <category>vmware</category>    
    <description>&lt;p&gt;J'utilise vmware-server pour tester de nouvelles distributions et des outils relatifs aux clusters. Normalement j'atteins ces serveurs uniquement par ssh, il y a quelques semaines je voulais installer une nouvelle distribution mais le programme vmware-server-console ne fonctionnait plus depuis ma Debian instable.&lt;/p&gt;    &lt;p&gt;J'obtiens ce message d'erreur:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;J'ai essayé d'installer la dernière version de vmware-server-console:&lt;/p&gt;

&lt;pre&gt;# unzip VMware-server-linux-client-1.0.1-29996.zip
# tar xvzf VMware-server-console-1.0.1-29996.tar.gz
# cd vmware-server-console-distrib
# ./vmware-install.pl&lt;/pre&gt;


&lt;p&gt;Mais j'obtiens à nouveau le message d'erreur:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;Après quelques recherches sur google, j'ai trouvé la solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supprimer le fichier libpng12.so.0 distribué avec vmware-server-console&lt;/li&gt;
&lt;li&gt;Créer un lien symbolique depuis la libpng livré avec Debian dans le répertoire lib de vmware-server-console&lt;/li&gt;
&lt;li&gt;Supprimer libdbus-1-2&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;$ su -
# rm /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0
# cd /usr/lib/vmware-server-console/lib/libpng12.so.0/
# ln -s /usr/lib/libpng12.so.0 /usr/lib/vmware-server-console/lib/libpng12.so.0/
# apt-get remove libdbus-1-2                                                                                   17:05 #10024
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
  bluez-pin libdbus-1-2 libnautilus-burn2 python2.4-dbus
0 upgraded, 0 newly installed, 4 to remove and 3 not upgraded.
Need to get 0B of archives.
After unpacking 1348kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 197795 files and directories currently installed.)
Removing bluez-pin ...
Removing libnautilus-burn2 ...
Removing python2.4-dbus ...
dpkg - warning: while removing python2.4-dbus, directory `/usr/lib/python2.4/site-packages/dbus' not empty so not removed.
Removing libdbus-1-2 ...
$&lt;/pre&gt;


&lt;p&gt;Et ca fonctionne:&lt;/p&gt;

&lt;pre&gt;$ vmware-server-console&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/12/30/34-vmware-server-console-erreur-libpng-sur-debian-gnu-linux#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/12/30/34-vmware-server-console-erreur-libpng-sur-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/151</wfw:commentRss>
      </item>
    
  <item>
    <title>vmware-server-console: libpng error on Debian GNU/Linux</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/12/30/33-vmware-server-console-libpng-error-on-debian-gnu-linux</link>
    <guid isPermaLink="false">urn:md5:969ac846e20cab977f9d5f7e0165b276</guid>
    <pubDate>Sat, 30 Dec 2006 22:15:10 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>General</category>
            
    <description>&lt;p&gt;I use vmware-server to test some new distribution and cluster tools. Normally I reach servers only by ssh but some weeks ago I would install a new distribution and my vmware-server-console was not still working from my Debian unstable.&lt;/p&gt;    &lt;p&gt;I got this message:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;I tried to install a new version of vmware-server-console:&lt;/p&gt;


&lt;pre&gt;# unzip VMware-server-linux-client-1.0.1-29996.zip
# tar xvzf VMware-server-console-1.0.1-29996.tar.gz
# cd vmware-server-console-distrib
# ./vmware-install.pl&lt;/pre&gt;


&lt;p&gt;But I got the same message:&lt;/p&gt;


&lt;pre&gt;$ vmware-server-console
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)
$&lt;/pre&gt;


&lt;p&gt;After some research on google I got the solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remove the libpng12.so.0 file delivered with vmware-server-console&lt;/li&gt;
&lt;li&gt;Create a symbolic link from the Debian libpng to vmware-server-console directory&lt;/li&gt;
&lt;li&gt;remove the libdbus-1-2&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;$ su -
# rm /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0
# cd /usr/lib/vmware-server-console/lib/libpng12.so.0/
# ln -s /usr/lib/libpng12.so.0 /usr/lib/vmware-server-console/lib/libpng12.so.0/
# apt-get remove libdbus-1-2                                                                                   17:05 #10024
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
  bluez-pin libdbus-1-2 libnautilus-burn2 python2.4-dbus
0 upgraded, 0 newly installed, 4 to remove and 3 not upgraded.
Need to get 0B of archives.
After unpacking 1348kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 197795 files and directories currently installed.)
Removing bluez-pin ...
Removing libnautilus-burn2 ...
Removing python2.4-dbus ...
dpkg - warning: while removing python2.4-dbus, directory `/usr/lib/python2.4/site-packages/dbus' not empty so not removed.
Removing libdbus-1-2 ...
$&lt;/pre&gt;


&lt;p&gt;And it works:&lt;/p&gt;

&lt;pre&gt;$ vmware-server-console&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/12/30/33-vmware-server-console-libpng-error-on-debian-gnu-linux#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/12/30/33-vmware-server-console-libpng-error-on-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/150</wfw:commentRss>
      </item>
    
  <item>
    <title>Essential Unix commands when you browse a file system</title>
    <link>http://www.zoxx.net/notes/index.php/post/2009/08/06/Essential-Unix-commands-when-you-browse-a-file-system</link>
    <guid isPermaLink="false">urn:md5:25ccf030c496e011f4baee822ece3396</guid>
    <pubDate>Sat, 30 Dec 2006 00:22:00 -0800</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>unix</category>
            
    <description>    &lt;h4&gt;df -k&lt;/h4&gt;


&lt;p&gt;This command allows you to know where we are in the file system and to find back from where do we mount this file system, specially if you use a lot of automount crossed or nfs shares.&lt;/p&gt;

&lt;pre&gt;
obelix:/var/www# df -k .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg01-var   3096336   2713092    225960  93% /var
obelix:/var/www# 
&lt;/pre&gt;


&lt;h4&gt;showmount -e&lt;/h4&gt;


&lt;p&gt;When you want to troubleshoot any nfs issue, you have to know the command showmount, if this command fails you can be sure you will fail to mount your network file system.&lt;/p&gt;

&lt;pre&gt;
obelix:~ # showmount -e localhost
Export list for localhost:
/goinfre 192.168.1.44
obelix:~ #          
idefix:~ # showmount -e obelix
mount clntudp_create: RPC: Program not registered
idefix:~ #
&lt;/pre&gt;


&lt;p&gt;In this specific case, it means the nfs client idefix doesn't have rpc.statd started, to fix it on debian you need just to run it:&lt;/p&gt;

&lt;pre&gt;
idefix:~ # /etc/init.d/nfs-common start
Starting NFS common utilities: statd
idefix:~ # showmount -e obelix
&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2009/08/06/Essential-Unix-commands-when-you-browse-a-file-system#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2009/08/06/Essential-Unix-commands-when-you-browse-a-file-system#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/156</wfw:commentRss>
      </item>
    
  <item>
    <title>Realtek 8180L avec ndiswrapper sous Debian GNU/Linux</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/11/24/32-realtek-8180l-avec-ndiswrapper-sous-debian-gnu-linux</link>
    <guid isPermaLink="false">urn:md5:f629a2a29830b93327cefe645f6700c3</guid>
    <pubDate>Fri, 24 Nov 2006 00:50:12 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>General</category>
            
    <description>&lt;p&gt;J'avais une  ancienne carte wifi  802.11b dans un placard,  je voulais
utiliser  celle-ci pour  créer un  routeur wifi  avec  portail captif.
Ci-dessous  vous verrez  comment  configurer cette  carte sous  Debian
GNU/Linux.&lt;/p&gt;    &lt;h3&gt;0- RTL8180L&lt;/h3&gt;


&lt;pre&gt;root@obelix:~ # lspci | grep 8180
00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8180L 802.11b MAC (rev 20)&lt;/pre&gt;

&lt;h3&gt;I- Outil ndiswrapper en mode utilisateur&lt;/h3&gt;


&lt;h4&gt;Téléchargement et installation de ndiswrapper&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper&lt;/pre&gt;


&lt;h4&gt;Télécharger le driver windows realtek 8180&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # wget &quot;ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip&quot;
--21:17:40--  ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip
           =&amp;gt; `ndis5x-8180(173).zip'
Connecting to 202.65.194.18:21... connected.
Logging in as anonymous ... Logged in!
==&amp;gt; SYST ... done.    ==&amp;gt; PWD ... done.
==&amp;gt; TYPE I ... done.  ==&amp;gt; CWD /cn/wlan ... done.
==&amp;gt; PASV ... done.    ==&amp;gt; RETR ndis5x-8180(173).zip ... done.
Length: 104,101 (102K) (unauthoritative)

100%[====================================================&amp;gt;] 104,101       45.30K/s

21:17:50 (45.24 KB/s) - `ndis5x-8180(173).zip' saved [104101]

root@obelix:~ #
root@obelix:~ # unzip ndis5x-8180\(173\).zip
Archive:  ndis5x-8180(173).zip
  inflating: rtl8180.sys             
  inflating: NET8180.INF             
  inflating: Release.txt&lt;/pre&gt;

&lt;h4&gt;Installer le driver windows 8180 sur la Debian GNU/Linux&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # ndiswrapper -i NET8180.INF
Installing net8180
root@obelix:~ # ndiswrapper -l
Installed ndis drivers:
net8180 driver present, hardware present 
root@obelix:~ #&lt;/pre&gt;


&lt;h3&gt;II- Modules kernel&lt;/h3&gt;


&lt;h4&gt;Récupérer les sources&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper-source&lt;/pre&gt;


&lt;h4&gt;Les décompresser&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src # tar xvjf ndiswrapper-source.tar.bz2&lt;/pre&gt;


&lt;h4&gt;Les compiler et les installer&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src/modules/ndiswrapper # make
root@obelix:/usr/src/modules/ndiswrapper # make install&lt;/pre&gt;


&lt;h4&gt;Une fois que j'ai fait ça, J'ai eu quelques problèmes pour charger le module ndiswrapper&lt;/h4&gt;



&lt;pre&gt;root@obelix:~/ndiswrapper-1.29 # modprobe ndiswrapper
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.18.2-obelix/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
root@obelix:~/ndiswrapper-1.29 # dmesg | tail -1
ndiswrapper: Unknown symbol wireless_send_event
root@obelix:~/ndiswrapper-1.29 #&lt;/pre&gt;


&lt;h4&gt;Après quelques recherches sur google, J'ai trouvé la solution&lt;/h4&gt;


&lt;p&gt;http://ndiswrapper.sourceforge.net/mediawiki/index.php/FAQ&lt;/p&gt;



&lt;blockquote&gt;&lt;p&gt;If you  get the compilation error  Unknown symbol: wireless_send_event
you will need to enable the CONFIG_NET_RADIO option and recompile your
kernel or find a kernel with this option already enabled. Checking for
the /proc/net/wireless file is not a  good way of making sure you have
this  option  enabled   since  it  will  exist  if   one  or  both  of
CONFIG_NET_RADIO and CONFIG_NET_PCMCIA_RADIO options are enabled.&lt;/p&gt;&lt;/blockquote&gt;



&lt;pre&gt;root@obelix:~ # modprobe ndiswrapper
root@obelix:~ # iwconfig wlan0
wlan0     IEEE 802.11b  ESSID:off/any  
          Mode:Auto  Frequency:2.437 GHz  Access Point: Not-Associated   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;h4&gt;Maintenant nous sommes capable de configurer la nouvelle interface&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # iwconfig wlan0 essid FON_zoxx
root@obelix:~ # iwconfig wlan0 
wlan0     IEEE 802.11b  ESSID:&quot;FON_zoxx&quot;  
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:18:84:11:6D:81   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:73/100  Signal level:-49 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:-1068288296  Invalid misc:-1373815975   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;p&gt;Malheureusement il  est seulement possible  d'utiliser notre interface
ndiswrapper  en mode  &quot;managed&quot;  ou &quot;ad-hoc&quot;.  Donc  aucune chance  de
l'utiliser en mode &quot;Master&quot;.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/11/24/32-realtek-8180l-avec-ndiswrapper-sous-debian-gnu-linux#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/11/24/32-realtek-8180l-avec-ndiswrapper-sous-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/149</wfw:commentRss>
      </item>
    
  <item>
    <title>Realtek 8180L with ndiswrapper on Debian GNU/Linux</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/11/24/31-realtek-8180l-with-ndiswrapper-on-debian-gnu-linux</link>
    <guid isPermaLink="false">urn:md5:665e672019050d64794fa9740a6da63a</guid>
    <pubDate>Fri, 24 Nov 2006 00:28:30 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>General</category>
            
    <description>&lt;p&gt;A old wifi 802.11b pci card was on the shelf, so I would use it to create an open wifi router at home. Below you will see how configure this nic card on Debian GNU/Linux.&lt;/p&gt;    &lt;h3&gt;0- RTL8180L&lt;/h3&gt;



&lt;pre&gt;root@obelix:~ # lspci | grep 8180
00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8180L 802.11b MAC (rev 20)&lt;/pre&gt;

&lt;h3&gt;I- Userland tool&lt;/h3&gt;


&lt;h4&gt;Download the command line tool and install it&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper&lt;/pre&gt;


&lt;h4&gt;Download the realtek 8180 windows driver&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # wget &quot;ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip&quot;
--21:17:40--  ftp://202.65.194.18/cn/wlan/ndis5x-8180(173).zip
           =&amp;gt; `ndis5x-8180(173).zip'
Connecting to 202.65.194.18:21... connected.
Logging in as anonymous ... Logged in!
==&amp;gt; SYST ... done.    ==&amp;gt; PWD ... done.
==&amp;gt; TYPE I ... done.  ==&amp;gt; CWD /cn/wlan ... done.
==&amp;gt; PASV ... done.    ==&amp;gt; RETR ndis5x-8180(173).zip ... done.
Length: 104,101 (102K) (unauthoritative)

100%[====================================================&amp;gt;] 104,101       45.30K/s

21:17:50 (45.24 KB/s) - `ndis5x-8180(173).zip' saved [104101]

root@obelix:~ #
root@obelix:~ # unzip ndis5x-8180\(173\).zip
Archive:  ndis5x-8180(173).zip
  inflating: rtl8180.sys             
  inflating: NET8180.INF             
  inflating: Release.txt&lt;/pre&gt;

&lt;h4&gt;Install the 8180 windows driver on your Debian GNU/Linux&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # ndiswrapper -i NET8180.INF
Installing net8180
root@obelix:~ # ndiswrapper -l
Installed ndis drivers:
net8180 driver present, hardware present 
root@obelix:~ #&lt;/pre&gt;


&lt;h3&gt;II- Kernel modules&lt;/h3&gt;


&lt;h4&gt;get sources&lt;/h4&gt;


&lt;pre&gt;root@obelix:~ # apt-get install ndiswrapper-source&lt;/pre&gt;


&lt;h4&gt;uncompress them&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src # tar xvjf ndiswrapper-source.tar.bz2&lt;/pre&gt;


&lt;h4&gt;compile and install them&lt;/h4&gt;


&lt;pre&gt;root@obelix:/usr/src/modules/ndiswrapper # make
root@obelix:/usr/src/modules/ndiswrapper # make install&lt;/pre&gt;


&lt;h4&gt;once I did it, I got some problems to load the module ndiswrapper&lt;/h4&gt;



&lt;pre&gt;root@obelix:~/ndiswrapper-1.29 # modprobe ndiswrapper
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.18.2-obelix/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
root@obelix:~/ndiswrapper-1.29 # dmesg | tail -1
ndiswrapper: Unknown symbol wireless_send_event
root@obelix:~/ndiswrapper-1.29 #&lt;/pre&gt;


&lt;h4&gt;after some research on google, I got a solution&lt;/h4&gt;


&lt;p&gt;http://ndiswrapper.sourceforge.net/mediawiki/index.php/FAQ&lt;/p&gt;



&lt;blockquote&gt;&lt;p&gt;If you  get the compilation error  Unknown symbol: wireless_send_event
you will need to enable the CONFIG_NET_RADIO option and recompile your
kernel or find a kernel with this option already enabled. Checking for
the /proc/net/wireless file is not a  good way of making sure you have
this  option  enabled   since  it  will  exist  if   one  or  both  of
CONFIG_NET_RADIO and CONFIG_NET_PCMCIA_RADIO options are enabled.&lt;/p&gt;&lt;/blockquote&gt;



&lt;pre&gt;root@obelix:~ # modprobe ndiswrapper
root@obelix:~ # iwconfig wlan0
wlan0     IEEE 802.11b  ESSID:off/any  
          Mode:Auto  Frequency:2.437 GHz  Access Point: Not-Associated   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;h4&gt;Now we are able to set up this new interface&lt;/h4&gt;



&lt;pre&gt;root@obelix:~ # iwconfig wlan0 essid FON_zoxx
root@obelix:~ # iwconfig wlan0 
wlan0     IEEE 802.11b  ESSID:&quot;FON_zoxx&quot;  
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:18:84:11:6D:81   
          Bit Rate:11 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:73/100  Signal level:-49 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:-1068288296  Invalid misc:-1373815975   Missed beacon:0

root@obelix:~ #&lt;/pre&gt;


&lt;p&gt;Unfortunately It's  only possible to use our  ndiswrapper interface in
managed or ad-hoc mode. No chance to use it in Master mode :(.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/11/24/31-realtek-8180l-with-ndiswrapper-on-debian-gnu-linux#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/11/24/31-realtek-8180l-with-ndiswrapper-on-debian-gnu-linux#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/148</wfw:commentRss>
      </item>
    
  <item>
    <title>Install of adobe flashplayer 9 on Debian GNU/Linux with Firefox</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/10/23/24-install-of-adobe-flashplayer-9-on-debian-gnu-linux-with-firefox</link>
    <guid isPermaLink="false">urn:md5:96c200c65678a23e1007809623221373</guid>
    <pubDate>Mon, 23 Oct 2006 19:03:43 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>debian</category>
            
    <description>&lt;p&gt;Installation of flashplayer9 plugin with Firefox on Debian.&lt;/p&gt;    &lt;h3&gt;Website&lt;/h3&gt;


&lt;p&gt;http://labs.adobe.com/downloads/flashplayer9.html
http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin&lt;/p&gt;


&lt;h3&gt;Download&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # wget http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
--09:25:59--  http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
           =&amp;gt; `fp9_update_b1_installer_linuxplugin'
Resolving www.adobe.com... 192.150.19.60
Connecting to www.adobe.com|192.150.19.60|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz [following]
--09:26:00--  http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz
           =&amp;gt; `FP9_plugin_beta_101806.tar.gz'
Resolving download.macromedia.com... 88.221.15.191
Connecting to download.macromedia.com|88.221.15.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,609,188 (2.5M) [application/x-gzip]

100%[=============================================================================================================================&amp;gt;] 2,609,188    581.99K/s    ETA 00:00

09:26:04 (557.29 KB/s) - `FP9_plugin_beta_101806.tar.gz' saved [2609188/2609188]

root@idefix:/tmp #&lt;/pre&gt;

&lt;h3&gt;Tarball Uncompressing&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # tar xvzf FP9_plugin_beta_101806.tar.gz                                                                                                    
flash-player-plugin-9.0.21.55/
flash-player-plugin-9.0.21.55/libflashplayer.so
flash-player-plugin-9.0.21.55/readme.txt&lt;/pre&gt;

&lt;h3&gt;http://www.proteines.fr before flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src=&quot;http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_01_before_flash9.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;


&lt;h3&gt;installation of the flash plugin&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # cd flash-player-plugin-9.0.21.55
root@idefix:...flash-player-plugin-9.0.21.55 # cp libflashplayer.so /usr/lib/firefox/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 # ls -al !$                                                                                                     
ls -al /usr/lib/firefox/plugins/libflashplayer.so
lrwxrwxrwx 1 root root 39 2006-03-23 08:49 /usr/lib/firefox/plugins/libflashplayer.so -&amp;gt; ../../mozilla/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 #&lt;/pre&gt;


&lt;h3&gt;http://www.proteines.fr after flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src=&quot;http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_02_after_flash9.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/10/23/24-install-of-adobe-flashplayer-9-on-debian-gnu-linux-with-firefox#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/10/23/24-install-of-adobe-flashplayer-9-on-debian-gnu-linux-with-firefox#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/141</wfw:commentRss>
      </item>
    
  <item>
    <title>Installation d'Adobe flashplayer 9 sur Debian GNU/Linux avec Firefox</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/10/23/25-installation-d-adobe-flashplayer-9-sur-debian-gnu-linux-avec-firefox</link>
    <guid isPermaLink="false">urn:md5:196a4d2cec0c83aae1131f516edf32b1</guid>
    <pubDate>Mon, 23 Oct 2006 19:03:43 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>debian</category>
            
    <description>&lt;p&gt;Installation d'Adobe flashplayer 9 avec Firefox sur Debian.&lt;/p&gt;    &lt;h3&gt;Sites web&lt;/h3&gt;


&lt;p&gt;http://labs.adobe.com/downloads/flashplayer9.html
http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin&lt;/p&gt;


&lt;h3&gt;Téléchargement&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # wget http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
--09:25:59--  http://www.adobe.com/go/fp9_update_b1_installer_linuxplugin
           =&amp;gt; `fp9_update_b1_installer_linuxplugin'
Resolving www.adobe.com... 192.150.19.60
Connecting to www.adobe.com|192.150.19.60|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz [following]
--09:26:00--  http://download.macromedia.com/pub/labs/flashplayer9_update/FP9_plugin_beta_101806.tar.gz
           =&amp;gt; `FP9_plugin_beta_101806.tar.gz'
Resolving download.macromedia.com... 88.221.15.191
Connecting to download.macromedia.com|88.221.15.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,609,188 (2.5M) [application/x-gzip]

100%[=============================================================================================================================&amp;gt;] 2,609,188    581.99K/s    ETA 00:00

09:26:04 (557.29 KB/s) - `FP9_plugin_beta_101806.tar.gz' saved [2609188/2609188]

root@idefix:/tmp #&lt;/pre&gt;

&lt;h3&gt;Décompression de l'archive&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # tar xvzf FP9_plugin_beta_101806.tar.gz                                                                                                    
flash-player-plugin-9.0.21.55/
flash-player-plugin-9.0.21.55/libflashplayer.so
flash-player-plugin-9.0.21.55/readme.txt&lt;/pre&gt;

&lt;h3&gt;http://www.proteines.fr avant flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src=&quot;http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_01_before_flash9.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;


&lt;h3&gt;installation du plugin flash&lt;/h3&gt;


&lt;pre&gt;root@idefix:/tmp # cd flash-player-plugin-9.0.21.55
root@idefix:...flash-player-plugin-9.0.21.55 # cp libflashplayer.so /usr/lib/firefox/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 # ls -al !$                                                                                                     
ls -al /usr/lib/firefox/plugins/libflashplayer.so
lrwxrwxrwx 1 root root 39 2006-03-23 08:49 /usr/lib/firefox/plugins/libflashplayer.so -&amp;gt; ../../mozilla/plugins/libflashplayer.so
root@idefix:...flash-player-plugin-9.0.21.55 #&lt;/pre&gt;


&lt;h3&gt;http://www.proteines.fr après l'installation de flashplayer 9&lt;/h3&gt;


&lt;p&gt;&lt;img src=&quot;http://www.zoxx.net/notes/images/images_flashplayer9/proteines_fr_02_after_flash9.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/10/23/25-installation-d-adobe-flashplayer-9-sur-debian-gnu-linux-avec-firefox#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/10/23/25-installation-d-adobe-flashplayer-9-sur-debian-gnu-linux-avec-firefox#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/142</wfw:commentRss>
      </item>
    
  <item>
    <title>Automate rpm and src.rpm builds in Makefile.am with autotools</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/08/31/23-automate-rpm-and-srcrpm-builds-in-makefileam-with-autotools</link>
    <guid isPermaLink="false">urn:md5:1fea1db0ef436bffc71b5bc3d6cffb5a</guid>
    <pubDate>Thu, 31 Aug 2006 23:24:54 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>code</category>
            
    <description>&lt;p&gt;Automate rpm and src.rpm builds in Makefile.am with autotools&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RPM Tree&lt;/li&gt;
&lt;li&gt;SPEC files&lt;/li&gt;
&lt;li&gt;Makefile.am&lt;/li&gt;
&lt;/ul&gt;    &lt;h3&gt;RPM TREE&lt;/h3&gt;


&lt;p&gt;First you need to get a rpm working directory.&lt;/p&gt;


&lt;h4&gt;set your rpm topdir in your rpmmacros file&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:~ % echo &quot;%_topdir /home/ludo/rpm&quot; &amp;gt; ~/.rpmmacros&lt;/pre&gt;

&lt;h4&gt;create your rpm directories tree&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:~ % for dir in rpm rpm/BUILD rpm/SPECS rpm/SRPMS rpm/SOURCES rpm/RPMS rpm/RPMS/i386
for&amp;gt; do
for&amp;gt;  mkdir $dir
for&amp;gt; done
ludo@idefix:~ %&lt;/pre&gt;

&lt;h3&gt;SPEC FILE&lt;/h3&gt;


&lt;h4&gt;our spec file&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % cat packages/rpm/s2a.spec
Vendor:       Ludovic Francois
Name:         s2a
Release:      3
License:      GPL (cf http://www.fsf.org)
Group:        unsorted
Provides:     s2a
Packager:     lfrancois@datadirectnet.com
Version:      0.0.1
Summary:      Monitoring and administration tools for DataDirect Networks s2a
Source:       s2a-0.0.1.tar.gz 
BuildRoot:    /var/tmp/%{name}-buildroot
%description
Monitoring and administration tools for DataDirect Networks s2a appliances.
This tools supports:
  - s2a6000
  - s2a3000
  - s2a8500
  - s2a9500
You will find  the main binary named s2a, with  this binary you could
get a remote access on the storage system and make all cli monitoring
and administration tasks from your unix command line.
%prep
%setup
%build
./configure --prefix=/usr --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc/s2a
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
install -d -m 755               ${RPM_BUILD_ROOT}/etc/cron.d/
install -m 644 debian/cron.d    ${RPM_BUILD_ROOT}/etc/cron.d/s2a
install -d -m 755               ${RPM_BUILD_ROOT}/usr/share/doc/s2a/
install -m 644 ChangeLog        ${RPM_BUILD_ROOT}/usr/share/doc/s2a/ChangeLog
install -m 644 README           ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README
install -m 644 TODO             ${RPM_BUILD_ROOT}/usr/share/doc/s2a/TODO
install -m 644 src/scripts/README.ddn_disk_rebuild  ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README.ddn_disk_rebuild
install -m 644 src/scripts/README.ddn_rrdtool       ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README.ddn_rrdtool
install -m 644 COPYING          ${RPM_BUILD_ROOT}/usr/share/doc/s2a/copyright
%files
%defattr(-,root,root)
/etc/s2a/ddn_uptodate/ddn_uptodate_default.cfg
/etc/s2a/ddn_uptodate/ddn_uptodate_sgi.cfg
/etc/cron.d/s2a
/usr/bin/s2a
/usr/bin/ddn_tree
/usr/bin/ddn_disk_rebuild
/usr/bin/ddn_rrdtool
/usr/bin/ddn_diff
/usr/bin/ddn_dump
/usr/bin/ddn_restore
/usr/bin/ddn_richmedia
/usr/bin/ddn_uptodate
/usr/bin/ddn_temperature
/usr/share/s2a/images/ddn_logo.gif
/usr/share/s2a/images/DDNlogo.jpg
/usr/share/s2a/images/DDNtoasterview-logo.png
/usr/share/s2a/images/splash_s2a_bin.jpg
/usr/share/s2a/images/splash_s2a_bin.png
/usr/share/man/man1/s2a.1.gz
/usr/share/doc/s2a/README
/usr/share/doc/s2a/TODO
/usr/share/doc/s2a/README.ddn_disk_rebuild
/usr/share/doc/s2a/README.ddn_rrdtool
/usr/share/doc/s2a/copyright
/usr/share/doc/s2a/ChangeLog
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h3&gt;Makefile.am&lt;/h3&gt;


&lt;h4&gt;rule in my Makefile.am&lt;/h4&gt;


&lt;pre&gt;# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:
# %_topdir /home/ludo/rpm
# cd /home/ludo/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS

rpm:
    $(MAKE) distdir ; \
    mv $(PACKAGE)-$(VERSION) $(PACKAGE)-0.0.1 ; \
    tar cvzf $(PACKAGE)-0.0.1.tar.gz $(PACKAGE)-0.0.1 ; \
    $(RM) -rf $(PACKAGE)-0.0.1 ; \
    RPM_TOPDIR=`rpm --showrc | perl -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
    cp $(srcdir)/packages/rpm/s2a.spec $$RPM_TOPDIR/SPECS ; \
    cp $(PACKAGE)-0.0.1.tar.gz $$RPM_TOPDIR/SOURCES/ ; \
    rpmbuild -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(PACKAGE).spec ; \
    mv $$RPM_TOPDIR/RPMS/i386/$(PACKAGE)-*.rpm packages/rpm ; \
    mv $$RPM_TOPDIR/SRPMS/$(PACKAGE)-*.src.rpm packages/rpm&lt;/pre&gt;

&lt;h4&gt;command to launch&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % make rpm
[...]
Wrote: /home/ludo/rpm/SRPMS/s2a-0.0.1-3.src.rpm
Wrote: /home/ludo/rpm/RPMS/i386/s2a-0.0.1-3.i386.rpm
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.96254
+ umask 022
+ cd /home/ludo/rpm/BUILD
+ rm -rf s2a-0.0.1
+ exit 0
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h4&gt;results&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % find | egrep &quot;s2a.*rpm&quot;
./packages/rpm/s2a-0.0.1-3.i386.rpm
./packages/rpm/s2a-0.0.1-3.src.rpm
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h3&gt;Errors&lt;/h3&gt;


&lt;h4&gt;check-files&lt;/h4&gt;


&lt;pre&gt;Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/s2a-buildroot
error: Installed (but unpackaged) file(s) found:
   /usr/bin/s2a&lt;/pre&gt;

&lt;h4&gt;if you have some files you don't want in the BuildRoot add in your spec file at the files section the define below:&lt;/h4&gt;


&lt;pre&gt;%files
%defattr(-,root,root)
%define _unpackaged_files_terminate_build 0&lt;/pre&gt;


&lt;h4&gt;Or it's maybe the same problem I got, you need just to clean your buildroot in your spec file:&lt;/h4&gt;


&lt;pre&gt;%install
rm -rf $RPM_BUILD_ROOT&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/08/31/23-automate-rpm-and-srcrpm-builds-in-makefileam-with-autotools#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/08/31/23-automate-rpm-and-srcrpm-builds-in-makefileam-with-autotools#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/140</wfw:commentRss>
      </item>
    
  <item>
    <title>Automatiser la construction des paquets rpm et src.rpm grâce aux autotools et Makefile.am</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/08/31/26-automatiser-la-construction-des-paquets-rpm-et-srcrpm-grace-aux-autotools-et-makefileam</link>
    <guid isPermaLink="false">urn:md5:0422805ad9fb960f0d3ef87605f69804</guid>
    <pubDate>Thu, 31 Aug 2006 23:24:54 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>code</category>
            
    <description>&lt;p&gt;Automatiser la construction des paquets rpm et src.rpm grâce aux autotools et Makefile.am&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RPM Tree&lt;/li&gt;
&lt;li&gt;SPEC files&lt;/li&gt;
&lt;li&gt;Makefile.am&lt;/li&gt;
&lt;/ul&gt;    &lt;h3&gt;racine RPM&lt;/h3&gt;


&lt;p&gt;D'abord nous avons besoin de créer un répertoire de travail pour
générer nos RPM.&lt;/p&gt;


&lt;p&gt;Ci-dessous nous allons voir l'arborescence exacte de ce répertoire et
où le définir.&lt;/p&gt;


&lt;h4&gt;Définir le répertoire parent dans notre fichier de macros rpm&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:~ % echo &quot;%_topdir /home/ludo/rpm&quot; &amp;gt; ~/.rpmmacros&lt;/pre&gt;

&lt;h4&gt;Créer les différents répertoires nécessaires&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:~ % for dir in rpm rpm/BUILD rpm/SPECS rpm/SRPMS rpm/SOURCES rpm/RPMS rpm/RPMS/i386
for&amp;gt; do
for&amp;gt;  mkdir $dir
for&amp;gt; done
ludo@idefix:~ %&lt;/pre&gt;

&lt;h3&gt;Fichier SPEC&lt;/h3&gt;


&lt;h4&gt;Fichier spec utilisé dans notre exemple&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % cat packages/rpm/s2a.spec
Vendor:       Ludovic Francois
Name:         s2a
Release:      3
License:      GPL (cf http://www.fsf.org)
Group:        unsorted
Provides:     s2a
Packager:     lfrancois@datadirectnet.com
Version:      0.0.1
Summary:      Monitoring and administration tools for DataDirect Networks s2a
Source:       s2a-0.0.1.tar.gz 
BuildRoot:    /var/tmp/%{name}-buildroot
%description
Monitoring and administration tools for DataDirect Networks s2a appliances.
This tools supports:
  - s2a6000
  - s2a3000
  - s2a8500
  - s2a9500
You will find  the main binary named s2a, with  this binary you could
get a remote access on the storage system and make all cli monitoring
and administration tasks from your unix command line.
%prep
%setup
%build
./configure --prefix=/usr --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc/s2a
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
install -d -m 755               ${RPM_BUILD_ROOT}/etc/cron.d/
install -m 644 debian/cron.d    ${RPM_BUILD_ROOT}/etc/cron.d/s2a
install -d -m 755               ${RPM_BUILD_ROOT}/usr/share/doc/s2a/
install -m 644 ChangeLog        ${RPM_BUILD_ROOT}/usr/share/doc/s2a/ChangeLog
install -m 644 README           ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README
install -m 644 TODO             ${RPM_BUILD_ROOT}/usr/share/doc/s2a/TODO
install -m 644 src/scripts/README.ddn_disk_rebuild  ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README.ddn_disk_rebuild
install -m 644 src/scripts/README.ddn_rrdtool       ${RPM_BUILD_ROOT}/usr/share/doc/s2a/README.ddn_rrdtool
install -m 644 COPYING          ${RPM_BUILD_ROOT}/usr/share/doc/s2a/copyright
%files
%defattr(-,root,root)
/etc/s2a/ddn_uptodate/ddn_uptodate_default.cfg
/etc/s2a/ddn_uptodate/ddn_uptodate_sgi.cfg
/etc/cron.d/s2a
/usr/bin/s2a
/usr/bin/ddn_tree
/usr/bin/ddn_disk_rebuild
/usr/bin/ddn_rrdtool
/usr/bin/ddn_diff
/usr/bin/ddn_dump
/usr/bin/ddn_restore
/usr/bin/ddn_richmedia
/usr/bin/ddn_uptodate
/usr/bin/ddn_temperature
/usr/share/s2a/images/ddn_logo.gif
/usr/share/s2a/images/DDNlogo.jpg
/usr/share/s2a/images/DDNtoasterview-logo.png
/usr/share/s2a/images/splash_s2a_bin.jpg
/usr/share/s2a/images/splash_s2a_bin.png
/usr/share/man/man1/s2a.1.gz
/usr/share/doc/s2a/README
/usr/share/doc/s2a/TODO
/usr/share/doc/s2a/README.ddn_disk_rebuild
/usr/share/doc/s2a/README.ddn_rrdtool
/usr/share/doc/s2a/copyright
/usr/share/doc/s2a/ChangeLog
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h3&gt;Makefile.am&lt;/h3&gt;


&lt;h4&gt;régles permettant de construire notre rpm dans mon Makefile.am&lt;/h4&gt;


&lt;pre&gt;# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
# must contain the following line:
# %_topdir /home/ludo/rpm
# cd /home/ludo/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS

rpm:
    $(MAKE) distdir ; \
    mv $(PACKAGE)-$(VERSION) $(PACKAGE)-0.0.1 ; \
    tar cvzf $(PACKAGE)-0.0.1.tar.gz $(PACKAGE)-0.0.1 ; \
    $(RM) -rf $(PACKAGE)-0.0.1 ; \
    RPM_TOPDIR=`rpm --showrc | perl -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
    cp $(srcdir)/packages/rpm/s2a.spec $$RPM_TOPDIR/SPECS ; \
    cp $(PACKAGE)-0.0.1.tar.gz $$RPM_TOPDIR/SOURCES/ ; \
    rpmbuild -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(PACKAGE).spec ; \
    mv $$RPM_TOPDIR/RPMS/i386/$(PACKAGE)-*.rpm packages/rpm ; \
    mv $$RPM_TOPDIR/SRPMS/$(PACKAGE)-*.src.rpm packages/rpm&lt;/pre&gt;

&lt;h4&gt;finalement la commande à lancer pour générer le rpm&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % make rpm
[...]
Wrote: /home/ludo/rpm/SRPMS/s2a-0.0.1-3.src.rpm
Wrote: /home/ludo/rpm/RPMS/i386/s2a-0.0.1-3.i386.rpm
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.96254
+ umask 022
+ cd /home/ludo/rpm/BUILD
+ rm -rf s2a-0.0.1
+ exit 0
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h4&gt;résultats&lt;/h4&gt;


&lt;pre&gt;ludo@idefix:.../common/s2a/api_tools/s2a_bin % find | egrep &quot;s2a.*rpm&quot;
./packages/rpm/s2a-0.0.1-3.i386.rpm
./packages/rpm/s2a-0.0.1-3.src.rpm
ludo@idefix:.../common/s2a/api_tools/s2a_bin %&lt;/pre&gt;

&lt;h3&gt;Erreurs&lt;/h3&gt;


&lt;h4&gt;check-files&lt;/h4&gt;


&lt;p&gt;Vérifies si les fichiers indiqués dans le fichier spec correspondent
bien à ceux réellement créés.&lt;/p&gt;


&lt;pre&gt;Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/s2a-buildroot
error: Installed (but unpackaged) file(s) found:
   /usr/bin/s2a&lt;/pre&gt;

&lt;h4&gt;if you have some files you don't want in the BuildRoot add in your spec file at the files section the define below:&lt;/h4&gt;


&lt;h4&gt;Si cette erreur est normale, ajouter la définition ci-dessous&lt;/h4&gt;


&lt;pre&gt;%files
%defattr(-,root,root)
%define _unpackaged_files_terminate_build 0&lt;/pre&gt;


&lt;h4&gt;Dans tous les cas, ne pas oublier de nettoyer son buildroot dans le fichier spec:&lt;/h4&gt;


&lt;pre&gt;%install
rm -rf $RPM_BUILD_ROOT&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/08/31/26-automatiser-la-construction-des-paquets-rpm-et-srcrpm-grace-aux-autotools-et-makefileam#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/08/31/26-automatiser-la-construction-des-paquets-rpm-et-srcrpm-grace-aux-autotools-et-makefileam#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/143</wfw:commentRss>
      </item>
    
  <item>
    <title>Create a debian package with dh_make and dpkg-buildpackage</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/08/09/22-create-a-debian-package-with-dh_make-and-dpkg-buildpackage</link>
    <guid isPermaLink="false">urn:md5:0ae38ec7f7fafd79db624c7eba8df7aa</guid>
    <pubDate>Wed, 09 Aug 2006 00:34:40 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>debian</category>
            
    <description>&lt;p&gt;Create a debian package with dh_make and dpkg-buildpackage&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;generate a debian template directory&lt;/li&gt;
&lt;li&gt;editing configuration files&lt;/li&gt;
&lt;li&gt;create a debian apt repository&lt;/li&gt;
&lt;/ul&gt;    &lt;h3&gt;dh_make to run only once&lt;/h3&gt;


&lt;p&gt;This command will allow us to generate the debian directory, and a tree with all useful example files.&lt;/p&gt;


&lt;h4&gt;command&lt;/h4&gt;

&lt;pre&gt;
ludo@idefix:~/s2a-0.0.1 % cp /ddn/common/s2a/api_tools/s2a_bin/s2a-0.0.1b16_27M.tar.gz ..                                                                    
ludo@idefix:~/s2a-0.0.1 % dh_make -e lfrancois@datadirectnet.com -f ../s2a-0.0.1b16_27M.tar.gz                                                               
ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)

Type of package: single binary, multiple binary, library, kernel module or cdbs?
 [s/m/l/k/b] s

Maintainer name : Ludovic Francois
Email-Address   : lfrancois@datadirectnet.com
Date            : Fri, 23 Jun 2006 11:39:13 +0200
Package Name    : s2a
Version         : 0.0.1
License         : blank
Type of Package : Single
Hit &amp;lt;enter&amp;gt; to confirm:
Done. Please edit the files in the debian/ subdirectory now. s2a
uses a configure script, so you probably don't have to edit the Makefiles.
ludo@idefix:~/s2a-0.0.1 %&lt;/pre&gt;


&lt;h4&gt;Files generated&lt;/h4&gt;


&lt;pre&gt;
ludo@idefix:~/s2a-0.0.1/debian % ls -l
total 104
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  197 2006-06-23 11:39 changelog
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo    2 2006-06-23 11:39 compat
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  353 2006-06-23 11:39 control
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  651 2006-06-23 11:39 copyright
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo   75 2006-06-23 11:39 cron.d.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo   17 2006-06-23 11:39 dirs
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo   17 2006-06-23 11:39 docs
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1222 2006-06-23 11:39 emacsen-install.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  453 2006-06-23 11:39 emacsen-remove.ex                                                                                               
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1101 2006-06-23 11:39 emacsen-startup.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1854 2006-06-23 11:39 init.d.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1736 2006-06-23 11:39 manpage.1.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 4649 2006-06-23 11:39 manpage.sgml.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 4606 2006-06-23 11:39 manpage.xml.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  106 2006-06-23 11:39 menu.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  921 2006-06-23 11:39 postinst.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  913 2006-06-23 11:39 postrm.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  690 2006-06-23 11:39 preinst.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  881 2006-06-23 11:39 prerm.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  184 2006-06-23 11:39 README.Debian
-rwxr-xr-x 1 ludo ludo 2511 2006-06-23 11:39 rules
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  223 2006-06-23 11:39 s2a-default.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  475 2006-06-23 11:39 s2a.doc-base.EX
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  654 2006-06-23 11:39 watch.ex
ludo@idefix:~/s2a-0.0.1/debian %&lt;/pre&gt;

&lt;h3&gt;Files editing&lt;/h3&gt;


&lt;h4&gt;debian/control file&lt;/h4&gt;


&lt;p&gt;edit the control file to finalize the work of dh_make on the proprietary of your package&lt;/p&gt;


&lt;pre&gt;
Source: s2a
Section: admin
Priority: optional
Maintainer: Ludovic Francois &amp;lt;lfrancois@datadirectnet.com&amp;gt;
Build-Depends: debhelper (&amp;gt;= 5), autotools-dev
Standards-Version: 3.7.2

Package: s2a
Architecture: i386
Depends: ${shlibs:Depends}
Description: Monitoring and administration tools for DataDirect Networks s2a
 Monitoring and administration tools for DataDirect Networks s2a appliances.
 This tools supports:
  - s2a6000
  - s2a3000
  - s2a8500
  - s2a9500
 You will find  the main binary named s2a, with  this binary you could
 get a remote access on the storage system and make all cli monitoring
 and administration tasks from your unix command line.&lt;/pre&gt;


&lt;h4&gt;debian/rules file&lt;/h4&gt;


&lt;p&gt;This makefile indicates us about the install of our files. In our case it's pretty easy because we are using autotools so we need just to let the autotools process to go through with the command ./configure.&lt;/p&gt;


&lt;p&gt;I just needed to setup fine configure.in and Makefile.am, and now they write all files, man with man_MANS, /etc conf file with sysconfdir and scripts with bin_SCRIPTS to install files at the good place.&lt;/p&gt;


&lt;h3&gt;dch&lt;/h3&gt;


&lt;p&gt;You need also to edit your debian changelog file.
To do it run dch (debian changelog), the first time that will help you in writing a small notice about your first release.&lt;/p&gt;


&lt;p&gt;But the very good thing with this tool is that you have a very simple way with debian to increment the version of the package and add a comment about this upgrade:&lt;/p&gt;


&lt;pre&gt;$ dch -i &quot;cleaning update for integration in directMONITOR&quot;&lt;/pre&gt;


&lt;h3&gt;dpkg-buildpackage -rfakeroot&lt;/h3&gt;


&lt;h3&gt;package checking&lt;/h3&gt;


&lt;pre&gt;$ lintian -i s2a_0.0.1-1_i386.changes
$ lintian -i s2a_0.0.1-1_i386.changes&lt;/pre&gt;


&lt;h3&gt;Build your own apt repository&lt;/h3&gt;


&lt;h4&gt;Server side&lt;/h4&gt;


&lt;p&gt;The first time:&lt;/p&gt;


&lt;pre&gt;# mkdir /var/www/apt&lt;/pre&gt;


&lt;p&gt;After each dupload:&lt;/p&gt;


&lt;pre&gt;ludo@obelix:/var/www/apt % apt-ftparchive release . &amp;gt; Release
ludo@obelix:/var/www/apt % gpg -abs -o Release.gpg Release&lt;/pre&gt;


&lt;h4&gt;Client side (debian developer)&lt;/h4&gt;


&lt;pre&gt;# aptitude install dupload&lt;/pre&gt;


&lt;h5&gt;/etc/dupload.conf&lt;/h5&gt;


&lt;pre&gt;$default_host = &quot;zoxx&quot;;
$cfg{'zoxx'} = {
        fqdn =&amp;gt; &quot;obelix.zoxx.net&quot;,
        method =&amp;gt; &quot;scpb&quot;,
        incoming =&amp;gt; &quot;/var/www/apt/&quot;,
        dinstall_runs =&amp;gt; 1,
};
$cfg{'zoxx'}{postupload}{'changes'} = &quot;
             echo 'cd /var/www/apt ;
             dpkg-scanpackages . /dev/null &amp;gt;Packages || true ;
             dpkg-scansources . /dev/null &amp;gt;Sources || true ;
             gzip -c Packages &amp;gt;Packages.gz ;
             gzip -c Sources &amp;gt;Sources.gz' | ssh obelix.zoxx.net  2&amp;gt;/dev/null ;
             echo 'Package archive created!'&quot;;&lt;/pre&gt;


&lt;h5&gt;dupload&lt;/h5&gt;


&lt;pre&gt;ludo@idefix:~ % dupload s2a_0.0.1-1_i386.changes
dupload note: no announcement will be sent.
Uploading (scpb) to obelix.zoxx.net:/var/www/apt/
[ job s2a_0.0.1-1_i386 from s2a_0.0.1-1_i386.changes                                                                                                         
 s2a_0.0.1-1_i386.deb, md5sum ok
 s2a_0.0.1-1.diff.gz, md5sum ok
 s2a_0.0.1.orig.tar.gz, md5sum ok
 s2a_0.0.1-1.dsc, md5sum ok     
 s2a_0.0.1-1_i386.changes ok ]
Uploading (scp) to zoxx (obelix.zoxx.net)
[ Uploading job s2a_0.0.1-1_i386
 s2a_0.0.1-1_i386.deb 16.6 kB, ok
 s2a_0.0.1-1.diff.gz 7.5 kB, ok
 s2a_0.0.1.orig.tar.gz 116.2 kB, ok
 s2a_0.0.1-1.dsc 0.3 kB, ok
 s2a_0.0.1-1_i386.changes 0.7 kB, ok
s2a_0.0.1-1_i386.deb                                                                                                                   100%   17KB  16.6KB/s   00:00
s2a_0.0.1-1.diff.gz                                                                                                                    100% 7730     7.6KB/s   00:00
s2a_0.0.1.orig.tar.gz                                                                                                                  100%  116KB 116.2KB/s   00:00
s2a_0.0.1-1.dsc                                                                                                                        100%  333     0.3KB/s   00:00
s2a_0.0.1-1_i386.changes                                                                                                               100%  711     0.7KB/s   00:00
 ]
Package archive created!
ludo@idefix:~ %&lt;/pre&gt;

&lt;h4&gt;Client side (debian user)&lt;/h4&gt;


&lt;pre&gt;
# echo &quot;deb http://www.zoxx.net/apt ./&quot; &amp;gt;&amp;gt; /etc/apt/sources.list
# GET http://www.zoxx.net/ludo_gpg.asc | apt-key add -
OK
# aptitude update
# aptitude show s2a
Package: s2a
New: yes
State: installed
Automatically installed: no
Version: 0.0.1-2
Priority: optional
Section: admin
Maintainer: Ludovic Francois &amp;lt;lfrancois@datadirectnet.com&amp;gt;
Uncompressed Size: 442k
Depends: libc6 (&amp;gt;= 2.3.6-6)
Description: Monitoring and administration tools for DataDirect Networks s2a
 Monitoring and administration tools for DataDirect Networks s2a appliances.
This tools supports:
 * s2a6000
 * s2a3000
 * s2a8500
 * s2a9500
 You will find  the main binary named s2a, with  this binary you could get a
remote access on the storage system and make all cli monitoring and
administration tasks
 from your unix command line.
# aptitude install s2a&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/08/09/22-create-a-debian-package-with-dh_make-and-dpkg-buildpackage#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/08/09/22-create-a-debian-package-with-dh_make-and-dpkg-buildpackage#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/139</wfw:commentRss>
      </item>
    
  <item>
    <title>Créer un paquet debian avec dh_make et dpkg-buildpackage</title>
    <link>http://www.zoxx.net/notes/index.php/post/2006/08/09/27-creer-un-paquet-debian-avec-dh_make-et-dpkg-buildpackage</link>
    <guid isPermaLink="false">urn:md5:aef0f2320244b9d5d351ef9db7f5fdd8</guid>
    <pubDate>Wed, 09 Aug 2006 00:34:40 +0000</pubDate>
    <dc:creator>Ludovic Francois</dc:creator>
        <category>debian</category>
            
    <description>&lt;p&gt;Créer un paquet debian avec dh_make et dpkg-buildpackage&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Générer un répertoire debian modèle&lt;/li&gt;
&lt;li&gt;Éditer les fichiers de configuration&lt;/li&gt;
&lt;li&gt;Créer son propre dépôt apt debian&lt;/li&gt;
&lt;/ul&gt;    &lt;h3&gt;dh_make à lancer une seule fois&lt;/h3&gt;


&lt;p&gt;Cette commande nous permettra de générer le répertoire nommé debian
ainsi qu'un lot de fichiers d'exemples à l'intérieur de ce répertoire.&lt;/p&gt;


&lt;h4&gt;Lancement de la commande&lt;/h4&gt;

&lt;pre&gt;
ludo@idefix:~/s2a-0.0.1 % cp /ddn/common/s2a/api_tools/s2a_bin/s2a-0.0.1b16_27M.tar.gz ..                                                                    
ludo@idefix:~/s2a-0.0.1 % dh_make -e lfrancois@datadirectnet.com -f ../s2a-0.0.1b16_27M.tar.gz                                                               
ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1)

Type of package: single binary, multiple binary, library, kernel module or cdbs?
 [s/m/l/k/b] s

Maintainer name : Ludovic Francois
Email-Address   : lfrancois@datadirectnet.com
Date            : Fri, 23 Jun 2006 11:39:13 +0200
Package Name    : s2a
Version         : 0.0.1
License         : blank
Type of Package : Single
Hit &amp;lt;enter&amp;gt; to confirm:
Done. Please edit the files in the debian/ subdirectory now. s2a
uses a configure script, so you probably don't have to edit the Makefiles.
ludo@idefix:~/s2a-0.0.1 %&lt;/pre&gt;


&lt;h4&gt;Liste des fichiers générés&lt;/h4&gt;


&lt;pre&gt;
ludo@idefix:~/s2a-0.0.1/debian % ls -l
total 104
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  197 2006-06-23 11:39 changelog
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo    2 2006-06-23 11:39 compat
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  353 2006-06-23 11:39 control
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  651 2006-06-23 11:39 copyright
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo   75 2006-06-23 11:39 cron.d.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo   17 2006-06-23 11:39 dirs
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo   17 2006-06-23 11:39 docs
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1222 2006-06-23 11:39 emacsen-install.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  453 2006-06-23 11:39 emacsen-remove.ex                                                                                               
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1101 2006-06-23 11:39 emacsen-startup.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1854 2006-06-23 11:39 init.d.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 1736 2006-06-23 11:39 manpage.1.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 4649 2006-06-23 11:39 manpage.sgml.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo 4606 2006-06-23 11:39 manpage.xml.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  106 2006-06-23 11:39 menu.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  921 2006-06-23 11:39 postinst.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  913 2006-06-23 11:39 postrm.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  690 2006-06-23 11:39 preinst.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  881 2006-06-23 11:39 prerm.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  184 2006-06-23 11:39 README.Debian
-rwxr-xr-x 1 ludo ludo 2511 2006-06-23 11:39 rules
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  223 2006-06-23 11:39 s2a-default.ex
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  475 2006-06-23 11:39 s2a.doc-base.EX
-rw&lt;del&gt;&lt;/del&gt;--- 1 ludo ludo  654 2006-06-23 11:39 watch.ex
ludo@idefix:~/s2a-0.0.1/debian %&lt;/pre&gt;

&lt;h3&gt;Édition des fichiers&lt;/h3&gt;


&lt;h4&gt;Fichier debian/control&lt;/h4&gt;


&lt;p&gt;Éditer le fichier control pour finaliser le travail de dh_make sur les
propriétés de votre package.&lt;/p&gt;


&lt;pre&gt;
Source: s2a
Section: admin
Priority: optional
Maintainer: Ludovic Francois &amp;lt;lfrancois@datadirectnet.com&amp;gt;
Build-Depends: debhelper (&amp;gt;= 5), autotools-dev
Standards-Version: 3.7.2

Package: s2a
Architecture: i386
Depends: ${shlibs:Depends}
Description: Monitoring and administration tools for DataDirect Networks s2a
 Monitoring and administration tools for DataDirect Networks s2a appliances.
 This tools supports:
  - s2a6000
  - s2a3000
  - s2a8500
  - s2a9500
 You will find  the main binary named s2a, with  this binary you could
 get a remote access on the storage system and make all cli monitoring
 and administration tasks from your unix command line.&lt;/pre&gt;


&lt;h4&gt;Fichier debian/rules&lt;/h4&gt;


&lt;p&gt;Ce makefile nous donne des information sur la manière dont seront installés nos fichiers. Dans notre cas, c'est assez simple vu que nous utilisons les autotools, nous aurons juste besoin de passer quelques arguments au script ./configure.&lt;/p&gt;


&lt;p&gt;Dans le cas présent, j'ai juste eu besoin de paraméter les fichiers configure.in et Makefile.am. Maintenant le &quot;make install&quot; copiera les man au bon endroit grâce à la directive man_MANS, les fichiers de /etc grâce à la directive sysconfdir et les scripts avec bin_SCRIPTS.&lt;/p&gt;


&lt;h3&gt;dch&lt;/h3&gt;


&lt;p&gt;Nous avons aussi besoin d'éditer le fichier de changelog qui permet de suivre les modifications qui seront faites sur le paquet debian.&lt;/p&gt;


&lt;p&gt;Pour faire ça, il faut lancer la commande dch, la première fois, ca nous aidera à écrire une courte notice à propos de notre première release.&lt;/p&gt;



&lt;p&gt;Mais la chose très intéressante avec cet outil est que ça devient très simple d'incrémenter la version du paquet et d'ajouter un commentaire à propos de cette mise à jour&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;$ dch -i &quot;cleaning update for integration in directMONITOR&quot;&lt;/pre&gt;


&lt;h3&gt;dpkg-buildpackage -rfakeroot&lt;/h3&gt;


&lt;h3&gt;vérification du paquet&lt;/h3&gt;


&lt;pre&gt;$ lintian -i s2a_0.0.1-1_i386.changes
$ lintian -i s2a_0.0.1-1_i386.changes&lt;/pre&gt;


&lt;h3&gt;Comment fabriquer son propre dépot de paquets (dupload)&lt;/h3&gt;


&lt;h4&gt;Côté serveur&lt;/h4&gt;


&lt;p&gt;La première fois&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;# mkdir /var/www/apt&lt;/pre&gt;


&lt;p&gt;Après chaque dupload:&lt;/p&gt;


&lt;pre&gt;ludo@obelix:/var/www/apt % apt-ftparchive release . &amp;gt; Release
ludo@obelix:/var/www/apt % gpg -abs -o Release.gpg Release&lt;/pre&gt;


&lt;h4&gt;Côté client (mainteneur debian)&lt;/h4&gt;


&lt;pre&gt;# aptitude install dupload&lt;/pre&gt;


&lt;h5&gt;/etc/dupload.conf&lt;/h5&gt;


&lt;pre&gt;$default_host = &quot;zoxx&quot;;
$cfg{'zoxx'} = {
        fqdn =&amp;gt; &quot;obelix.zoxx.net&quot;,
        method =&amp;gt; &quot;scpb&quot;,
        incoming =&amp;gt; &quot;/var/www/apt/&quot;,
        dinstall_runs =&amp;gt; 1,
};
$cfg{'zoxx'}{postupload}{'changes'} = &quot;
             echo 'cd /var/www/apt ;
             dpkg-scanpackages . /dev/null &amp;gt;Packages || true ;
             dpkg-scansources . /dev/null &amp;gt;Sources || true ;
             gzip -c Packages &amp;gt;Packages.gz ;
             gzip -c Sources &amp;gt;Sources.gz' | ssh obelix.zoxx.net  2&amp;gt;/dev/null ;
             echo 'Package archive created!'&quot;;&lt;/pre&gt;


&lt;h5&gt;dupload&lt;/h5&gt;


&lt;pre&gt;ludo@idefix:~ % dupload s2a_0.0.1-1_i386.changes
dupload note: no announcement will be sent.
Uploading (scpb) to obelix.zoxx.net:/var/www/apt/
[ job s2a_0.0.1-1_i386 from s2a_0.0.1-1_i386.changes                                                                                                         
 s2a_0.0.1-1_i386.deb, md5sum ok
 s2a_0.0.1-1.diff.gz, md5sum ok
 s2a_0.0.1.orig.tar.gz, md5sum ok
 s2a_0.0.1-1.dsc, md5sum ok     
 s2a_0.0.1-1_i386.changes ok ]
Uploading (scp) to zoxx (obelix.zoxx.net)
[ Uploading job s2a_0.0.1-1_i386
 s2a_0.0.1-1_i386.deb 16.6 kB, ok
 s2a_0.0.1-1.diff.gz 7.5 kB, ok
 s2a_0.0.1.orig.tar.gz 116.2 kB, ok
 s2a_0.0.1-1.dsc 0.3 kB, ok
 s2a_0.0.1-1_i386.changes 0.7 kB, ok
s2a_0.0.1-1_i386.deb                                                                                                                   100%   17KB  16.6KB/s   00:00
s2a_0.0.1-1.diff.gz                                                                                                                    100% 7730     7.6KB/s   00:00
s2a_0.0.1.orig.tar.gz                                                                                                                  100%  116KB 116.2KB/s   00:00
s2a_0.0.1-1.dsc                                                                                                                        100%  333     0.3KB/s   00:00
s2a_0.0.1-1_i386.changes                                                                                                               100%  711     0.7KB/s   00:00
 ]
Package archive created!
ludo@idefix:~ %&lt;/pre&gt;

&lt;h4&gt;Côté client (utilisateur debian)&lt;/h4&gt;


&lt;pre&gt;
# echo &quot;deb http://www.zoxx.net/apt ./&quot; &amp;gt;&amp;gt; /etc/apt/sources.list
# GET http://www.zoxx.net/ludo_gpg.asc | apt-key add -
OK
# aptitude update
# aptitude show s2a
Package: s2a
New: yes
State: installed
Automatically installed: no
Version: 0.0.1-2
Priority: optional
Section: admin
Maintainer: Ludovic Francois &amp;lt;lfrancois@datadirectnet.com&amp;gt;
Uncompressed Size: 442k
Depends: libc6 (&amp;gt;= 2.3.6-6)
Description: Monitoring and administration tools for DataDirect Networks s2a
 Monitoring and administration tools for DataDirect Networks s2a appliances.
This tools supports:
 * s2a6000
 * s2a3000
 * s2a8500
 * s2a9500
 You will find  the main binary named s2a, with  this binary you could get a
remote access on the storage system and make all cli monitoring and
administration tasks
 from your unix command line.
# aptitude install s2a&lt;/pre&gt;</description>
    
    
    
          <comments>http://www.zoxx.net/notes/index.php/post/2006/08/09/27-creer-un-paquet-debian-avec-dh_make-et-dpkg-buildpackage#comment-form</comments>
      <wfw:comment>http://www.zoxx.net/notes/index.php/post/2006/08/09/27-creer-un-paquet-debian-avec-dh_make-et-dpkg-buildpackage#comment-form</wfw:comment>
      <wfw:commentRss>http://www.zoxx.net/notes/index.php/feed/atom/comments/144</wfw:commentRss>
      </item>
    
</channel>
</rss>
