建立自己的ubuntu发行服务器for 龙芯
http://sns.akaedu.org/home/space.php?uid=2&do=blog&id=770
1.dupload *.changes
能将我们的软件上传到服务器上
但不是按照 pool/main/a/aalib/
而是将所有的放在信息放在 服务器的 / 目录下
研究结果使用 dupload + Reprepro创建成功
Code:
#!/bin/bash
echo "********** REPO CONTROL SCRIPT **********"
echo "******* CLOSE GEDIT TEXT EDITORS! *******"
echo "* *"
cd /home/user/Documents
mkdir -p Original_debs
mkdir -p Output_debs
mkdir -p tmp/DEBIAN
echo -n "Name of File with extension (Example: program.deb) > "
read FILE
cp $FILE /home/user/Documents/Original_debs/
dpkg-deb -x $FILE tmp/
dpkg-deb --control $FILE tmp/DEBIAN
echo "DEPACKAGING DONE. OPENING CONTROL FILE FOR EDIT..."
cd /home/user/Documents/tmp/DEBIAN
gedit control
cd /home/user/Documents/
echo "EDITING DONE."
echo "REPACKAGING..."
dpkg-deb -b tmp $FILE
cp $FILE /home/user/Desktop/repository/deb/
rm -r tmp/
echo "REPACKAGING COMPLETE. TEMP FILES REMOVED."
echo "REBUILDING REPOSITORY INFORMATION..."
cd /home/user/Desktop/repository/
dpkg-scanpackages -m . /dev/null | bzip2 -9c >Packages.bz2
dpkg-scanpackages -m . /dev/null | gzip -9c >Packages.gz
echo "REBUILDING REPOSITORY INFORMATION COMPLETE."
echo "FTP PROCESS IN PROGRESS...UPDATING REPOSITORY..."
ftp -n my.webhost.com<<END_SCRIPT
quote USER username
quote PASS password
cd public_html
cd deb
lcd /home/user/Desktop/repository/deb/
put $FILE
cd ..
lcd /home/user/Desktop/repository/
put Packages.bz2
put Packages.gz
put Release
by
END_SCRIPT
echo -n "FTP PROCESS DONE. "
cd /home/user/Documents/
mv $FILE /home/user/Documents/Output_debs/
cd /
echo "REPOSITORY UPDATED!"
echo "* *"
echo "********** REPO CONTROL SCRIPT **********"
dpkg-scanpackages -m . /dev/null | bzip2 -9c >Packages.bz2
使用Reprepro创建成功
Origin: Your Name
Label: Your own label
Suite: stable
Codename: sarge
Version: 3.1
Architectures: i386 all source
Components: main non-free contrib
Description: Your description
Origin: Your Name
Label: Your own label
Suite: unstable
Codename: sid
Architectures: i386 all source
Components: main non-free contrib
Description: Your description
skx@lappy:~/apt$ reprepro -Vb . include sarge
/home/skx/debian/sarge/reprepro/reprepro_0.6-1sarge0_i386.changes
Created directory "./db"
Created directory "./pool"
Created directory "./pool/main"
Created directory "./pool/main/r"
Created directory "./pool/main/r/reprepro"
db: 'reprepro' added to 'sarge|main|i386'.
db: 'reprepro' added to 'sarge|main|source'.
Created directory "./dists"
Created directory "./dists/sarge"
Created directory "./dists/sarge/main"
Created directory "./dists/sarge/main/binary-i386"
writing to './dists/sarge/main/binary-i386/Packages.new'...
writing to './dists/sarge/main/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/main/binary-all"
writing to './dists/sarge/main/binary-all/Packages.new'...
writing to './dists/sarge/main/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/main/source"
writing to './dists/sarge/main/source/Sources.gz.new'...
Created directory "./dists/sarge/non-free"
Created directory "./dists/sarge/non-free/binary-i386"
writing to './dists/sarge/non-free/binary-i386/Packages.new'...
writing to './dists/sarge/non-free/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/non-free/binary-all"
writing to './dists/sarge/non-free/binary-all/Packages.new'...
writing to './dists/sarge/non-free/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/non-free/source"
writing to './dists/sarge/non-free/source/Sources.gz.new'...
Created directory "./dists/sarge/contrib"
Created directory "./dists/sarge/contrib/binary-i386"
writing to './dists/sarge/contrib/binary-i386/Packages.new'...
writing to './dists/sarge/contrib/binary-i386/Packages.gz.new'...
Created directory "./dists/sarge/contrib/binary-all"
writing to './dists/sarge/contrib/binary-all/Packages.new'...
writing to './dists/sarge/contrib/binary-all/Packages.gz.new'...
Created directory "./dists/sarge/contrib/source"
writing to './dists/sarge/contrib/source/Sources.gz.new'...
sudo reprepro -Vb . includedeb lucid ../ubuntu10.04/pool/main/libpa*.deb
more conf/distributions
Origin: sns.akaedu.org
Label: Ubuntu
Suite: stable
Codename: lucid
Version: 10.04
Architectures: mipsel binary
Components: main free non-free
Description: Ubuntu 10.04 package repositories for mipsel(loongson)
Log: /var/log/repos/lucid.log
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关注。
楼主原创吗?